Docs

GLM 5.2 API developer guide

GLM 5.2 is currently "Available". This guide provides model IDs, price snapshots, and copyable examples for integration. GLM 5.2 model page

Overview

  • Vendor: Z.ai
  • Type: Text
  • Number of tiers: 1
  • Endpoint tags: openai

Available tiers and pricing

The model in requests must use the model IDs in the table below, case-sensitive.

Tier Model ID Input Output Context
GLM 5.2 glm-5.2 $1.0000 / 1M tokens $3.5000 / 1M tokens

Prices are build-time snapshots; refer to the pricing page and console for the latest prices.

Base URL and authentication

Base URL is https://api.rokoapi.com/v1. All requests must include Authorization: Bearer $OPENAI_API_KEY.

Console

Quickstart

curl https://api.rokoapi.com/v1/chat/completions \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "glm-5.2",
  "stream": true,
  "messages": [{"role": "user", "content": "Introduce yourself in one sentence"}]
}'

Common parameters

ParameterDescription
modelUse the public model IDs from the table above.
prompt / messagesInput prompt, conversation messages, or generation instructions; format depends on the endpoint.
streamText models can set this to true to enable SSE streaming output.

Notes

  • Use only the model IDs listed on this page; unprovisioned or retired names will return a model unavailable error.
  • If you encounter a 403 error, check your account balance, key group, and model access permissions.
  • Multimodal, tool calling, caching, and streaming capabilities depend on the upstream model and channel configuration; refer to actual responses.