# GLM-5 Code API pricing 

| Field | Per 1M tokens |
| --- | --- |
| Input | $1.20 |
| Output | $5.00 |
| Cached input | $0.30 |

[Cost calculator](https://apicostcheck.com/calculator/) · [Compare models](https://apicostcheck.com/compare/) 

[Report a wrong price](https://apicostcheck.com/board/?cat=data&title=Wrong+price%3A+GLM-5+Code&body=Our+page+shows+%241.20+input+%2F+%245.00+output+per+1M.+The+official+page+says%3A+%28paste+the+link+and+the+price%29#new) 

[Z.ai (Zhipu GLM)](https://apicostcheck.com/providers/zai/) · Max input 200,000 · Max output 128,000 [reasoning](https://apicostcheck.com/?f_reasoning=yes) · [tool calling](https://apicostcheck.com/?f_tools=yes) Per 1,000 tokens (1K): $0.0012 input, $0.005 output. 

[Calculate my cost →](https://apicostcheck.com/calculator/?model=glm-5-code) 

Follow this price: 

Confirm with the link we send; every alert has a one-click unsubscribe. [How alerts work](https://apicostcheck.com/alerts/) · [Privacy](https://apicostcheck.com/privacy/#alert-data) 

### Atom feed ▾

[Atom](https://apicostcheck.com/models/glm-5-code/feed.xml)[JSON](https://apicostcheck.com/data/models/glm-5-code.json)

Get notified in any feed reader. 

Billing rules for caching, Batch and long prompts: [Z.ai (Zhipu GLM) API cost guide](https://apicostcheck.com/glm-api-cost-calculator/). 

## Price in context

GLM-5 Code ranks 14 of 15 current Z.ai (Zhipu GLM) models by output price, cheapest first ([GLM-5.3 Flash](https://apicostcheck.com/models/glm-5.3-flash/) is the cheapest at $0.50, [GLM-4.5 X](https://apicostcheck.com/models/glm-4.5-x/) the most expensive at $8.90). Output tokens cost 4.17× the input price; the median across all 126 current models is 5×. Against the whole table (median $1.25 input / $4.40 output per 1M), GLM-5 Code is cheaper on one and pricier on the other.

Cached input costs 25% of the normal input price ($0.30 vs $1.20 per 1M). In the support-chatbot scenario with 60% cache hits the month comes to $419 instead of $516 without caching (19% less). There is no separate cache-write charge: repeated prefixes are discounted automatically. This site's data has no batch price for this model, so the calculations here bill batch jobs at the standard rates.

The context window is 200,000 tokens, roughly 400 pages of English text; 87% of current models accept more. The closest model from another provider by price is [GPT-6.1 Terra](https://apicostcheck.com/models/gpt-6.1-terra/) ($1.00 / $5.00); the cheapest reasoning model for the chatbot scenario is [MiMo V2.6 Flash](https://apicostcheck.com/models/mimo-v2.6-flash/) at $27.18 per month against $419 for GLM-5 Code.

## What it costs per month

| Scenario (per month) | GLM-5 Code |
| --- | --- |
| Customer support chatbot 5,000 req/day · 1,200 in · 400 out · cache 60% | $419 |
| RAG over documents 2,000 req/day · 8,000 in · 600 out · cache 30% | $626 |
| Coding agent 1,500 req/day · 25,000 in · 2,000 out · cache 80% | $990 |
| Deep reasoning 800 req/day · 3,000 in · 6,000 out · cache 20% | $793 |
| Batch processing 50,000 req/day · 1,500 in · 150 out · batch | $3,825 |

Adjust the numbers in the [calculator](https://apicostcheck.com/calculator/). 

## Cheaper alternatives

Lowest monthly cost for the chatbot scenario among reasoning models: 

- [MiMo V2.6 Flash](https://apicostcheck.com/models/mimo-v2.6-flash/) — $27.18/mo
- [Gemini 2.5 Flash Lite](https://apicostcheck.com/models/gemini-2.5-flash-lite/) — $32.28/mo
- [Qwen Flash](https://apicostcheck.com/models/qwen-flash/) — $33.00/mo
- [Doubao Seed 2.1 Lite 260915](https://apicostcheck.com/models/doubao-seed-2-1-lite-260915/) — $34.05/mo
- [Muse Ember 1.0](https://apicostcheck.com/models/muse-ember-1.0/) — $37.63/mo 

## Comparisons

- [Compare GLM-5 Code with any model →](https://apicostcheck.com/compare/?m=glm-5-code) 

## Other Z.ai (Zhipu GLM) models

[GLM-4.5 X](https://apicostcheck.com/models/glm-4.5-x/), [GLM-5.3 FlashX](https://apicostcheck.com/models/glm-5.3-flashx/), [GLM-5.3 Flash](https://apicostcheck.com/models/glm-5.3-flash/), [GLM-5.3](https://apicostcheck.com/models/glm-5.3/), [GLM-5.2](https://apicostcheck.com/models/glm-5.2/), [GLM-5.1](https://apicostcheck.com/models/glm-5.1/), [GLM-5v Turbo](https://apicostcheck.com/models/glm-5v-turbo/), [GLM-5](https://apicostcheck.com/models/glm-5/), [GLM-4.7](https://apicostcheck.com/models/glm-4.7/), [GLM-4.6](https://apicostcheck.com/models/glm-4.6/), [GLM-4.5v](https://apicostcheck.com/models/glm-4.5v/), [GLM-4.5](https://apicostcheck.com/models/glm-4.5/), [GLM-4.5 Air](https://apicostcheck.com/models/glm-4.5-air/), [GLM-4.5 AirX](https://apicostcheck.com/models/glm-4.5-airx/) · [All Z.ai (Zhipu GLM) API prices →](https://apicostcheck.com/providers/zai/) 

## Models at a similar price

[GPT-6.1 Terra](https://apicostcheck.com/models/gpt-6.1-terra/) ($1.00/$5.00), [Claude Haiku 4.5](https://apicostcheck.com/models/claude-haiku-4-5/) ($1.00/$5.00), [GLM-4.5 AirX](https://apicostcheck.com/models/glm-4.5-airx/) ($1.10/$4.50), [GLM-5.3](https://apicostcheck.com/models/glm-5.3/) ($1.40/$4.40), [GLM-5.2](https://apicostcheck.com/models/glm-5.2/) ($1.40/$4.40), [GLM-5.1](https://apicostcheck.com/models/glm-5.1/) ($1.40/$4.40) 

## Price history

No price changes recorded since tracking began on 2026-10-08. [See all price changes →](https://apicostcheck.com/price-changes/)

### Other changes (1)

Listings, fields a source added or dropped, and limit changes. These are not price moves.

| Date | Change | Old /1M | New /1M | What happened |
| --- | --- | --- | --- | --- |
| 2026-10-08 | Added | — | — | — |

## Source and checks

| | |
| --- | --- |
| Data source | [LiteLLM price list](https://github.com/BerriAI/litellm/blob/main/model_prices_and_context_window.json) (MIT) |
| Official pricing | [docs.z.ai ↗](https://docs.z.ai/guides/overview/pricing) |
| Last synced | 2026-11-24 01:00 UTC |
| Last price change | No price changes recorded since tracking began on 2026-10-08. |
| Cross-check | Single source: models.dev has no comparable data |
| Official check | The [official page](https://docs.z.ai/guides/overview/pricing.md) was read on 2026-11-24 and this ID is not on it, so its price could not be checked against this page |
| Price region | Not confirmed by an official check |

Cite: GLM-5 Code API pricing, https://apicostcheck.com/models/glm-5-code/, retrieved 2026-11-24. Reuse under CC BY 4.0; a plain or nofollow link is fine.

---
Source: https://apicostcheck.com/models/glm-5-code/ · prices in USD per 1M tokens, synced 2026-11-24 01:00 UTC · Free to reuse under CC BY 4.0 with attribution to apicostcheck.com (a plain or nofollow link is fine). Prices derived from LiteLLM's model price list, MIT License, (c) 2023 Berri AI.
