Skip to content

DeepSeek Responses

Create responses with the OpenAI Responses API–compatible format for DeepSeek. Supports multimodal input, tool calling, streaming, and context compaction.

http
POST /v1/responses

The Responses API targets multimodal workflows, tool calling, and context continuation. Compared with DeepSeek Chat Completions, its input/output and tool-call structures are better suited to complex task orchestration.

The default model is .

Available models

ModelDescription
Next-generation high-capability model
Next-generation fast model

Headers

NameTypeRequiredDescription
stringYesRequest authentication. Use a Bearer token, for example:
stringYesRequest content type; must be

Request body

NameTypeRequiredDescription
stringYesModel name; default example . See Available models above
string | arrayNoModel input: a plain text string, or an array of text / image / file input items
stringNoSystem (developer) message; not automatically inherited when used with
objectNoReasoning configuration for DeepSeek reasoning capabilities
objectNoText output configuration (, )
arrayNoList of callable tools (built-in / MCP / function)
string | objectNoTool selection: / / , or a specific tool object
booleanNoWhether to allow parallel tool calls, default
integerNoUpper bound on tokens generated in one response (visible output and reasoning tokens), minimum
integerNoMaximum total built-in tool calls in one response
numberNoSampling temperature, range , default
numberNoNucleus sampling, range , default
integerNo; number of candidate token log probabilities to return
booleanNoWhether to use SSE streaming, default
objectNoStreaming options; only effective when
booleanNoWhether to run asynchronously in the background, default
booleanNoWhether to store the response for later retrieval, default
objectNoUp to 16 key-value pairs of metadata
arrayNoAdditional output data to include (e.g. retrieval results, logprobs)
stringNoDeprecated. Truncation strategy: / (default)
stringNoPrevious response ID for multi-turn continuation; cannot be used with
string | objectNoConversation ID or ; cannot be used with
objectNoReusable prompt template ( / / )
stringNoPrompt cache bucket key
objectNoCache options (, ); supported by the DeepSeek series
stringNoStable end-user identifier, max 64 characters
stringNoProcessing tier: / / / / /
stringNoDeprecated; use /
objectNoContent moderation configuration
arrayNoLong-context management configuration

reasoning

NameTypeRequiredDescription
stringNo / / / / / / , default
stringNo / /

text

NameTypeRequiredDescription
objectNoDefault ; may use /
stringNo / / , default

stream_options

NameTypeRequiredDescription
booleanNoStream obfuscation fields; trusted links may disable this to save bandwidth. Usage is returned by default on

prompt

NameTypeRequiredDescription
stringYesPrompt template ID
stringNoTemplate version
objectNoTemplate variables

Request example

bash
curl -X POST https://octopusx.ai/v1/responses \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4-pro",
    "instructions": "You are a concise technical assistant.",
    "input": "In three sentences, explain when the Responses API is a good fit."
  }'
bash
curl -X POST https://octopusx.ai/v1/responses \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4-pro",
    "input": [
      {
        "type": "input_text",
        "text": "Describe the main content of this image."
      },
      {
        "type": "input_image",
        "image_url": "https://example.com/image.png"
      }
    ]
  }'
bash
curl -X POST https://octopusx.ai/v1/responses \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4-pro",
    "input": "Look up today'\''s weather in Hangzhou.",
    "tools": [
      {
        "type": "function",
        "name": "get_weather",
        "description": "Get weather by city",
        "parameters": {
          "type": "object",
          "properties": {
            "city": { "type": "string" }
          },
          "required": ["city"]
        }
      }
    ],
    "tool_choice": "auto"
  }'
bash
curl -X POST https://octopusx.ai/v1/responses \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4-pro",
    "input": "Explain the advantages of the Responses API step by step.",
    "stream": true
  }'

Response example

json
{
  "id": "resp_abc123",
  "object": "response",
  "created_at": 1735689600,
  "status": "completed",
  "model": "deepseek-v4-pro",
  "output": [
    {
      "type": "message",
      "id": "msg_abc123",
      "status": "completed",
      "role": "assistant",
      "content": [
        {
          "type": "output_text",
          "text": "The Responses API is a good fit for multimodal input, tool calling, and tasks that need context continuation. It splits output into structured items that are easy for programs to read. Through a unified gateway you can reuse the same auth, billing, and channel routing.",
          "annotations": []
        }
      ]
    }
  ],
  "usage": {
    "prompt_tokens": 26,
    "completion_tokens": 62,
    "total_tokens": 88
  }
}

Response fields

NameTypeDescription
stringResponse ID
stringAlways
integerCreation timestamp (Unix seconds)
stringStatus, e.g.
stringModel actually used
arrayList of structured output items
stringOutput item type, e.g.
arrayContent parts (e.g. )
objectToken usage
integerInput tokens
integerOutput tokens
integerTotal tokens

Context compaction

POST /v1/responses/compact compresses a long context into a summary that can continue in later turns. The request shape is close to /v1/responses; common fields are model, input, instructions, and previous_response_id.

bash
curl -X POST https://octopusx.ai/v1/responses/compact \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4-pro",
    "instructions": "Compress into context that later turns can continue from. Keep decisions, constraints, and open todos.",
    "input": [
      { "role": "user", "content": "First-round requirements..." },
      { "role": "assistant", "content": "First-round proposal..." }
    ]
  }'

Notes

TIP

Whether optional parameters take effect depends on the upstream model’s capabilities. In the debugger, non-required fields are off by default and are written into the request body only after you enable them.

WARNING

previous_response_id and conversation cannot be used together. Streaming usage is usually returned via the response.completed event.