glm-5.2
GLM-5.2 · Z.ai
- Multiplier
- ×1.0 (reference)
- Context served
- 128K tokens
- Max output
- 8.19K tokens
- Parameters
- not published
- Throughput
- not yet measured
- License
- MIT
An OpenAI-compatible endpoint. If your tool takes a base URL and a key, it already works: this is the exact configuration, not a simplified version of it.
One base URL, bearer auth with your API key. The endpoint speaks the OpenAI chat-completions and completions APIs.
https://api.tium.ai/v1
Authorization: Bearer sk-tium-...Get a key from your dashboard. Keys are shown once at creation; store them in an environment variable, never in source.
OpenCode, the OpenAI SDKs, or plain curl: the same base URL and key.
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"tium": {
"npm": "@ai-sdk/openai-compatible",
"name": "Tium",
"options": {
"baseURL": "https://api.tium.ai/v1"
},
"models": {
"glm-5.2": {
"name": "GLM-5.2",
"limit": {
"context": 128000,
"output": 32768
}
}
}
}
}
}Each response carries what it cost, what remains, and your limits. You never have to take a number on trust.
| X-Tium-Request-Id | Correlation id for support. Present on every response, including errors. |
| X-Tium-Tokens-In / -Cached / -Out | The token counts this request was billed on (non-streamed responses). |
| X-Tium-Weighted-Tokens | Weighted tokens charged: the token counts times the published weights and model multiplier. |
| X-Tium-Model-Multiplier | The multiplier applied, captured at request time. What you see is what you were charged. |
| X-Tium-Balance-Remaining | Weighted tokens left (allotment + credits) at the start of the request. |
| X-Tium-Concurrency-Limit / -Remaining | Your tier's concurrency limit and how many slots were free. |
On streamed responses the per-request token headers arrive in the trailing usage chunk instead, since the counts don't exist when the headers are sent. Identity and concurrency headers are sent up front.
The distinction that matters for agents: 402 is a wall (out of balance) and must not be retried; 429 is backpressure (too many at once) and should be retried after a short wait.
| HTTP | Code | Meaning |
|---|---|---|
| 400 | invalid_request_body | The JSON body was malformed. Fix the request; do not retry as-is. |
| 401 | invalid_api_key / revoked_api_key | Key is wrong, missing, or revoked. Re-check the Authorization header. |
| 402 | insufficient_balance | Allotment and credits are exhausted. Top up. Agents must NOT retry a 402. |
| 402 | key_spend_limit_reached | This key hit its per-key spend limit. Raise the limit or use another key. |
| 429 | concurrency_limit_reached | Too many requests at once for your tier. Retry after a short wait; carries Retry-After. |
| 429 | daily_burst_cap_reached | Daily burst cap reached (abuse guard). Resets 00:00 UTC. |
| 502 | backend_unavailable | The inference backend is unreachable. Transient; safe to retry. |
Errors return an OpenAI-shaped body: error.type, error.code, and error.request_id for support.
The catalog is data, not a hardcoded page: it carries the next model without a redesign.
GLM-5.2 · Z.ai
The full catalog, with every model’s multiplier and published weights, is on /models.