Skip to content
English

DeepSeek V4 Pro API

POST Base URL: https://api.hiapi.ai /v1/responses

The OpenAI-compatible Responses endpoint is recommended for this model, while /v1/chat/completions remains available for compatibility. The same HiAPI API key works across enabled models; media models use /v1/tasks and a different request shape.

Model overview

Model namedeepseek-v4-pro
VersionDeepSeek-V4-Pro-0813
TypeText generation · Responses + Chat Completions
Context window1,000,000 tokens
Maximum output384,000 tokens
Default modeThinking · high effort
FeaturesStreaming, JSON output, tools, Codex access
PricingSee HiAPI Pricing

DeepSeek V4 Pro 0813 is the official production release of DeepSeek’s V4 Pro model. It is designed for demanding reasoning, coding, and Agent workloads, with a 1M-token context window, up to 384K output tokens, thinking and non-thinking modes, and native Responses and Chat Completions support.

Production guidance

API key and endpoints
  • Use the same HiAPI API key across enabled models.
  • Use /v1/responses for the primary integration. /v1/chat/completions remains available for compatible clients.
  • Media generation uses /v1/tasks and a different request shape. Keep API keys on your server.
Stateless Responses contract
  • DeepSeek Responses is stateless. Omit store, previous_response_id, conversation, and background.
  • Replay required context in input for each turn.
  • Streaming ends with response.completed, response.incomplete, or response.failed rather than Chat Completions [DONE].

Best suited for

Complex reasoning

Long-horizon analysis and difficult professional tasks.

reasoning.effortinput
Coding Agents

Repository analysis, implementation, and iterative tool workflows.

toolsinput
Long-context work

Large codebases, documents, and multi-step investigations.

inputmax_output_tokens
Structured output

Machine-readable responses for downstream systems.

text.format

Request parameters

model string required

Use deepseek-v4-pro.

example deepseek-v4-pro
input string | array required

Text or an array of message items with role and content.

instructions string optional

Define the role and response requirements.

stream boolean optional

Return semantic SSE events when true.

default false
max_output_tokens integer optional

Limit output for this response; the model specification limit is 384K.

example 4096
reasoning object optional

Control reasoning effort; defaults to high.

effort enum optional

none disables reasoning; higher levels usually increase latency and token use.

default high enum: nonelowhighmax
text object optional

Configure structured output through text.format.

tools array optional

Tool definitions; use only tool types verified for this model.

tool_choice string | object optional

Control tool selection.

API examples

Request examples

Maximum reasoning

Use max explicitly for the strongest reasoning effort.

Request body
{
  "model": "deepseek-v4-pro",
  "input": [
    {
      "type": "message",
      "role": "user",
      "content": [
        {
          "type": "input_text",
          "text": "Review this service design and list the top three risks."
        }
      ]
    }
  ],
  "reasoning": {
    "effort": "max"
  },
  "max_output_tokens": 4096,
  "stream": false
}
Non-thinking response

Set reasoning.effort=none for low-latency generation.

Request body
{
  "model": "deepseek-v4-pro",
  "input": [
    {
      "type": "message",
      "role": "user",
      "content": [
        {
          "type": "input_text",
          "text": "Review this service design and list the top three risks."
        }
      ]
    }
  ],
  "reasoning": {
    "effort": "none"
  },
  "max_output_tokens": 4096,
  "stream": false
}
Streaming response

Set stream=true and dispatch semantic event types.

Request body
{
  "model": "deepseek-v4-pro",
  "input": [
    {
      "type": "message",
      "role": "user",
      "content": [
        {
          "type": "input_text",
          "text": "Review this service design and list the top three risks."
        }
      ]
    }
  ],
  "reasoning": {
    "effort": "high"
  },
  "max_output_tokens": 4096,
  "stream": true
}

Response schema

Read output_text items from output for non-streaming calls and process semantic event types when streaming. usage is the billing detail source.

{
  "id": "resp_example",
  "object": "response",
  "status": "completed",
  "model": "deepseek-v4-pro",
  "output": [
    {
      "id": "msg_example",
      "type": "message",
      "role": "assistant",
      "status": "completed",
      "content": [
        {
          "type": "output_text",
          "text": "Sparse attention computes only selected token relationships."
        }
      ]
    }
  ],
  "usage": {
    "input_tokens": 24,
    "output_tokens": 18,
    "total_tokens": 42,
    "input_tokens_details": {
      "cached_tokens": 0
    }
  }
}
  1. For non-streaming calls, read output_text items from output.
  2. For streaming, append response.output_text.delta and stop on a terminal response event.
  3. Read input, output, cached-input, and total Token counts from usage.
  4. Handle response.incomplete and response.failed explicitly.

FAQ

What is DeepSeek V4 Pro?

DeepSeek V4 Pro 0813 is the official production release of the V4 Pro API model for demanding reasoning, coding, and Agent workloads. It supports a 1M-token context window, up to 384K output, and both thinking and non-thinking modes.

Which model ID and endpoint should I use?

Set model to deepseek-v4-pro. HiAPI recommends POST /v1/responses; compatible clients can also use POST /v1/chat/completions.

How do I control reasoning?

For Responses, set reasoning.effort to none, low, high, or max; high is the default. For Chat Completions, use thinking.type and reasoning_effort.

Does Responses store conversation state?

No. DeepSeek Responses is stateless. Omit store, previous_response_id, conversation, and background, and replay required context in input.

How are tokens billed?

Input, output, and cached-input tokens are billed separately. Use the live HiAPI pricing page as the source of truth. View live pricing.

Can I use it with Codex or an OpenAI-compatible client?

Use the Responses endpoint for Codex-compatible workflows. Existing Chat Completions clients can keep their messages request shape and switch the base URL, API key, and model ID.

Next steps