How To Use Claude 3 on Cursor AI

Luc Pimentel - AI Insights
AI Creators
Published in
3 min readMar 16, 2024

Everyone’s talking about Claude 3.

They say it’s better than ChatGPT 4 for coding.

But if you’re using Cursor AI as your main IDE, you probably haven’t tried it yet.

So let me show you how to configure Cursor to use Claude 3 instead of GPT.

You don’t even need to make an Antropic account. (Which is great news for those not in the US)

Let’s dive in.

1. Use OpenRouter AI

OpenRouter AI is an AI model aggregator.

You can access models like GPT-4 32K, Google PaLM, Anthropic via their API.

2. Fund Your Open Router Account

Next step is to add funds to your OpenRouter account just as you would to any AI API service.

Keep in mind that you’re not paying for any subscription service.

You’re paying for how much you use it, just like if you were using Anthropic AI directly.

3. Get Your API Key

After funding your account, the next step is to get your API key.

On the top right corner, go to: Account -> Keys -> Create Key.

4. Go to Cursor AI and Open the Settings

Next, head over to Cursor AI and open the AI settings.

This is where you’ll configure the available models to include Claude 3 models.

Scroll down in the Cursor AI settings, and click on the “Configure Models” tab.

Then, click on “Add Models” -> Override OpenAI base URL and add the the following URL:

https://openrouter.ai/api/v1

Next, click on add models and add the following models:

• anthropic/claude-3-opus
• anthropic/claude-3-haiku
• anthropic/claude-3-sonnet

It’s crucial that you use the exact name for both the model and the base URL.

Because this is how Cursor AI will connect to the API endpoint.

Don’t change a single letter. If you do, the API connection will fail and you won’t be able to use the model.

5. Enter Your OpenRouter API key

Now, enter the API key you received from OpenRouter below the OpenAI API key section, and click to test.

Then, you’ll be ready to start using Claude3 through CursorAI.

This method also works for any other model you want to try, as long as it’s available on OpenRouter.

So whenever there is a new important AI release, integrating it with Cursor will be very easy.

And that’s it for this tutorial!

If you liked it, you’ll also like my Ultimate Prompting Guide.

Where I will teach you how to create highly effective prompts and AI automations.

Here’s what you will learn:

  • Easy step-by-step approach to create highly-reliable super prompts.
  • The right way to create prompts that are highly contextual to you;
  • Discover the best prompt engineering guidelines available today;
  • The simplest step-by-step approach to create AI automation workflows;
  • How to create AI apps with Python

Please check it out: https://lucasaibuilder.gumroad.com/l/ultimate_prompting

--

--

Luc Pimentel - AI Insights
AI Creators

Exploring where AI meets Marketing, Automation and Growth 💼📈 Teaching you to become a leveraged creator with AI