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.
The GLM series has thinking on by default — the response content array carries a type="thinking" block, and that part counts towards output tokens. So max_tokens should not be set too low; 1024 or higher is recommended, otherwise the response may be truncated before the thinking finishes and you get no answer text.

Authorizations

Authorization
string
header
required

##All interfaces require authentication using a Bearer Token##

Get an API Key:

Visit the API Key management page to obtain your API Key

Add it to the request header when using:

Note: EvoLink uses Bearer Token authentication uniformly for /v1/messages.

Body

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

Model to call:

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

"glm-5.3"

max_tokens
integer
default:1024
required

Maximum number of tokens to generate for this request; required by the Anthropic protocol.

Note: the GLM series has thinking on by default, and the thinking content also consumes output tokens, so this value should not be too small — 1024 or higher is recommended.

Required range: 1 <= x <= 131072
Example:

1024

messages
Message · object[]
required

The list of conversation messages, in chronological order. At least one message is required.

Minimum array length: 1

Response

Message object

Anthropic-style message response

id
string

The message's unique ID (format: msg_<uuid>)

type
enum<string>

Response object type

Available options:
message
role
enum<string>
Available options:
assistant
model
string

Model actually used

Example:

"glm-5.3"

content
object[]

The list of response content blocks

Possible block types:

  • thinking: the reasoning process (when thinking is enabled, which is the default)
  • text: the final answer text
  • tool_use: a tool call initiated by the model
stop_reason
enum<string>

Stop reason

  • end_turn: natural completion (also returned when stop_sequences is hit)
  • max_tokens: reached the max_tokens limit
  • tool_use: the model triggered a tool call
Available options:
end_turn,
max_tokens,
tool_use
usage
object

Token usage statistics (Anthropic specification)