DeepSeek V3/R1 can be easily integrated into Cursor IDE to enhance your coding experience with top-tier AI capabilities at a lower cost.
This guide covers how to set up DeepSeek in Cursor using the official API or third-party providers like OpenRouter and SiliconFlow.
Quick Parameters
| Provider | Base URL (API Base) | Recommended Model Name | Note |
|---|---|---|---|
| DeepSeek Official | https://api.deepseek.com | deepseek-chat (V3)deepseek-reasoner (R1) | Must enable "Override OpenAI Base URL" |
| OpenRouter | https://openrouter.ai/api/v1 | deepseek/deepseek-chat | Best for global access |
| SiliconFlow | https://api.siliconflow.cn/v1 | deepseek-ai/DeepSeek-V3 | High speed in China |
Note: Cursor integrates DeepSeek via its "OpenAI Compatible" interface.
Configuration Steps
- Open Settings: Click the gear icon in the top right, or press
Cmd + ,(Mac) /Ctrl + ,(Win) to open Cursor Settings. - Go to Models: Select Models from the sidebar menu.
- Add Custom Model:
- Under "Model Names", type the model name (e.g.,
deepseek-chat) and click the + button to add and enable it.
- Under "Model Names", type the model name (e.g.,
- Configure API Key & Base URL:
- Scroll down to the "OpenAI API Key" section.
- Crucial Step: Click "Override OpenAI Base URL".
- Enter the Base URL:
https://api.deepseek.com(or your provider's URL). - Enter your API Key (
sk-xxxx).
- Verify: Click the "Verify" button. A green checkmark indicates success!
Configuration Examples
1. DeepSeek Official (Recommended)
Most stable and cost-effective.
{
"baseUrl": "https://api.deepseek.com",
"apiKey": "sk-your-deepseek-key",
"model": "deepseek-chat"
}2. OpenRouter
Great for accessing multiple models.
{
"baseUrl": "https://openrouter.ai/api/v1",
"apiKey": "sk-your-openrouter-key",
"model": "deepseek/deepseek-chat"
}FAQ
Q: "Connection failed" error? A: Please check:
- Is the Base URL correct? (Must include
https://). - Do not use a trailing slash if not needed (standard is usually without, but some tools differ. Cursor handles both well).
- Do you have sufficient balance in your API account?
Q: How to use DeepSeek R1 (Reasoning)?
A: Simply add deepseek-reasoner to your model list in Cursor, then select it in the chat interface (Cmd+K / Cmd+L).
Q: Is deepseek-chat V2 or V3?
A: The official deepseek-chat endpoint now points to the latest DeepSeek V3 model.

