Cursor: Unlock Advanced AI Models with OpenRouter

20 January 2025

AI

Introduction

Ever wanted to use advanced AI models in Cursor without paying for a Pro subscription? You're in luck! OpenRouter makes it super easy to connect powerful AI models like GPT-4o, Claude 3.5 Sonnet, and more—without breaking the bank. In this guide, I'll show you exactly how to set it up in just a few steps.

Why OpenRouter?

Think of OpenRouter as your all-access pass to some of the best AI models out there. Instead of being locked into one provider, you get to pick and choose from a variety of options, including:

  • Claude 3.5 Sonnet – A smart, fast AI from Anthropic.
  • GPT-4o – OpenAI’s latest powerhouse for deep reasoning and creativity.
  • Gemini 1.5 Pro – Google’s top-tier AI for versatile tasks.
  • Deepseek Coder V2 – A specialized AI assistant for coding.

The best part? You can seamlessly integrate these models into Cursor without needing a Pro plan. Let’s set it up!

How to Use Openrouter in Cursor

1. Get Your OpenRouter API Key

  1. Head over to OpenRouter and create an account.
  2. Navigate to your settings and generate an API key.

2. Configure Cursor to Use OpenRouter

  1. Open Cursor and go to Cursor Settings (typically using Ctrl+Shift+J or Cmd+Shift+J).

Cursor Settings

  1. Go to the Models tab.

Models Tab

  1. In the Override OpenAI Base URL field, enter:
https://openrouter.ai/api/v1
  1. Paste your OpenRouter API key into the OpenAI API Key field.
  2. Hit Save, and restart Cursor if necessary.
  3. Choose one of OpenRouter’s supported models, like gpt-4o or claude-3.5-sonnet or whatever models you prefer.

Add OpenRouter’s Model

Now you are good to go! 🎉

Press Command + L and Try it out with a prompt and see the magic happen! Demo

Final Thoughts

And that’s it! With OpenRouter, you can access top-tier AI models tailored to your needs—whether for coding, brainstorming, or AI-assisted development. Stay updated with Cursor and OpenRouter’s docs as features evolve, and experiment to find the best fit for your workflow. Give it a try, and if you run into any issues, check out the OpenRouter Docs or tweak Cursor’s settings. 🚀