TokenLX
ZHIPU

zhipu/glm-4.7

200K  context$0.3/M tokens input$1.18/M tokens outputThinking   Supported0.07B  tokens servedText

Zhipu GLM — Chinese LLM from Tsinghua. Solid bilingual support with academic training roots.

Key strengths

  • Bilingual quality
  • Academic training
  • Tool calling
  • Multi-size tiers

Use cases

  • Chinese enterprise
  • Academic
  • Bilingual content
  • Data analysis
Thinking token billing

When Thinking mode is enabled, reasoning tokens generated by the model are counted as billable output. This can increase total usage beyond the visible answer tokens.

chinesebilingual

Zhipu's zhipu/glm-4.7 is a frontier text generation model in the GLM family. It excels at complex reasoning, agentic workflows, code generation, and long-form writing tasks, with native support for streaming, tool calling, JSON mode, and multi-turn conversations.

The model handles long-context inputs gracefully and is particularly effective for software engineering, multi-step research, and end-to-end project execution. Its tokenizer and pricing are optimized for high-throughput production workloads, with a competitive cost profile relative to other models in its tier.

zhipu/glm-4.7 is fully OpenAI-compatible — drop in your existing OpenAI Python or Node SDK and switch `baseURL` to `https://api.tokenlx.ai`. TokenLX transparently routes your requests to the optimal provider endpoint while preserving streaming, function-calling, and structured-output semantics.

Performance

Compare different providers across TokenLX · All locations.

Throughput
53
tok/s
Latency
137
ms
E2E Latency
200
ms
Tool Call Errors
0.06
%
Output Errors
0.37
%
Time to First Token
108
ms

Effective Pricing

Actual cost per million tokens across providers over the past 7 days.

Input
$0.3
per 1M tokens
7d agotoday
Output
$1.18
per 1M tokens
7d agotoday
Cache read
$0.06
per 1M tokens
7d agotoday
Input tiers
0M - 0.032M$0.3per 1M tokens
0M - 0.032M$0.44per 1M tokens
0.032M - 0.2M$0.59per 1M tokens
Output tiers
0M - 0.032M$1.18per 1M tokens
0M - 0.032M$2.07per 1M tokens
0.032M - 0.2M$2.36per 1M tokens

Recent activity

Total usage per day on TokenLX (last 30 days).

Prompt
25.25M
Completion
46.71M
30d ago15d agotoday

Sample code & API

TokenLX normalizes requests and responses across providers. Use any OpenAI SDK or our native SDK.

Control Thinking cost

Disable Thinking when you do not need explicit reasoning, or set a lower budget_tokens value to cap the reasoning length. Only enable return_thoughts when you need to inspect the thinking process.

from openai import OpenAI

client = OpenAI(
    base_url="https://api.tokenlx.ai/v1",
    api_key="sk-tokenlx-...",
)

# Non-streaming
response = client.chat.completions.create(
    model="glm-4.7",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Hello!"},
    ],
    # Optional: enable Thinking / reasoning.
    extra_body={
        "thinking": {
            "enabled": True,
            "budget_tokens": 2048,
            "return_thoughts": True,
        }
    },
)
print(response.choices[0].message.content)

# Streaming
stream = client.chat.completions.create(
    model="glm-4.7",
    messages=[{"role": "user", "content": "Tell me a story"}],
    stream=True,
    extra_body={
        "thinking": {
            "enabled": True,
            "budget_tokens": 2048,
            "return_thoughts": True,
        }
    },
)
for chunk in stream:
    print(chunk.choices[0].delta.content or "", end="", flush=True)

Replace sk-aihubrouter-… with your key from the dashboard.