---
title: "GLM-5 Pricing: GLM-5.3, Flash & GLM-5.2 API Rates | Inference.net"
description: "Live GLM-5.3, GLM-5.3 Flash, and GLM-5.2 API pricing per 1M tokens on Inference.net, with prompt_cache_key rules, 40-turn session math, and SDK setup."
url: "https://inference.net/guides/glm-5-pricing/"
---

Guide Published December 06, 2026 7 min read

# GLM-5 Pricing: GLM-5.3, Flash & GLM-5.2 API Rates

Live GLM-5.3, GLM-5.3 Flash, and GLM-5.2 API pricing per 1M tokens on Inference.net, with prompt_cache_key rules, 40-turn session math, and SDK setup.

[**Inference.net**](https://inference.net/company/)

## Run GLM-5.3 at $0.084/1M Input

Call glm-5.3 and multimodal glm-5.3-flash with 1M context, prompt_cache_key support, native /v1/messages, and hosted US ZDR.

## Live GLM-5 and GLM-5.3 API pricing on Inference.net

On Inference.net, GLM API pricing starts at **`$0.084` per 1M fresh input tokens**, **`$0.079` per 1M cached reads**, and **`$3.00` per 1M output tokens** on [`glm-5.3`](https://inference.net/models/glm-5-3/) (1,048,576 context window, 943,718 max output tokens). For high-volume, output-heavy, or multimodal workloads, [`glm-5.3-flash`](https://inference.net/models/glm-5-3-flash/) costs **`$0.10` fresh input**, **`$0.03` cached reads** (70.0% discount), and **`$0.35` output per 1M tokens** with `text`, `image`, and `video` inputs. Both `glm-5.3` and `glm-5.3-flash` expose OpenAI `/v1/chat/completions`, `/v1/responses`, and native Anthropic `/v1/messages` with one API key.

All model IDs, context limits, and per-1M-token rates below were verified directly from `GET https://api.inference.net/v1/models` on **2026-12-06** (the API returns per-token prices; multiply by `1,000,000` for per-1M rates):

| Model ID | Context / max output | Fresh input ($/1M) | Cached read ($/1M) | Output ($/1M) | Tools & modalities | Hosting & ZDR scope | Model page |
| --- | --- | --- | --- | --- | --- | --- | --- |
| `glm-5.3` | 1,048,576 / 943,718 | `$0.084` | `$0.079` | `$3.00` | Tools, text | Inference.net-hosted (US, ZDR) | [GLM-5.3](https://inference.net/models/glm-5-3/) |
| `glm-5.3-flash` | 1,048,576 / 262,144 | `$0.10` | `$0.03` | `$0.35` | Tools, text + image + video | Inference.net-hosted (US, ZDR) | [GLM-5.3 Flash](https://inference.net/models/glm-5-3-flash/) |
| `glm-5.2` | 1,048,576 / 943,718 | `$1.30` | `$0.20` | `$4.40` | Tools, text | External route (upstream terms) | [GLM-5.2](https://inference.net/models/glm-5-2/) |
| `glm-5.2-fast` | 1,000,000 / 128,000 | `$2.60` | `$0.40` | `$8.80` | Tools, text | External route (upstream terms) | [GLM-5.2 Fast](https://inference.net/models/glm-5-2-fast/) |
| `glm-5` | 204,800 / 131,072 | `$0.95` | `$0.20` | `$2.55` | Text (`supports_tools: false`) | External route (upstream terms) | [GLM-5](https://inference.net/models/glm-5/) |

_Note: `glm-5.3` and `glm-5.3-flash` are always-thinking models supporting `low`, `high`, and `max` reasoning efforts (`reasoning_effort: "none"` is not supported). See [Reasoning docs](https://inference.net/docs/api/reasoning/) for per-model effort matrices._

## Which GLM model should you pick?

- **Deep coding, architecture, and long-output synthesis:** [`glm-5.3`](https://inference.net/models/glm-5-3/) (`$0.084` / `$0.079` cached / `$3.00` output). Lowest fresh input rate in the GLM family, 943,718 max output ceiling, Inference.net-hosted US infrastructure, and default [Zero Data Retention](https://inference.net/zero-data-retention/).
- **Cost-sensitive coding loops, multimodal agents, and extraction:** [`glm-5.3-flash`](https://inference.net/models/glm-5-3-flash/) (`$0.10` / `$0.03` cached / `$0.35` output). Output tokens cost 8.6x less than `glm-5.3`, cached input reads drop by 70.0%, and it adds `image` and `video` input modalities alongside 1M context and hosted US ZDR.
- **Migrating off legacy GLM-5.2 or GLM-5:** [`glm-5.2`](https://inference.net/models/glm-5-2/) (`$1.30` / `$4.40`), [`glm-5.2-fast`](https://inference.net/models/glm-5-2-fast/) (`$2.60` / `$8.80`), and [`glm-5`](https://inference.net/models/glm-5/) (`$0.95` / `$2.55`, no tool calling, 204K context) are externally routed and cost significantly more than `glm-5.3` and `glm-5.3-flash`. Move production workloads to `glm-5.3` or `glm-5.3-flash` unless pinned to an older checkpoint.

Compare models side by side on the [GLM API hub](https://inference.net/models/glm/), [GLM-5.3 vs GLM-5.3 Flash](https://inference.net/compare/glm-5-3-vs-glm-5-3-flash/), or [DeepSeek V4.1 Flash vs GLM-5.3 Flash](https://inference.net/compare/deepseek-v4-1-flash-vs-glm-5-3-flash/).

## GLM prompt caching: why `prompt_cache_key` is required

Unlike DeepSeek V4.1 Flash or Kimi K3 (which rely on implicit prefix caching without a cache key), **GLM routes on Inference.net require an explicit `prompt_cache_key` for reliable cache affinity**:

1. **On `glm-5.3`, `glm-5.3-flash`, `glm-5.2`, and `glm-5.2-fast`:** Keep the leading prompt prefix byte-identical across calls (same system prompt, same tool order, same static context) AND pass a stable `prompt_cache_key` string in the request body. `prompt_cache_key` is a routing-affinity hint; it does not create or identify cached content on its own.
2. **On `glm-5`:** Pass BOTH a stable `session_id` string for routing stickiness and a stable `prompt_cache_key` string for cache affinity alongside byte-identical leading messages.
3. **Never reuse GLM's `prompt_cache_key` on DeepSeek V4.1 Flash:** DeepSeek V4.1 Flash and V4 Pro routes use implicit caching without `prompt_cache_key` and may reject requests that send it. If you route across both families in one app, attach `prompt_cache_key` only to GLM (and OpenAI) requests.
4. **Verify cached reads on every call:** Inspect `usage.prompt_tokens_details.cached_tokens` in the JSON response (pass `stream_options: { "include_usage": true }` when streaming).

json

```json
{
  "model": "glm-5.3-flash",
  "prompt_cache_key": "repo-backend-v1",
  "messages": [
    { "role": "system", "content": "Stable system instructions and repository context..." },
    { "role": "user", "content": "Write unit tests for the token bucket middleware." }
  ]
}
```

## 40-turn coding-agent cost math

This breakdown uses the exact [Coding Agent preset](https://inference.net/tools/llm-pricing-calculator/?preset=coding-agent): **40 turns per session**, **14,000 average input tokens per turn** (`560K` total input = `84K` fresh + `476K` cached reads at an **85% cache hit rate**), and **900 average output tokens per turn** (`36K` total output). Monthly spend scales to **750,000 requests/month** (18,750 sessions).

| Model ID | Fresh input (84K) | Cached read (476K) | Output (36K) | 40-turn session (85% cache) | Session without cache | Monthly (750K reqs) |
| --- | --- | --- | --- | --- | --- | --- |
| `glm-5.3-flash` | `$0.0084` | `$0.0143` | `$0.0126` | **`$0.0353`** | `$0.0686` | `$661.50` |
| `glm-5.3` | `$0.0071` | `$0.0376` | `$0.1080` | **`$0.1527`** | `$0.1550` | `$2,862.38` |
| `glm-5` | `$0.0798` | `$0.0952` | `$0.0918` | **`$0.2668`** | `$0.6238` | `$5,002.50` |
| `glm-5.2` | `$0.1092` | `$0.0952` | `$0.1584` | **`$0.3628`** | `$0.8864` | `$6,802.50` |
| `glm-5.2-fast` | `$0.2184` | `$0.1904` | `$0.3168` | **`$0.7256`** | `$1.7728` | `$13,605.00` |

What the math shows:

- **`glm-5.3-flash` cuts 40-turn session cost by 48.6% with `prompt_cache_key`:** Going from 0% to 85% cache hits drops the session from `$0.0686` to **`$0.0353`** (`$661.50/month` at 750K requests).
- **`glm-5.3` is 2.4x cheaper than `glm-5.2` per coding session:** `$0.1527` vs `$0.3628`, with 70.7% of the `glm-5.3` session bill coming from output tokens (`$0.1080`). Keep `reasoning_effort: "low"` on routine turns if you want to cap output token volume.
- **Single-turn 500K-token analysis (0% cache, 4K output):** `glm-5.3` costs **`$0.0540`** (`$0.0420` input + `$0.0120` output) and `glm-5.3-flash` costs **`$0.0514`** (`$0.0500` input + `$0.0014` output), compared to `$0.6676` on `glm-5.2`.

Model your own prompt sizes and cache hit ratios in the [LLM Pricing Calculator](https://inference.net/tools/llm-pricing-calculator/) or [Prompt Cache Calculator](https://inference.net/tools/prompt-cache-calculator/).

## Quickstart: OpenAI SDK (with `prompt_cache_key`) and Anthropic `/v1/messages`

Create a free account at [/register](https://inference.net/register/?model=glm-5.3) and generate a key in [API keys](https://inference.net/dashboard/api-keys/). Export `INFERENCE_API_KEY` in your shell:

bash

```bash
export INFERENCE_API_KEY="inf_sk_..."
```

### OpenAI Python SDK with `prompt_cache_key`

Pass `prompt_cache_key` through `extra_body` in the official OpenAI Python SDK so consecutive calls in the same conversation or shared-system pipeline keep routing affinity:

python

```python
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.inference.net/v1",  # or https://us.api.inference.net/v1
    api_key=os.environ["INFERENCE_API_KEY"],
)

stream = client.chat.completions.create(
    model="glm-5.3",
    stream=True,
    stream_options={"include_usage": True},
    reasoning_effort="low",
    extra_body={"prompt_cache_key": "repo-api-service-v1"},
    messages=[
        {"role": "system", "content": "You are a concise backend engineer. Output valid TypeScript."},
        {"role": "user", "content": "Implement an idempotency-key middleware for HTTP POST handlers."},
    ],
)

for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)
    if chunk.usage:
        cached = getattr(chunk.usage.prompt_tokens_details, "cached_tokens", 0) or 0
        print(f"\n[usage] prompt={chunk.usage.prompt_tokens} cached={cached} output={chunk.usage.completion_tokens}")
```

### Native Anthropic SDK (`/v1/messages`)

Both `glm-5.3` and `glm-5.3-flash` work natively over `POST https://api.inference.net/v1/messages`. Set `base_url="https://api.inference.net"` without `/v1` because the Anthropic SDK appends `/v1/messages` automatically (see [Anthropic SDK docs](https://inference.net/docs/api/anthropic-sdk/) and [Claude Code setup](https://inference.net/docs/integrations/claude-code/)).

python

```python
import os
from anthropic import Anthropic

client = Anthropic(
    base_url="https://api.inference.net",
    auth_token=os.environ["INFERENCE_API_KEY"],
)

message = client.messages.create(
    model="glm-5.3-flash",
    max_tokens=2048,
    messages=[
        {"role": "user", "content": "Summarize three failure modes of distributed cron locks."}
    ],
)

for block in message.content:
    if block.type == "text":
        print(block.text)
```

## Privacy, Zero Data Retention, and US routing

Inference.net enables [Zero Data Retention](https://inference.net/zero-data-retention/) by default for new accounts under SOC 2 Type II controls on eligible Inference.net-hosted routes (`glm-5.3` and `glm-5.3-flash`), and both models support the US-only host `https://us.api.inference.net/v1`. Externally routed legacy models (`glm-5.2`, `glm-5.2-fast`, `glm-5`) are excluded from Inference.net's ZDR policy and follow their upstream provider's data-handling and retention terms.

## Frequently asked questions

### What is the difference between `glm-5.3` and `glm-5.3-flash`?

Both are Inference.net-hosted US models with a 1,048,576-token context window, tool calling, default ZDR, and `low`/`high`/`max` reasoning efforts. `glm-5.3` (`$0.084` input / `$0.079` cached / `$3.00` output per 1M) is text-only with a 943,718-token max output ceiling for deeper coding and long-form synthesis. `glm-5.3-flash` (`$0.10` input / `$0.03` cached / `$0.35` output per 1M) adds `image` and `video` input modalities, cuts output token cost by 8.6x, and gives a 70.0% cached-read discount.

### How do I enable prompt caching on GLM-5.3 and GLM-5.3 Flash?

Keep your leading system instructions, tool definitions, and static context byte-identical across turns and pass a stable `prompt_cache_key` string in every request body. Check `usage.prompt_tokens_details.cached_tokens` to verify cache hits. For legacy `glm-5`, pass both `session_id` and `prompt_cache_key`.

### Can I turn off thinking with `reasoning_effort: "none"` on GLM-5.3?

No. `glm-5.3` and `glm-5.3-flash` are always-thinking models supporting `low`, `high`, and `max` reasoning efforts. Pass `reasoning_effort: "low"` to minimize reasoning token overhead and latency, or switch to `deepseek-v4.1-flash-1017` or `moonshotai/kimi-k3.1-pro` if you need `reasoning_effort: "none"`.

### Can I use GLM-5.3 in Claude Code, OpenCode, or LiteLLM Proxy?

Yes. Use `glm-5.3` or `glm-5.3-flash` natively in [Claude Code](https://inference.net/docs/integrations/claude-code/), [OpenCode](https://inference.net/docs/integrations/opencode/), [Cursor](https://inference.net/docs/integrations/cursor/), and [LiteLLM Proxy](https://inference.net/docs/integrations/litellm/) with `openai/glm-5.3` or `openai/glm-5.3-flash`.

## Related GLM resources

- **Model hub & specs:** [GLM API Hub](https://inference.net/models/glm/) · [GLM-5.3](https://inference.net/models/glm-5-3/) · [GLM-5.3 Flash](https://inference.net/models/glm-5-3-flash/) · [GLM-5.2](https://inference.net/models/glm-5-2/)
- **Calculators & comparisons:** [LLM Pricing Calculator](https://inference.net/tools/llm-pricing-calculator/) · [Prompt Cache Calculator](https://inference.net/tools/prompt-cache-calculator/) · [GLM-5.3 vs GLM-5.3 Flash](https://inference.net/compare/glm-5-3-vs-glm-5-3-flash/) · [Kimi K3 vs GLM-5.3](https://inference.net/compare/kimi-k3-vs-glm-5-3/) · [DeepSeek V4.1 Flash vs GLM-5.3 Flash](https://inference.net/compare/deepseek-v4-1-flash-vs-glm-5-3-flash/)
- **Next guides:** [Kimi K3 Pricing Guide](https://inference.net/guides/kimi-k3-pricing/) · [DeepSeek API Pricing Guide](https://inference.net/guides/deepseek-api-pricing/) · [OpenCode DeepSeek & Kimi Setup](https://inference.net/guides/opencode-deepseek-kimi-setup/) · [Cheapest LLM API Guide](https://inference.net/guides/cheapest-llm-api/)

### Start calling GLM-5.3 and GLM-5.3 Flash with 1M context

Create a free Inference.net API key to run glm-5.3 and multimodal glm-5.3-flash over OpenAI and native Anthropic /v1/messages with prompt_cache_key support and hosted US ZDR.

[Create API key](https://inference.net/register/?model=glm-5.3)

Estimate Your Inference Bill

## Calculate your monthly LLM API & prompt-cache spend

Compare live input, cached-read, and output token pricing across every open-weight and frontier model on Inference.net with 0% markup.

[Open pricing calculator](https://inference.net/tools/llm-pricing-calculator/) [Explore model catalog](https://inference.net/models/)

## Related reading & models

[Back to all guides](https://inference.net/guides/)

[Guide December 05, 2026 **DeepSeek API Pricing: Live Rates, Caching Math, and Models** Live DeepSeek API pricing per 1M tokens for V4.1 Flash, V4 Pro, Cyber, and V3.2 on Inference.net, with prompt caching math and copy-paste code snippets. Read more](https://inference.net/guides/deepseek-api-pricing/) [Guide December 06, 2026 **Kimi K3 Pricing: K3.1 Pro, K3, Fast & K2.6 API Rates** Live Kimi K3 and Kimi K3.1 Pro API pricing per 1M tokens on Inference.net, with 1M-context specs, 40-turn prompt-cache math, and SDK quickstarts. Read more](https://inference.net/guides/kimi-k3-pricing/) [Article February 21, 2026 **LLM API Pricing Comparison 2026: Live Rates** Compare 2026 LLM API pricing across DeepSeek V4.1 Flash ($0.103/$0.60), Kimi K3.1 Pro, GLM-5.3, GPT, and Claude, plus $0.007/1M prompt cache savings. Read more](https://inference.net/content/llm-api-pricing-comparison/) [Guide December 06, 2026 **Cheapest LLM API in 2026: Verified Per-1M Rates & Cache Math** Compare the cheapest LLM API models per 1M fresh, cached, and output tokens on Inference.net with 40-turn coding-agent and extraction cost math. Read more](https://inference.net/guides/cheapest-llm-api/)

[**Explore serverless models** Compare open-weight and frontier models, context windows, and per-token pricing.](https://inference.net/models/) [**Inference Pass plans** Predictable monthly access for coding agents and high-volume OpenAI-compatible API workloads.](https://inference.net/subscription/)
