Logoai2save
Sign In
ai2save

GLM API pricing and chat integration

Compare public GLM group rates for prompts, generated answers and cache reads. Test a model with a Chat Completions request.

Compare GLM models for structured extraction

Try a representative document with each candidate model. Record prompt tokens, output tokens and whether the returned fields match your expected schema.

Public prices

USD / 1M tokens

Zhipu GLM 50% off · glm-5.1

token

Site Price (Discounted)
Context (tokens)InputOutputCache readCache write (5m)Cache Write (1h)USD / request or image
Standard$0.616$1.936$0.1144———
Official Price
Context (tokens)InputOutputCache readCache write (5m)Cache Write (1h)USD / request or image
Standard$1.40$4.40$0.26———

Zhipu GLM 50% off · glm-5.2

token

Site Price (Discounted)
Context (tokens)InputOutputCache readCache write (5m)Cache Write (1h)USD / request or image
Standard$0.616$1.936$0.1144———
Official Price
Context (tokens)InputOutputCache readCache write (5m)Cache Write (1h)USD / request or image
Standard$1.40$4.40$0.26———

Zhipu GLM 50% off · glm-5.3

token

Site Price (Discounted)
Context (tokens)InputOutputCache readCache write (5m)Cache Write (1h)USD / request or image
Standard$0.616$1.936$0.1144———
Official Price
Context (tokens)InputOutputCache readCache write (5m)Cache Write (1h)USD / request or image
Standard$1.40$4.40$0.26———

Standard-time prices. Context tiers, cache duration, time multipliers and per-request units are listed below. The selected group’s billing rules apply.

Public prices →

Retrieved:

Source: OpenAI · Anthropic · Gemini · LiteLLM — Not independently verified

Integration and request example

Choose an enabled GLM model ID and send a short extraction prompt in the messages array. Check the returned fields before processing more documents.

Replace YOUR_MODEL_ID with a model ID supported by your group set SUB2API_API_KEY, and set SUB2API_BASE_URL to the service origin (without /v1). This example shows the request format and does not send a request.

curl "$SUB2API_BASE_URL/v1/chat/completions" \
  -H "Authorization: Bearer $SUB2API_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"YOUR_MODEL_ID","messages":[{"role":"user","content":"Hello"}]}'
Read the integration guide →

Model limits and billing conditions

Use the rates of the same group used for the test. Models with a lower input rate can still cost more when the output is longer.

View all API prices →