GLM via the Gatelum gateway
GLM API: GLM-5 models, a key and sample code
GLM API in Gatelum gives you GLM models, released by Z.ai, through the Gatelum gateway. Requests arrive in the OpenAI API format, so GLM can be called from existing OpenAI SDK code, and a single Gatelum key serves both GLM and the rest of the catalog.
No Z.ai platform registration is needed: create a Gatelum account, top up in rubles with a code and issue a key. Below are the GLM-5 versions currently enabled in the catalog, the lighter Flash included, with prices, connection steps and a sample request.
The Gatelum gateway is how GLM models reach you. This is not an official GLM page — Gatelum is an independent OpenAI-compatible gateway, with its own key, balance and prices.
GLM models on Gatelum and their prices
The table shows the Gatelum catalog's z-ai/ models. Pricing is per million input and output tokens, and the Model ID under each name is the one to put into the model field.
| Model and Model ID | Type | Input, per 1M tokens | Output, per 1M tokens |
|---|---|---|---|
GLM-5.3z-ai/glm-5.3 | Conversation | $0.9660 | $3.30 |
GLM-5.3 Flashz-ai/glm-5.3-flash | Conversation | $0.0720 | $0.2550 |
GLM-5.3 FlashXz-ai/glm-5.3-flashx | Conversation | $0.0810 | $0.2730 |
GLM-5.2z-ai/glm-5.2 | Conversation | $0.2880 | $0.9820 |
GLM-5.1z-ai/glm-5.1 | Conversation | $0.2760 | $0.8850 |
All prices and the balance are in US dollars. There are no ruble prices in the interface.
How to get a GLM API key
Sign up
Create an Gatelum account with your email — it takes about a minute.
Top up with a code
Once you redeem a top-up code from the store in your dashboard, the amount appears on your prepaid balance immediately.
Create a key
Create an glt_… API key in your dashboard. It works with GLM models and the rest of the catalog straight away, and you can put a spending cap on it.
GLM API request example
Because the gateway speaks the OpenAI API, three steps are enough: put https://gatelum.com/v1 in the base URL, attach your Gatelum key and take a Model ID from the table. z-ai/glm-5.3 is used in the example.
curl --silent --show-error --fail-with-body \
--header 'Authorization: Bearer glt_YOUR_KEY' \
'https://gatelum.com/v1/chat/completions' \
--header "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"model": "z-ai/glm-5.3",
"messages": [
{
"role": "user",
"content": "Hi! Tell me about yourself in two sentences."
}
]
}
JSONGLM API pricing and payment
Price separates the GLM-5 versions: high-volume calls are cheaper on the lighter Flash, harder tasks go to the full versions. Weigh the rates in the table before you decide. Every request is billed on its actual tokens, with no monthly fee.
- The balance is prepaid: you add funds before sending requests, with no subscription or monthly fee.
- Top-ups are made in rubles using a code, which you redeem in your dashboard.
- Charges cover actual usage only, at the rates listed in the table; each request is visible in your history.
To see what your workload would cost, try the cost calculator.
GLM API FAQ
How do I get a GLM API key?
Open a Gatelum account, redeem the top-up code in your dashboard and generate a key. That glt_… key accepts z-ai/glm-… Model IDs along with every other catalog model.
Is this the official Z.ai API?
No. Gatelum is a standalone gateway: GLM requests are served through Gatelum, and the key, balance and prices are ours. Z.ai appears only as the developer of the GLM models.
Which GLM models are available?
The GLM-5 versions in the table on this page, the lighter GLM-5.3 Flash among them. The lineup changes along with the Gatelum catalog.
How much does the GLM API cost?
Prices for all GLM versions are in the table and the catalog, quoted separately for input and output per million tokens. There's no subscription — only actual usage is billed, and the cost calculator makes budgeting easy.
How do I pay for GLM?
Add to your prepaid Gatelum balance by buying a code with rubles and redeeming it in the dashboard. The funds become available at once for GLM requests and any other model.
How do I switch to GLM from another model?
If your code already runs through Gatelum, just change the Model ID to the GLM version you need from the table. If you're still on another OpenAI-compatible API, point the base URL at Gatelum's address with /v1 and swap in your Gatelum key.
Start using GLM through Gatelum
In a few minutes you can sign up, redeem a top-up code and send your first request to GLM. The same key also unlocks every other model in the catalog.