z-ai/glm-5.1
202,752 context · $1.40/M input tokens · $4.40/M output tokens
GLM-5.1 delivers a major leap in coding capability, with particularly significant gains in handling long-horizon tasks. Unlike previous models built around minute-level interactions, GLM-5.1 can work independently and continuously on a single task for more than 8 hours, autonomously planning, executing, and improving itself throughout the process, ultimately delivering complete, engineering-grade results.
Pay-per-use
No upfront costs, pay only for what you use
Use the following code examples to integrate with our API:
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://llm.wavespeed.ai/v1"
)
response = client.chat.completions.create(
model="z-ai/glm-5.1",
messages=[
{"role": "user", "content": "Hello!"}
]
)
print(response.choices[0].message.content)z-ai/glm-5.1
GLM-5.1 delivers a major leap in coding capability, with particularly significant gains in handling long-horizon tasks. Unlike previous models built around minute-level interactions, GLM-5.1 can work independently and continuously on a single task for more than 8 hours, autonomously planning, executing, and improving itself throughout the process, ultimately delivering complete, engineering-grade results.
Input
$1.4 /M
Output
$4.4 /M
Context
203K
Tool Use
Supported
Access GLM 5.1 through our unified API — OpenAI-compatible, no cold starts, transparent pricing.
Pricing on WaveSpeedAI: $1.40 per million input tokens and $4.40 per million output tokens. Prompt caching and batch processing are billed separately and reduce effective cost on long, repetitive workloads.
GLM 5.1 supports up to 203K tokens of context with up to — tokens of output per request.
Yes. WaveSpeedAI exposes GLM 5.1 through an OpenAI-compatible endpoint at https://llm.wavespeed.ai/v1. Point the official OpenAI SDK at this base URL with your WaveSpeedAI API key — no other code changes required.
Sign in to WaveSpeedAI, create an API key in Access Keys, then send a request to https://llm.wavespeed.ai/v1/chat/completions with model id set to the value shown above. New accounts receive free credits to evaluate GLM 5.1 before paying per token.