Z.AI GLM 5 inference overview

Price per 1M tokens

$1.00 (input)
$3.20 (output)

Parameters

40B (active)
744B (total)

Context Window

203K

Release Date

Feb 2026

Z.AI GLM 5 inference details

GLM-5 is a Mixture-of-Experts (MoE) model for long-horizon agentic tasks. It delivers significant improvement compared to GLM-4.7 across a wide range of academic benchmarks with strong performance across reasoning, coding, and agentic tasks.

Created by: 

Z.AI

License: 

mit

Model card: 

				
					import openai
import weave

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

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="<your-apikey>",

    # Optional: Team and project for usage tracking
    project="<team>/<project>",
)

response = client.chat.completions.create(
    model="zai-org/GLM-5-FP8",
    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 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