Verified 2026-11-18 · rates follow the live catalog
Openference is an independent gateway, not a GLM subscription and not run by the people who build GLM. What it offers for the same job is a different shape: the $20 Minion and $80 Boss plans give you an included allowance that is metered at each model's token rates, GLM among them, and anything past it bills as on-demand credits at those same rates. You keep one key for GLM and every other model in the catalog.
| Model | Context | Input / 1M | Output / 1M | Cached input / 1M | One request | One request, prompt cached |
|---|---|---|---|---|---|---|
| GLM-5.1 | 256K | $1.40 | $4.40 | $0.26 | $0.032 | $0.0096 |
| GLM-5.2 | 256K | $1.40 | $4.40 | $0.26 | $0.032 | $0.0096 |
| GLM-5.3 | 1.0M | $1.40 | $4.40 | $0.26 | $0.032 | $0.0096 |
| GLM-5.3-Flash-Uncensored | 1.0M | $0.25 | $0.75 | $0.10 | $0.0057 | $0.0027 |
| GLM-5.3-Flash | 1.0M | $0.15 | $0.50 | $0.03 | $0.0035 | $0.0011 |
| GLM-4.7-Flash | 128K | $0.06 | $0.40 | — | $0.0016 | — |
GLM-5.3 is the full-size model and GLM-5.3-Flash is the cheaper one to run in a loop. GLM-5.1, GLM-5.2, GLM-5.3, GLM-5.3-Flash publish a discount: 10% off during 14:00–24:00 UTC. The GLM API page adds what each GLM model accepts, which ones share a price, and the exact model ids. To see what a Claude Code session costs on different models, GLM included, read the Claude Code cost guide.
A plan's allowance is spread over three rolling windows: a 5-hour window that resets at 00:00, 05:00, 10:00, 14:00 and 19:00 UTC, a weekly window that resets every Monday at 14:00 UTC, and a monthly window that resets on your billing date. The dashboard shows how much of each you have used and when it next resets.
At the edge of a window the behavior is simple. When a window is used up and the account has credits, usage carries on as on-demand spend. With no credits the API returns a 402 with a resets_at time. Separately, a per-minute request cap applies per account; a request over it gets a 429 with a Retry-After header, which you should honor. Upstream failures never count against any window.
The plan docs list estimated requests per window for GLM-5.3, GLM-5.3-Flash and GLM-4.7-Flash on each plan: see Plans & Usage.
Claude Code speaks the Anthropic Messages format and authenticates with a bearer token. Set the token variable, not the API-key one, and point all three model tiers at catalog names, because Claude Code otherwise sends Anthropic-style model ids that are not accepted:
export ANTHROPIC_BASE_URL="https://api.openference.com"
export ANTHROPIC_AUTH_TOKEN="YOUR_API_KEY"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="GLM-5.3-Flash"
export ANTHROPIC_DEFAULT_SONNET_MODEL="GLM-5.3"
export ANTHROPIC_DEFAULT_OPUS_MODEL="GLM-5.3"
Leave /v1 off the base URL: Claude Code appends /v1/messages itself, and a base URL that already ends in /v1 sends requests to /v1/v1/messages, which fail. The Claude Code guide has the persistent settings.json form.
Codex reads ~/.codex/config.toml. Add a provider and set the context window and output limit to match the model, because Codex otherwise assumes a much smaller window:
model = "GLM-5.3"
model_provider = "openference"
model_context_window = 1048576
model_max_output_tokens = 128000
[model_providers.openference]
name = "Openference"
base_url = "https://api.openference.com/v1"
env_key = "OPENFERENCE_API_KEY"
wire_api = "responses"
Export OPENFERENCE_API_KEY in your shell and run codex. Codex speaks the Responses API; requests for GLM models are translated to chat completions and back, so no extra setting is needed.
| Model | One request | Multiple of GLM-5.3 |
|---|---|---|
| Claude Haiku 5.5 | $0.0025 | 0.08× |
| Claude Opus 4.6 | $0.125 | 3.9× |
| Claude Fable 5.1 | $0.25 | 7.7× |
2 of the 13 Claude models in the catalog cost less per request than GLM-5.3 at list price, and 11 cost more. That is price only: it says nothing about which one solves your task, so the useful comparison is cost per finished task on your own repository.
No. This is an independent gateway with its own plans, billing and limits. It is a way to use GLM in the same coding tools, alongside other models, under one key.
https://api.openference.com/v1 for OpenAI-format clients such as Codex, Cursor and Cline, and https://api.openference.com without /v1 for Claude Code.
Yes, for now: GLM-5.3-Flash-Free is free through 4 December 2026. See the free AI API page for how it behaves.
Start with GLM-5.3 for hard tasks and GLM-5.3-Flash for fast, repetitive steps, then check the result on your own code. The model pages list context size and rates for each.
Model catalog · Pricing · Comparisons · Cost guides · Integration guides · FAQ
Guides: GLM coding plan alternative · Free AI API · LLM gateway · LLM proxy · Cheap AI API · OpenAI-compatible API
Model APIs: GLM API · DeepSeek API · Kimi API · Qwen API · MiniMax API