DeepSeek
DeepSeek (Hangzhou-based, spun out of the High-Flyer quantitative hedge fund and founded in 2023 by Liang Wenfeng) is a Chinese AI lab that ships frontier-class models and publishes their weights on Hugging Face under the MIT licence. Its positioning is aggressive price/performance: the V4 family (April 2026 preview, GA August 2026) standardises a 1M-token context via token-wise compression plus DeepSeek Sparse Attention, and the API undercuts Western frontier providers by roughly an order of magnitude.
Data checked 2026-09-06- Models tracked
- 3
- OpenAI-compatible API
- yes
- API base URL
- https://api.deepseek.com
The API is deliberately compatibility-first — it serves the OpenAI Chat Completions format, the OpenAI Responses format (adapted for Codex), and the Anthropic Messages format from the same base URL, so existing SDKs and agent harnesses (Claude Code, Codex, OpenCode, GitHub Copilot) work by swapping base_url and model name. As of September 2026 only three models are served: deepseek-v4-flash, deepseek-v4-pro, and the experimental deepseek-v4-flash-vision-exp.
A Access and limits
Sign up at https://platform.deepseek.com and create a key at https://platform.deepseek.com/api_keys; billing is prepaid, drawn from a "topped-up balance" or a "granted balance" (granted balance is consumed first). DeepSeek does not publish a permanent free tier or a guaranteed sign-up grant on its official docs — check the console dashboard for any granted balance rather than trusting third-party claims of a "5M free token" promo. No published regional endpoints: one global base URL, https://api.deepseek.com (Anthropic-format traffic goes to https://api.deepseek.com/anthropic; beta features such as FIM and chat-prefix completion use the beta base URL).
PEAK/OFF-PEAK PRICING (effective 16:00 UTC, 2026-08-16): peak hours are 01:00-04:00 and 06:00-10:00 UTC, Monday through Friday; every other hour of the week is off-peak and bills at exactly 50% of the peak rate. The prices recorded per model here are the PEAK (standard/full) rates — halve them for off-peak. CONTEXT CACHING is on by default for every account with no code change and no cache-write fee: cache hits bill at about 3.3% of the cache-miss input rate ($0.014 vs $0.44 per 1M peak on Flash; $0.044 vs $1.32 on Pro), and usage responses report prompt_cache_hit_tokens / prompt_cache_miss_tokens.
Because V4 uses sliding-window attention, a request only hits cache when it FULLY matches a persisted cache prefix unit (persisted at request boundaries, at detected common prefixes across requests, and at fixed token intervals for long inputs/outputs) — plain incremental prefix growth is no longer enough on its own. Rate limiting is by concurrency, not RPM/TPM: 500 concurrent requests for deepseek-v4-pro and 2500 for deepseek-v4-flash and deepseek-v4-flash-vision-exp, per account across all keys; over-limit returns HTTP 429, and free capacity expansion can be requested. A user_id request parameter gives per-tenant KV-cache, safety, and scheduling isolation.
There is no batch API and no fine-tuning API. The Files API (image upload, referenced by file_id) is free. RETIRED: the legacy deepseek-chat and deepseek-reasoner model names, which routed to V4-Flash non-thinking/thinking modes, became inaccessible after 2026-07-24 15:59 UTC; the DeepSeek-V3.2-Speciale temporary endpoint expired 2025-12-15.
The 2025-era off-peak programme (50% off V3 / 75% off R1, 16:30-00:30 UTC) ended with those models and is unrelated to the current V4 peak/off-peak scheme.
C Calling the API
DeepSeek accepts requests in the OpenAI Chat Completions format, so any
OpenAI-compatible client works by changing the base URL. Example uses
deepseek-v4-flash.
curl https://api.deepseek.com/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4-flash",
"messages": [{"role": "user", "content": "Hello"}]
}'
from openai import OpenAI
client = OpenAI(
base_url="https://api.deepseek.com",
api_key=os.environ["API_KEY"],
)
response = client.chat.completions.create(
model="deepseek-v4-flash",
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)
A compatibility layer is not always the provider's full API — caching, strict tool schemas and structured output are commonly unsupported there. Check the official docs before relying on an advanced feature.
B Models
| Model | Context | Max out | In $/M | Out $/M | Blended | Status |
|---|---|---|---|---|---|---|
DeepSeek-V4-Flash
deepseek-v4-flash
|
1M | 384K | $0.44 | $1.32 | $0.66 | ga open |
DeepSeek-V4-Flash-Vision-Exp
deepseek-v4-flash-vision-exp
|
1M | 384K | $0.44 | $1.32 | $0.66 | preview open |
DeepSeek-V4-Pro
deepseek-v4-pro
|
1M | 384K | $1.32 | $3.96 | $1.98 | ga open |