glm-5
Z.AI logo

GLM 5

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

Capabilities

  • Thinking
  • Tools
  • Tool calling
  • Structured outputs

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.