Codex with V0 unauthorized
Resolved 💬 3 comments Opened May 28, 2025 by heymaaz Closed Aug 7, 2025
What version of Codex is running?
0.1.2505172129
Which model were you using?
v0-1.0-md
What platform is your computer?
darwin | arm64 | 24.5.0
What steps can reproduce the bug?
Prerequisites:
- Vercel v0 Pro Plan: I have an active Vercel v0 Pro subscription.
- ChatGPT Organization with Credits: My OpenAI account is part of an organization, and it has sufficient credits.
- Ensure you have a Vercel v0 Pro plan.
- Ensure your OpenAI account is part of an organization with available credits.
- Follow the setup instructions for "v0 in OpenAI Codex CLI" from the Vercel documentation: https://vercel.com/docs/v0/codex
- Attempt to run a command that utilizes a
v0model through the OpenAI Codex CLI.codex --provider vercel --model v0-1.0-md
What is the expected behavior?
I expect to be able to successfully run and interact with Vercel v0 models via the OpenAI Codex CLI, given my active v0 Pro plan and available OpenAI organization credits. Specifically, I expect the CLI command to:
Successfully authenticate with the Vercel v0 API (via the V0_API_KEY).
Initiate a request to the v0-1.0-md model hosted by Vercel.
Return a response from the v0 model without any "Unauthorized" errors.
https://x.com/jaredpalmer/status/1925515251597844554
What do you see instead?
Error Message:
⚠️ OpenAI rejected the request. Error details: Status: 401, Code: unknown, Type: unknown, Message: 401 "Unauthorized". Please verify your settings and try again.
Additional information
Configuration:
Here is the content of my ~/.codex/config.json file:
{
"model": "v0-1.0-md",
"provider": "Vercel",
"providers": {
"openai": {
"name": "OpenAI",
"baseURL": "https://api.openai.com/v1",
"envKey": "OPENAI_API_KEY"
},
"openrouter": {
"name": "OpenRouter",
"baseURL": "https://openrouter.ai/api/v1",
"envKey": "OPENROUTER_API_KEY"
},
"azure": {
"name": "AzureOpenAI",
"baseURL": "https://YOUR_PROJECT_NAME.openai.azure.com/openai",
"envKey": "AZURE_OPENAI_API_KEY"
},
"gemini": {
"name": "Gemini",
"baseURL": "https://generativelanguage.googleapis.com/v1beta/openai",
"envKey": "GEMINI_API_KEY"
},
"ollama": {
"name": "Ollama",
"baseURL": "http://localhost:11434/v1",
"envKey": "OLLAMA_API_KEY"
},
"mistral": {
"name": "Mistral",
"baseURL": "https://api.mistral.ai/v1",
"envKey": "MISTRAL_API_KEY"
},
"deepseek": {
"name": "DeepSeek",
"baseURL": "https://api.deepseek.com",
"envKey": "DEEPSEEK_API_KEY"
},
"xai": {
"name": "xAI",
"baseURL": "https://api.x.ai/v1",
"envKey": "XAI_API_KEY"
},
"groq": {
"name": "Groq",
"baseURL": "https://api.groq.com/openai/v1",
"envKey": "GROQ_API_KEY"
},
"arceeai": {
"name": "ArceeAI",
"baseURL": "https://conductor.arcee.ai/v1",
"envKey": "ARCEEAI_API_KEY"
},
"vercel": {
"name": "Vercel",
"baseURL": "https://api.v0.dev/v1",
"envKey": "V0_API_KEY"
}
},
"disableResponseStorage": false,
"flexMode": false,
"reasoningEffort": "high",
"history": {
"maxSize": 1000,
"saveHistory": true,
"sensitivePatterns": []
},
"tools": {
"shell": {
"maxBytes": 10240,
"maxLines": 256
}
}
}
Here is the content of my cat ~/.zshrc file:
``` mdc
v0 key
export V0_API_KEY="v1:bo***ACJFAz:KrgS*27c"
openai oqood codex key
export OPENAI_API_KEY="sk-proj-*****Tdm0j8v-th4r_EA"
---
Any guidance or troubleshooting steps would be greatly appreciated!
3 Comments
fixed using
``` shell
export OPENAI_API_KEY="${V0_API_KEY}"
codex
This unfortunately hasn't fixed for me, I'm still getting the same issues. I've even directly copied your config.json..
Thank you for your feedback! Please try using the latest version of Codex CLI, as we're focused on the native/Rust implementation. If the issue persists, feel free to report it again.