OpenAI Codex
Use v0 inside OpenAI Codex to run prompts from the terminal.
The Codex CLI lets you run prompts from the terminal using the v0-1.5-md model over the v0 API.
Prerequisites
- You have Node.js installed.
Install Codex CLI
Install Codex globally:
Set your API key
Set your v0 API key as an environment variable:
You can add this line to your shell profile (e.g. ~/.zshrc or ~/.bashrc)
for persistence.
Configure Codex
Create a config file at ~/.codex/config.toml:
Make sure the env_key matches the V0_API_KEY environment variable.
Run Codex
You can now run Codex using the v0-1.5-md model:
This will open a prompt in your terminal where you can interact with the model.
By using our API, you agree to our API Terms.