Speed
Output tokens / second
Custom pricing for production workloads

DeepSeek's current Flash build: 1M context, thinking mode on by default and image understanding.
DeepSeek V4.1 Flash is the current DeepSeek Flash build, a 1M-context chat and reasoning model with thinking mode enabled by default and image understanding.
Whole-repository and long-document work
A 1M-token window holds an entire codebase or a stack of filings in a single prompt, and a 384K output ceiling leaves room for long answers.
Multimodal analysis
Image understanding lets screenshots, diagrams and scanned pages go straight into the same request as the text.
See how DeepSeek V4.1 Flash compares in generation speed and latency.
Output tokens / second
Compare 5 models available on AI/ML API across 4 independent benchmarks.
Expert-written questions across academic subjects.
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.3 | 1M tokens |
| Output | $1.2 | 1M tokens |
| Cached input | $0.006 | 1M tokens |
AI/ML API input and output rates for 5 models, per million tokens.
| Model | Input | Output |
|---|---|---|
| $0.3 | $1.2 | |
| $0.3 | $1.2 | |
| $0.44 | $1.32 | |
| $0.39 | $1.56 | |
| $1.84 | $3.68 |
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.1-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.1-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.1-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 V4.1 Flash is the current build in DeepSeek's Flash line: a chat and reasoning model with a 1M-token context window, thinking mode enabled by default and image understanding.
DeepSeek reports that V4.1 Flash surpasses V4 Pro on performance, cost and speed. It also accepts image input, which V4 Pro does not.
Yes. It takes both image and text input and returns text, so screenshots, diagrams and scanned pages can go into the same request as your prompt.
Yes. Thinking mode is enabled by default, so the model reasons through a problem before answering unless you tell it otherwise.
1,048,576 tokens, with up to 384,000 tokens of output.
Yes, it supports function calling and structured outputs, alongside streaming responses.
Work that needs a very large window: whole-repository code analysis, long-document review, and agent loops that accumulate a lot of context. Image input widens that to mixed text-and-visual material.
Yes. The model also answers to the alias deepseek-flash.
Send a request to the chat completions endpoint with the model id deepseek/deepseek-v4.1-flash. The request shape is the same as for any other chat model on AI/ML API.