Skip to content
deepseek-v4-flash · 1M context

DeepSeek V4 Flash API

The official DeepSeek-V4-Flash release: a 1,048,576-token context window at a workhorse price, and genuinely fast — about 1 second to first token and ~100 tokens/second in our measurements. OpenAI-compatible, Cloudflare-hosted, 40% off list for the launch period.

Specs

Context window
1,048,576 tokens (input + max_tokens)
Function calling
Yes — calls tools with correct schemas in our contract tests
Reasoning
Yes — reasoning_effort accepted; default low via the gateway
Upstream ID (public)
@cf/deepseek-ai/deepseek-v4-flash-0731
Privacy
Cloudflare-hosted; metadata-only logging on our side

Pricing (40% off list)

deepseek-v4-flash40% off
Input
$0.44$0.264
Output
$1.32$0.792

@cf/deepseek-ai/deepseek-v4-flash-0731

Struck price = list. Full live pricing, including cached input, on the models page.

Measured speed

Our measurements, 2026-08-16 — the reason we call Flash fast is that we checked.

~1.0 s

time to first token (p50, 5 streams)

~102 tok/s

streaming throughput (p50)

4.6 s

first token at 100K input tokens

13.2 s

first token at 300K input tokens (~45 ms per 1K tokens)

Quickstart

OpenAI SDK unchanged — set base_url, use model id deepseek-v4-flash.

from openai import OpenAI

client = OpenAI(
    base_url="https://api.clfaigateway.dev/v1",
    api_key="sk-gw-...",  # app.clfaigateway.dev
)

resp = client.chat.completions.create(
    model="deepseek-v4-flash",
    messages=[{"role": "user", "content": "Summarize this repository..."}],
    stream=True,
)
for chunk in resp:
    print(chunk.choices[0].delta.content or "", end="")

deepseek-v4-flash — common questions

Long-context agent loops, repository and document Q&A, extraction and classification at volume — anywhere you want the 1M window and real speed without flagship pricing. It calls tools correctly and streams its reasoning.

Same 1M window and the same tokenizer; Flash is about a third of Pro’s price, much faster to first token in our tests, and the right default. Escalate the hardest reasoning to Pro when quality on a specific task demands it.

deepseek-v4-pro →

Very large requests (600K+ tokens) can hit retryable capacity errors at peak times, and per-minute rate limits are tighter on frontier-class models than on small ones. The gateway returns honest 429s with retry-after; official SDKs back off automatically.

Rate-limit docs →