DeepSeek Character Limits: Tokens, Context Window and Output Caps

If a long conversation in DeepSeek’s chat has ever stopped and asked you to start a new chat, you have run into the practical edge of DeepSeek character limits. The honest answer is that DeepSeek does not measure characters at all — it measures tokens, and every limit you care about (prompt size, conversation length, response length, file uploads) is enforced in tokens, not characters. DeepSeek’s own documentation puts one English character at roughly 0.3 token and one Chinese character at roughly 0.6 token. This guide gives you the current numbers for DeepSeek’s two API models, shows how to convert characters to tokens for planning, and explains how to recover when a chat hits the wall.
The short answer: DeepSeek limits tokens, not characters

DeepSeek has no “maximum characters per message” setting. Instead, the model counts tokens — sub-word units that the tokenizer produces from your text. The same hard limit applies to your input, the system prompt and the model’s reply combined. When the running total reaches the context window, the reply is cut off (the API reports finish_reason “length”), the request is rejected with a 400-class error, or the chat asks you to start a new conversation.
For planning, use the ratios from DeepSeek’s Token & Token Usage page:
- English: 1 character ≈ 0.3 token, so a 1,000-token prompt is roughly 3,300 English characters. The same page notes that an English word, a number or a symbol is typically counted as one token.
- Chinese: 1 Chinese character ≈ 0.6 token, so a 1,000-token prompt is roughly 1,670 Chinese characters.
- Code and other scripts: ratios vary with indentation, identifiers and language, so measure rather than estimate.
DeepSeek stresses that these ratios vary and that the token count returned in the API’s usage results is the actual figure. If you need exact numbers, run your text through the DeepSeek token counter or DeepSeek’s downloadable offline tokenizer before you paste it into a long-running session.
Current DeepSeek API limits at a glance
As of October 2026, DeepSeek’s official Models & Pricing page lists two API models with the same context limits.
| Limit | deepseek-flash | deepseek-v4-pro |
|---|---|---|
| Model version | DeepSeek-V4.1-Flash-1017 | DeepSeek-V4-Pro-0813 |
| Context length | 1M tokens | 1M tokens |
| Max output tokens | 384K | 384K |
| Thinking mode | Thinking (default) or non-thinking; effort low / high / max | Thinking (default) or non-thinking; effort low / high / max |
| Image input (vision) | Supported | Not supported |
| Weights license | MIT | MIT |
Requests that still use the legacy names deepseek-v4-flash or deepseek-v4-flash-vision-exp are served by DeepSeek-V4.1-Flash-1017, so the Flash limits apply to them too.
One subtlety worth internalising: the context window covers input and output together, but output is separately capped at 384K tokens and, before that, by your own max_tokens. If you expect to generate a 50K-token response, you are capped by max_tokens, not by the context window. In other words, the million-token figure is the headroom, but the 384K output cap and your own max_tokens parameter usually bite first.
How the API counts tokens
DeepSeek’s chat surface is separate from the OpenAI-compatible POST /chat/completions endpoint at https://api.deepseek.com. On the API, every token in your messages array — system prompt, prior assistant turns you replay, the new user message — plus the model’s response counts against the same window.
Here is a minimal Python pattern using the OpenAI SDK that prints the token counts DeepSeek returns:
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.deepseek.com",
api_key=os.environ.get("DEEPSEEK_API_KEY"),
)
resp = client.chat.completions.create(
model="deepseek-flash",
messages=[
{"role": "system", "content": "You are a concise assistant."},
{"role": "user", "content": "Summarise this contract in 5 bullets."},
],
max_tokens=2000,
)
print(resp.usage.prompt_tokens, resp.usage.completion_tokens)
The usage object on the response gives you the authoritative count: prompt_tokens, completion_tokens, plus prompt_cache_hit_tokens and prompt_cache_miss_tokens for billing. That is the only count that matters — tokenizer estimates from third-party libraries can drift.
Two things to know about the API surface relative to the chatbot:
- The API is stateless. DeepSeek does not remember prior turns on its side; you must resend the full conversation history with every request. The web chat and mobile app, by contrast, keep session history for you.
- DeepSeek also exposes an Anthropic-compatible surface at
https://api.deepseek.com/anthropic, so the Anthropic SDK works by setting thatbase_urland your DeepSeekapi_key. The same context and output limits apply.
For background on getting authenticated and a working request, see the DeepSeek API getting started tutorial.
Web chat and mobile app: where users actually hit the wall
On DeepSeek chat in the browser and on the mobile DeepSeek app, DeepSeek’s documentation does not describe a token counter or a separate context limit for the chat, so the practical signal is a conversation that stops and prompts you to start a new chat. To solve it, begin a new chat and, if needed, carry over a summary of the previous content so you can keep working without losing context.
The chatbot tracks the cumulative token usage across the entire thread, not per message. That means:
- A single huge paste can fill the window in one turn.
- Many small turns can also fill it — every prior user/assistant pair stays in context until you start a new chat.
- Uploaded documents and images add to the same budget.
Both your inputs and the AI’s responses count. Length accumulates silently over time, which is why the message may appear suddenly.
Why “characters” is the wrong unit to think in
People reach for “character limit” because that is the language Twitter and SMS taught us. Inside an LLM, the budget is tokens, and tokenization depends on the script, the language, and how rare a word is. “Antidisestablishmentarianism” is one English word but several tokens; “你好世界” is four Chinese characters and, by DeepSeek’s 0.6 ratio, roughly two-and-a-half tokens. Reasoning in characters will mislead you. Reason in tokens, and use a counter when the gap matters.
What happens when you hit the limit

Three failure modes to recognise:
- Truncation in the middle of a long answer. The response object’s
finish_reasoncomes back as"length", which means the generation hitmax_tokensor the conversation reached the model’s context length, and the content may be cut off. Fix by raisingmax_tokens(up to 384K on both current models) or splitting the task. - Prompt rejection. The API returns a 400-class error before generation starts because the input alone overflows the window. Fix by trimming history, summarising, or moving large reference material into a retrieval index.
- A “start a new chat” prompt in the chatbot. Start a new chat. Paste in a tight summary of where you left off rather than the full transcript.
Practical strategies to stay under the limit
1. Cache the static prefix
Context caching is on by default for every DeepSeek API user. Per DeepSeek’s Context Caching guide, a request hits the cache only when its prefix fully matches a cache prefix unit that has already been persisted — units are written at the end of each request’s input and output, when the system detects a prefix shared across requests, and at fixed token intervals for long inputs. The usage object reports the split in prompt_cache_hit_tokens and prompt_cache_miss_tokens; caching is best-effort, and unused caches are usually cleared within a few hours to a few days. Move your system prompt and few-shot examples to the start of messages, and keep them byte-identical across calls. The cache cuts cost; it does not, however, expand the window. See the DeepSeek context caching reference for more.
2. Summarise instead of replaying
For long-running threads, ask the model to produce a 200–400 token summary of the conversation so far, then start fresh with the summary as the system prompt. You trade some fidelity for a much larger working budget for the next phase.
3. Use retrieval for big corpora
A million tokens is enough to hold a medium codebase or a stack of contracts, but feeding everything in can degrade precision. Retrieve only the chunks that matter using embeddings; the DeepSeek RAG tutorial walks through a working pipeline.
4. Set max_tokens deliberately
If you ask for a 50,000-token report, set max_tokens=60000, not the default. If you only need a tight answer, set it lower — that protects you from runaway JSON outputs. In thinking mode (the default), check usage.completion_tokens on a few real calls before you settle on a cap, because the reasoning is generated output too.
Thinking mode changes your token math
Thinking mode is on by default on both deepseek-flash and deepseek-v4-pro, with effort high. Per DeepSeek’s Thinking Mode guide, you set the effort with reasoning_effort="low", "high" or "max", and switch thinking on or off with extra_body={"thinking": {"type": "enabled"}} or {"type": "disabled"}. When thinking is enabled, the response returns reasoning_content alongside the final content. Both are generated by the model, and DeepSeek bills by total input and output tokens.
Two operational consequences:
- Token use is higher. The reasoning can run to thousands of tokens before the final answer appears. Budget output accordingly.
- Know when
reasoning_contentgoes back into context. If a request does not carrytools, you do not need to send earlierreasoning_contentback — the API ignores it and it is not added to the context. If the request carriestools, you must pass back thereasoning_contentof all previous turns, and it is concatenated into the context, so it counts against the window.
For long reasoning at high or max effort, leave generous output headroom: the API allows up to 384K output tokens, and the DeepSeek-V4-Pro-0813 model card recommends a 384K maximum output length for those effort levels when the open weights are run locally. A finish_reason of "length" tells you the cap was hit.
Worked example: costing a long-document workflow
Suppose you run 10,000 contract reviews per month against deepseek-flash. Each call has a 4,000-token system prompt (treated here as a cache hit on every call; in reality the first calls are misses), a 50,000-token contract (uncached, varies per call), and a 5,000-token structured response. Rates are USD per 1M tokens from the official pricing page as of October 2026; off-peak rates are half of peak, and peak hours are 01:00–04:00 and 06:00–10:00 UTC, Monday to Friday, excluding Chinese public holidays.
deepseek-flash PEAK OFF-PEAK
Cached input: 4,000 × 10,000 = 40,000,000 × $0.006/M = $0.24 × $0.003/M = $0.12
Uncached input: 50,000 × 10,000 = 500,000,000 × $0.30/M = $150.00 × $0.15/M = $75.00
Output: 5,000 × 10,000 = 50,000,000 × $1.20/M = $60.00 × $0.60/M = $30.00
------- -------
Total $210.24 $105.12
Run the same job on deepseek-v4-pro ($0.044 / $1.32 / $3.96 per 1M at peak, $0.022 / $0.66 / $1.98 off-peak) and the bill becomes $1.76 + $660.00 + $198.00 = $859.76 at peak, or $0.88 + $330.00 + $99.00 = $429.88 off-peak — about 4.1× the Flash bill, a useful reminder that model choice dwarfs everything else when prompts are long. The DeepSeek pricing calculator handles the arithmetic for you.
How DeepSeek compares to other providers on context
Window size alone is not the whole story — retrieval accuracy deep into a long prompt and the output cap both matter, so test long-context recall on your own documents before relying on the full million tokens. For reference, as of 22 October 2026 Anthropic’s pricing page says Claude 4.6 and later models get the full 1M-token context window at standard pricing, while Claude Haiku 4.5 has a 200K window; OpenAI’s pricing page lists GPT-5.4 Mini and GPT-5.4 nano with a 400,000-token context window and a 272,000-token maximum input, and charges a higher long-context rate for GPT-5.4 and GPT-5.5 prompts above 272K input tokens. DeepSeek’s pricing page lists one rate per token type regardless of prompt length, varying only between peak and off-peak hours. For head-to-head context comparisons, see DeepSeek vs Claude and DeepSeek vs Gemini.
Files, images and audio

On the API, deepseek-flash accepts images in user messages (JPEG, PNG, GIF and WebP); deepseek-v4-pro does not support image input. Per DeepSeek’s Vision guide, images are converted into tokens based on their dimensions and billed with your text tokens, with an upper bound of 1,024 tokens per image; a request can carry up to 600 images, and inline images count toward a 48 MiB request-body limit. Those image tokens share the same context window as your text. The official pricing page lists no audio input for either model. For step-by-step file workflows, see the DeepSeek features reference.
Quick reference: planning your prompts
- Short question, no history: any model — limits are not in play.
- Long document review (≤ 200K tokens):
deepseek-flash; switch thinking off if you only need extraction. Budget 4–8K output. - Repository-scale code analysis (200K–800K tokens): thinking at
higheffort. Stage the prompt; do not dump everything at once. - Hard reasoning over a small input: thinking at
maxeffort, with generousmax_tokens. - Images:
deepseek-flashonly; budget up to 1,024 tokens per image. - Multi-turn agent loops: cache the system prompt; summarise older turns at every milestone.
For the broader picture of what each model can do, browse the DeepSeek beginner guides hub.
What is the maximum character limit in DeepSeek?
DeepSeek does not enforce a character limit; it enforces a token limit. As of October 2026 both API models, deepseek-flash and deepseek-v4-pro, support a 1M-token context with up to 384K output tokens. Using DeepSeek’s published ratios (about 0.3 token per English character and 0.6 per Chinese character), 1M tokens is roughly 3.3 million English characters or 1.67 million Chinese characters. Use the DeepSeek token counter for an exact count before pasting a long brief.
Why does DeepSeek chat ask you to start a new chat?
DeepSeek does not document the chat app’s message, but the model behind it has a fixed context window: everything in a thread — your messages and the model’s replies — has to fit in it, so a very long thread eventually leaves no room. The fix is to start a new chat and paste a short summary of the prior conversation rather than the full transcript. DeepSeek troubleshooting covers other common error messages.
How many tokens is one English word in DeepSeek?
DeepSeek’s Token & Token Usage page says an English word is typically counted as one token, and puts one English character at about 0.3 token; it also warns that ratios vary by model and tokenizer. Long or rare words split into several tokens, and code tokenizes differently from prose. The usage field the API returns is the real count. For a deeper reference on counting and budgeting tokens before sending a request, see the DeepSeek API best practices guide.
Does the DeepSeek API have a daily message cap?
DeepSeek does not publicly document a daily message cap on the API as of October 2026. Its Rate Limit & Isolation page documents per-account concurrency limits instead — 2,500 concurrent requests for deepseek-flash and 500 for deepseek-v4-pro — and going over them returns HTTP 429. Handle 429s with exponential backoff and jitter. Specifics on rate-limit behaviour and retries are in the DeepSeek API rate limits reference.
Can I increase the output token limit beyond 384,000?
No. 384K tokens is the maximum output on both deepseek-flash and deepseek-v4-pro, regardless of how much input headroom you have left. If you need a longer artefact, split the task into chunks and stitch the results together, or use streaming to handle very long generations incrementally. The DeepSeek API streaming guide shows the pattern.
Sources & Methodology
Primary sources
- OfficialDeepSeek API documentationEndpoints, request/response shape, model IDsLast checked: October 23, 2026
- PricingDeepSeek API pricing pagePer-1M-token rates, billing units, cache-hit pricingLast checked: October 23, 2026
Methodology
Information in this article was checked against the official DeepSeek documentation, the article's cited primary sources, and the deepseekai.guide pricing dataset on the date shown above. Where third-party numbers are quoted, the originating source is linked inline so the reader can verify and re-check.
Data confidence
High for facts cited inline with primary-source links; medium for context narrative.
Editorial note
AI tooling moves quickly. If you spot an outdated number or a broken link, the contact link in the footer is the fastest way to flag it for the editorial team.
