Skip to content
OpenKey

GLM 4.5

Z.aiReleased Jul 25, 2025

GLM-4.5 is our latest flagship foundation model, purpose-built for agent-based applications. It leverages a Mixture-of-Experts (MoE) architecture and supports a context length of up to 128k tokens. GLM-4.5 delivers significantly...

Try in playground
Context window
131K tokens
Max output
98K tokens
Input
text
Output
text
Tokenizer
Other
Knowledge cutoff
Dec 31, 2024
Released
Jul 25, 2025
Reasoning
optional

Pricing

Per 1M tokens. The provider price and our flat 3% fee are separate columns — what you pay is their sum.

Per 1M tokensProvider+ 3% feeYou pay
Input$0.600$0.018$0.618
Output$2.20$0.066$2.27
Cache read$0.110$0.0033$0.113

Benchmarks

Design Arena

CategoryEloWin rateRank
3Dmodels124759.7%#30
Codemodels121554.4%#46
Data vizmodels120453.3%#47
Game devmodels121154.4%#41
SVGmodels115450.8%#41
UI componentsmodels120055.1%#49
Websitesmodels121253.8%#48

Head-to-head preference voting. How we filter and rank

Supported parameters

  • include_reasoning
  • max_tokens
  • reasoning
  • response_format
  • temperature
  • tool_choice
  • tools
  • top_k
  • top_p

Call it

OpenAI-compatible: point your SDK at api.openkey.ai/v1 and use model z-ai/glm-4.5.

Code sample language
curl https://api.openkey.ai/v1/chat/completions \
  -H "Authorization: Bearer $OPENKEY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "z-ai/glm-4.5",
    "messages": [{"role": "user", "content": "Hello"}]
  }'
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.openkey.ai/v1",
    api_key=os.environ["OPENKEY_API_KEY"],
)

completion = client.chat.completions.create(
    model="z-ai/glm-4.5",
    messages=[{"role": "user", "content": "Hello"}],
)
print(completion.choices[0].message.content)
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.openkey.ai/v1",
  apiKey: process.env.OPENKEY_API_KEY,
});

const completion = await client.chat.completions.create({
  model: "z-ai/glm-4.5",
  messages: [{ role: "user", content: "Hello" }],
});
console.log(completion.choices[0].message.content);

Questions

How much does GLM 4.5 cost via API?
Through OpenKey, GLM 4.5 costs $0.618 per 1M input tokens and $2.27 per 1M output tokens. That is the provider price ($0.600 / $2.20) plus a flat 3% fee — nothing else.
What is GLM 4.5's context window?
GLM 4.5 accepts up to 131K tokens of context and returns up to 98K tokens per request.
Is GLM 4.5 OpenAI-compatible?
Yes. Send requests to OpenKey's /v1/chat/completions endpoint with model "z-ai/glm-4.5" using any OpenAI SDK — only the base URL and API key change.
What inputs does GLM 4.5 support?
GLM 4.5 accepts text input and produces text output. Its knowledge cutoff is Dec 31, 2024.

More from Z.ai

All Z.ai models →