GLM 5.1
glm-5.1Use the GLM 5.1 API for coding and reasoning. Send conversation messages and include tool definitions on supported routes. The listed routes publish a context limit of 200,000 tokens. Use it to work through multi-step coding tasks or review longer technical material. Compare the available provider routes, request examples, and usage prices on OpenAny.
- Published price
- From $0.745 / 1M tokens
- Billing unit
- / 1M tokens
- Context / Max output
- 200K / 128K
- Listed routes
- 2
Other parameters (13)
Result preview
Z.AI · 4390ms
Response example. Run to see the actual response.
{
"id": "chatcmpl-0758b9ab-bac7-99f3-a76c-a458c9979723",
"model": "glm-5.1",
"usage": {
"total_tokens": 230,
"prompt_tokens": 6,
"completion_tokens": 224,
"prompt_tokens_details": {
"cached_tokens": 0
},
"completion_tokens_details": {
"reasoning_tokens": 187
}
},
"object": "chat.completion",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! I'm GLM, trained by Z.ai. How can I assist you today? Whether you have questions or just want to chat, I'm happy to help.",
"reasoning_content": "Let me consider how to respond to this greeting effectively.\n\nThe user has started with a simple \"hello\" - this is likely the beginning of a conversation. I should respond in a way that's both welcoming and open-ended.\n\nFirst, I should acknowledge their greeting warmly. Then I should introduce myself briefly to establish context. Since this is an initial interaction, I should also express my willingness to help while inviting them to share what's on their mind.\n\nI need to make sure my response is friendly and professional, while also being concise enough not to overwhelm. The goal is to create an inviting atmosphere for further conversation.\n\nLet me craft a response that's welcoming, informative, and encourages further dialogue. I should include:\n- A warm greeting back\n- A brief introduction of who I am\n- An expression of readiness to help\n- An invitation for them to continue the conversation\n\nThis should create a good foundation for a productive interaction."
},
"logprobs": null,
"finish_reason": "stop"
}
],
"created": 1784220767,
"openmodels_cost": 418,
"system_fingerprint": null
}Request example
POST /v1/chat/completionscurl 'https://api.openany.si/v1/chat/completions' \
-H "Authorization: Bearer $OPENANY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"messages": [
{
"content": "Hello!",
"role": "user"
}
],
"model": "glm-5.1",
"route_mode": "balanced",
"do_sample": true,
"stream": false,
"temperature": 1,
"tool_stream": false,
"top_p": 0.95
}'Model API questions
How do I call GLM 5.1 through OpenAny?
Use model ID glm-5.1 with an OpenAny key and the operation published in this model's API tab. The model API base is https://api.openany.si/v1. Confirm the protocol and request schema; model availability does not imply every OpenAI API operation is supported.
How is GLM 5.1 billed?
Compare the published rate and billing unit of the selected provider route. Input, output and cache token rates may differ. Image, audio and video models can use other units. Recorded usage determines the charge under that route's billing contract.
Are Community and Verified routes the same as an official publisher API?
No. Inspect the provider name and supply classification for the specific route. A marketplace listing or a supply label is not a claim of publisher endorsement, identical service or measured uptime. Different route prices may reflect different supply and conditions.
Where do these prices come from, and when were they updated?
Rates come from the provider routes in OpenAny's public model catalog, not an independent quote from the model publisher. The catalog does not supply a price update timestamp. A page or catalog snapshot date is not a price revision date. Compare supply, billing units, tiers and conditions; a lower listed rate alone does not establish equivalent service or explain the price difference.
Use GLM 5.1 with your agent
Inspect endpoint contracts and confirm availability and pricing before a paid call.