DeepSeek-V4.1-Flash1M context, web search, and tool calling fully supported
Try it now

DeepSeek-V4.1-Flash

deepseek-v4.1-flash
Open sourceDeepSeek series

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$0.15/M tokens
Input (cache hit)$0.003/M tokens
Output$0.6/M tokens

Peak

Input$0.3/M tokens
Input (cache hit)$0.006/M tokens
Output$1.2/M tokens

Rate Limits & Context

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

API Reference

POSThttps://api.tokenfab.com/v1/chat/completions

Request Example

curl https://api.tokenfab.com/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": "Please introduce yourself."}
    ]
  }'

Response Example

{
  "id": "chatcmpl-7f3a2c91",
  "object": "chat.completion",
  "created": 1789012800,
  "model": "deepseek-v4.1-flash",
  "choices": [{
    "index": 0,
    "message": {
      "role": "assistant",
      "reasoning_content": "The user wants me to introduce myself, so I should state the model name and main capabilities.",
      "content": "I am DeepSeek-V4.1-Flash, a multimodal MoE model developed by DeepSeek. I accept text and image input, support a 1M context window, and have thinking mode enabled by default."
    },
    "finish_reason": "stop"
  }],
  "usage": {
    "prompt_tokens": 14,
    "completion_tokens": 58,
    "total_tokens": 72
  }
}

Request Parameters

ParameterTypeRequiredDescription
modelstring✓Model ID, e.g. deepseek-v4.1-flash
messagesarray✓List 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)
thinkingobject—Thinking mode switch: type is enabled or disabled, default enabled
reasoning_effortstring—Thinking effort: low / high / max, default high; none turns thinking mode off
max_tokensint—Maximum output tokens, 1 to 384K (393216); if unset, defaults to 8K in non-thinking mode and 64K in thinking mode (128K at max)
temperaturefloat—Sampling temperature, 0–2, default 1; has no effect in thinking mode
top_pfloat—Nucleus 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_formatobject—Set type to json_object to enable JSON mode; the prompt must also ask for JSON output
streambool—Whether to stream message deltas over SSE
toolsarray—Tool definitions; only function is supported for now
tool_choicestring—Tool choice policy: none / auto / required / a named function; required and named functions are not supported in thinking mode