Setup guide - Documented by Zed
Use DeepSeek in Zed
Zed has DeepSeek as a first-class API provider for the Zed Agent and other Zed AI features. Enter your key in Agent Settings or set DEEPSEEK_API_KEY. Zed's docs give a custom-models example that already uses the current deepseek-flash and deepseek-v4-pro ids.
Last verified 3 steps3 official sources
Steps
- Step 1.
Create an API key at https://platform.deepseek.com/api_keys.
- Step 2.
Open Agent Settings with the agent: open settings command, go to the DeepSeek section and enter your key. Zed also reads DEEPSEEK_API_KEY from the local Zed process environment.
YAMLagent: open settings - Step 3.
Optional: add custom DeepSeek models (alternate ids, token limits or endpoint) in settings.json, verbatim from Zed docs.
JSON{ "language_models": { "deepseek": { "api_url": "https://api.deepseek.com/v1", "available_models": [ { "name": "deepseek-flash", "display_name": "DeepSeek V4.1 Flash", "max_tokens": 1000000, "max_output_tokens": 384000 }, { "name": "deepseek-v4-pro", "display_name": "DeepSeek V4 Pro", "max_tokens": 1000000, "max_output_tokens": 384000 } ] } } }
Caveats
- Zed's example api_url is https://api.deepseek.com/v1. DeepSeek's own docs give https://api.deepseek.com as the OpenAI-format base URL.
- This covers Zed-owned AI features (Zed Agent, Inline Assistant, commit messages, thread summaries). External Agents and Terminal Threads set up model access themselves.
- Keys saved through Zed are stored in the system keychain. A non-empty DEEPSEEK_API_KEY takes precedence over the keychain value.
More setup guides
Same tool, other providers
Related reading
- DeepSeek V4.1-Flash-1017: Benchmarks vs Opus 5, Pricing, Switch?DeepSeek V4.1-Flash-1017 jumps 11 points on Terminal-Bench 4.0 at the same deepseek-flash price. Benchmarks vs Opus 5, K3, GLM-5.3 and when to switch.
- DeepSeek 4.1 Flash as a Daily Coding Model: Cache, Peak Hours and LimitsDeepSeek 4.1 Flash as a daily coding model: what a session costs, how peak hours double the bill, why caching matters, and where the subsidy argument holds.
- Where to Run DeepSeek V4.1 Flash Free and CheapDeepSeek V4.1 Flash replaced V4 Flash. Official API: $0.15 input, $0.60 output off-peak. OpenRouter hosts start near $0.05. MIT weights are on Hugging Face.
- DeepSeek V4 Flash Vision Exp: Experimental Vision, Limits, and How to Run It in OpenCodeDeepSeek V4 Flash Vision Exp guide: supported image formats, three input methods, the 384-token per-image cap, and how to run it in OpenCode today.
- We Read DeepSeek Harness: What 453K Lines of Agent Runtime Actually SayDeepSeek Harness (dsh) code read: a 453K-line plugin runtime on a vendored Cordis fork, three patterns worth stealing, and the gaps the launch does not mention.
- DeepSeek V4 Flash Is 90% Off Through Novita on Vercel AI Gateway: The Cost MathDeepSeek V4 Flash via Novita on Vercel AI Gateway was 90% off for Pro customers through August 11. The before/after cost math and the provider-pinning setup.
FAQ
How do I use DeepSeek in Zed?
Zed has DeepSeek as a first-class API provider for the Zed Agent and other Zed AI features. Enter your key in Agent Settings or set DEEPSEEK_API_KEY. Zed's docs give a custom-models example that already uses the current deepseek-flash and deepseek-v4-pro ids.
Which DeepSeek model ids work in Zed?
The official docs read for this guide list deepseek-flash and deepseek-v4-pro. Requests go to https://api.deepseek.com/v1.
Is this an official DeepSeek and Zed setup?
Zed documents this setup in its own docs. It was last checked against 3 official pages on October 17, 2026.
Sources
Last verified against 3 official pages.
- zed.devhttps://zed.dev/docs/ai/use-api-access.md
- zed.devhttps://zed.dev/docs/ai/llm-providers
- api-docs.deepseek.comhttps://api-docs.deepseek.com/quick_start/pricing
Newsletter
New models, set up the day they ship
One email per week. New model releases, the coding tools that support them and how to wire them up.