Speed
Output tokens / second
Custom pricing for production workloads
A 284B-parameter Mixture-of-Experts model engineered for fast, affordable inference without sacrificing reasoning depth. Thirteen billion parameters active per forward pass. One million tokens of context.
In the 1M-token context setting, V4 Flash achieves only 10% of the single-token FLOPs and 7% of the KV cache size compared with DeepSeek-V3.2, a dramatic efficiency jump that makes serving very long contexts actually economical.
deepseek/deepseek-v4-flashhttps://api.aimlapi.com/v1DeepSeek V4 Flash is the efficiency-first member of DeepSeek's fourth-generation model family, released in preview on April 24, 2026. It sits alongside V4 Pro as a complementary option, where Pro optimizes for maximum intelligence, Flash optimizes for throughput, latency, and cost per token without falling dramatically short on quality.
The model uses a sparse Mixture-of-Experts design: while it carries 284 billion parameters in total, only 13 billion are active during any single inference call. That translates directly into lower compute and lower cost while keeping outputs sharper than a dense 13B model would achieve on its own.
Several architectural decisions separate V4 Flash from earlier DeepSeek releases and from the broader open-source field.
Compressed Sparse Attention (CSA)Compresses KV caches along the sequence dimension (compression rate 4 in Flash), then applies DeepSeek Sparse Attention. A lightning indexer picks the top 512 most relevant compressed KV entries per query, plus a 128-token sliding window so local context is never missed.
Heavily Compressed Attention (HCA)Applies a much more aggressive compression rate of 128, then performs dense attention over that compressed representation, giving the model a cheap global view of distant tokens in every layer. CSA and HCA layers are interleaved throughout the network.
Manifold-Constrained Hyper-Connections (mHC)Strengthens conventional residual connections to enhance stability of signal propagation across layers while preserving model expressivity, a key factor in maintaining quality at high compression ratios.
Muon optimizerUsed during training for faster convergence and greater stability. Alongside FP4/FP8 mixed precision (expert weights in FP4, most other weights in FP8), this keeps training costs low while preserving model quality.
Everyday dialogue, content creation, basic RAG applications, and batch text processing are documented as suitable uses for this model.
For everyday dialogue, the documentation says it is designed for high-concurrency, lightweight workloads and is suited to common, essential conversational use cases.
For content creation, the same source explicitly lists content creation among the model’s intended uses.
For basic RAG applications, the documentation names basic retrieval-augmented generation as a suitable use case.
See how DeepSeek 4 Flash compares in generation speed and latency. Data retrieved Nov 4, 2026.
Output tokens / second
Compare 7 models available on AI/ML API across 5 independent benchmarks.
Expert-written questions across academic subjects.
Graduate-level science questions written to resist web search.
Agentic tasks completed in a command-line environment.
Reasoning across long documents of about 100k tokens.
Python coding tasks drawn from scientific research.
| Usage | Price | Unit |
|---|---|---|
| Input | $0.2645 | 1M tokens |
| Output | $0.4221 | 1M tokens |
| Cached input | $0.006 | 1M tokens |
Prices from the AI/ML API price list, checked on Nov 4, 2026.
AI/ML API input and output rates for 5 models, per million tokens.
| Model | Input | Output |
|---|---|---|
| $0.2645 | $0.4221 | |
| $0.3 | $1.2 | |
| $0.3 | $1.2 | |
| $0.44 | $1.32 | |
| $0.39 | $1.56 |
Give your agent the model details, code and documentation.
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"curl 'https://api.aimlapi.com/v1/chat/completions' \
-H "Authorization: Bearer $AIMLAPI_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "deepseek/deepseek-v4-flash",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}'import os
import requests
headers = {
"Authorization": f"Bearer {os.environ['AIMLAPI_KEY']}",
"Content-Type": "application/json",
}
payload = {
"model": "deepseek/deepseek-v4-flash",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}
response = requests.post("https://api.aimlapi.com/v1/chat/completions", headers=headers, json=payload, timeout=120)
response.raise_for_status()
print(response.json())const response = await fetch("https://api.aimlapi.com/v1/chat/completions", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "deepseek/deepseek-v4-flash",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());DeepSeek 4 Flash costs $0.2645 input and $0.4221 output per 1M tokens on AI/ML API, billed as you go with no subscription.
Yes, DeepSeek 4 Flash can stream responses as they are generated.
Yes, DeepSeek 4 Flash supports both function calling and structured outputs.
DeepSeek 4 Flash was built by DeepSeek.
Use deepseek/deepseek-v4-flash as the model parameter. Requests go to the OpenAI-compatible endpoint with your AI/ML API key.
DeepSeek 4 Flash accepts up to 1,000,000 tokens of context and returns up to 384,000 output tokens.