glm-4-5-air
Text chat, coding, structured extraction, and tool calling.
Pricing: Input 48 credits / 1M tokens (≈ $0.24), Output 264 credits / 1M tokens (≈ $1.32).
Prices updated
How can I help you today?
This demo page does not include the full memory features of the client. For the complete experience, please use the client or the CLI.
GLM-4.5-Air API
Text chat, coding, structured extraction, and tool calling.
Parameters
| Parameter | Description |
|---|---|
| model | glm-4-5-air |
| messages | user / assistant / system; text |
| context | 128K tokens; text input and output. |
| max_tokens | integer |
| stream | true / false (SSE) |
| thinking.type | enabled / disabled |
| tools / tool_choice | function / auto |
Pricing
Current retail rate per 1M tokens: input 48 credits, cached input 7.2 credits, output 264 credits. Requests reserve credits before execution and settle once from actual token usage, rounded up to whole credits. Failed requests are refunded.
API examples · OpenAI
curl https://modelfold.ai/v1/chat/completions \ -H "Authorization: Bearer $MODELFOLD_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"glm-4-5-air","messages":[{"role":"user","content":"Hello"}],"max_tokens":1024,"stream":true}'
Real API examples 1
Generated by this exact model on 2026-11-11. Prompt: Explain idempotency keys in one short sentence. Response: An idempotency key is a unique token sent by a client to ensure that a request can only be processed once by a server, preventing duplicate side effects.
Real API examples 2
Generated by this exact model on 2026-11-11. Prompt: Extract JSON with item and quantity: 3 blue notebooks. Output JSON only. Response: ```json { "item": "blue notebooks", "quantity": 3 } ```
API examples · Anthropic
from anthropic import Anthropic client = Anthropic(api_key="YOUR_MODELFOLD_KEY", base_url="https://modelfold.ai/anthropic") message = client.messages.create(model="glm-4-5-air", max_tokens=1024, messages=[{"role":"user","content":"Hello"}]) print(message.content)
FAQ
How do I enable streaming and tools?⌄
Use stream: true for SSE. Pass tools and tool_choice for function calling. Tool execution remains the responsibility of your application.
Is conversation history retained?⌄
Send previous user and assistant messages in messages. API calls do not keep a conversation automatically.
How does caching work?⌄
The first request is generally uncached. Reuse an identical prefix for later cache hits; cache usage is reported by the API and is not guaranteed.
Can I use the Anthropic protocol?⌄
Yes. Use /anthropic as the base URL with the Anthropic SDK, the same ModelFold key, and this model ID. Responses API is not supported.
Can this model read images?⌄
This is a text model. Use GLM-4.6V for images.
| Input | 48 credits 1M tokens≈ $0.24 |
| Cached input | 7.2 credits 1M tokens≈ $0.04 |
| Output | 264 credits 1M tokens≈ $1.32 |
Billed per token: input and output are priced separately, and thinking tokens count as output. The Playground charges exactly the same way.
Read API docs →AI Agents · Claude Code / Cursor / Trae →curl https://modelfold.ai/v1/chat/completions \
-H "Authorization: Bearer $MODELFOLD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"glm-4-5-air","messages":[{"role":"user","content":"Hello"}]}'