GLM 5.3 API: Endpoints, Parameters & Python Examples

GLM 5.3 API: Endpoints, Parameters & Python Examples

GLM 5.3 API guide — model ID glm-5.3, endpoints (OpenAI/Anthropic-compatible), thinking parameters (reasoning_effort low/high/max), pricing $1.40/$4.40, and Python code examples.

GLM 5.3 API: Endpoints, Parameters & Python Examples

Quick answer: The GLM 5.3 API (model id glm-5.3) is rolling out at $1.40 per 1M input / $4.40 per 1M output tokens — the same rate as GLM 5.2. It's OpenAI- and Anthropic-compatible, requires thinking always enabled (reasoning_effort: low/high/max), and supports 1M-token context, 128K output, function calling with streaming parameters, and structured output.


TL;DR

FieldGLM 5.3 API
Model IDglm-5.3
Price$1.40 in / $4.40 out per 1M ($0.26 cached)
Context / Output1M tokens / 128K
ThinkingAlways on — reasoning_effort low/high/max
ProtocolsOpenAI Chat Completion / OpenAI Response / Anthropic Message
StatusRolling out ("coming soon" per official docs)

Endpoints

Z.AI publishes three compatible endpoints (all already live in docs):

ProtocolBase URL
OpenAI Chat Completionhttps://api.z.ai/api/coding/paas/v4
OpenAI Responsehttps://api.z.ai/api/v1
Anthropic Messagehttps://api.z.ai/api/anthropic

The OpenAI Chat Completion endpoint is the most widely used — and the one that works for previous Coding Plan subscribers (including expired ones) during rollout.

Required Parameters: Thinking Is Always On

The one breaking change vs GLM 5.2: you can no longer disable thinking.

{
  "model": "glm-5.3",
  "thinking": { "type": "enabled" },
  "reasoning_effort": "max"
}
ParameterValuesDefaultNotes
thinking.typeenabledenableddisabled is rejected
reasoning_effortlow, high, maxmaxmax recommended for coding

Migration: set enabled + low before switching the model ID, then tune up.

Python Example (OpenAI-Compatible)

from openai import OpenAI

client = OpenAI(
    base_url="https://api.z.ai/api/coding/paas/v4",
    api_key="YOUR_ZAI_API_KEY",
)

resp = client.chat.completions.create(
    model="glm-5.3",
    messages=[
        {"role": "user", "content": "Write a Python function that checks if a number is prime, with a docstring."}
    ],
    extra_body={
        "thinking": {"type": "enabled"},
        "reasoning_effort": "max",
    },
)

print(resp.choices[0].message.content)

Pricing

ModelInput/1MCached/1MOutput/1M
GLM 5.3$1.40$0.26$4.40
GLM 5.2$1.40$0.26$4.40
Kimi K3 (ref)$3.00$15.00

At $0.68 per Artificial Analysis Intelligence Index task, GLM 5.3 is the cheapest top-tier model per unit of measured intelligence — though it's also the most verbose of the group (~170M output tokens across AA's eval suite vs 72M median).

Capabilities

  • 1M-token context — repo-scale code fits in one request
  • 128K max output
  • Function calling — now with streaming parameter output
  • Structured output — JSON mode supported
  • Streaming — real-time token delivery
  • Text only — no vision/audio input (same as 5.2)

Availability Status

  • Coding Plan: live (all subscribers on 5.3)
  • ZCode: live
  • API: rolling out — endpoints published, pricing confirmed
  • OpenRouter: not listed yet (z-ai/glm-5.2 is newest)

FAQ

What is the GLM 5.3 API model ID? glm-5.3.

How much does the GLM 5.3 API cost? $1.40 per 1M input, $4.40 per 1M output, $0.26 cached input.

Is GLM 5.3 API OpenAI-compatible? Yes — OpenAI Chat Completion and Response protocols, plus an Anthropic-compatible endpoint.

What changed from GLM 5.2 API? Thinking is always enabled — use reasoning_effort (low/high/max) instead of thinking.type: "disabled".

Is the GLM 5.3 API available now? Rolling out — endpoints are published and pricing confirmed; Z.AI says general availability is coming soon.


Sources

Last updated: August 18, 2026

Start Using GLM 5 Today

Try GLM 5 free — reasoning, coding, agents, and image generation in one platform.