DeepSeek-V4.1-Flash

deepseek-v4.1-flash
Open sourceDeepSeek seriesNEW

Overview

Multimodal1M ContextVisionReasoningAgentic tasks

DeepSeek-V4.1-Flash is the smallest model in DeepSeek's new architecture family, with native multimodal visual understanding. It is a 552B-parameter MoE model built on the new Causal-Encoder-Decoder architecture, with asymmetric input and output: only 8B parameters are activated for input and 16B for output, at a cost well below other known models of the same size. The new architecture sharply compresses the KV cache, cutting HBM requirements to 1/4 and SSD requirements to 1/8 of the previous generation, which lowers the cost of agent workloads where cache-hit charges make up a large share. The model supports a 1M context window and up to 384K output tokens; thinking mode is on by default, with three effort levels (low, high and max) to match task complexity.

Asymmetric MoE architecture
552B-parameter MoE on a Causal-Encoder-Decoder architecture, activating 8B for input and 16B for output.
Native visual understanding
Images and text are processed jointly from pre-training onward; accepts JPEG / PNG / GIF / WebP images.
Smaller cache, lower cost
KV cache needs 1/4 the HBM and 1/8 the SSD of the previous generation, so agent workloads pay less for caching.
1M context, three thinking levels
A 1M-token context window with up to 384K output; thinking mode is on by default with low / high / max levels.

Features

Reasoninglow / high / max; on by default at high; set reasoning_effort to none to turn it off
VisionImage input (JPEG / PNG / GIF / WebP)
Tool callingTool calls, also available in thinking mode
JSON modeSet response_format to json_object
Context cachingCache hits are billed at the cached-input price
Streaming
Prefix completionBeta

Pricing

Off-peak prices are half of peak prices. Peak hours are Monday to Friday 9:00–12:00 and 14:00–18:00 Beijing time (UTC+8); all other times are off-peak.
Off-peak
Input¥1/M tokens
Input (cache hit)¥0.02/M tokens
Output¥4/M tokens
Peak
Input¥2/M tokens
Input (cache hit)¥0.04/M tokens
Output¥8/M tokens

Rate Limits & Context

Context Window1M
Max Output384K
RPM (requests/min)15K
TPM (tokens/min)1200K

API Reference

ENDPOINT
POST https://api.tokenfab.cn/v1/chat/completions

Request Example

curl https://api.tokenfab.cn/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKENFAB_API_KEY" \
  -d '{
    "model": "deepseek-v4.1-flash",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "介绍一下你自己。"}
    ]
  }'

Response Example

JSON
{
  "id": "chatcmpl-7f3a2c91",
  "object": "chat.completion",
  "created": 1789012800,
  "model": "deepseek-v4.1-flash",
  "choices": [{
    "index": 0,
    "message": {
      "role": "assistant",
      "reasoning_content": "用户希望我做自我介绍,需要说明模型名称与主要能力。",
      "content": "我是 DeepSeek-V4.1-Flash,由深度求索研发的 MoE 多模态模型,支持文本与图像输入、1M 上下文窗口,思考模式默认开启。"
    },
    "finish_reason": "stop"
  }],
  "usage": {
    "prompt_tokens": 14,
    "completion_tokens": 58,
    "total_tokens": 72
  }
}

Request Parameters

ParameterTypeRequiredDescription
modelstringModel ID, e.g. deepseek-v4.1-flash
messagesarrayList of chat messages, each with role and content; a user message's content can be an array of content parts carrying images (JPEG, PNG, GIF, WebP)
thinkingobjectThinking mode switch: type is enabled or disabled, default enabled
reasoning_effortstringThinking effort: low / high / max, default high; none turns thinking mode off
max_tokensintMaximum output tokens, 1 to 384K (393216); if unset, defaults to 8K in non-thinking mode and 64K in thinking mode (128K at max)
temperaturefloatSampling temperature, 0–2, default 1; has no effect in thinking mode
top_pfloatNucleus sampling, default 1; in thinking mode values below 0.95 are raised to 0.95, and in non-thinking mode it is fixed at 1.0
response_formatobjectSet type to json_object to enable JSON mode; the prompt must also ask for JSON output
streamboolWhether to stream message deltas over SSE
toolsarrayTool definitions; only function is supported for now
tool_choicestringTool choice policy: none / auto / required / a named function; required and named functions are not supported in thinking mode