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

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

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

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-flash",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Please introduce yourself."}
    ]
  }'

Response Example

{
  "id": "chatcmpl-2k8d91fz",
  "object": "chat.completion",
  "created": 1784950000,
  "model": "deepseek-v4-flash",
  "choices": [{
    "index": 0,
    "message": {
      "role": "assistant",
      "content": "I am DeepSeek-V4-Flash, a cost-effective, high-throughput MoE text model with 284B total parameters and about 13B activated per token. I support a million-token context window and suit large-scale production and online workloads."
    },
    "finish_reason": "stop"
  }],
  "usage": {
    "prompt_tokens": 14,
    "completion_tokens": 46,
    "total_tokens": 60
  }
}

Request Parameters

ParameterTypeRequiredDescription
modelstring✓Model ID, e.g. deepseek-v4-flash
messagesarray✓List of chat messages, each with role and content
temperaturefloat—Sampling temperature, 0–2, default 0.7
top_pfloat—Nucleus sampling, 0–1, default 0.9
max_tokensint—Maximum output tokens
streambool—Whether to stream the response, default false
toolsarray—Tool definitions for function calling
tool_choicestring—Tool choice policy: auto / none / a named function