
DeepSeek
DeepSeek V4
From $0.140 per 1M tokens
GLM-5.2 is Z.AI's flagship foundation model, built for the era of long-horizon tasks. GLM-5.2 reads a 1M-token context window that Z.AI describes as solid and lossless, writes up to 128K tokens back, thinks by default but lets you switch thinking off, and exposes a reasoning-effort control the rest of the GLM family does not have. On reAPI, GLM-5.2 bills about a third below Z.AI's published per-token rate on both input and output.
glm-5.2Chat models run on the api.reapi.ai gateway, which has its own console and its own key. Open the console to run GLM-5.2 through the OpenAI-compatible Chat Completions surface.
Real-world workflows and production use cases you can build and ship with this model.

This is the case Z.AI leads with, and the one the context window exists for. GLM-5.2 keeps module boundaries, architectural constraints, API contracts, directory structure and earlier decisions in view for the length of a task, which is what stops the late stages of a long job from feeling like they were done by someone who never read the beginning. Z.AI's framing is worth quoting: the model does not merely read more context, it carries the engineering judgements it formed earlier into later execution. The way to test that on your own codebase is to ask GLM-5.2 for a technical audit — architecture map, module responsibilities, API contracts, data flows, call chains, technical debt — before you ask it to change anything.
Read the API docs
Z.AI describes GLM-5.2 as more stable on cross-file, multi-step, long-chain work: it breaks the goal down, identifies dependencies and risks, then implements, verifies and closes in stages. The named fits are module decoupling, API migration, directory restructuring, SDK adaptation and cross-language refactoring — the jobs that fail not because any single edit is hard but because step forty contradicts step three. Bound the task, state what must not change, and ask GLM-5.2 for the execution plan, impact scope, risk boundaries and verification method before it starts editing.

The failure mode of an autonomous coding agent is not bad code, it is scope creep: an extra dependency, a quietly changed API contract, a skipped test, a commit you did not ask for. Z.AI puts consistency on exactly these constraints — code style, architectural boundaries, dependency rules, build process, testing requirements, commit boundaries — among GLM-5.2's improvements, and specifically under long context and many rounds. Feed GLM-5.2 your real lint rules, build commands, test requirements and prohibited actions, then give it a real task and check the report against them.
Credit-based — 1 credit = $0.001 USD. Pay only for completed generations.
| Category | Unit | Price |
|---|---|---|
| Token pricing | ||
| Input | 1M tokens | $0.9 |
| Output | 1M tokens | $3 |
Z.AI publishes a per-million-token rate for GLM-5.2 input and output. On reAPI, GLM-5.2 bills roughly a third below both — no subscription underneath it, no minimum commitment, pay-as-you-go in USD against your gateway balance. The exact numbers are in the pricing table on this page.
GLM-5.2 is served from a standard `/v1/chat/completions` endpoint. If your code already speaks that shape, adopting GLM-5.2 is a base URL, a key and a model string — the same SDKs work once the base URL points at the gateway. No SDK swap, no vendor-specific client.
The same api.reapi.ai key that calls GLM-5.2 calls the Claude, GPT and Gemini families too. Sending the cheap bulk of an agent's turns to GLM-5.2 and escalating only the hard ones to a closed frontier model is a model string, not a second integration, a second invoice and a second set of credentials.
These two are the open-weight answer to the same question: a million-token context aimed at long-horizon coding, with the weights published rather than held. GLM-5.2 is the cheaper of the pair on reAPI by a wide margin, and the more forgiving to integrate — thinking is optional, sampling parameters still do something, and prior reasoning is dropped from the history unless you ask to keep it. Kimi K3 answers with modality and a stricter contract. Pick on shape, then on price.
Comparison reflects behavior documented by each vendor at the time of writing. Rates are described as relationships rather than amounts; the live numbers for GLM-5.2 are in the pricing table above.
Sign up at api.reapi.ai, open the console and generate an API key. That one key reaches GLM-5.2 and every other model on the gateway, billed from a single balance.
OpenSet your base URL to api.reapi.ai and your key to the one you just created. Any client that already speaks OpenAI Chat Completions works unchanged — no SDK swap is needed to reach GLM-5.2.
OpenSet the model field to `glm-5.2` — with the dot — and post your messages. Turn on streaming for long outputs, and remember that GLM-5.2 thinks by default at the deepest effort setting, so pick an effort level before you measure cost.
OpenCommon questions about this model.
Try it in the playground or grab an API key to integrate now.