ZhipuPaidOperational
Glm 4
API model name: glm-4
Glm 4 is Zhipu's chat model, served on the Api.Airforce unified API. It is priced at $0.06 per million input tokens and $0.27 per million output tokens. Access it through the OpenAI-compatible API with one key, alongside 65+ other models on Api.Airforce.
Pricing
Specifications
- Provider
- Zhipu
- Type
- chat model
What is Glm 4 used for?
- Chatbots & assistants — conversational AI, drafting, summarizing and Q&A.
Glm 4 vs. similar models
| Model | Context | Input / 1M | Output / 1M |
|---|---|---|---|
| Glm 4 | — | $0.06 | $0.27 |
| Glm 4.5 Air | 131K | $0.21 | $0.87 |
| Glm 4.7 Flash | 203K | Free | Free |
| Glm 4.7 Free | 205K | Free | Free |
Prices are Api.Airforce pay-as-you-go rates per 1M tokens. Context is the maximum input length.
Related models
Glm 4.5 AirZhipu · $0.21 / 1MGlm 4.7 FlashZai · FreeGlm 4.7 FreeZai · FreeGlm 5Zai · $0.80 / 1MGlm 5 FreeZai · FreeGlm 5.1Zai · $0.80 / 1MGpt 3.5OpenAIGpt 3.5 Turbo 16kOpenAIGpt 4OpenAI · $6.42 / 1MGpt 4 0125OpenAI · $2.13 / 1MGpt 4 1106OpenAI · $2.13 / 1MGpt 4 32kOpenAI
Glm 4 — frequently asked questions
- How much does Glm 4 cost?
- Glm 4 is billed pay-as-you-go at $0.06 per 1M input tokens and $0.27 per 1M output tokens. There is no subscription — you only pay for what you use.
- What can Glm 4 do?
- Glm 4 is Zhipu's chat model, accessible through the Api.Airforce API.
- Is Glm 4 free to use?
- Glm 4 is a paid, pay-as-you-go model — no subscription, you are only charged for usage.
- How do I use Glm 4 via the API?
- Glm 4 is OpenAI-compatible. Point any OpenAI SDK at https://api.airforce/v1 and pass the model ID glm-4 with your Api.Airforce API key.
- Who makes Glm 4?
- Glm 4 is Zhipu's chat model, served through the unified Api.Airforce gateway alongside 65+ other models.
Loading live metrics…
Loading live metrics…
Use Glm 4 via the API
OpenAI-compatible — point any OpenAI SDK at https://api.airforce/v1 and pass glm-4 as the model.
cURL
curl https://api.airforce/v1/chat/completions \
-H "Authorization: Bearer $AIRFORCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-4",
"messages": [{ "role": "user", "content": "Hello!" }]
}'Python
from openai import OpenAI
client = OpenAI(base_url="https://api.airforce/v1", api_key="$AIRFORCE_API_KEY")
r = client.chat.completions.create(
model="glm-4",
messages=[{"role": "user", "content": "Hello!"}],
)
print(r.choices[0].message.content)JavaScript
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.airforce/v1", apiKey: process.env.AIRFORCE_API_KEY });
const r = await client.chat.completions.create({
model: "glm-4",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(r.choices[0].message.content);