Can I use open router in cursor chat or agent?

Is there a way to use models from open router by the api key?

I mean, I have credits in open router to use different kind of models, and I would like to use them in cursor chat or agent (or both) like we do in open code

Is this possible? Thanks!

Hey, OpenRouter isn’t officially supported as a BYOK provider yet. The only ones in the list are OpenAI, Anthropic, Google AI, Azure OpenAI, and AWS Bedrock.

There’s a workaround using Override OpenAI Base URL, and it works partially:

  1. Cursor Settings → Models → API Keys, enable OpenAI API Key and paste your OpenRouter key
  2. Turn on Override OpenAI Base URL and set it to https://openrouter.ai/api/v1
  3. Add the models you want using their OpenRouter model IDs

Details and discussion in the canonical thread: How to add open router api key and use its models

Caveats to keep in mind:

  • Models that overlap with built-in ones like Claude Sonnet, GPT-5, etc. can break because of conflicts with Cursor’s internal name mapping
  • There’s no model catalog sync with OpenRouter, so you have to add everything manually
  • Some agent features may be limited in BYOK mode
  • Chat is usually more stable than Agent

If you want native support, there’s an open feature request you can upvote: It would be great we can connect OpenRouter by API Key