DeepSeek’s V4 release announcement says V4-Pro and V4-Flash support a 1M-token context window. DeepSeek’s current API model list uses the names deepseek-v4-pro and deepseek-flash; its quick-start says deepseek-flash is served by DeepSeek-V4.1-Flash-1017. The current models-and-pricing page lists a 1M context length and a maximum output of 384K for both API models. Check the live model metadata for the exact limits on the model ID you use. (api-docs.deepseek.com)
Third-party providers can publish limits for their own deployments. For example, DeepInfra lists a 1,048,576-token context for its deepseek-ai/DeepSeek-V4.1-Flash deployment. Treat that as a DeepInfra-specific listing, not a specification for every V4 model or host. (api-docs.deepseek.com)
What the context window means in production
DeepSeek defines context_window as the total token capacity for input and output combined. It separately defines max_output_tokens as the maximum number of tokens the server allows in a single response. So a 1M context window does not mean the model can generate 1M tokens in one answer; the output cap is separate. (api-docs.deepseek.com)
For planning, treat context as a shared budget: input tokens plus generated output must fit within the model’s context window, and the requested output must also stay within that model’s output cap. For example, with a 1,048,576-token context and 900,000 input tokens, at most 148,576 tokens remain for output—and the model’s separate output cap may be lower. This is an arithmetic illustration, not a claim about a specific model’s current limits.
Check the exact limit for DeepSeek’s API model
DeepSeek documents GET https://api.deepseek.com/models as its model-list endpoint. The response is a list with model records in data; each record has an id, and may include context_window and max_output_tokens. Query the endpoint and inspect the record matching the model ID you use in production. (api-docs.deepseek.com)
MODEL=deepseek-flash
curl https://api.deepseek.com/models \
-H "Authorization: Bearer $DEEPSEEK_API_KEY" \
| jq --arg model "$MODEL" '.data[] | select(.id == $model) | {id, name, context_window, max_output_tokens}'
The official API reference documents the bearer-authentication scheme; the model-list schema documents the data array, id, and limit fields. Metadata fields may be omitted when unavailable for a model, so check the documentation and returned record if a field is absent. (api-docs.deepseek.com)
For a new DeepSeek API integration, the quick-start shows the OpenAI-compatible chat-completions endpoint and deepseek-flash model name. It also says the legacy names deepseek-v4-flash and deepseek-v4-flash-vision-exp are still accepted, but the corresponding models have been retired and requests are served by DeepSeek-V4.1-Flash-1017. Prefer the current documented model name for new integrations. (api-docs.deepseek.com)
curl https://api.deepseek.com/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DEEPSEEK_API_KEY" \
-d '{
"model": "deepseek-flash",
"messages": [
{"role": "user", "content": "Summarize this document."}
],
"stream": false
}'
This is a request example, not a test of a million-token prompt or of long-context accuracy. If you use another provider, check that provider’s model ID and documentation instead of assuming its limits match DeepSeek’s API. (api-docs.deepseek.com)
Is a 1M-token window right for your workload?
A large context window can let you submit more material in one request—for example, a long conversation, a large document collection, or substantial code. These are possible uses of the capacity, not guarantees that a particular input will fit after tokenization or that the model will use every detail correctly. MindStudio’s article lists long-document and codebase use cases, but does not provide measurements establishing performance for them; it also cautions that performance can vary at extreme context lengths. (api-docs.deepseek.com)
Before choosing a model for production, test it with representative material at the length you expect to send. Include questions that depend on details from different parts of the input, then evaluate whether the model finds and uses those details reliably. If it misses your quality bar, a larger advertised context window alone will not solve the problem.
Bottom line: DeepSeek’s current API models are listed with a 1M-token context window, but the exact model ID matters. Check that model’s current context_window and max_output_tokens, and test answer quality at your intended context length. Treat third-party providers’ figures as specific to their own deployments.
Sources
DeepSeek V4 Preview Release | DeepSeek API Docs
Lists Models | DeepSeek API Docs
Your First API Call | DeepSeek API Docs
Chat Completions API | DeepSeek API Docs
DeepSeek API | DeepSeek API Docs
Models & Pricing | DeepSeek API Docs
DeepSeek V4.1 Flash API - Documentation - DeepInfra
What Is DeepSeek V4? Open-Weight AI at Frontier-Level Performance
