GLM 5.2

Cloudflare Workers AI model tuned for agentic coding, repository edits, and tool-heavy engineering work.

Text

GLM 5.2 technical docs

Endpoint, auth header, parameters, prices, and tested request examples for GLM 5.2.

Endpoint

Endpoint and pricing

POST /responses Endpoint https://api.imole.app/v1 Base URL 3 API cauris 3 Agent cauris
Headers

Request headers

Authorization required

Bearer Imole API key.

Content-Type required

Use application/json for JSON requests.

Parameters

Request parameters

model required

Text model id.

input required

String input or Responses input array.

messages

Legacy chat-style array. The router converts it to Responses input.

instructions

System or developer instruction inserted ahead of the user task.

max_output_tokens

Optional provider output control. Imole does not require it or impose its own token ceiling.

reasoning

Optional reasoning controls when supported, including effort and Pro mode.

temperature

Sampling randomness when the model supports it.

top_p

Nucleus sampling control.

stream

Return server-sent events when supported.

true, false
tools

Tool definitions for tool-enabled Responses calls.

tool_choice

Tool selection policy.

auto, none, required
parallel_tool_calls

Allow multiple tool calls in one turn.

true, false
text.format

Structured text format controls for Responses.

response_format

Compatibility field for JSON-style output requests.

metadata

Optional request metadata.

Examples

Tested request examples

Prompt input
curl -X POST "https://api.imole.app/v1/responses" \
  -H "Authorization: Bearer $IMOLE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "glm-5.2",
  "input": "Reply with exactly hello-from-imole and nothing else.",
  "max_output_tokens": 64
}'
Prompt-only numeric answer
curl -X POST "https://api.imole.app/v1/responses" \
  -H "Authorization: Bearer $IMOLE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "glm-5.2",
  "input": "What is 2 + 2? Reply with only the answer.",
  "max_output_tokens": 64
}'
Prompt-only shell command
curl -X POST "https://api.imole.app/v1/responses" \
  -H "Authorization: Bearer $IMOLE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "glm-5.2",
  "input": "Name a Unix command that lists files in the current folder. Reply briefly.",
  "max_output_tokens": 64
}'