GLM API Pricing: Models, Token Costs, and Getting Started
By Nicho
GLM API pricing depends on the model, access provider, and mix of input, cached input, and output tokens. A coding subscription uses a different billing system, so its monthly allowance should not be treated as a balance for arbitrary API traffic.
For the two GLM models currently listed on cheapaimodel, GLM-5.3-Flash has the lower token price. Whether it is the better choice depends on the results your application needs. Start with a small evaluation rather than assuming that either the cheapest or the most expensive model will win.
This guide compares published rates checked on 26 October 2026. The examples are calculations from stated token counts, not measured application benchmarks.
Using GLM from outside China? See the Zhipu GLM API on Z.ai for sign-up, card payment and the 3DS catch.
Current GLM API prices
The following prices are in USD per million tokens. Input and cache-read input are separate categories; do not count the same tokens in both.
| Model and access route | Uncached input / 1M | Cached input / 1M | Output / 1M |
|---|---|---|---|
| GLM-5.3, Z.ai direct | $1.40 | $0.26 | $4.40 |
| GLM-5.3, cheapaimodel | $0.976972 | $0.181438 | $3.070483 |
| GLM-5.3-Flash, Z.ai direct | $0.15 | $0.03 | $0.50 |
| GLM-5.3-Flash, cheapaimodel | $0.104676 | $0.020935 | $0.348919 |
Sources: Z.ai API pricing and cheapaimodel pricing. The gateway rates are reproduced at their displayed precision. Check both pages again before funding an account or moving production traffic.
Z.ai lists additional models that are outside this comparison. A model appearing in its catalog does not establish that cheapaimodel serves it. Use the current model catalog to confirm availability, then check the exact identifier and required features for your route.
The table compares token charges. It does not demonstrate equal latency, uptime, model revisions, or behavior across providers.
Calculate a budget from your own token mix
Express each token count in millions, then calculate:
Token subtotal = uncached input × input rate + cached input × cache rate + output × output rate.
Use mutually exclusive input categories. If a request reports one million total input tokens and 800,000 are cache hits, the uncached amount is 200,000, not one million. Confirm the meaning of the usage fields returned by your provider before feeding them into a cost dashboard.
Here are three scenarios using the rates above:
| Scenario | GLM-5.3 direct | GLM-5.3 gateway | Flash direct | Flash gateway |
|---|---|---|---|---|
| 1M uncached input + 0.2M output | $2.2800 | $1.5911 | $0.2500 | $0.1745 |
| 20M uncached input + 2M output | $36.8000 | $25.6804 | $4.0000 | $2.7914 |
| 4M uncached + 16M cached input + 2M output | $18.5600 | $12.9519 | $2.0800 | $1.4515 |
For example, the second Flash gateway subtotal is 20 × $0.104676 + 2 × $0.348919 = $2.791358. The table rounds only the final totals to four decimal places.
The third scenario assumes an 80% cache-hit share of its 20 million input tokens. That is a budgeting assumption, not an observed hit rate. Your prompts, cache eligibility, and provider behavior determine what actually happens.
These subtotals exclude taxes where applicable, separately billed tools or storage, and tokens from retries beyond the stated amounts. Tokenization and output length can also differ between models, so equal token counts isolate price rather than predict equal work completed.
Check charges beyond the token table
The direct Z.ai price list labels cached-input storage as temporarily free and prices built-in web search separately. Neither statement establishes how a third-party gateway handles the same features. Confirm the gateway's applicable charges before including them in a budget.
For an agent workflow, count all model calls and any chargeable tools. A task that requires several retries can cost more than a single successful request even when the advertised token rate is lower. Track total spend per accepted result alongside token consumption.
For comparisons with other model families, see our LLM API pricing comparison.
GLM API access versus the GLM Coding Plan
Z.ai's standard API and its GLM Coding Plan serve different purchasing needs. The plan is a subscription for supported agent tools, with five-hour and weekly credit allowances. Credit consumption varies by model and usage category. It is not a simple promise of unlimited requests.
Its usage policy limits subscription use to supported tools and prohibits account sharing. Check whether your intended application is covered rather than assuming a subscription key can replace general-purpose API billing.
Choose based on the work you need to do:
- For a supported personal coding or office-agent workflow, evaluate the plan's current limits and terms against your usage.
- For an application you operate, evaluate an API route and budget its actual requests. Do not convert a subscription's monthly price into an unrestricted per-token rate.
- If you use both, keep their credentials, endpoints, and billing records separate so you know which product is handling each request.
cheapaimodel describes its own service as prepaid, with top-ups starting at $5 and no subscription. Review its current billing and refund terms before adding funds.
How to get a GLM API key and start safely
1. Choose the account that will serve the request
For direct access, follow Z.ai's standard API quickstart. For gateway access, use the cheapaimodel documentation. Obtain the key from the service you actually intend to call; keys are not interchangeable between providers.
2. Match the key, base URL, and model ID
Z.ai documents the standard API base URL as https://api.z.ai/api/paas/v4/. cheapaimodel publishes https://api.cheapaimodel.ai/v1 and lists glm-5.3 and glm-5.3-flash in its price catalog. The coding plan has separate configuration instructions. Do not mix those routes simply because they accept similar request formats.
3. Send a small representative request
Keep the key in a server-side secret or environment variable, never in a public repository or browser bundle. Use the selected provider's current example to make the first request, then inspect the returned usage and account charge. This guide does not claim that an authenticated integration test has been performed for your account.
4. Validate the features your application needs
Test streaming, tool calls, structured output, or non-text input separately when you rely on them. Z.ai's model documentation describes its own capabilities; it is not proof that every gateway exposes every feature identically. Review limits for the route you selected before increasing concurrency or request size.
5. Measure quality before increasing traffic
Use representative tasks with clear acceptance criteria. Compare failures, retries, latency, and cost per accepted result. Start with Flash when its lower price makes it a reasonable candidate, and test GLM-5.3 when the workload warrants another option. Price alone is not a quality ranking.
Is there a free GLM API?
The current Z.ai price list marks some older Flash models as free, while GLM-5.3-Flash has paid rates. “Flash” therefore does not mean “free.” Verify the exact model, provider, and account conditions rather than transferring an older offer to a different version.
For the models covered here, use the paid rates above as your starting point. Check live prices, pick the appropriate model, and validate a small workload before scaling.