DeepSeek-V4-Flash

deepseek-v4-flash
Open sourceDeepSeek series

Overview

1M ContextRAGCode generationContext caching

DeepSeek-V4-Flash is a lightweight MoE text model built for online workloads at scale: 284B total parameters with only about 13B activated per inference. It keeps long-context comprehension while optimizing the reasoning path for everyday chat, retrieval-augmented generation, content production, customer support, coding assistance and long-running tasks. Its unit price is markedly lower than comparable models, making it a good fit for high-QPS, low-latency and cost-sensitive integrations.

Million-token context
A 1M-token context window loads project-scale codebases, very long documents and multi-turn conversations in a single pass.
Efficient MoE
284B total / 13B activated keeps each inference light, balancing quality against compute cost.
Exceptional value
Per-token cost is well below models in the same class.
High throughput, low latency
RPM 15K / TPM 1.20M for steady output under online and high-concurrency workloads.

Features

Web search
Structured output
Context caching
Batch
Prefix completion
Fine-tuning
Vision

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.5/M tokens
Input (cache hit)¥0.05/M tokens
Output¥4.5/M tokens
Peak
Input¥3/M tokens
Input (cache hit)¥0.1/M tokens
Output¥9/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-flash",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "介绍一下你自己。"}
    ]
  }'

Response Example

JSON
{
  "id": "chatcmpl-2k8d91fz",
  "object": "chat.completion",
  "created": 1784950000,
  "model": "deepseek-v4-flash",
  "choices": [{
    "index": 0,
    "message": {
      "role": "assistant",
      "content": "我是 DeepSeek-V4-Flash,一款兼顾高性价比与高吞吐的 MoE 文本模型,总参数 284B、单次激活约 13B,支持百万级上下文窗口,适合大规模生产与在线业务使用。"
    },
    "finish_reason": "stop"
  }],
  "usage": {
    "prompt_tokens": 14,
    "completion_tokens": 46,
    "total_tokens": 60
  }
}

Request Parameters

ParameterTypeRequiredDescription
modelstringModel ID, e.g. deepseek-v4-flash
messagesarrayList of chat messages, each with role and content
temperaturefloatSampling temperature, 0–2, default 0.7
top_pfloatNucleus sampling, 0–1, default 0.9
max_tokensintMaximum output tokens
streamboolWhether to stream the response, default false
toolsarrayTool definitions for function calling
tool_choicestringTool choice policy: auto / none / a named function