GLM 5
Z.AI logo

GLM 5

Z.AI
GLM-5 is an advanced, open-source large language model designed for developers tackling the toughest challenges. It excels at long-context reasoning, multi-step tool orchestration, and complex systems engineering, making it the ideal choice for powering sophisticated agents and applications that require high-level cognitive tasks.

Pricing

The model is available through multiple vendor channels; deepinfra supports input caching, with a cache-hit fee of $0.176/M. sophnet and baidu channels use tiered pricing. sophnet-glm-5 pricing: input <32k: $0.548→$2.466; input <64k: $0.822→$3.836; input >64k: $1.096→$4.384. baidu-glm-5 pricing: input <32k: $0.548→$2.466; input >32k: $0.822→$3.014;alicloud-glm-5 pricing: input <32k: $0.563 → $2.535, cache hit fee $0.113/M; input >32k: $0.845 → $3.098, cache hit fee $0.169/M.

Input Modalities

  • Text

Output Modalities

  • Text

Context length

  • 200K tokens

Max output

  • 131K tokens

Capabilities

  • Thinking
  • Streaming
  • Tool calling
  • Web search
  • URL context
  • Code interpreter
  • Computer use
  • File search
  • Memory tool
  • Structured outputs
  • Citations
  • Prompt caching
  • Background mode
  • Server-side sessions

Providers

Alibaba Cloud alicloud-glm-5
Pricing$0.5634$2.5353
Cache Read$0.1127/M tokens
Pricing$0.8446$3.0969
Cache Read$0.1689/M tokens
Context200K
Max output128K
Latency0.9S
Throughput65.8TPS
Uptime
100.00% uptime 3 days ago
100.00% uptime 2 days ago
98.03% uptime yesterday
Z.AI zai-glm-5
Pricing$0.6198$2.7891
Cache Read$0.155/M tokens
Pricing$0.9296$3.4085
Cache Read$0.2324/M tokens
Context200K
Max output128K
Latency1.5S
Throughput61.4TPS
Uptime
0.00% uptime 3 days ago
0.00% uptime 2 days ago
100.00% uptime yesterday
Baidu baidu-glm-5
Pricing$0.548$2.466
Pricing$0.822$3.014
Context200K
Max output128K
Latency-
Throughput-
Uptime
0.00% uptime 3 days ago
0.00% uptime 2 days ago
0.00% uptime yesterday
Deepinfra deepinfra-glm-5
Pricing$0.88$2.816
Cache$0.176
Context202K
Max output128K
Latency-
Throughput-
Uptime
0.00% uptime 3 days ago
100.00% uptime 2 days ago
100.00% uptime yesterday

Performance for glm-5

Uptime is the percentage of requests that succeeded over the past 72 hours. AIHubMix continuously monitors every provider and automatically retries with the next-best provider when one returns an error or responds too slowly; Latency is total round-trip time (lower is better); Throughput is how fast the model writes (tokens per second, higher is better).

Uptime
Loading...
Latency
Loading...
Throughput
Loading...

Try this model

Python
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["AIHUBMIX_API_KEY"],
    base_url="https://aihubmix.com/v1",
)

response = client.chat.completions.create(
    model="glm-5",
    messages=[
      {
        "role": "user",
        "content": "Hello, how are you?"
      }
    ],
    max_tokens=1024,
    stream=False,
)

print(response.choices[0].message.content)

Frequently asked questions

What is GLM 5?

GLM-5 is an advanced, open-source large language model designed for developers tackling the toughest challenges. It excels at long-context reasoning, multi-step tool orchestration, and complex systems engineering, making it the ideal choice for powering sophisticated agents and applications that require high-level cognitive tasks.