Is it possible to use Cursor with our APIs from open-source LLMs like GLM 4.5, Qwen3, etc? If not, can you guys suggest an alternative, please?
Hey, yes, you can use your API keys for these models, but unfortunately, Cursor might not support some API providers. However, you can use OpenRouter, as Cursor supports this API provider.
So, get the API via the OpenRouter and then use that specific API via the cursor interface? Will it work as an agent or just asking?
You need to register on OpenRouter, then create your API key. After that, you need to add it in Cursor and override the base URL to this address: https://openrouter.ai/api/v1
, and add the model name to the list of models. Yes, it will work in agent mode.
HI deanrie, thank you for the screenshots, but it does not work here. I wonder, is there anything wrong with our current 1 year Cursor plan? Please advise.
You have the model added incorrectly, it should be openrouter/horizon-beta
.
I typed that name there, had no idea that the typed name has to be EXACTLY that, will try again and let you know.
Update: Nah, does not work. When I click on verify API, nothing happens. Not a single bip (good, bad, error…nada). I now typed the exact name as you stated but I get the exact error.
Try enabling all the settings here, and also try adding any other model, for example google/gemini-2.5-flash-lite
Geeee, you’re a genius, that did it! Thank you so much <3
Update: It kind of works, but we keep getting this error:
Any idea what’s wrong or how to avoid it?
UPDATE: it is unusable now, none of the API keys are working, seems like a Cursor bug or block, please advise.
Hi, is it possible to separate openAI api keys and various providers like openrouter? Right now, setting this up makes o3 and other openAI model unusable, so it is impossible to use openrouter and openAI models at the same time, which is quite sad.
i have this kind problem too, since its bug. its this acknowladge by dev @deanrie ?
Yes, it’s a bug. I hope we fix it soon.
Thanks for the feedback. I understand that another field for the API key would be useful, and I’ll let the team know about it.
I just checked and everything is working for me. It might have been temporary. Let me know if it works for you.
We encountered the same bug with all other models. To get it working again, we had to remove Horizon Beta and stop the API key. It’s definitely a Cursor bug; I hope you can investigate and get to the bottom of it.
Hey, could it be that the API key is incorrect? If you previously had a different API key for OpenAI, try re-entering the key and clicking verify.
No, it kind of works now with the same API, but I’m getting a new error after each completed prompt, see attached.
UPDATE: it throws this error only when editing files.
If we’re just chatting, it works like a charm.
As soon as it edits a line of code, that error appears instantly.