Model detail
GLM-4-0520
A dated GLM-4 snapshot used for conversational text generation and general language-processing tasks.
Model specs
- Model ID
-
glm-4-0520
- Context length
- 128K
- Max output
- –
- I/O modalities
- Released
- 2024-06
02
API endpoints
One MixRoute gateway, OpenAI-compatible
-
OpenAI-compatible
/v1/chat/completionsPOST
03
Pricing
Flat rate, unit: /1M Tokens
Input
$14.2860 /1M Tokens
Completion
$14.2860 /1M Tokens
05
Selection summary
Quickly judge whether it fits your workload
What is this model good for?
A dated GLM-4 snapshot used for conversational text generation
A dated GLM-4 snapshot used for conversational text generation and general language-processing tasks.
What should you check before using it?
128,000 context tokens
GLM model that supports tool calling and structured output. Released 2024-06-05.
Why use it through MixRoute?
GLM-4-0520 runs tools and structured output here
Tool calling and structured output run on that route as well. MixRoute serves GLM-4-0520 on the OpenAI-compatible endpoint /v1/chat/completions; point your existing client at https://api.mixroute.ai/v1 with the model ID glm-4-0520 and re-run your integration tests.
07
Capabilities & compatibility
Unconfirmed capabilities stay "Unknown," no guesses
Tool calling
GLM-4-0520 supports function and tool calls.
tools definition; the response returns tool_calls to execute and feed results back.
Structured output
GLM-4-0520 can produce JSON-formatted output on demand.
response_format: { type: "json_schema" } forces valid JSON output.
Streaming
GLM-4-0520 supports streamed responses.
stream: true streams tokens incrementally, so chat UIs render as they arrive.
OpenAI SDK
Call GLM-4-0520 through MixRoute's OpenAI-compatible endpoint.
base_url to https://api.mixroute.ai/v1; everything else follows the OpenAI style.
08
Token cost estimator
Live estimate from this page's pricing, not an actual bill
This model has no cache-read price; caching is not counted
09
FAQ
GLM-4-0520 sits alongside gpt-5.3-codex, glm-4.6, gemini-2.5-pro in the catalog. Compare them on the dimensions that change your bill and your users’ experience: task quality on your own prompts, latency at your concurrency, context and output limits, and cost per completed task rather than per token.
One endpoint, a testable decision
Test this model and alternate routes with the same request format
Start from a real workload, then let quality, total cost, and failure conditions decide whether to send production traffic.