Apply your own routing policies, reduce token costs automatically, and see every routing decision in real time with Merge Gateway.

How GLM-4.5 performs*
What GLM-4.5 costs to run
Test GLM-4.5
with Gateway’s Simulator
See a prompt's output, token spend, latency, and more with GLM-4.5.
Route requests to GLM-4.5 in minutes
1$ pip install merge-gateway-sdk1from merge_gateway import MergeGateway
2
3client = MergeGateway(api_key="YOUR_API_KEY")
4
5response = client.responses.create(
6 model="openai/gpt-5.2",
7 input=[
8 {"type": "message", "role": "system", "content": "You are a helpful programming tutor. Explain the concepts clearly with practical examples."},
9 {"type": "message", "role": "user", "content": "Explain the concept of recursion in programming with a simple set of examples."},
10 ],
11)
12
13print(response.output[0].content[0].text)1response = client.responses.create(
2 model="anthropic/claude-sonnet-4-20250514",
3 input=[
4 {"type": "message", "role": "system", "content": "You are a helpful programming tutor. Explain the concepts clearly with practical examples."},
5 {"type": "message", "role": "user", "content": "Explain the concept of recursion in programming with a simple set of examples."},
6 ],
7)1from openai import OpenAI
2
3client = OpenAI(
4 api_key="YOUR_API_KEY",
5 base_url="https://api-gateway.merge.dev/v1/openai",
6)1response = client.chat.completions.create(
2 model="gpt-5.2",
3 messages=[
4 {"role": "system", "content": "You are a helpful programming tutor. Explain the concepts clearly with practical examples."},
5 {"role": "user", "content": "Explain the concept of recursion in programming with a simple set of examples."},
6 ],
7)
8
9print(response.choices[0].message.content)1npm install merge-gateway-ai-sdk-provider ai1import { createMergeGateway } from "merge-gateway-ai-sdk-provider";
2
3const gateway = createMergeGateway({
4 apiKey: "YOUR_API_KEY",
5});1import { generateText } from "ai";
2
3const { text } = await generateText({
4 model: gateway("openai/gpt-4o"),
5 prompt: "Explain the concept of recursion in programming with a simple set of examples.",
6});
7
8console.log(text);1import { createOpenAI } from "@ai-sdk/openai";
2
3const gateway = createOpenAI({
4 apiKey: "YOUR_API_KEY",
5 baseURL: "https://api-gateway.merge.dev/v1/ai-sdk",
6});
7
8// All generateText/streamText calls work unchanged1from anthropic import Anthropic
2
3client = Anthropic(
4 api_key="YOUR_API_KEY",
5 base_url="https://api-gateway.merge.dev/v1/anthropic",
6)
7
8message = client.messages.create(
9 model="claude-sonnet-4-20250514",
10 max_tokens=1024,
11 messages=[
12 {"role": "user", "content": "Explain the concept of recursion in programming with a simple set of examples."},
13 ],
14)
15
16print(message.content[0].text)Explore other models available in Merge Gateway
GLM-4.5 FAQ
Heading
What other models does Zhipu AI offer?
Zhipu AI (or Z.ai) has built a broad GLM model family spanning cost-efficient, standard, and reasoning-focused tiers. Here are some other models Zhipu AI supports:
- GLM-4.5 Air: A lightweight variant of GLM-4.5 with a 128k token context window, designed for cost-sensitive deployments where full model capability is not required. It carries an input price of $0.17 per 1M tokens and output at $0.98 per 1M tokens, making it one of the most affordable options in the GLM lineup
- GLM-4.7 Flash: A reasoning-capable model with a 200k token context window and a blended cost of roughly $0.10 per 1M tokens, making it the most price-efficient reasoning model Zhipu AI currently offers on Artificial Analysis. It is well-suited for high-throughput tasks that need chain-of-thought reasoning at low cost
- GLM-5: The flagship reasoning model in Zhipu AI's current lineup, with a 200k token context window and an Intelligence Index score of 50 out of 100 on Artificial Analysis, placing it in the top tier of tracked reasoning models. It is priced at $1.00 per 1M input tokens and $3.20 per 1M output tokens and targets complex problem-solving tasks that demand high accuracy
- GLM-5.1: The most recent iteration of Zhipu AI's flagship reasoning series, reaching an Intelligence Index score of 51 out of 100 on Artificial Analysis and ranking in the top 5 of all evaluated models. It is priced higher than GLM-5 at $1.40 per 1M input tokens and $4.40 per 1M output tokens, and is best suited for research and production workloads where top-tier accuracy justifies the cost
How does GLM-4.5 differ from Zhipu AI's other models?
GLM-4.5 sits in the mid-range of Zhipu AI's GLM family, positioned above the lightweight Air variant but below the reasoning-focused GLM-5 and GLM-5.1 tier.
- Context window: GLM-4.5 supports a standard context window for general-purpose tasks, while GLM-5 and GLM-5.1 extend to 200k tokens for long-document and multi-step reasoning use cases
- Pricing tier: GLM-4.5 Air, the closest sibling, is priced at $0.17 per 1M input tokens, making it the budget-tier entry point. GLM-5 and GLM-5.1 are significantly more expensive, targeting users who need the highest accuracy in the GLM family
- Reasoning capability: GLM-4.7 Flash and GLM-5 include extended chain-of-thought reasoning. GLM-4.5 is a standard model without the explicit reasoning compute overhead, making it faster for straightforward instruction-following tasks
- Use case fit: GLM-4.5 is a practical choice for instruction-following, summarization, and general text generation where top benchmark scores are less critical than moderate cost and reliable output quality
GLM-4.5 is best suited for teams that need a capable general-purpose model from Zhipu AI without committing to the pricing of the premium reasoning tier.
What models should I consider using alongside GLM-4.5?
No single model is optimal for every task. Here are models worth pairing with GLM-4.5 depending on what your product needs:
- GLM-4.7 Flash when you need reasoning capability at the lowest possible cost. At a blended rate of around $0.10 per 1M tokens, it handles chain-of-thought tasks that would otherwise require routing to the more expensive GLM-5 tier
- Gemini 3.1 Flash Lite Preview when throughput is the primary constraint. At 279 tokens per second and a blended cost of $0.22 per 1M tokens, it is one of the fastest reasoning models available and handles high-volume classification or extraction tasks at very low latency
- Claude Sonnet 4.5 when instruction-following precision and multi-turn conversation quality are critical. Anthropic's mid-tier model consistently performs well on structured output and agentic tasks where GLM-4.5 may produce less predictable formatting
- Kimi K2 Thinking when long-context reasoning is required. With a 256k token context window and an Intelligence Index of 41 out of 100 on Artificial Analysis, it handles document-heavy workloads that exceed standard context limits
- Llama 4 Maverick when you want open-weight flexibility for fine-tuning or on-premises deployment. It offers a competitive benchmark profile at a lower per-token cost for self-hosted inference, complementing GLM-4.5 in architectures where model ownership matters
What are the challenges of using GLM-4.5 in my product?
Like any production LLM, GLM-4.5 comes with tradeoffs worth planning for:
- Provider dependency: Zhipu AI is a China-based provider and GLM-4.5 is primarily served through regional infrastructure. Relying on it as a single provider creates fragility if latency increases for international traffic or if the model is deprecated in favor of newer GLM versions
- Limited Western ecosystem documentation: Compared to OpenAI or Anthropic, Zhipu AI's English-language documentation and community support are less developed, which can slow integration and debugging for teams outside China
- Cost at scale: Even at a mid-range price point, token costs compound quickly as request volume grows without active cost management or routing policies that fall back to cheaper variants like GLM-4.7 Flash
- No native multimodal input: GLM-4.5 is a text-in, text-out model. Workloads that require image, audio, or video understanding cannot be served by GLM-4.5 without routing to a multimodal model in parallel
- Version deprecation risk: Zhipu AI has iterated quickly through GLM-4.5, GLM-4.7, and GLM-5 within a short window. Production integrations should account for model version changes and test new releases before switching.
Why should I use Merge Gateway to route LLM requests with GLM-4.5 and every other model?
Using GLM-4.5 through Merge Gateway gives you access to the model itself and the infrastructure layer around it:
- One API, every provider: Access GLM-4.5 and every other major LLM through a single endpoint and API key. Change providers by swapping the model string — no application code changes required
- Intelligent routing and automatic failover: Merge routes around Zhipu AI outages automatically. Routing policies based on cost, latency, or quality can reduce spend by 40–60% without touching your application code
- Cost governance: Set hard or soft project budgets so GLM-4.5 spend stays within plan. Every request is attributed to a model, project, and tag in a unified billing dashboard across all providers
- Build Your Own Router: Define what "best" means for your traffic by selecting from curated ML benchmarks or adding your own eval scores. The router scores each available model against your weights and picks the winner per request, with a plain-language explanation of every decision
- Security and compliance controls: Apply DLP rules and prompt injection protection before every request reaches Zhipu AI. Enforce per-project model and region policies without adding that logic to your application
How can I start routing requests to GLM-4.5 via Merge Gateway?
Getting GLM-4.5 running through Merge Gateway takes a few minutes:
1. Create an account and get your API key from the dashboard.
2. Install the Merge Gateway SDK: run pip install merge-gateway-sdk (Python) or npm install merge-gateway-sdk (Node). Alternatively, if you're already using the OpenAI SDK, set base_url = "https://api-gateway.merge.dev/v1/openai" and your existing code works as-is.
3. Make your first request using the provider/model format. For GLM-4.5, the model string is zhipu/glm-4.5. Swap the model string to route to any other provider without changing anything else.
4. Configure a routing policy in the dashboard to set failover behavior, cost limits, and optimization strategy. Your first policy can be as simple as naming GLM-4.5 as primary with one fallback.
Full setup instructions and SDK references are in the Merge Gateway docs.
Try GLM-4.5 through Merge Gateway
Route, observe, and control AI requests across providers from one API.





