NewDeepSeek V4.1 Flash 1017 is now availableTry it now

GLM-5.2

Z.ai's reasoning model, served through one OpenAI-compatible endpoint with transparent per-token pricing and project-scoped API keys.

Z.aiReasoning Model
MODEL SPEC
Developed by
Z.ai
Model family
GLM-5.2
Size
—
Architecture
Transformer
Context window
1M tokens
Max output
944K tokens
License
Provider license
Overview

GLM-5.2 is a reasoning model from Z.ai, available through the Inference.net serverless API. Use the same OpenAI-compatible request shape across the catalog and switch models by changing a single identifier.

The API supports streaming responses and project-scoped credentials. Usage, token volume, and spend appear in the dashboard automatically, so the model can move from evaluation to production without a second integration path.

QUICKSTARTGet API key
import OpenAI from 'openai'

const client = new OpenAI({
  baseURL: 'https://api.inference.net/v1',
  apiKey: process.env.INFERENCE_API_KEY,
})

const completion = await client.chat.completions.create({
  model: 'glm-5.2',
  messages: [{ role: 'user', content: 'Hello' }],
})
PROMPT CACHING
  1. Keep the prompt prefix byte-identical across calls: same text, same order.
  2. Pass a stable prompt_cache_key string. It is a routing-affinity hint; it does not create or identify cached content.
  3. Check usage.prompt_tokens_details.cached_tokens in the response to confirm cache reads.
{
  "prompt_cache_key": "v1-stable-prefix",
  "messages": [{ "role": "user", "content": "..." }]
}
AGENT INTEGRATIONSView all
Ready when you are

Start building with GLM-5.2 today

Serverless, OpenAI-compatible, and billed per token. No commitments.