Overview
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
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
Peak
Rate Limits & Context
API Reference
https://api.tokenfab.com/v1/chat/completionsRequest 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."}
]
}'import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ.get("TOKENFAB_API_KEY"),
base_url="https://api.tokenfab.com/v1",
)
response = client.chat.completions.create(
model="deepseek-v4.1-flash",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Please introduce yourself."},
],
)
print(response.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.TOKENFAB_API_KEY,
baseURL: "https://api.tokenfab.com/v1"
});
const response = await client.chat.completions.create({
model: "deepseek-v4.1-flash",
messages: [
{ role: "system", content: "You are a helpful assistant." },
{ role: "user", content: "Please introduce yourself." }
]
});
console.log(response.choices[0].message.content);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
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | ✓ | Model ID, e.g. deepseek-v4.1-flash |
messages | array | ✓ | 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) |
thinking | object | — | Thinking mode switch: type is enabled or disabled, default enabled |
reasoning_effort | string | — | Thinking effort: low / high / max, default high; none turns thinking mode off |
max_tokens | int | — | Maximum output tokens, 1 to 384K (393216); if unset, defaults to 8K in non-thinking mode and 64K in thinking mode (128K at max) |
temperature | float | — | Sampling temperature, 0–2, default 1; has no effect in thinking mode |
top_p | float | — | 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_format | object | — | Set type to json_object to enable JSON mode; the prompt must also ask for JSON output |
stream | bool | — | Whether to stream message deltas over SSE |
tools | array | — | Tool definitions; only function is supported for now |
tool_choice | string | — | Tool choice policy: none / auto / required / a named function; required and named functions are not supported in thinking mode |