Configure DeepSeek API for Aider, Continue, and Cursor
DeepSeek provides native OpenAI API protocol compatibility. Connect DeepSeek models to Aider, Continue, and Cursor with standard endpoint configuration.
On this page
OpenAI-compatible parameters
- Base URL:
https://api.deepseek.comorhttps://api.deepseek.com/v1 - Chat and coding model:
deepseek-chat(DeepSeek-V3 for fast generation and autocompletion) - Reasoning model:
deepseek-reasoner(DeepSeek-R1 for complex problem solving) - API key: Generated in your DeepSeek Platform dashboard.
TOOL 1
Continue extension setup (VS Code & JetBrains)
In Continue configuration (~/.continue/config.yaml or config.json), add DeepSeek models:
models:
- name: "DeepSeek Chat"
provider: "openai"
model: "deepseek-chat"
apiKey: "sk-your_deepseek_api_key"
apiBase: "https://api.deepseek.com/v1"
- name: "DeepSeek Reasoner (R1)"
provider: "openai"
model: "deepseek-reasoner"
apiKey: "sk-your_deepseek_api_key"
apiBase: "https://api.deepseek.com/v1"
tabAutocompleteModel:
name: "DeepSeek Coder Autocomplete"
provider: "openai"
model: "deepseek-chat"
apiKey: "sk-your_deepseek_api_key"
apiBase: "https://api.deepseek.com/v1"TOOL 2
Aider CLI pair programming setup
Aider has built-in DeepSeek support. Export the key and launch:
# Native DeepSeek provider (recommended)
export DEEPSEEK_API_KEY="sk-your_deepseek_api_key"
aider --model deepseek/deepseek-chat
# Generic OpenAI-compatible variables:
# export OPENAI_API_BASE="https://api.deepseek.com"
# export OPENAI_API_KEY="sk-your_deepseek_api_key"Or launch with the reasoning model:
aider --model deepseek/deepseek-reasonerTOOL 3
Cursor editor setup
In Cursor Settings → Models:
- Enable OpenAI API Key and paste your key.
- Check Override OpenAI Base URL and enter
https://api.deepseek.com/v1. - Add and enable
deepseek-chatin the model list.
Tip: If streaming reasoning tokens cause syntax glitches in your Cursor version, use
deepseek-chat for standard code generation.Prompt caching and latency efficiency
DeepSeek API automatically caches prompt prefixes on the server. In multi-turn coding sessions, cached tokens cost significantly less and return responses faster.
Troubleshooting
404 Model Not Found
Ensure the model ID matches deepseek-chat or deepseek-reasoner.
401 Invalid API Key
Check that the key begins with sk- with no extra spaces.