Skip to content

DeepSeek V4 Pro API

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

DeepSeek V4 Pro costs $0.28 per million input tokens and $0.55 per million output tokens, against an official rate of $0.43 and $0.87 — 37% 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-pro. On an agent or chat workload that resends a fixed prompt prefix, where that prefix is billed at the cached rate of $0.055 per million, the saving reaches 66%.

Input

$0.28/M

$0.43/M

Output

$0.55/M

$0.87/M

Savings

37%

off official

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

Still the best reasoning-per-dollar in open weights. Aggressive cache discounts make it especially cheap for agent loops with a large fixed system prompt.

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-pro",
    messages=[{"role": "user", "content": "Hello"}]
)
DeepSeek V4 Pro: our rate against DeepSeek's own
The official rate is the one the model's own publisher charges, and it is the only benchmark this page claims to beat. DeepSeek V4 Pro is $0.55 per 1M tokens on output. That is 37% below the model publisher's own rate.Our published rates, read from the same table the API bills from.

DeepSeek V4 Pro 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.28/M$0.55/M
Official (DeepSeek)$0.43/M$0.87/M
OpenRouter$0.42/M$0.85/M
DeepInfra$0.30/M$0.60/M
Together AI$0.40/M$0.82/M

Cached input on DeepSeek V4 Pro is billed at $0.055/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

  • Cost-sensitive batch processing at scale
  • Math and reasoning-heavy evaluation pipelines
  • Agent loops with large repeated system prompts
Full technical documentation

Related

Other text models

DeepSeek V4 Pro questions

Every figure below is read from the same catalogue entry as the table above, so the two cannot disagree.

What does DeepSeek V4 Pro cost on AI Token Router, and what is the official rate?

Input is $0.28/M here against $0.43/M official, and output is $0.55/M against $0.87/M official — $0.15/M off every million input tokens and $0.32/M off every million output tokens. The headline 37% blends the two, weighted three to one towards output, because real workloads write far more than they read and a flat average of the two percentages would overstate what you actually save. Both figures are printed side by side on this page: the official rate is the only benchmark that makes ours mean anything.

Can I call DeepSeek V4 Pro right now?

Yes. A request naming deepseek/deepseek-v4-pro reaches a live upstream today and is billed at the rates above. 7 of the 24 models in this catalogue are callable right now; the rest are listed at their intended price and marked unavailable on their own pages, so you find that out here rather than from an error at call time.

Does DeepSeek V4 Pro support prompt caching, and what does a cached token cost?

Yes. A repeated prefix — a fixed system prompt, a tool schema, a document you keep querying — is served from the model's KV cache and billed at $0.055/M instead of the standard $0.28/M, which is 80% below the input rate. DeepSeek's own cached rate is $0.087/M, so the discount applies on top of a rate that is already below official. Nothing has to be set on the request; the prefix is matched automatically. On an agent loop, where most of every request is unchanged from the last one, this is usually the largest single line on the bill.

How do I call DeepSeek V4 Pro from my code?

Point an OpenAI SDK at https://router.xark.io/api/v1 and pass model="deepseek/deepseek-v4-pro" — the chat completions endpoint is https://router.xark.io/api/v1/chat/completions. Request shape, streaming frames, the usage block and the error envelope all match what your OpenAI client already handles, so the base URL and the model id are the only two lines that change. The bare name deepseek-v4-pro, without the provider prefix, resolves to the same model. An integration written before the ids were namespaced therefore keeps working.

How large is DeepSeek V4 Pro's context window?

160K — 163,840 tokens in a single request, shared between everything you send and everything the model generates back. For comparison, the widest context in this catalogue is Llama 4 Maverick at 1M. Context is billed like any other input: filling the window costs the input rate on every token in it, every turn, which is why the cached-input rate matters more than the window size on a workload that resends the same prefix.

What licence is DeepSeek V4 Pro under, and can I use it commercially?

DeepSeek V4 Pro is published by DeepSeek under the MIT licence. MIT is a standard permissive licence: commercial use, modification and redistribution are all allowed, and the only obligation is to keep the copyright and licence notice with the software. It sets no user threshold, no field-of-use restriction and no separate acceptable-use policy, so there is nothing in it that limits what you build commercially on top of the output.

How does DeepSeek V4 Pro pricing here compare with other providers carrying it?

Of the 3 other providers we track carrying DeepSeek V4 Pro, the lowest is DeepInfra at $0.30/M input and $0.60/M output, against our $0.28/M input and $0.55/M output. That is where the rates stood when we last reconciled them, and it can change without notice — we are not claiming to be the cheapest source for this model, only that our rate sits below DeepSeek's official $0.43/M. If you find one of these figures stale, tell us and we will correct it.

What is DeepSeek V4 Pro actually good at?

Still the best reasoning-per-dollar in open weights. Aggressive cache discounts make it especially cheap for agent loops with a large fixed system prompt. In practice that points at cost-sensitive batch processing at scale, math and reasoning-heavy evaluation pipelines and agent loops with large repeated system prompts. The specifics that actually decide a fit — the rate, the licence and what it will and will not serve today — are all on this page rather than behind a sales conversation.

Start using DeepSeek V4 Pro today

$5 in free credits, no credit card required.