Skip to navigation

DeepSeek V4 Pro

Beta
View as Markdown

DeepSeek V4 Pro is the larger model in the DeepSeek V4 family, served on Sarvam infrastructure as an open-weight model. It supports text input and output with a 1,000,000-token context window.

DeepSeek V4 Pro is in beta. Its behaviour, limits, and availability may change before general availability. Beta models must be enabled for your API key; without access, requests return 400 invalid_request_error (“This model is currently in beta”). Contact us to request access. See Beta models.

At a glance

Model IDdeepseekv4-pro
Best forHarder reasoning and agentic tasks over long text
Context window1,000,000 tokens
Input → outputText → text
Reasoninglow, high (default), or max; can be turned off. See Reasoning
Tool callingSupported, including tool_choice: "required" and parallel tool calls
APIsPOST /v2/chat/completions and POST /v2/responses
Pricing₹115 input · ₹4 cached input · ₹350 output per 1M tokens; reasoning is billed as output (Pricing)

Key capabilities

Long context

Process up to 1,000,000 tokens across the prompt, reasoning, and generated output.

Reasoning

Choose low, high, or max, or turn thinking off for direct answers.

Tool calling

Use OpenAI-compatible tools and tool_choice, with thinking on or off.

Structured output

Constrain answers with response_format JSON schemas.

Log probabilities

Request logprobs and top_logprobs.

Multiple choices

Generate n > 1 completions in one request.

Moving from OpenRouter, Fireworks AI, or Together AI? The migration guides map model IDs and request fields to Sarvam.

Quickstart

from sarvamai import SarvamAI
client = SarvamAI(api_subscription_key="YOUR_SARVAM_API_KEY")
response = client.chat.completions_v2(
model="deepseekv4-pro",
messages=[
{
"role": "user",
"content": "Explain the difference between a B-tree and a B+ tree index.",
}
],
max_tokens=2000,
)
print(response.choices[0].message.content)

Supported parameters

model: "deepseekv4-pro" on Chat Completion V2 and Responses. Full request/response schemas live on those API reference pages; this table covers what’s actually accepted for this model.

ParameterChat Completion V2Responses
Streaming (stream)
Tool calling (tools, tool_choice)
parallel_tool_calls: false enforced
Structured output (response_format / text.format)
Log probabilities (logprobs, top_logprobs) send top_logprobs with include: ["message.output_text.logprobs"]; logprobs: true returns 400
Multiple choices (n > 1)N/A — Responses has no n
Reasoning controlreasoning_effort: low, high (default), max, or none to turn offreasoning.effort: same values
Turn reasoning off reasoning_effort: "none" reasoning.effort: "none"

On POST /v2/responses, logprobs is only populated when the request includes "include": ["message.output_text.logprobs"]. Without it, output[].content[].logprobs is always an empty array even if top_logprobs is set. Verified against the live API on 2026-10-22.

Reasoning

DeepSeek V4 Pro thinks by default at high effort.

ValueBehaviour
"low", "high", "max"Sets the reasoning effort. Omitting the field gives high.
"none"Turns thinking off.
"minimal", "medium", "xhigh"Also accepted.
Integer budgetsNot supported; return 400.

Set the value with reasoning_effort on Chat Completion V2 or reasoning.effort on Responses. You can also turn thinking off with thinking: {"type": "disabled"}, sent through extra_body in the SDKs:

response = client.chat.completions_v2(
model="deepseekv4-pro",
messages=[{"role": "user", "content": "What is 17 × 23?"}],
extra_body={"thinking": {"type": "disabled"}},
max_tokens=2000,
)

Read the reasoning trace from choices[].message.reasoning_content on chat. On Responses, output starts with a reasoning item; read its content[0].text (summary is empty). Reasoning tokens are billed as output tokens and count against max_tokens / max_output_tokens.

Tool calling

Pass OpenAI-compatible tools. tool_choice accepts "auto", "none", "required", or a named function ({"type": "function", "function": {"name": "..."}}). Tool calling works with thinking on or off. The model can return several tool calls in one turn; set parallel_tool_calls: false to get at most one.

Known limitations

  • Text input only. Image, audio, and video parts return 400.
  • Reasoning and the final answer share the max_tokens / max_output_tokens budget.
  • stop strings apply to the answer only; a match inside the reasoning doesn’t end the response.
  • Structured output (response_format on chat, text.format on Responses) turns reasoning off, even when you set an effort level.
  • Set max_tokens explicitly. When it’s omitted, generation isn’t capped at a small default and long answers can run to tens of thousands of tokens.

Limits and errors

AreaLimit or conditionAPI responseRecommended action
Outputmax_tokens exceeds 1,000,000400 invalid_request_errorSet max_tokens within the context window.
Request sizeRequest body exceeds 10 MiB (10,485,760 bytes)413 invalid_request_error, with the limit in the messageShorten the prompt.
ModalityRequest includes image, audio, or video input400 invalid_request_errorSend text input only.
ReasoningReasoning consumes the full max_tokens budget200 with finish_reason: "length"Raise max_tokens or lower the reasoning effort.
AuthenticationAPI key is missing or invalid403 invalid_api_key_errorCheck the api-subscription-key header.
ModelModel ID is unknown or unavailable404 not_found_errorCheck the spelling; model IDs are case-sensitive.
QuotaNo credits remain402 insufficient_quota_errorAdd credits in the dashboard.
Rate limitRequest or concurrency limit is exceeded429 rate_limit_exceeded_errorBack off and retry.
AvailabilityModel remains overloaded after retries503 model_overloadedRetry later.