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

DeepSeek V4 Pro API

The DeepSeek V4 flagship (official 0813 release) for the hardest work: repository-scale analysis, long-document reasoning and reliable function calling over a 1,048,576-token window — behind one OpenAI-compatible endpoint, hosted on Cloudflare.

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-pro-0813
Privacy
Cloudflare-hosted; metadata-only logging on our side

Pricing (40% off list)

deepseek-v4-pro40% off
Input
$1.32$0.792
Output
$3.96$2.376

@cf/deepseek-ai/deepseek-v4-pro-0813

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

Measured behavior

Our measurements, 2026-08-16. Pro trades latency for depth — plan around it.

~2.5 s

time to first token on short prompts (p50)

~44 tok/s

streaming throughput (p50)

31.5 s

first token at 300K input tokens

76.5 s

first token at 600K input tokens — always stream large jobs

Quickstart

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

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-pro",
    messages=[{"role": "user", "content": "Summarize this repository..."}],
    stream=True,
)
for chunk in resp:
    print(chunk.choices[0].delta.content or "", end="")

deepseek-v4-pro — common questions

When the answer quality on hard reasoning matters more than latency and price: multi-step analysis over huge context, tricky refactors, long legal or research documents. For high-volume agent loops and extraction, Flash at a third of the price is usually the better trade.

Compare with Flash →

Prefill on hundreds of thousands of tokens is real compute — we measured 76.5 s to first token on a 600K-token prompt, and the model can queue under load. The gateway budgets for this (it will not cut a large request off as "hung"); your side should stream and keep the connection open.

Streaming docs →

No. Reasoning streams as reasoning_content and its tokens are part of completion_tokens, billed once at the output rate. Usage logs show the reasoning share separately so long thinking is never a billing surprise.

Billing docs →