Call open models from any OpenAI or Anthropic client.
One key, two compatible surfaces, per-token billing to the micro-dollar. Nothing to install beyond the SDK you already use.
1. Get a key
Sign in with your email, add credit to your wallet, and create a key. When you create a key you choose how much credit to put on it; the key can spend up to that amount. You can top it up, reclaim unused credit, or delete it at any time from the console.
2. Endpoints
- OpenAI-compatible
- https://api.supernova-labs.ai/glm/v1
- Anthropic-compatible
- https://api.supernova-labs.ai/glm
- Models
- glm-5.3 · glm-5.3-fast · glm-5.2 — one key works with all of them.
- Auth
- Authorization: Bearer sk-glm-…
The OpenAI surface implements /chat/completions and /models and works with the official OpenAI SDKs, Codex, and any tool that takes a base_url. The Anthropic surface is what Claude Code speaks.
3. Quick start
Python · OpenAI SDK
from openai import OpenAI
client = OpenAI(base_url="https://api.supernova-labs.ai/glm/v1", api_key="sk-glm-…")
r = client.chat.completions.create(
model="glm-5.3",
messages=[{"role": "user", "content": "Hello"}],
)
print(r.choices[0].message.content)curl
curl https://api.supernova-labs.ai/glm/v1/chat/completions \
-H "Authorization: Bearer sk-glm-…" \
-H "Content-Type: application/json" \
-d '{"model":"glm-5.3","messages":[{"role":"user","content":"Hello"}]}'Node · OpenAI SDK
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.supernova-labs.ai/glm/v1", apiKey: "sk-glm-…" });
const r = await client.chat.completions.create({
model: "glm-5.3",
messages: [{ role: "user", content: "Hello" }],
});
console.log(r.choices[0].message.content);Claude Code
export ANTHROPIC_BASE_URL=https://api.supernova-labs.ai/glm
export ANTHROPIC_AUTH_TOKEN=sk-glm-…
export ANTHROPIC_MODEL=glm-5.3
claude4. Choosing a model
Every request names the model it wants. There is no default — a request without a valid model id is rejected with 404 model not found, and the error lists the ids you can use. One API key works with every model, unless your account has been set up for specific models under an agreement with us — then a request for any other model returns 403, the error body carries an allowed_models list, and GET /v1/models with that key returns only those models.
| Model id | Weights | Status |
|---|---|---|
glm-5.3 | fp8 | available — the standard lane |
glm-5.3-fast | fp4 | available — the same model in fp4 on a faster lane with priority scheduling, at twice the price |
glm-5.2 | fp8 | available — the previous generation, same price as glm-5.3 |
OpenAI-compatible: the model field
client.chat.completions.create(model="glm-5.3", messages=[...])
# or in raw JSON
{"model": "glm-5.3", "messages": [{"role": "user", "content": "Hello"}]}Anthropic-compatible: the model field, or Claude Code's env
# Messages API
POST https://api.supernova-labs.ai/glm/v1/messages
{"model": "glm-5.3", "max_tokens": 1024, "messages": [{"role": "user", "content": "Hello"}]}
# Claude Code picks its model from the environment
export ANTHROPIC_BASE_URL=https://api.supernova-labs.ai/glm
export ANTHROPIC_AUTH_TOKEN=sk-glm-…
export ANTHROPIC_MODEL=glm-5.3
export ANTHROPIC_SMALL_FAST_MODEL=glm-5.3The live list is always GET https://api.supernova-labs.ai/glm/v1/models. Model ids are case-sensitive. Claude Code also accepts /model glm-5.3 inside a session.
5. Pricing
Prepaid credits, billed in USD per token to $0.000001. The fast lane is priced at twice the base rate:
| Model | Input · cache miss | Input · cache hit | Output |
|---|---|---|---|
glm-5.3 fp8 | $1.40 | $0.26 | $4.40 |
glm-5.3-fast fp4 | $2.80 | $0.52 | $8.80 |
glm-5.2 fp8 | $1.40 | $0.26 | $4.40 |
USD per million tokens. A cache hit is billed well below a miss; reasoning tokens count as output. Full details and how credits work: /pricing/.
6. How billing works
Credit lives in your wallet. Creating a key moves some of that credit onto the key; each request draws it down. Keys are independent — one exhausting its credit doesn't affect another.
You can add credit to a key or reclaim what it hasn't used. Delete a key and everything it didn't spend returns to your wallet; if requests in flight took it slightly past its credit, that difference is charged to your wallet instead. Quota changes take effect within about 4 seconds; a delete stops new requests just as fast but is settled only after the key's in-flight requests finish, which can take a few minutes on a busy key.
Because a request's cost is only known when it finishes, a key can overrun its credit by at most one in-flight request per concurrency slot; that overrun is what gets charged to your wallet when the key is deleted.
7. Error codes
| Status | Meaning | What to do |
|---|---|---|
| 401 | Key invalid or deleted | Check the header. If the key was deleted, create a new one. |
| 402 | This key's credit is used up | Add credit to the key in the console. Takes effect in ~4 s. |
| 403 | Model not enabled for this key | Your account is set up for specific models; the error body lists them in allowed_models. Also visible in the console. Rejected requests are not billed. |
| 404 | Unknown model name | Pass glm-5.3, glm-5.3-fast or glm-5.2 in the model field — see Choosing a model. |
| 429 | Too many concurrent requests on this key | Each key allows 128 requests in flight. Retry with backoff, or spread load across keys. |
| 503 | Backend temporarily unavailable | Retry with backoff. |
Errors are JSON in the OpenAI shape: {"error": {"message": "…", "type": "…", "code": "…"}}.
8. Limits
Each key allows 128 concurrent requests, and an account can have two keys in use at a time — 256 concurrent requests per account. Wallet top-ups are $5 to $1,000 per transaction. Need more of any of these? contact@supernova-labs.ai.