Hey, yes, if you need models from your subscription, you need to disable your API key each time if you’re using the OpenAI API or compatible APIs like OpenRouter in your case. You can use the shortcut Cmd/Ctrl + Shift + 0 for quickly enabling/disabling the API key.
Regarding the “Unauthorized User API key” error, it occurs if you try to use other providers like Anthropic or Google. This happens because your base URL for OpenAI is changed. I hope we’ll fix this soon.
It has always been this way, you couldn’t use the API key and your subscription models simultaneously because, in this case, all requests go through your API key.
Hi!
As of 0.49.4, it’s not working. When using the custom API, I’m getting this error for Cursor models:
Request failed with status code 400: {“code”:“Client specified an invalid argument”,“error”:“Incorrect API key provided: … You can obtain an API key from https://console.x.ai.”}.
It seems like it still looks for a custom API, even for Cursor models.
It’s possible that the API key from Grok doesn’t work in Cursor. OpenAI, Anthropic, Google, and Operouter should work without issues. I’ve checked, even if they are all enabled simultaneously. Can you check this with another provider and let me know if the problem persists?
Weirdly, none of them are working. I’m trying with the OpenRouter custom API. None of the models (DeepSeek, Sonnet 3.5, Grok-3) worked. Only GPT-4o worked, but when I checked the OpenRouter activity dashboard, I realised it used the custom API, not Cursor.
Yes, sorry for the delay. It seems that at the moment this doesn’t work specifically with OpenRouter. It somehow picks up OpenAI models, which wasn’t the case before. I’ll try to find out from them.
However, you need to understand that this won’t work if your API has models with similar names. For example, if you have the OpenAI API key enabled, you can use both API models and Cursor models that are not related to OpenAI simultaneously. The same goes for other API keys. In such cases, we can’t identify which model you want to use, the subscription model or the API key model, since the model names are the same.
Thanks for the clarification. I’d rather use free models (e.g., Gemini, stealth models) via the OpenRouter API. For OpenAI, I always use my Cursor models via my Plus subscription.