GLM-5.4
About GLM-5.4
Z.AI's GLM flagship for coding and agentic work, with text, image, video and PDF input and a 1M-token context window.
GLM-5.4 by Z.AI is a language model, with a 1M-token context window, priced on CupAI at $1.4 per 1M input tokens and $4.4 per 1M output tokens. Call it through CupAI's OpenAI-compatible API with the model ID glm-5.4 and pay in toman.
GLM-5.4 is available through CupAI with the standard API format. Set the base URL and your key, and put the model ID in the request.
GLM-5.4 pricing
On /v1/messages, cache is billed at Anthropic’s multiples (0.1× read, 1.25× write).
Technical details
Sample code and API for GLM-5.4
Change the base URL to CupAI and add your API key. The rest of the request stays the same in compatible clients. Full API documentation
curl 'https://api.cupai.ir/v1/chat/completions' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer $CUPAI_API_KEY' \
-d '{
"model": "glm-5.4",
"messages": [
{
"role": "user",
"content": "Hello!"
}
]
}'Replace CUPAI_API_KEY with your own key. Base URL: https://api.cupai.ir/v1
Endpoints
/v1/chat/completions/v1/responses/v1/messagesCapabilities
Capabilities supported by this model’s API.
Common questions about GLM-5.4
By the input and output tokens of each request. Rates are in the price table on this page and are deducted from your wallet.
Change the base URL to CupAI, put your API key in the request header and send the model ID in the body.
Payments are in rials with no foreign card. Credit works across every available model.