GLM-5.2 API at $1.10 / $4.10 per Million Tokens

The GLM-5.2 API on Morph costs $1.10 per million input tokens and $4.10 per million output, below Fireworks, Baseten, and Z.ai's own $1.40/$4.40. OpenAI-compatible, ~100 tok/s, MIT open weights you can pin. Get a key and drop it into Claude Code, Cline, or Cursor.

July 24, 2026 · 1 min read
Input / output per 1M tokens
$1.10 / $4.10
Input / output per 1M tokens
OpenAI-compatible serving
~100 tok/s
OpenAI-compatible serving
Token context
1M
Token context
Open weights you can pin
MIT
Open weights you can pin

The GLM-5.2 API, Priced

The GLM-5.2 API on Morph costs $1.10 per million input tokens and $4.10 per million output, with cached input at $0.22 per million. Fireworks, Baseten, and Z.ai's own first-party API all list GLM-5.2 at $1.40 input and $4.40 output, so Morph runs below every one of them on both dimensions. It is the same model: Zhipu AI's open-weight, MIT-licensed GLM-5.2 with a 1M-token context, the top open-weights score on the Artificial Analysis Intelligence Index. Morph serves it at about 100 tokens per second on an OpenAI-compatible endpoint. Get a key and point your editor at it.

GLM-5.2 API Pricing vs Everyone Else

GLM-5.2 is the cost story. It posts roughly a quarter of frontier per-token rates with comparable daily coding quality, and Morph prices it below the other hosts of the same weights. Pay per token, billed through one Morph account, no per-plan usage caps.

GLM-5.2 API pricing per 1M tokens (verified July 24, 2026)
ProviderInputOutputCached input
Morph$1.10$4.10$0.22
Fireworks AI$1.40$4.40$0.14
Baseten$1.40$4.40$0.26
Z.ai (first-party)$1.40$4.40$0.26

Fireworks price from fireworks.ai, Baseten from baseten.co/pricing, Z.ai from docs.z.ai. GLM-5.2 is verbose, so effective cost-per-task is higher than the sticker rate on any provider; the per-token gap holds across all of them.

1/4
GLM-5.2 lands near a quarter of frontier per-token rates with comparable daily coding quality. The cheapest place to run the same open weights is the whole pitch.
Z.ai list pricing vs GPT-5.5 ($5/$30) and Opus 4.8 ($5/$25)

Call It From Your Editor

The endpoint is OpenAI-compatible. Set the base URL to Morph, pass your key, call morph-glm52-744b. Switching from Z.ai or any other host is a base URL and model name change, no SDK rewrite. The same key works in any client that speaks the OpenAI API: Claude Code, Cline, OpenCode, Roo Code, and Cursor's custom-model setting.

from openai import OpenAI

client = OpenAI(
    base_url="https://api.morphllm.com/v1",
    api_key="YOUR_MORPH_API_KEY",
)

resp = client.chat.completions.create(
    model="morph-glm52-744b",
    messages=[
        {"role": "user", "content": "Refactor this module to remove the circular import."},
    ],
)
print(resp.choices[0].message.content)

In an editor, set the provider base URL to https://api.morphllm.com/v1 and select morph-glm52-744b. No extra headers, no whitelisted user agent.

Why GLM-5.2

Cheapest per token

$1.10 input and $4.10 output per million on Morph, below Fireworks, Baseten, and Z.ai's own $1.40/$4.40. Roughly a quarter of frontier rates with comparable daily coding quality.

#1 open-weights

Top open-weights model on the Artificial Analysis Intelligence Index (score 51). 62.1 on SWE-bench Pro and 81.0 on Terminal-Bench 2.1 from Z.ai's technical report.

Pin the version

MIT-licensed open weights on Hugging Face. You pin the exact version, so the model does not get silently swapped or nerfed mid-project. Your evals will not drop out from under you.

For the full architecture (IndexShare sparse attention), the benchmark breakdown, and the serving footguns people hit on SGLang and vLLM, see the GLM-5.2 deep dive. For every open model Morph serves, see Open Source Models.

Two Models, One Endpoint

GLM-5.2 is the cost workhorse. For the hardest problems, the same Morph key also serves Kimi K3, which tops the Arena.ai Frontend Code Arena at 1,679 Elo. Route the bulk of the loop through GLM-5.2 at $1.10/$4.10 and reach for Kimi K3 when a task needs it, without swapping keys or endpoints.

The Morph model lineup
GLM-5.2Kimi K3
RoleCost workhorseHardest problems
Input / output per 1M$1.10 / $4.10$3 / $15
Standout#1 open-weights intelligence#1 Frontend Code Arena
Context1M1M
APIOpenAI-compatibleOpenAI-compatible

Kimi K3 is Sonnet-tier priced, not cheap; it is the model you reach for when GLM-5.2 stalls. Details on the Kimi K3 API page.

Private deployments

The fastest endpoints are private deployments

Morph's top speeds come from dedicated deployments, not shared public endpoints: speculators trained on your traffic, caching tuned to your workload, and volume discounts over public per-token rates. Over 100 billion tokens per day run this way.

Talk to us about a private deployment

Get your GLM-5.2 API key

GLM-5.2 at $1.10 input and $4.10 output per million tokens, below Fireworks, Baseten, and Z.ai. OpenAI-compatible, one key across Claude Code, Cline, Cursor, and every model Morph serves.

FAQ

How much does the GLM-5.2 API cost?

On Morph, $1.10 per million input tokens and $4.10 per million output, with cached input at $0.22 per million. That is below Fireworks, Baseten, and Z.ai's own first-party API, all at $1.40/$4.40. Pricing is per token, no per-plan usage caps.

How do I get a GLM-5.2 API key?

Sign up and create a key from the dashboard. Set base_url to https://api.morphllm.com/v1, pass the key, and call morph-glm52-744b. One key works across every model Morph serves.

Is GLM-5.2 open source?

Yes. Zhipu AI (Z.ai) releases GLM-5.2 under the MIT license with open weights on Hugging Face (zai-org/GLM-5.2), no regional restrictions. Open weights let you pin the version so the model is never silently swapped under your evals.

Can I use it in Claude Code, Cline, or Cursor?

Yes. Point any OpenAI-compatible client at https://api.morphllm.com/v1 and select morph-glm52-744b. It drops into Claude Code, Cline, Roo Code, OpenCode, and Cursor's custom-model setting with a config change.