Skip to content
GLM 5.3 · 1M context · flagship coding

GLM 5.3 API, OpenAI-compatible

Z.ai’s GLM 5.3 — the flagship agentic coding model of the GLM-5 series — pairs a 1,048,576-token context window with reasoning, function calling and structured outputs. Served on Cloudflare Workers AI infrastructure through one OpenAI-compatible endpoint: prepaid USD credits, per-token billing you can audit, and 60% off the list price for the launch period.

What you get

Context window
1,048,576 tokens (input + max_tokens), confirmed against the endpoint’s own limit message
Positioning (per Z.ai)
Flagship agentic coding model — built for multi-step, tool-driven development workflows
Image input
No — our probe came back 0/2: the model accepts the image, then answers that it cannot see it. The gateway refuses image requests to this model by name before they cost you anything; deepseek-v4.1-flash and qwen3.8-27b do read images
Function calling
Yes — verified in our contract tests, tools called with correct schema
Reasoning
Yes — streamed as reasoning_content, billed once at output rate; always on — effort low/medium/high/max: low and high think briefly, medium and max think fully (the gateway validates the level per model)
JSON mode
Yes — verified: response_format json_object returns valid JSON. Give it max_tokens headroom — the model reasons before it answers
Cached input
A published rate — our repeat-probes have not seen a hit on this model yet; see the caching note below
Upstream ID (public)
@cf/zai-org/glm-5.3
Privacy
Runs on Cloudflare infrastructure; we log metadata only — never prompt or response content

Pricing (60% off list, applied automatically)

glm-5.360% off
Input
$1.40$0.56
Output
$4.40$1.76

@cf/zai-org/glm-5.3

Struck price = list. The cached-input rate is published upstream, but our identical-repeat probes have not seen a cache hit on this model yet, so treat it as a bonus, not a budget line. Live prices for every model are on the models page, synced from the billing database that rates your requests.

Measured, not quoted

Our own measurements, 2026-08-28 — the day we added the model. Live status and per-model numbers stay on the models page.

~0.8 s

time to first token (p50, 5 streams, none hung)

~107 tok/s

streaming throughput (p50)

72–77 ms / 1K tokens

prefill rate measured at 50K–300K input

~23 s

first token on a real 300K-token prompt — use streaming for large jobs

Ship in two lines of config

If your code already talks to the OpenAI API, you only change base_url and the key. The model id is glm-5.3; the upstream id is public.

from openai import OpenAI

client = OpenAI(
    base_url="https://api.clfaigateway.dev/v1",
    api_key="sk-gw-...",  # app.clfaigateway.dev
)

resp = client.chat.completions.create(
    model="glm-5.3",
    messages=[{"role": "user", "content": "Refactor this module..."}],
    stream=True,
)
for chunk in resp:
    print(chunk.choices[0].delta.content or "", end="")

GLM 5.3 on the gateway — common questions

The window counts input plus your max_tokens budget. Prefill is real work at this size — we measured 72–77 ms per 1,000 input tokens from 50K up to 300K, so a 300K-token prompt takes about 23 seconds before the first token. Always stream large requests, and expect retryable capacity errors at peak times on very large prompts.

Context & caching docs →

No — and we checked instead of assuming. Our standard probe sends two solid-colour images; GLM 5.3 answered 0/2, accepting each image and then saying it cannot see it. That silent failure mode is exactly why the gateway refuses image requests to this model up front with a named error, before they cost you anything. deepseek-v4.1-flash and qwen3.8-27b do read images, verified the same way.

Which models read images →

The rate is published upstream, but on this model our identical 300K-token repeat within a minute still billed zero cached tokens — we have not seen a hit here yet, and we publish that instead of promising savings. If upstream starts serving cache hits, the cached rate applies automatically and your usage log will show it.

How caching behaves →

Almost always finish_reason "length": the completion budget covers thinking plus the answer, and this model thinks first — against a ~240K-token prompt we measured 7,000+ tokens of reasoning before any visible text. With a small max_tokens the budget dies mid-thought, content arrives empty or truncated, and the consumed tokens are still billed. Give agentic calls 8,000+ tokens of headroom and check finish_reason before retrying — a retry with the same tight budget buys the same failure.

Streaming & reasoning docs →

We added it the day it appeared and measured everything we publish — around fifty calls, none of which hit transient upstream errors. A good early sign, not a guarantee: the gateway still translates upstream hiccups into clean retryable errors and fails over where it can, and the status page will say so if reliability shifts.

Prepaid credits, billed per actual token from upstream usage — never estimates. Reasoning tokens are part of output and billed once. Every request shows its exact cost in your usage log, and the ledger adds up to the nano-dollar.

Billing docs →