Integration Guide

How to Use DeepSeek in Cursor (Agent Mode)

Cursor lets you bring your own model key, and DeepSeek ships an OpenAI-compatible API, so on paper the two snap together: point Cursor at https://api.deepseek.com, paste your key, name the model deepseek-v4-pro. The honest catch is agent mode. Cursor's own docs say custom API keys work with chat models only, and its proprietary agent/Composer models are a separate lane — so what actually runs in Agent when you switch to DeepSeek is the part worth getting right. This guide gives you the verified setup, marks the community-only details as unverified, notes what to expect in agent mode, and shows the gateway alternative that hands Cursor one OpenAI-compatible endpoint for DeepSeek and everything else.

Adding DeepSeek to Cursor through custom OpenAI-compatible model settings

Can you use DeepSeek in Cursor?

Yes for chat — with a caveat for agent mode. Cursor supports bringing your own model key, and DeepSeek publishes an OpenAI-compatible API, so you can wire DeepSeek into Cursor's chat in a few minutes. The important nuance up front, straight from Cursor's documentation:

If your goal is simply "use DeepSeek for coding help inside Cursor," the setup below does that. If your goal is specifically the autonomous agent, read the caveat first.

Add DeepSeek as a custom model in Cursor

The verified path is Cursor Settings → Models, then paste and verify your key. Cursor's official flow for a bring-your-own key is short:

  1. Open Cursor Settings → Models.
  2. Select your provider and paste your API key into the text field.
  3. Click Verify to confirm the key works.
  4. Click Save.

That four-step flow — Settings → Models → paste key → Verify → Save — is documented on Cursor's official API keys help page.

Where the docs stop and the community begins. DeepSeek is not one of Cursor's five officially supported key providers (those are OpenAI, Anthropic, Google, Azure OpenAI and AWS Bedrock). To point Cursor at DeepSeek you rely on Cursor's OpenAI-compatible custom-model support. The exact UI for that — a "+ Add Custom Model" button, an "Override OpenAI Base URL" toggle, a "Public Model Name" field — is described in community forum threads and third-party guides, not in Cursor's primary docs as of this writing. So the labels below may differ in your Cursor version; look for the model-provider settings and its custom/base-URL controls rather than trusting an exact string.

Working generically within the model-provider settings, you supply three things: the base URL, the model name, and the API key. DeepSeek's values:

# DeepSeek — OpenAI-compatible endpoint
Base URL:    https://api.deepseek.com
Model name:  deepseek-v4-pro   # or deepseek-v4-flash
API key:     sk-...your DeepSeek key...

Enter those in the custom-model / base-URL fields, paste the key, run Verify, then Save. Cursor sends the OpenAI-shaped request to DeepSeek, and DeepSeek answers in the chat pane.

DeepSeek base URL and model ids

Use https://api.deepseek.com and a current deepseek-v4-* id — the old aliases are on a sunset clock. DeepSeek's own docs pass base_url="https://api.deepseek.com" and model="deepseek-v4-pro" in their getting-started example. The full picture:

FieldValueNotes
Base URL (OpenAI-compatible)https://api.deepseek.comUse this for Cursor's OpenAI-compatible custom model
Anthropic-compatible endpointhttps://api.deepseek.com/anthropicFor tools that speak the Anthropic API shape
Current model iddeepseek-v4-proRecommended — highest-capability current model
Current model iddeepseek-v4-flashRecommended — faster / lighter current model
Legacy aliasdeepseek-chatNon-thinking mode of deepseek-v4-flash; deprecated, sunset 2026/07/24
Legacy aliasdeepseek-reasonerThinking mode of deepseek-v4-flash; deprecated, sunset 2026/07/24

The two legacy ids — deepseek-chat and deepseek-reasoner — still resolve but are deprecated with a stated sunset date of 2026/07/24. Since that date is essentially now, prefer the deepseek-v4-pro / deepseek-v4-flash ids and verify in DeepSeek's API docs whether the aliases are still live for your account before relying on them.

What works in agent mode

Chat answers will run on DeepSeek; the autonomous agent loop is the uncertain part — and Cursor's docs do not promise it. Here is the layered reality, kept honest about what is documented versus reported:

Cursor featureRuns on your DeepSeek key?Basis
Chat pane (ask a question)YesCursor docs: custom keys work with chat models
Tab / autocompleteNoCursor docs: Tab keeps using built-in models
Agent / Composer loopNot documentedNo official statement; community reports mixed (see below)

The nuance that trips people up: Cursor's agent (Composer) capability is built around Cursor's own proprietary models, and the official docs only commit to custom keys working with "chat models." They do not say a bring-your-own model will or will not drive the full multi-step agent loop.

On the community side, some users report Cursor's agent/Composer models returning errors such as "this model does not support custom APIs" when a BYOK key is active. That is user-reported on the Cursor forum, not an official limitation — see the forum thread — so do not take it as gospel. The practical takeaway:

Your DeepSeekkey + base URL Chat panedocumented: yes Tab / autocompletedocs: built-in only Agent / Composerundocumented — test it DeepSeek answers in chat— reliable path Verify on your account;fall back to chat or a gateway
Cursor's three lanes for a custom DeepSeek key. "Documented" = Cursor API-keys help page (July 2026); agent behaviour is community-reported and unverified.

What Cursor officially supports (and where DeepSeek fits)

Cursor's bring-your-own-key feature names five providers — DeepSeek is not one, so it rides in through OpenAI-compatible custom-model support. Per Cursor's docs, the officially supported key providers are:

DeepSeek reaches Cursor by looking like OpenAI — same request shape, different base URL. That is exactly why an OpenAI-compatible endpoint is the universal adapter for tools like this; the same trick works in Aider, Dify and LangChain. If DeepSeek is your target because of price, the cheapest-LLM-API breakdown puts it in context against the field; for the coding angle specifically, see the best coding models of 2026.

Data privacy when you use your own key

A custom key means Cursor's Zero Data Retention no longer applies, and your requests still pass through Cursor's servers. Cursor is explicit: when you use your own API keys, its Zero Data Retention policy does not apply, and data handling follows the privacy policy of your chosen provider — here, DeepSeek. And importantly, API requests are still routed through Cursor's servers even with a custom key. So bringing your own DeepSeek key changes whose retention terms govern the prompt, not whether Cursor is in the request path. If that routing matters for your data-governance posture, weigh it before switching — and confirm current wording on Cursor's API keys page.

The one-key alternative: a gateway Cursor can point at

Because a gateway is just another OpenAI-compatible endpoint, Cursor can point at one URL and reach DeepSeek — plus every other model — on a single key. The per-provider approach means a separate key, base URL and set of caveats for DeepSeek, then again for the next model. A gateway collapses that: you configure one OpenAI-compatible base URL once, and switch models by name.

# DataLLM Lab as Cursor's OpenAI-compatible endpoint
Base URL:    https://www.datallmlab.com/v1
Model name:  deepseek-v4-pro      # or any other model id
API key:     sk-...your DataLLM Lab key...

This is standard OpenAI-compatible configuration, not an official Cursor integration — DataLLM Lab does not claim built-in Cursor support, it simply speaks the protocol Cursor already sends. The upside for a setup like this:

The same caveats as any custom model still apply inside Cursor: chat is the documented path, and agent/Composer behaviour is worth verifying on your account.

Point Cursor at one endpoint, reach every model

DataLLM Lab is OpenAI-compatible — set https://www.datallmlab.com/v1 as your base URL and one key reaches DeepSeek and 300+ other models, with routing and failover built in.

FAQ

Can I use DeepSeek in Cursor?

Yes for chat. DeepSeek has an OpenAI-compatible API and Cursor supports custom keys: Settings → Models, paste the key, Verify, Save. Cursor's docs note custom keys work with chat models only — Tab autocomplete keeps using Cursor's built-in models.

What base URL and model id do I use?

Base URL https://api.deepseek.com; current model ids deepseek-v4-pro and deepseek-v4-flash. The legacy deepseek-chat and deepseek-reasoner still resolve but are deprecated with a sunset of 2026/07/24 — prefer the v4 ids.

Does DeepSeek work in Cursor agent mode?

Cursor's docs commit only to custom keys working with chat models; agent/Composer runs on Cursor's own models. Whether a custom DeepSeek key drives the agent loop is undocumented — community reports are mixed, so test it on your account rather than assuming.

Where do I paste a custom key in Cursor?

Cursor Settings → Models: select the provider, paste the key, click Verify, then Save. DeepSeek isn't one of the five officially supported providers, so you use Cursor's OpenAI-compatible custom-model settings; those exact UI labels come from community guides and may differ by version.

Is my data private with my own key?

When you use your own key, Cursor's Zero Data Retention does not apply — DeepSeek's privacy policy governs the data. Requests are still routed through Cursor's servers even with a custom key.

Can a gateway make this easier?

Yes. DataLLM Lab is OpenAI-compatible, so Cursor can point at https://www.datallmlab.com/v1 with one key and reach DeepSeek or any model by name — standard OpenAI-compatible configuration, not an official Cursor integration, with routing and failover on top.

Written by
Kevin Fan

Founder of DataLLM Lab, the unified LLM gateway. Kevin tests models the boring way — same prompts, real costs, unedited outputs — and writes up what the runs actually show.

One API for every model

One API, every model.

Get a single API key for Claude Opus 4.7, GPT-5.4, and 300+ more — with automatic price comparison and routing to the best model for every request.