How can i both use custom api and cursor pro

i add a custom api in openai api key, but then i can’t use my cursor pro to use gemini or claude.

it 's crazy

if i want to use custom model, i need to turn on my api key without use other cursor pro models,

if i want to use cursor pro model, i must open cursor settings and turn off my api key, then i can’t use custom model

2 Likes

Yes, that’s a bit annoying. It wasn’t like this in the previous versions.

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.

1 Like

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.

1 Like

thank u!!! and wait for your fix

Hey! Any plan to make both work simultaneously? Thanks!

Hey, it’s already working in version 0.49.

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.

I’ll try to check this again, thanks.

Hey again!
Sorry to bother. Any update so far?
Thanks!

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.

Hi I am having an issue using custom APIs. I was able to use them in the previous version but when I updated to latest one, I am having this issue.

Free users can only use GPT 4.1 or Auto as premium models
(Request ID: 8ff1e929-027b-4de1-8cfd-c673fb689111)

I don’t have a cursor pro subscription now or before but I have a working claude api which I tested using CLI and it gave me this results.

Hey, thanks, we’ll check it.

I think we fixed it.

Yes it’s fixed, thanks a lot.
I have another doubt if the MAX mode is free with custom api or do we have to be a pro user?

Yes, you need to have a Pro subscription to use this mode.