Listed rates are the highest rates across available channels. Your request is billed at the selected channel’s rate, locked when the request starts, and may cost less.
GLM 5.1
Availableglm-5.1Zhipu GLMtextZhipu’s April 2026 flagship — SOTA on SWE-Bench Pro, 200k context, 128k max output.
Input / Output per 1M tokens
$1.40 / $4.40
Context window
200K
Provider routes
1
Capabilities
StreamingTools
Providers
Choose a route to view its rates and API example.
API example
Connect with your existing OpenAI-compatible SDK.
chat.ts
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://router.202ai.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'glm-5.1',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);