GLM API key: how to get a key for GLM 5.3 and which URL to use

A GLM key can come from the Z.ai platform or from a gateway. We show both routes, the correct addresses, model ids and a cost comparison on an example.

5 min · · API keys · models

There are two ways to get GLM 5.3: a key on the official Z.ai platform, or a gateway key that works with GLM and with every other model. Below, step by step: how to get a GLM API key in both cases, which URL to put in code, which model ids to use, what it costs on an example, and how to read typical errors.

The Z.ai platform was checked against its documentation on 18 October 2026. Zukko prices are given for the same date: the current ones are always at GET https://api.zukko.pro/v1/models or on the Models page in the dashboard.

GLM API Z.ai: a key on the official platform

According to the Z.ai documentation (Quick Start section), the path is:

  1. Open the Z.ai platform, register or sign in.
  2. On the Billing page, top up the balance if the model you chose requires it.
  3. On the API Keys page, create a key of type Standard API Key.
  4. Copy the key and store it safely.

Separately, Z.ai has a GLM Coding Plan subscription for coding tools, which according to the documentation has its own dedicated endpoint. It is configured by a separate guide on the platform, and we do not cover it here.

A request to the platform, following the example from the documentation:

bash
curl -X POST "https://api.z.ai/api/paas/v4/chat/completions" \
  -H "Content-Type: application/json" \
  -H "Accept-Language: en-US,en" \
  -H "Authorization: Bearer YOUR_ZAI_KEY" \
  -d '{"model": "glm-5.3", "messages": [{"role": "user", "content": "Hello! Introduce yourself."}]}'

This answers the query "glm api url": the Z.ai platform's base address for OpenAI-compatible clients is https://api.z.ai/api/paas/v4/, and the model is called glm-5.3. You can also use the regular openai SDK:

bash
from openai import OpenAI

client = OpenAI(api_key="YOUR_ZAI_KEY", base_url="https://api.z.ai/api/paas/v4/")
r = client.chat.completions.create(
    model="glm-5.3",
    messages=[{"role": "user", "content": "Hello! Introduce yourself."}],
)
print(r.choices[0].message.content)

Access terms, top-up methods and country restrictions are set by the platform itself. See its Payment Method section and rules on its site.

A GLM API key through the Zukko gateway

The second way is a Zukko key. You need just one for all models: GLM, Claude, GPT, Gemini, DeepSeek, Qwen. The balance is shared, in dollars, with pay-per-token billing and no subscription.

  1. Open the dashboard and create a key. The full fetch_... key is shown only once, so save it right away.
  2. Top up the balance from $1.
  3. Set the address https://api.zukko.pro/v1 and the model glm-5.3 or glm-5.3-flash in your client.
bash
curl https://api.zukko.pro/v1/chat/completions \
  -H "Authorization: Bearer fetch_your_key" \
  -H "Content-Type: application/json" \
  -d '{"model": "glm-5.3-flash", "messages": [{"role": "user", "content": "Hello! Introduce yourself."}]}'
bash
from openai import OpenAI

client = OpenAI(base_url="https://api.zukko.pro/v1", api_key="fetch_your_key")
r = client.chat.completions.create(
    model="glm-5.3",
    messages=[{"role": "user", "content": "Hello! Introduce yourself."}],
)
print(r.choices[0].message.content)

Access from Russia goes through the gateway, with payment by SBP (the payment page adds 8.5% on top), MasterCard, or crypto. GLM models can also be called in the Anthropic format: POST https://api.zukko.pro/v1/messages. In Claude Code and the official Anthropic SDK the address is given without /v1: ANTHROPIC_BASE_URL=https://api.zukko.pro, with the key in ANTHROPIC_AUTH_TOKEN. Details are in the Claude Code guide.

Two addresses not to mix up

Where the key is fromBase addressKey
Z.ai platformhttps://api.z.ai/api/paas/v4/Z.ai key
Zukko, OpenAI formathttps://api.zukko.pro/v1fetch_...
Zukko, Claude Code and Anthropic SDKhttps://api.zukko.profetch_...

A Z.ai key does not work with the Zukko address and vice versa: you will get a 401.

GLM models and their parameters

Data as of 18 October 2026. Zukko prices are dollars per 1M tokens.

idZukko input / outputOfficial input / outputContextImage inputStrength index
glm-5.30.1 / 0.11.4 / 4.4128Kno45
glm-5.3-flash0.04 / 0.040.15 / 0.5128Kno42

For GLM the cache is counted if the provider reports it in the response; there is no separate charge for writes. The strength index is the Artificial Analysis Intelligence Index; we give no other quality numbers, so test the model on your own tasks.

Cost calculation

A request with 500K input tokens and 100K output tokens:

  • glm-5.3 on Zukko: 0.5 × 0.1 + 0.1 × 0.1 = 0.05 + 0.01 = $0.06;
  • glm-5.3 at official prices: 0.5 × 1.4 + 0.1 × 4.4 = 0.70 + 0.44 = $1.14;
  • glm-5.3-flash on Zukko: 0.5 × 0.04 + 0.1 × 0.04 = 0.02 + 0.004 = $0.024;
  • glm-5.3-flash at official prices: 0.5 × 0.15 + 0.1 × 0.5 = 0.075 + 0.05 = $0.125.

Official prices come from our table and matched the Pricing page of the Z.ai platform on the check date. The provider may change them.

Free GLM API: what is true here

People search "free glm api" a lot. We do not promise free access. On its Pricing page, Z.ai at the time of checking marked some older models as Free (for example GLM-4.7-Flash and GLM-4.5-Flash) and some items as Limited-time Free. Such terms change, they may come with limits, and they do not replace the current 5.3. If you want to spend pennies, take glm-5.3-flash at $0.04 per 1M tokens: 100K input tokens plus the same number of output tokens cost 0.1 × 0.04 + 0.1 × 0.04 = $0.008.

Errors when connecting GLM

  • 401: wrong key, or the addresses from the table above are mixed up. Check the fetch_ prefix and stray spaces.
  • 402: not enough money on the Zukko balance. Top it up.
  • 403 model_not_allowed_for_key: the key's allowed_models list does not include the model. Add it in the key settings.
  • 404 model_not_found: wrong name. Take ids from GET /v1/models, for example glm-5.3-flash (hyphens and the dot in the version).
  • 429: the key's daily or monthly limit is exhausted (key_daily_limit_reached), or the model provider is limiting you.
  • 413 or a truncated context: GLM has a 128K window, not 1M like most other models in the catalog.

The other codes are covered in 401, 402, model not found. More on the model itself: GLM 5.3: connecting. On headers and keys: API authentication.

FAQ

Which base URL does GLM need?

For the Z.ai platform: https://api.z.ai/api/paas/v4/. For Zukko in OpenAI clients: https://api.zukko.pro/v1. For Claude Code and the Anthropic SDK: https://api.zukko.pro without /v1.

What is the model called in the request?

glm-5.3 and glm-5.3-flash. GET /v1/models returns the list of current ids.

Can one key serve both GLM and Claude?

On Zukko, yes: one fetch_... key and one balance. The model is chosen by the model string. For separate projects it is better to create separate keys with a daily limit.

Does GLM understand images?

In our catalog, image input is not marked for glm-5.3 and glm-5.3-flash. For image tasks, look at the other models in the table that accept image input.

zukko

Pay 25×
less

for Claude Code & ChatGPT

One fetch_* key and base URL api.zukko.pro — for Cursor, Claude Code, Codex, and any SDK.

Get API keyDocumentation

api.zukko.pro · fetch_*

GLM API key: how to get a GLM 5.3 key and URL · Zukko