GLM on RouterHub
GLM 5.3 and GLM 5.3 Flash API pricing and setup
Build apps with GLM using the OpenAI-compatible Chat Completions API, one RouterHub API key, and prepaid credits. Compare published input, output, and cached input rates before choosing your model.
GLM models and prices
| Model | Exact API ID | Input | Output | Cached input |
|---|---|---|---|---|
| GLM 5.3 | glm-5.3 | $0.627803 | $1.97309514 | $0.11659199 |
| GLM 5.3 Flash | glm-5.3-flash | $0.067265 | $0.22421667 | $0.013453 |
Input is the prompt you send; output is the response you receive. Cached input rates apply when the provider reports a cache hit. Prices come from RouterHub's current public catalogue; these are RouterHub rates. No separate subscription is required.
Compare GLM 5.3 with GLM 5.3 Flash by input and output price. Change the example model ID to select either published GLM model.
Get an API key
- Create a RouterHub account.
- Add prepaid credits with card or crypto.
- Create an API key and keep it in your local environment.
- Send a short Chat Completions request, then check Usage for its cost.
Send your first GLM API request
Use the exact model ID glm-5.3-flash with https://routerhub.si/v1/chat/completions. Set ROUTERHUB_API_KEY in your local environment. This request uses prepaid credits.
cURL
curl https://routerhub.si/v1/chat/completions \
-H "Authorization: Bearer $ROUTERHUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"glm-5.3-flash","messages":[{"role":"user","content":"Reply with OK."}]}'Python
Install the OpenAI Python SDK with pip install openai.
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["ROUTERHUB_API_KEY"],
base_url="https://routerhub.si/v1",
)
response = client.chat.completions.create(
model="glm-5.3-flash",
messages=[{"role": "user", "content": "Reply with OK."}],
)
print(response.choices[0].message.content)Node.js
Install the OpenAI JavaScript SDK with npm install openai.
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.ROUTERHUB_API_KEY,
baseURL: "https://routerhub.si/v1",
});
const response = await client.chat.completions.create({
model: "glm-5.3-flash",
messages: [{ role: "user", content: "Reply with OK." }],
});
console.log(response.choices[0].message.content);Compare models or connect a tool
Compare all GPT, Claude, DeepSeek, and GLM prices · OpenCode setup · All setup guides
Current model IDs, protocols, and prices · API quickstart · OpenAPI reference · This setup guide