Skip to main content
POST

Authorizations

Authorization
string
header
required

Pass Authorization: Bearer <token> in the request header.

Headers

x-dashscope-session-cache
enum<string>

Optional upstream session cache switch. It only takes effect when the current model and upstream provider support it.

Available options:
enable

Body

application/json
model
enum<string>
required

Model name. Use a model that is publicly exposed by the platform API and supports the Responses API. Whether a model supports tools, OCR, or thinking mode depends on the current provider channel.

Available options:
MiniMax-M2.5,
MiniMax-M2.5-highspeed,
MiniMax-M2.7,
MiniMax-M2.7-highspeed,
MiniMax-M3,
qwen3-coder-plus,
qwen3-max,
qwen3.5-flash,
qwen3.6-plus,
deepseek-v3-2-251201,
seed-1-6-250915,
seed-1-6-flash-250715,
seed-1-8-251228,
seed-2-0-lite-260228,
seed-2-0-mini-260215,
seed-2-0-pro-260328
Example:

"qwen3.6-plus"

input
required

Model input. Pass a plain text string or a message array arranged in conversation order. For multi-turn tool calls, pass back message, function_call, function_call_output, or reasoning items from the previous response.

instructions
string

System instructions inserted at the start of the context. When you use previous_response_id, the previous turn's instructions are not automatically passed into this turn.

previous_response_id
string

The previous response id. Use it to create a multi-turn conversation. The server combines the previous input and output as context. Do not use it together with conversation.

conversation
string

Conversation ID for the current response. Conversation history is passed as context, and this input and output are added to the conversation after the response completes. Do not use it together with previous_response_id.

stream
boolean
default:false

Whether to enable streaming output. When set to true, the endpoint returns an SSE event stream.

store
boolean
default:true

Whether to store this response. When set to false, this response cannot be used later as context through previous_response_id.

tools
object[]

Array of tools the model can call while generating the response. You can mix built-in tools and custom function tools. Whether a tool takes effect depends on model and upstream provider support.

tool_choice
default:auto

Controls how the model chooses tools. String mode supports auto, none, and required; object mode restricts the model to a given tool list.

Available options:
auto,
none,
required
temperature
number

Sampling temperature. It controls output randomness. Avoid setting both temperature and top_p.

Required range: 0 <= x < 2
top_p
number

Nucleus sampling probability threshold. It controls output diversity. Avoid setting both temperature and top_p.

Required range: 0 < x <= 1
enable_thinking
boolean
deprecated

Whether to enable thinking mode. This is not a standard OpenAI field; prefer reasoning.effort instead.

reasoning
object

Controls the model thinking effort. When set, the model may generate reasoning output items before the reply.

ocr_options
object

Custom OCR task parameters. Use only with models that support OCR. The custom task result is returned through ocr_result in the response content.

Response

The call succeeded. Non-streaming mode returns a complete Response object; streaming mode returns an SSE event stream.

id
string
required

Unique identifier for this response. It can be used as previous_response_id.

created_at
integer
required

Unix timestamp for this request, in seconds.

object
enum<string>
required

Fixed to response.

Available options:
response
status
enum<string>
required

Response generation status.

Available options:
completed,
failed,
in_progress,
cancelled,
queued,
incomplete
model
string
required

Model ID used to generate the response.

output
object · object · Function call · object · object · object · object[]
required

Array of output items generated by the model. Item types and order depend on the model response and tool calls.

parallel_tool_calls
boolean

Whether tools are called in parallel.

tool_choice
any

Echoes the tool choice strategy from the request.

tools
object[]

Echoes the tool configuration from the request.

usage
object

Token usage statistics. When tools, cache, OCR, or multimodal input are enabled, extra detail fields may be returned.

error
object | null

Error object when generation fails; usually null on success.