Skip to content
OpenKey

GLM 4.7

Z.aiReleased Dec 22, 2025

GLM-4.7 is Z.ai’s latest flagship model, featuring upgrades in two key areas: enhanced programming capabilities and more stable multi-step reasoning/execution. It demonstrates significant improvements in executing complex agent tasks while...

Try in playground
Context window
203K tokens
Max output
131K tokens
Input
text
Output
text
Tokenizer
Other
Released
Dec 22, 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.400$0.012$0.412
Output$1.75$0.052$1.80
Cache read$0.080$0.0024$0.082

Benchmarks

Design Arena

CategoryEloWin rateRank
androidnativeagents112756%#18
Full-stackagents111744.9%#20
godotgamedevagents113139.1%#17
Mobile appsagents119049.9%#16
3Dmodels126854.4%#26
ASCII artmodels121348.3%#18
Codemodels126654.9%#27
Data vizmodels123951.5%#32
Game devmodels125455.1%#30
SVGmodels120154.5%#29
UI componentsmodels125050.8%#30
Websitesmodels126855.5%#25

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

Supported parameters

  • frequency_penalty
  • include_reasoning
  • logit_bias
  • logprobs
  • max_tokens
  • min_p
  • presence_penalty
  • reasoning
  • repetition_penalty
  • response_format
  • seed
  • stop
  • structured_outputs
  • temperature
  • tool_choice
  • tools
  • top_k
  • top_logprobs
  • top_p

Call it

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

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.7",
    "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.7",
    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.7",
  messages: [{ role: "user", content: "Hello" }],
});
console.log(completion.choices[0].message.content);

Questions

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

More from Z.ai

All Z.ai models →