GLM API

GLM API

Two Z.ai models on the standard Text API passthrough. Every model here answers on all four request formats the Text API supports.

ModelChoose it for
glm-5.3The flagship of the GLM-5 series
glm-5.3-flashThe natively multimodal fast tier — image and video in, text out, over a 1M-token context

OpenAI Chat Completions

POST https://api.beatapi.io/v1/chat/completions

1import OpenAI from "openai";
2
3const client = new OpenAI({
4 apiKey: process.env.BEATAPI_API_KEY,
5 baseURL: "https://api.beatapi.io/v1"
6});
7
8const completion = await client.chat.completions.create({
9 model: "glm-5.3",
10 max_tokens: 2000,
11 messages: [
12 { role: "user", content: "Summarise the tradeoffs between optimistic and pessimistic locking for a booking system." }
13 ]
14});
15
16console.log(completion.choices[0].message.content);
$curl --request POST \
> --url https://api.beatapi.io/v1/chat/completions \
> --header 'Authorization: Bearer <BEATAPI_API_KEY>' \
> --header 'Content-Type: application/json' \
> --data '{
> "model": "glm-5.3",
> "messages": [
> {
> "role": "user",
> "content": "Summarise the tradeoffs between optimistic and pessimistic locking for a booking system."
> }
> ]
>}'

Both report reasoning tokens under usage.completion_tokens_details.reasoning_tokens, counted in completion_tokens and billed as output.

Other SDK formats

The same models answer on /v1/responses, /v1/messages and the Gemini-compatible endpoint. The request and response shapes are identical for every text model, so they are documented once on the Text API page rather than repeated here.

Authentication and availability

One BeatAPI key reaches every model on this page — there is no per-vendor key, no per-vendor base URL, and no separate signup. Send Authorization: Bearer <BEATAPI_API_KEY> against https://api.beatapi.io.