API Documentation
Build on GLM Mini — chat, models, workflows and webhooks over a simple HTTP API.
Overview
GLM Mini exposes a simple HTTP API over your instance. The API follows REST conventions and returns JSON for every response.
Authentication
Send a valid user key with every request. Keys are stored locally and are never exposed to the frontend.
Chat completions
Send a list of messages to the chat endpoint and receive a completion from the selected model. Model selection, temperature and system prompts are all supported.
Streaming
Stream token-by-token responses for a real-time feel. The chat UI uses streaming by default.
Rate limits & errors
Requests are rate-limited per user key. Errors use standard HTTP status codes with a JSON body describing what went wrong.