Skip to main content
Watch: I Built an AI App Without Leaving Databricks

Cost levers - verified

How to cut your Z.ai API bill

Prompt caching: automatic. Cache lifetime: not specified. A cache hit typically saves 81.5% on input across 12 current models. Batch: no batch API documented. Service tiers: none documented.

Read from docs.z.ai. Compare every provider's cost levers

Caching
Automatic
Cache hit saves
81.5%
Batch
None
Service tiers
0

Prompt caching

Mode

Automatic: repeated prefixes are cached with no code change

Automatic cache recognition on mainstream GLM models; no manual configuration.

Cache lifetime

Not specified ("reasonable time limits")

Minimum prompt
Not stated
Cache write cost

No cache-write line item; new content billed at standard prices

Cache read cost

Guide says cache hits are 'usually 50% of standard price', but the pricing table lists cached input at roughly 15-20% of input

Derived from the pricing table. The 15-20% range is computed from the pricing table, Cached Input divided by Input per model (e.g. GLM-5.3 $0.26/$1.4 = 18.6%, GLM-5 $0.2/$1 = 20%, GLM-4.7-FlashX $0.01/$0.07 = 14.3%, GLM-4.5-X $0.45/$2.2 = 20.5%). Only the "usually 50%" guide wording is a quote.

Storage cost

Cached Input Storage listed as 'Limited-time Free' on the pricing table

How to enable

Automatic; check usage.prompt_tokens_details.cached_tokens.

From the docs
“Automatic Cache Recognition: Implicit caching that intelligently identifies repeated context content without manual configuration”
“Cache has reasonable time limits, will recalculate after expiration”
“New content tokens: Billed at standard prices”
“Cache hit tokens: Billed at discounted prices (usually 50% of standard price)”
“| GLM-5.3 | $1.4 | $0.26 | Limited-time Free | $4.4 |”

Sources: docs.z.ai/guides/capabilities/cache, docs.z.ai/guides/overview/pricing

Batch API

No batch API documented

No batch page in the docs index (llms.txt) or pricing page.

Checkeds: docs.z.ai/guides/overview/pricing, docs.z.ai/llms.txt

Service tiers

Flex trades speed or availability for a lower price; Priority and Fast cost more for lower latency or reserved capacity.

Service tiers on the pages checked: Not stated

Other discounts and surcharges

Other discounts on the pages checked: Not stated

Z.ai per-model prices

USD per 1M tokens from the provider's own pricing page, newest release first. A dash means the model has no such rate. Muted rows are scheduled for shutdown or deprecated.

Z.ai models with input, cache, batch, output and fast mode prices per 1M tokens
ModelInputCached inputBatch inputOutputBatch output
GLM-5.3-Flash$0.15$0.0380% off-$0.50-
GLM-5.3$1.40$0.2681.4% off-$4.40-
GLM-5.2$1.40$0.2681.4% off-$4.40-
GLM-5.1$1.40$0.2681.4% off-$4.40-
GLM-5$1$0.2080% off-$3.20-
GLM-4.7$0.60$0.1181.7% off-$2.20-
GLM-4.6V$0.30$0.0583.3% off-$0.90-
GLM-4.6$0.60$0.1181.7% off-$2.20-
GLM-4.5$0.60$0.1181.7% off-$2.20-
GLM-4.5-Air$0.20$0.0385% off-$1.10-
GLM-4-32B-0414-128K$0.10--$0.10-
GLM-4.7-FlashX$0.07$0.0185.7% off-$0.40-
GLM-5.3-FlashX$0.37$0.07579.7% off-$1.25-

Research notes

Internal contradiction: caching guide says hits are usually 50% of standard, while every per-model row on the pricing page is about 15-20% (e.g. GLM-5.3 $0.26 vs $1.40). Treat the pricing table as authoritative.

FAQ

Does Z.ai cache prompts automatically?

Automatic: repeated prefixes are cached with no code change. Automatic cache recognition on mainstream GLM models; no manual configuration. How to enable: Automatic; check usage.prompt_tokens_details.cached_tokens.

How much does a cache hit cost on Z.ai?

Across 12 current models with a cache read price, a hit saves 81.5% (79.7% to 85.7%) off the input price. The docs say: Guide says cache hits are 'usually 50% of standard price', but the pricing table lists cached input at roughly 15-20% of input.

Does Z.ai have a batch API discount?

No batch API is documented. No batch page in the docs index (llms.txt) or pricing page.

Sources

Last verified from Z.ai's own pages below. Quotes are verbatim; each was matched against the live page.

Newsletter

Know when a provider changes its prices

One email per week. New model releases, pricing changes and what they mean for what you build.