Anthropic (Claude) API Key Not Working in Cursor — Always Returns “Bad User API Key / Unauthorized”

Hey, thanks for the report.

It looks like you’ve hit a known bug with the “Override OpenAI Base URL” toggle, which breaks Anthropic requests and returns “Bad User API key / Unauthorized.” Confirmation and workaround here:

What to try now:

  • Settings → Models → API Keys → turn off Override OpenAI Base URL
  • Make sure it didn’t turn itself back on after a request
  • Restart Cursor, open a new chat, select a Claude model, and try again

If the issue remains, please send:

  • The Request ID from the chat menu at the time of the error
  • A screenshot of Settings → Models → API Keys with the toggles visible
  • The exact error text and a screenshot
  • Console logs from Help → Toggle Developer Tools → Console
  • Confirmation that Override OpenAI Base URL is definitely off

I’ll add your details to the ongoing fix. Let me know if the workaround helps.