Zai GLM 5 API pricing
Zai GLM 5 is a language model from Z.ai. Call it as "zai-glm-5" from any OpenAI SDK by changing the base URL and API key.
Prices synced December 1, 2026 · Model ID zai-glm-5
Zai GLM 5 API pricing per token
You pay for prompt tokens at the input rate and generated tokens at the output rate. No subscription, seat fee or minimum — credit never expires.
| Rate | Input / 1M tokens | Output / 1M tokens | Input / 1K tokens |
|---|---|---|---|
| Standard (real-time) | — | — | — |
Run Zai GLM 5 on your own GPU
Same model, same OpenAI-compatible API, on a pod only you use. The configurator opens pre-filled with the vLLM image and command; the pod is billed per minute while it exists.
vllm/vllm-openai:latest
--model zai-org/zai-glm-5 --host 0.0.0.0 --port 8000 --served-model-name zai-org/zai-glm-5 --max-model-len 32768 --gpu-memory-utilization 0.90 --tensor-parallel-size 2
The pod serves zai-org/zai-glm-5 on port 8000 behind a VLLM_API_KEY generated for you in the pod's environment. Weights download from Hugging Face on first start, so the first boot takes a few minutes; gated repos need an HF_TOKEN in the environment variables. GPU sizing uses 80% of VRAM for weights and the rest for KV cache; long contexts or big batches need a larger tier.
How to call the Zai GLM 5 API
Works with the official OpenAI SDKs — change the base URL and API key only. One key covers every model on FastInfra.
| Field | Value |
|---|---|
| Model ID | zai-glm-5 |
| Capability | Chat |
| Base URL | https://api.fastinfra.ai/v1 |
| Primary endpoint | POST https://api.fastinfra.ai/v1/chat/completions |
| Auth | Authorization: Bearer YOUR_API_KEY |
| OpenAI Chat SDK | Yes — set base_url to the Base URL |
| Validate model id | GET https://api.fastinfra.ai/v1/models/zai-glm-5 |
| Docs | Integration reference |
Point the OpenAI SDK at the Base URL above with your FastInfra API key.
Python
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.fastinfra.ai/v1")
stream = client.chat.completions.create(
model="zai-glm-5",
messages=[{"role": "user", "content": "Explain vector databases in two sentences."}],
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
Node.js
import OpenAI from "openai";
const client = new OpenAI({ apiKey: process.env.FASTINFRA_API_KEY, baseURL: "https://api.fastinfra.ai/v1" });
const response = await client.chat.completions.create({
model: "zai-glm-5",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(response.choices[0].message.content);
curl
curl https://api.fastinfra.ai/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "zai-glm-5",
"messages": [{"role": "user", "content": "Hello!"}]
}'
Served over 1 independent route. Requests go to the lowest-cost healthy route and fail over automatically if one is unavailable. Live latency and uptime are on the status page.
Zai GLM 5 vs alternatives
Live FastInfra prices per 1M tokens. Every model uses the same API key, so switching is a one-line change.
| Model | Input | Output | Context | |
|---|---|---|---|---|
| Zai GLM 5 (this page) | — | — | — | |
| Claude Opus 5 | $5.00 | $25.00 | 1M | Compare |
| Claude Sonnet 5 | $2.00 | $10.00 | 1M | Compare |
| Claude Haiku 5.5 | $0.10 | $0.50 | 1M | Compare |
| Claude Fable 5.1 | $10.00 | $50.00 | 1M | Compare |
| GPT-5.5 | $5.00 | $30.00 | 1.05M | Compare |
| GLM 5.3 Flash | $0.04 | $0.09 | 1M | Compare |
| GLM 4.7 Flash | $0.07 | $0.43 | 128K | Compare |
Zai GLM 5 API — frequently asked questions
How much does the Zai GLM 5 API cost?
On FastInfra, Zai GLM 5 (zai-glm-5) costs Pay-per-token pricing via automatic routing. Billing is per token used from prepaid credit, with no subscription or minimum spend.
Is Zai GLM 5 compatible with the OpenAI SDK?
Yes. Point the OpenAI Python or Node SDK at https://api.fastinfra.ai/v1, use a FastInfra API key and set model to "zai-glm-5". Chat completions, streaming use the same request shape.
Start using Zai GLM 5 today
Create an account, add credit from $5 and make your first Zai GLM 5 request in under five minutes. Compare every model on the pricing page.