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.
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:
- Custom keys drive chat models only. Cursor states plainly that "custom API keys only work with chat models. Tab completion continues using Cursor's built-in models." So DeepSeek can answer in the chat pane, but it will not take over Tab autocomplete.
- Agent mode is a separate lane. Cursor's agent/Composer features run on its own proprietary models. Whether a bring-your-own DeepSeek key drives the full agent loop is not documented officially — so treat it as something to test on your own account (see the agent-mode section).
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:
- Open Cursor Settings → Models.
- Select your provider and paste your API key into the text field.
- Click Verify to confirm the key works.
- Click Save.
That four-step flow — Settings → Models → paste key → Verify → Save — is documented on Cursor's official API keys help page.
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:
| Field | Value | Notes |
|---|---|---|
| Base URL (OpenAI-compatible) | https://api.deepseek.com | Use this for Cursor's OpenAI-compatible custom model |
| Anthropic-compatible endpoint | https://api.deepseek.com/anthropic | For tools that speak the Anthropic API shape |
| Current model id | deepseek-v4-pro | Recommended — highest-capability current model |
| Current model id | deepseek-v4-flash | Recommended — faster / lighter current model |
| Legacy alias | deepseek-chat | Non-thinking mode of deepseek-v4-flash; deprecated, sunset 2026/07/24 |
| Legacy alias | deepseek-reasoner | Thinking 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 feature | Runs on your DeepSeek key? | Basis |
|---|---|---|
| Chat pane (ask a question) | Yes | Cursor docs: custom keys work with chat models |
| Tab / autocomplete | No | Cursor docs: Tab keeps using built-in models |
| Agent / Composer loop | Not documented | No 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:
- Expect DeepSeek to work in the chat pane reliably (documented).
- Test agent/Composer with your DeepSeek model selected on your own account. Because there is no official commitment, behaviour can differ by Cursor version and change over time — this is the part to date-check against the current app.
- If the agent loop refuses your custom model, fall back to using DeepSeek in chat, or route through a gateway (below) so the request arrives as a standard OpenAI-compatible call.
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:
- OpenAI — standard, non-reasoning chat models.
- Anthropic — all Claude models via the Anthropic API.
- Google — Gemini models via the Google AI API.
- Azure OpenAI.
- AWS Bedrock.
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:
- One key for many models. Try DeepSeek today, a Claude or an open model tomorrow, without re-entering per-provider credentials. Browse the full model list or compare pricing.
- Routing and failover. If a model is unavailable, the request can reroute rather than fail — see routing & failover and what an LLM gateway is.
- Cost control across agents. One place to see spend and swap to a cheaper model — relevant when an agent loop burns tokens, as covered in cutting token costs in coding agents.
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.
DataLLM Lab