DeepSeek
Copy success!
Overview
DeepSeek-V4.1-Flash is the lightweight flagship of DeepSeek's new architecture family, packing 552B total MoE parameters to deliver flagship-surpassing intelligence across key benchmarks, including out-performing DeepSeek-V4-Pro. It adopts a Causal Encoder-Decoder asymmetric design with 8B active parameters for input and 16B for output, and offers native multimodal visual understanding. KV Cache usage is cut to one-quarter of the previous generation's HBM and one-eighth of its SSD storage, dramatically lowering costs for long-context and agentic workloads. With a 1M-token context window and up to 384K-token maximum output, it balances high throughput, low latency, and exceptional cost efficiency.
Input
TextImage
Output
Text
Features
Prefix Completion
Enable Partial Mode when calling the Qwen API to make the model continue strictly from your provided prefix text.View docsFunction Calling
Use function calling to connect large language models with external tools and systems.View docsCache
Context Cache stores shared prefixes for long-context requests to reduce repeated computation, improve latency, and lower cost.View docsStructured Outputs
Structured Outputs help ensure the model returns a JSON string in the expected format.View docsPricing
Off-peak hours are 22:00 to 08:00 (next day) in UTC+8; other times are peak hours.
- Input$0.15Per 1M tokens
- Output$0.6Per 1M tokens
- Input(Implicit Cache)$0.015Per 1M tokens
Rate Limits & Context
- Max Input1M
- Max Output393K
- Max Input (Thinking)1M
- Max Output (Thinking)393K
- Context1M
- Max Reasoning393K
- TPMTokens Per Minute1M
- RPMRequests Per Minute10K
Built-in Tools
code_interpreterResponses API
web_extractorResponses API
web_fetchAnthropic API
web_searchResponses API
web_searchAnthropic API
API Reference
Call APICopy success!
123456789101112131415161718192021
import os
from openai import OpenAI
client = OpenAI(
api_key=os.getenv("DASHSCOPE_API_KEY"),
base_url="https://dashscope-intl.aliyuncs.com/compatible-mode/v1",
)
completion = client.chat.completions.create(
model="deepseek-v4.1-flash",
messages=[
{
"role": "user",
"content": [
{"type": "image_url", "image_url": {"url": "https://example.com/image.jpg"}},
{"type": "text", "text": "Please only output the text content in the image."},
],
}
],
)
print(completion.choices[0].message.content)