Skip to content

DeepSeek V4 Flash API

160K context · Released May 21, 2026 · By DeepSeek · MIT

DeepSeek V4 Flash costs $0.09 per million input tokens and $0.18 per million output tokens, against an official rate of $0.14 and $0.28 — 36% below official pricing. It is a DeepSeek model under the MIT licence, with a 160K context window, callable through an OpenAI-compatible endpoint with the model id `deepseek/deepseek-v4-flash`.

Input

$0.090/M

$0.14/M

Output

$0.18/M

$0.28/M

Savings

36%

off official

  • No markup
  • OpenAI SDK compatible
  • No minimum spend
  • MIT

The cheapest capable model on the platform. Fast enough for interactive use and priced for workloads measured in billions of tokens per month.

Copy this and go

The model id is already filled in. Nothing in this snippet needs editing except your key.

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://router.xark.io/api/v1"   # ← the only line that changes
)

response = client.chat.completions.create(
    model="deepseek/deepseek-v4-flash",
    messages=[{"role": "user", "content": "Hello"}]
)

DeepSeek V4 Flash pricing across providers

Rates as published by each provider. We update these when they change; if you spot one that's stale, tell us and we'll fix it.

ProviderInputOutput
AI Token Router$0.090/M$0.18/M
Official (DeepSeek)$0.14/M$0.28/M
OpenRouter$0.14/M$0.27/M
DeepInfra$0.10/M$0.20/M
Together AI$0.13/M$0.26/M

Cached input on DeepSeek V4 Flash is billed at $0.018/M — roughly 80% below the standard input rate. For agent loops with a large fixed system prompt this is usually the number that matters most.

What it's good at

  • Billion-token-scale batch jobs
  • Summarisation and reranking
  • Cheap first-pass filtering before an expensive model
Full technical documentation

Related

Other text models

Start using DeepSeek V4 Flash today

$5 in free credits, no credit card required.