← Back to Blog

How to Use Claude 3.5 in Cursor via OkRouter

Complete guide to integrating AI models in Cursor IDE with 20% cost savings

Updated: January 20255 min read

20% Cheaper

Save money compared to OpenRouter or direct APIs

500+ Models

Access Claude, GPT-4, DeepSeek, and more

5 Min Setup

Quick and easy configuration

Cursor is one of the most popular AI-powered code editors in 2025, and it works great with Claude 3.5 Sonnet, GPT-4, and other leading AI models. However, using these models directly or through OpenRouter can be expensive.

In this guide, you'll learn how to configure Cursor to use OkRouter, which gives you access to 500+ AI models at 20% lower cost than OpenRouter, with the same OpenAI-compatible API.

Prerequisites

  • Cursor IDE installed (download from cursor.sh)
  • OkRouter account (free signup at api.okrouter.com)
  • Basic understanding of API keys

Step-by-Step Setup Guide

1

Get Your OkRouter API Key

First, you need to create an OkRouter account and get your API key.

  1. Visit api.okrouter.com/login
  2. Sign up for a free account (no credit card required)
  3. Navigate to the API Keys section in your dashboard
  4. Click "Create New API Key" and copy it

💡 Pro Tip:

OkRouter offers a generous free tier to get started. You only pay for what you use after that.

2

Open Cursor Settings

Configure Cursor to use a custom API provider.

  1. Open Cursor IDE
  2. Press Cmd/Ctrl + , to open Settings
  3. Navigate to Models or AI Settings
  4. Look for "Custom API Provider" or "OpenAI Compatible API"
3

Configure OkRouter API

Add OkRouter as your API provider with the correct settings.

https://api.okrouter.com/v1
sk-okr-your-api-key-here
claude-3-5-sonnet-20241022

⚠️ Important:

Make sure to include /v1 at the end of the base URL for OpenAI compatibility.

4

Choose Your AI Model

Select from 500+ available models based on your needs.

Popular Models for Cursor:

Claude 3.5 Sonnet$2.40/1M tokens

Best for code generation and complex reasoning

claude-3-5-sonnet-20241022
GPT-4 Turbo$8.00/1M tokens

Excellent for general coding tasks

gpt-4-turbo
DeepSeek V3$0.27/1M tokens

Most cost-effective for high-volume usage

deepseek-chat
View all 500+ models →
5

Test Your Setup

Verify that everything is working correctly.

  1. Open any code file in Cursor
  2. Press Cmd/Ctrl + K to open the AI chat
  3. Type a simple prompt like "Write a hello world function"
  4. Verify that you get a response from your selected model

✅ Success!

If you see a response, your setup is complete. You're now using AI models at 20% lower cost!

Cost Comparison: OkRouter vs OpenRouter

ModelOpenRouterOkRouterSavings
Claude 3.5 Sonnet$3.00/1M$2.40/1M20%
GPT-4 Turbo$10.00/1M$8.00/1M20%
DeepSeek V3$0.35/1M$0.27/1M23%

* Prices are approximate and may vary. Check our pricing page for current rates.

Troubleshooting Common Issues

❌ "Invalid API Key" Error

Make sure you copied the entire API key from your OkRouter dashboard. API keys start with sk-okr-.

❌ "Connection Failed" Error

Verify that your base URL is exactly https://api.okrouter.com/v1 (including the /v1).

❌ "Model Not Found" Error

Check that you're using the correct model ID. Visit our models page for the full list.

❌ Slow Response Times

OkRouter has automatic failover. If one provider is slow, try switching to a different model or contact support.

Frequently Asked Questions

Can I use multiple models in Cursor?

Yes! You can configure multiple API providers in Cursor and switch between them. Set up OkRouter for cost-effective access to 500+ models.

Is OkRouter compatible with all Cursor features?

Yes, OkRouter is 100% OpenAI-compatible, so all Cursor features work seamlessly including chat, code completion, and inline editing.

How much will I save compared to OpenRouter?

On average, you'll save 20% on all models. For high-volume usage, this can add up to hundreds of dollars per month.

Can I switch back to OpenRouter if needed?

Absolutely! Just change the base URL and API key in your Cursor settings. There's no lock-in.

Start Using AI in Cursor for 20% Less

Get your free OkRouter API key and start saving today