Z.AI GLM 4.5 on W&B Inference

Price per 1M tokens

$0.55 (input)
$2.00 (output)

Parameters

32B (Active)
355B (Total)

Context window

131K

Release date

July 2025

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: GLM-4.5
 
 
				
					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>",

    # Team and project are required for usage tracking
    project="<team>/<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)
				
			

GLM 4.5 resources