Automation & toolsAny device6 min read

How to Use DeepSeek in Cursor in 2026 (Custom OpenAI Base URL, Step by Step)

Paste a DeepSeek-compatible key into Cursor's OpenAI API Key field, turn on Override OpenAI Base URL, add the model ID. Chat and Agent use it; Tab doesn't.

On this page
  1. What you need
  2. Where to get DeepSeek V4.1 Flash, and what it costs
  3. Set up DeepSeek in Cursor, step by step
  4. What DeepSeek in Cursor costs in a month
  5. Use Off Grid AI Boost in Cursor
  6. Not working? Symptom, check, fix
  7. FAQ

To use DeepSeek in Cursor, open Cursor Settings > Models, paste your key into OpenAI API Key, turn on Override OpenAI Base URL and enter https://api.deepseek.com, then add deepseek-flash with + Add model. DeepSeek V4.1 Flash costs $0.30 in and $1.20 out per million tokens at peak. Want one flat bill instead? Boost covers DeepSeek from $4.99 a month.

See the Boost plans

What you need

  • Cursor on a plan that takes your own key. Cursor’s bring-your-own-key page says your provider bills you directly, and on individual plans those requests don’t draw from your included usage.
  • A key from a host that serves DeepSeek V4.1 Flash with an OpenAI-compatible API. DeepSeek’s own API, OpenRouter and the hosts in the table below all work this way.
  • The model ID that host uses. It differs per host, so copy it from the table.

Where to get DeepSeek V4.1 Flash, and what it costs

Price per million tokens, input / output. Each price links to the provider’s own pricing page.

Host Base URL for Cursor Model ID Price per 1M (in / out)
DeepSeek API https://api.deepseek.com deepseek-flash $0.30 / $1.20 peak, $0.15 / $0.60 off-peak
OpenRouter https://openrouter.ai/api/v1/cursor deepseek/deepseek-v4.1-flash $0.051 / $0.567, plus 5.5% on credits
NanoGPT https://api.nano-gpt.com/api/v1 deepseek/deepseek-v4.1-flash $0.039 / $0.40
DeepInfra https://api.deepinfra.com/v1/openai deepseek-ai/DeepSeek-V4.1-Flash $0.14 / $0.42
Off Grid AI Boost Arrives with your key Arrives with your key Flat plan from $4.99 a month, usage worth twice the price

Base URLs come from each host’s own docs: DeepSeek, OpenRouter’s Cursor guide, NanoGPT and DeepInfra. DeepSeek’s off-peak price is half the peak price; peak hours are 01:00 to 04:00 and 06:00 to 10:00 UTC on weekdays.

Set up DeepSeek in Cursor, step by step

  1. Get a key. For DeepSeek’s own API, create one at platform.deepseek.com/api_keys. For OpenRouter, create one on its API Keys page; it starts with sk-or-.
  2. Open Cursor Settings. Press Cmd+, on a Mac or Ctrl+, on Windows and Linux, then go to Models.
  3. Add the key. Under API Keys, turn on OpenAI API Key and paste your DeepSeek or OpenRouter key into that field. OpenAI-compatible hosts go in the OpenAI slot.
  4. Set the base URL. Turn on Override OpenAI Base URL and enter the base URL from the table. For OpenRouter, use the /cursor endpoint. OpenRouter’s guide says the generic /api/v1 URL can cause tool call problems in Cursor.
  5. Add the model. In the Models section, click + Add model and type the model ID exactly, for example deepseek-flash for DeepSeek’s API.
  6. Pick it and test. Open the model picker in the chat or agent panel, choose the model you added and send a short prompt. A normal reply means the key, URL and model ID all match.

The setting labels come from OpenRouter’s Cursor guide, since Cursor’s own help page covers adding a key but not the base URL override.

What uses DeepSeek once it’s set

  • Chat and Agent use your model when you pick it in the model picker.
  • Tab completion doesn’t. Cursor’s help page says “Tab completion continues using Cursor’s built-in models.”
  • Reasoning effort isn’t sent for overridden models, so requests run at the model’s default, per OpenRouter’s guide.

What DeepSeek in Cursor costs in a month

Say your agent sends 3M tokens a day, 3 input tokens for every output token. That’s 90M tokens a month: 67.5M in and 22.5M out.

  • DeepSeek API, peak hours: 67.5 × $0.30 + 22.5 × $1.20 = $20.25 + $27.00 = $47.25
  • DeepSeek API, all off-peak: 67.5 × $0.15 + 22.5 × $0.60 = $23.63
  • DeepInfra: 67.5 × $0.14 + 22.5 × $0.42 = $9.45 + $9.45 = $18.90
  • NanoGPT: 67.5 × $0.039 + 22.5 × $0.40 = $2.63 + $9.00 = $11.63
  • Boost Pro, cohort 1: $9.99 a month, with $19.99 of usage included at each model’s token rate

DeepSeek’s own API also charges $0.006 per million input tokens on a cache hit at peak, so a long system prompt you resend every call gets much cheaper there. The cheapest host for every open model is in the API price index, and the full per-model table is in cheapest OpenRouter alternatives, price per million tokens.

Use Off Grid AI Boost in Cursor

Boost is one OpenAI-compatible key for open models, Qwen 3.8 and DeepSeek V4.1 Flash among them. It goes into the same three Cursor fields:

  1. OpenAI API Key: your Boost key.
  2. Override OpenAI Base URL: the Boost base URL. It isn’t published yet; it comes in the email with your key.
  3. + Add model: the Boost model ID for DeepSeek or Qwen, listed with your key.

You pay one flat price: Starter $4.99, Pro $9.99 or Max $49.99 a month for cohort 1, half the regular price for as long as you stay. Each plan includes usage worth its full regular price every month, and you can top up any time. “We don’t keep your prompts or train on them.”

Boost is a pre-order. Your key arrives by email in January 2027 and your plan starts that day. If it misses January, you get all your money back. If you need DeepSeek in Cursor today, use DeepSeek’s API or OpenRouter now and switch the three fields when your key lands.

One thing to know about privacy in Cursor: Cursor sends your key to its backend with every request, because it builds the final prompt on its own servers. Its help page also says Cursor’s Zero Data Retention doesn’t cover your own keys; your provider’s policy applies. More on which hosts keep prompts is in the best private LLM APIs.

Not working? Symptom, check, fix

Symptom Check Fix
Cursor’s built-in GPT models fail or hit your provider Override OpenAI Base URL is on Cursor routes every OpenAI-family request to your URL while it’s on. Cursor staff confirmed this on the forum. Turn it off to use Cursor’s models, back on for DeepSeek
“Model not found” or a 400 error The model ID doesn’t match the host Copy the exact ID from the table: deepseek-flash on DeepSeek, deepseek/deepseek-v4.1-flash on OpenRouter and NanoGPT
404 on every request The base URL has an extra path, like /chat/completions Enter only the base URL from the table, the same one the host gives for the OpenAI SDK
Agent tool calls break on OpenRouter You used https://openrouter.ai/api/v1 Switch to https://openrouter.ai/api/v1/cursor
401 or “invalid key” The key is in the wrong field, or it belongs to another host Put it in OpenAI API Key and match it to the base URL’s host
Tab suggestions don’t change Tab never uses your key That’s expected. Only Chat and Agent use your model
The bill is higher than you planned Peak-hour DeepSeek pricing, or an agent that loops Run heavy jobs off-peak, move to a cheaper host, or go flat with Boost

FAQ

Can I use DeepSeek in Cursor? Yes. In Cursor Settings > Models, paste a key into OpenAI API Key, turn on Override OpenAI Base URL, enter the provider’s base URL, then add the DeepSeek model ID with + Add model. Chat and Agent use it. Tab completion keeps using Cursor’s own models.

What base URL do I use for DeepSeek in Cursor? For DeepSeek’s own API, https://api.deepseek.com with the model ID deepseek-flash. For OpenRouter, use https://openrouter.ai/api/v1/cursor, the endpoint OpenRouter built for Cursor, with deepseek/deepseek-v4.1-flash.

Why did Cursor’s own models stop working after I set a base URL? While Override OpenAI Base URL is on, Cursor sends every OpenAI-family request to your endpoint, its own managed models included. Cursor staff confirmed this on the Cursor forum. Turn the override off to use Cursor’s models, then back on for DeepSeek.

Does my own DeepSeek key count against Cursor’s included usage? On individual plans, no. Your provider bills you for those requests. On Teams and Enterprise plans, own-key requests can still carry Cursor’s token rate of $0.25 per million tokens.

Can I use Off Grid AI Boost in Cursor? Boost is OpenAI-compatible, so it uses the same three fields: your Boost key, the Boost base URL and a model ID. Boost is a pre-order, and the base URL arrives with your key in January 2027. Use DeepSeek’s API or OpenRouter until then.

Using another editor? The same key works in Cline and Roo Code and in Claude Code through an Anthropic-compatible endpoint.

Pre-order Boost from $4.99 a month

DID THIS LAND?
UPDATES FROM THE CREATOR