Skip to main content
POST
BaseURL: The default BaseURL is https://direct.evolink.ai, which has better support for text models and long-lived connections. https://api.evolink.ai is the primary endpoint for multimodal services and serves as a fallback address for text models.
Use POST /v1/responses and select the model with model. The minimum required fields are model and input. The examples also set an output budget and reasoning effort to help you get started.
Responses uses nested reasoning.effort, rather than top-level reasoning_effort or thinking. Reasoning usage is included in output_tokens. Simple tasks may return reasoning_tokens=0; this does not imply that thinking can be disabled.Reasoning effort; low is recommended.Compatibility rules for glm-5.3 / glm-5.3-flash / glm-5.3-flashxminimal and none do not disable thinking on the 5.3 series. Thinking tokens are billed as output. Unrecognized values are unchanged and have no compatibility mapping; use the listed values. These mappings do not apply to glm-5.2.On this endpoint, glm-5.2 may still produce reasoning tokens with none. This value does not guarantee that thinking is disabled.

Read the answer

Ordered output items. Extract text from content entries with type=output_text inside type=message items. Reasoning may precede the answer, and function_call turns may contain no answer text. Do not always read output[0]. Once the response JSON is parsed into response, extract the answer as follows:
Maximum output tokens for this generation, including reasoning. Start at 1024 and adjust for the task. A small budget may be exhausted during reasoning, leaving only reasoning items and no answer. Check status and incomplete_details. The parameter name is max_output_tokens, not max_tokens.
See the full reference for tool calls, images, SSE handling and multi-turn conversations.

Authorizations

Authorization
string
header
required

Send Bearer YOUR_API_KEY in the Authorization header.

Body

application/json
model
enum<string>
default:glm-5.3-flash
required

Choose a GLM model. All four support text on this endpoint. Optional capabilities vary by model.

Available options:
glm-5.3,
glm-5.3-flash,
glm-5.3-flashx,
glm-5.2
Example:

"glm-5.3-flash"

input
required

Required. A text string or an array of Responses input items. Arrays accept messages, returned model output items and function_call_output. For multi-turn conversations, include the full history in each request. Put the system prompt first as a role=system message. Images use input_image, supported only by glm-5.3-flash and glm-5.3-flashx. Do not use the Chat Completions messages / image_url block format.

Example:

"Introduce yourself in one sentence."

max_output_tokens
integer

Maximum output tokens for this generation, including reasoning. Start at 1024 and adjust for the task. A small budget may be exhausted during reasoning, leaving only reasoning items and no answer. Check status and incomplete_details. The parameter name is max_output_tokens, not max_tokens.

Required range: x >= 1
Example:

1024

stream
boolean
default:false

Enable SSE streaming. Read answer text from delta in response.output_text.delta. The successful terminal event is response.completed. Also end the turn and handle response.incomplete, response.failed or error. Do not wait only for [DONE] or connection closure.

reasoning
object

Responses uses nested reasoning.effort, rather than top-level reasoning_effort or thinking. Reasoning usage is included in output_tokens. Simple tasks may return reasoning_tokens=0; this does not imply that thinking can be disabled.

Response

Generation completed or returned an incomplete result; check status. Streaming returns text/event-stream.

id
string

ID of this response. Pass it unchanged as previous_response_id.

Example:

"response_demo"

object
string
Allowed value: "response"
created_at
integer

Creation time in Unix seconds.

model
string
Example:

"glm-5.3-flash"

status
enum<string>

completed means generation for this turn has ended, possibly with tool calls only. incomplete means the output is incomplete. Check both output and error.

Available options:
completed,
incomplete,
failed,
in_progress,
queued
output
object[]

Ordered output items. Extract text from content entries with type=output_text inside type=message items. Reasoning may precede the answer, and function_call turns may contain no answer text. Do not always read output[0].

output_text
string

Optional aggregated answer text; it may be absent. General-purpose clients should traverse output.

usage
object
error
object | null

Response error, normally null on success.

incomplete_details
object
metadata
object | null