DeepSeek

Copy success!
Add to Compare

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 docs

Function Calling

Use function calling to connect large language models with external tools and systems.View docs

Cache

Context Cache stores shared prefixes for long-context requests to reduce repeated computation, improve latency, and lower cost.View docs

Structured Outputs

Structured Outputs help ensure the model returns a JSON string in the expected format.View docs

Batches

Asynchronously process requests in batches to reduce costs.View docs

Web Search

Enable web search so the model can answer with real-time retrieved data.View docs

Fine-tuning

Train models on sample data to better adapt them to specific tasks.View docs

Pricing

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 Input
    1M
  • Max Output
    393K
  • Max Input (Thinking)
    1M
  • Max Output (Thinking)
    393K
  • Context
    1M
  • Max Reasoning
    393K
  • TPMTokens Per Minute
    1M
  • RPMRequests Per Minute
    10K

Built-in Tools

code_interpreterResponses API
web_extractorResponses API
web_fetchAnthropic API
web_searchResponses API
web_searchAnthropic API

API Reference

Call API
Copy 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)