Z.AI GLM 4.5 inference overview

Price per 1M tokens

$0.55 (input)
$2.00 (output)

Parameters

32B (active)
355B (total)

Context Window

131K

Release Date

Jul 2025

Z.AI GLM 4.5 inference details

GLM-4.5 is purpose built for agent-based applications. It leverages a Mixture-of-Experts (MoE) architecture and delivers significantly enhanced capabilities in reasoning, code generation, and agent alignment. It supports a hybrid inference mode with two options, a “thinking mode” designed for complex reasoning and tool use, and a “non-thinking mode” optimized for instant responses. Users can control the reasoning behavior with the reasoning enabled boolean.

Created by: 

Z.AI

License: 

mit

Model card: 

import openai
import weave

# Weave autopatches OpenAI to log LLM calls to W&B
weave.init("/")

client = openai.OpenAI(
    # The custom base URL points to W&B Inference
    base_url='https://api.inference.wandb.ai/v1',

    # Get your API key from https://wandb.ai/authorize
    # Consider setting it in the environment as OPENAI_API_KEY instead for safety
    api_key="",

    # Team and project are required for usage tracking
    project="/",
)

response = client.chat.completions.create(
    model="zai-org/GLM-4.5",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Tell me a joke."}
    ],
)

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

Z.AI GLM 4.5 resources

Screenshot 2025-07-30 at 1.03.14 PM
Course
AI engineering course: Agents
Inference_logo
Guide
W&B Inference powered by CoreWeave
Screenshot 2025-07-30 at 8.00.14 AM
Whitepaper
A primer on building successful AI agents