GLM-5.2

zai/glm-5.2

A long-context text model aimed at long-horizon coding and engineering tasks.

This model is available through the API. It is not currently offered as an agent's reasoning model.

Use through the API
In / out per 1M
Official price: $1.40Sale price: $0.98Official price: $4.40Sale price: $3.0830% off
Modalities
Text
Context
1M
Released
Jun 16, 2026

Overview

A long-context text model aimed at long-horizon coding and engineering tasks. It is billed from the same balance as every other model and tool here, and the price of each call comes back in the response.

Pricing

30% off

Prices in USD per million tokens, using your plan when signed in.

MeterPer 1M tokens
InputOfficial price: $1.40Sale price: $0.98
OutputOfficial price: $4.40Sale price: $3.08
Cache readOfficial price: $0.26Sale price: $0.182
Cache writeOfficial price: $1.40Sale price: $0.98

Your balance and per-call records come from /v1/credits and /v1/generation.

Use it

Point your client at the gateway and pass this model id. Nothing else changes.

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://gateway.agentsky.dev/v1",
  apiKey: process.env.AGENTSKY_API_KEY, // ast_…
});

const completion = await client.chat.completions.create({
  model: "zai/glm-5.2",
  messages: [{ role: "user", content: "Summarise this ticket." }],
});
console.log(completion.usage.cost); // USD, in the response

Questions