Hey, thanks for the report. The “Unauthorized User API key” error is often related to a bug with the “Override OpenAI Base URL” toggle.
Please try:
- Settings > Models > API Keys: turn off “Override OpenAI Base URL” and clear the Base URL field.
- Fully close Cursor (Cmd+Q) and restart it.
- If you’re using OpenRouter or any custom OpenAI-compatible endpoint - it’s not supported yet and causes these errors: Unauthorized User API key - OpenRouter + Anthropic API Key
If the toggle turns on by itself, that’s a known bug (being worked on):
- Thread: Override OpenAI Base URL toggle switch turn on automatically after few seconds no matter how many times I turn off
- Also see similar case: API Keys for ChatGPT and Anthropic Failing
Can you share:
- A screenshot of Settings > Models > API Keys (toggle state and Base URL)
- Which model and provider (OpenAI/Anthropic/Google/Azure/AWS)
- Console errors (Help > Toggle Developer Tools) when the error appears
Let me know if this helps. If not, we’ll escalate it further.