Skip to main content
Z.aiFastHigh

GLM 4.7

Z.ai's GLM 4.7 served through the OpenRouter aggregator - a flagship text model with enhanced programming capabilities and more stable multi-step reasoning/execution, showing clear gains on complex agent tasks. 200K context, billed at OpenRouter's actual usage cost.

743/3,252credits
input / output ยท per 1M tokens
200K-token context window, up to 128K output tokens
Enhanced programming and stable multi-step reasoning/execution
Text-only input and output; reasoning mode supported
OpenAI-compatible API (chat completions) via /llm/openrouter/v1
Billed at OpenRouter's actual usage.cost - listed rates are estimates

Run it right now

Test this model instantly in the Console Playground โ€” no code required

Sign in to try

Use with AI Assistant

Copy usage instructions for Claude, ChatGPT, or other AI

Model Specifications

Context Window
205K
tokens
Max Output
131K
tokens
Training Cutoff
Not published
Compatible SDK
OpenAI

Capabilities

Vision
Function Calling
Streaming
JSON Mode
System Prompt

Token Pricing (per 1M tokens)

Token TypeCreditsUSD Equivalent
Input Tokens743$0.50
Output Tokens3,252$2.17
Cached Tokens148.64$0.10

* 1,500 credits โ‰ˆ $1 (actual charges may vary based on usage)

Quick Start

curl -X POST "https://api.core.today/llm/openrouter/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer cdt_your_api_key" \
  -d '{
  "model": "z-ai/glm-4.7",
  "messages": [
    {
      "role": "user",
      "content": "Summarize the attached report in 5 bullets."
    }
  ],
  "max_tokens": 1024
}'

Parameters

ParameterTypeRequiredDefaultDescription
modelstringYes-Model ID in vendor/model form, e.g. "z-ai/glm-4.7".
messagesarrayYes-Chat messages in OpenAI format (system/user/assistant roles).
temperaturenumberNo0.7Sampling temperature (0-2).
max_tokensintegerNo2048Maximum completion tokens.
streambooleanNofalseStream the response as server-sent events.

Examples

Chat completion

OpenAI-compatible chat completion request via OpenRouter

curl -X POST "https://api.core.today/llm/openrouter/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer cdt_your_api_key" \
  -d '{
  "model": "z-ai/glm-4.7",
  "messages": [
    {
      "role": "user",
      "content": "Summarize the attached report in 5 bullets."
    }
  ],
  "max_tokens": 1024
}'

Tips & Best Practices

1Works with the OpenAI SDK - set base_url to https://ai.api.core.today/llm/openrouter/v1
2Charged at OpenRouter's usage.cost x 1,858 credits/USD - the listed rates are estimates and may lag OpenRouter price changes
3Text-only and cheaper than GLM 5.2 - a good default for coding and agent loops; step up to GLM 5.2 when you need the 1M context

Use Cases

Coding assistants and code generation
Multi-step agent task execution with tools
Cost-efficient general chat and reasoning