New

GLM 5.4 API

Use GLM-5.4 in your app or AI agent with image input and pay-as-you-go pricing.

Pay as you go · One key for multiple models
Get $5 credit. Pay $3.Save $2.00 on your first top-up

What GLM-5.4 supports

1M-token context

The official specification lists a one-million-token context window.

Image input

Send images with text in a Chat Completions request.

Adjustable thinking

Choose low or high reasoning effort, or turn thinking off.

Tools and JSON Schema

Call tools and get structured output that follows your JSON Schema.

Tested on BetterToken · 23 Nov 2026
CapabilityResult
Image input (base64)3 of 3 colour images identified correctly
Tool callingreturned the expected function call
JSON Schema outputschema-valid JSON returned
Reasoning effort (low / high)both accepted; thinking tokens are billed as output
Long input647,652 input tokens accepted in one request

GLM 5.4 API pricing

Monthly cost calculator

Model
90%
of input served from cache

Estimated monthly costGLM-5.4
BetterToken$9.40−25%$12.54
Get API key

Costs are estimated from the volume and cache hit rate you enter. Input includes cache hits.

Top up once. Get more from every token.

Choose your balance credit. The discount comes off what you pay.

Effective price per 1M tokens after this offer
Balance creditYou payYou saveGLM-5.4 input / output
$50You pay: $48 · You save: $2$48$2$1.008 / $3.168Top up
$100You pay: $95 · You save: $5$95$5$0.9975 / $3.135Top up
$200You pay: $185 · You save: $15$185$15$0.9713 / $3.0525Top up
$500Lowest tier rateYou pay: $450 · You save: $50$450$50$0.945 / $2.97Top up

GLM-5.4 vs GLM-5.3

GLM-5.4 accepts image input; GLM-5.3 is text-only.

All GLM models on BetterToken

Up to 32% below official

per million tokens

GLM modelInputOutputCache readContextInput modalitiesAPI formats
GLM-5.4glm-5.4
$1.05−25%$1.40
$3.30−25%$4.40
$0.195−25%$0.26
1MText · ImageChat Completions
GLM-5.3glm-5.3
$1.05−25%vs official$1.40
$3.30−25%vs official$4.40
$0.195−32%vs official$0.2857
1MTextChat CompletionsAnthropic Messages
GLM-5.3 Flashglm-5.3-flash
$0.1125−25%vs official$0.15
$0.375−25%vs official$0.50
$0.0225−32%vs official$0.0329
1MText · Image · Video · FileChat CompletionsAnthropic Messages
GLM-5.2glm-5.2
$1.05−25%vs official$1.40
$3.30−25%vs official$4.40
$0.195−32%vs official$0.2857
1MTextAnthropic MessagesChat Completions

Struck-through prices next to “vs official” use the sources below.

  • docs.z.ai ↗ · checked 2026-11-15 · GLM-5.3 (Input, Output) · GLM-5.3 Flash (Input, Output) · GLM-5.2 (Input, Output)
  • docs.bigmodel.cn ↗ · checked 2026-11-15 · GLM-5.3 (Cache read) · GLM-5.3 Flash (Cache read) · GLM-5.2 (Cache read)

The same API key and balance also work with Claude Fable 5.2 API, GPT-6.2 Astra API and Gemini.

Get a GLM 5.4 API key and make your first call

Copy the setup for your AI agent, or start with an SDK example.

OpenAI Chat Completions

curl https://bettertoken.ai/v1/chat/completions \
  -H "Authorization: Bearer YOUR_BETTERTOKEN_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-5.4",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

A few things you might want to know

Per million tokens, BetterToken charges $1.05 for input, $3.30 for output and $0.195 for cache reads. Your first $5 of balance costs $3.

Sign up or sign in to BetterToken, create an API key in Workspace and top up your balance. Set the model to glm-5.4 in your request.

GLM-5.4 accepts image input; GLM-5.3 is text-only. Both have a 1M-token context window. If you need to send images, choose GLM-5.4.

The official specification lists a 1 million-token context window. In our test on 23 Nov 2026, BetterToken accepted a single request with 647,652 input tokens.

A BetterToken account and API key give you pay-as-you-go access. No Z.ai account or Coding Plan subscription is required.

Call OpenAI Chat Completions with the base URL https://bettertoken.ai/v1. Use curl or the OpenAI SDK for Python or Node.js.

Yes. Include an image as a base64 data URL in a Chat Completions request.

Thinking tokens are billed as output. Use reasoning_effort (low or high) to adjust it, or thinking: {type: "disabled"} to turn it off and reduce output tokens.

Chat Completions supports tool calling, JSON mode, JSON Schema structured output and streaming. Allow enough max_tokens for structured output.

The listed cache-read rate is $0.195 per million tokens. The standard input rate is $1.05 per million.

You can use GLM, Claude, GPT and Gemini with the same BetterToken API key and balance. Select the model in your request.

Top up in US dollars with Stripe or USDT on TRC-20 and pay as you go, with no monthly fee for GLM-5.4 API access. On your first top-up, get $5 credit for $3.

YOUR NEXT PROJECT STARTS HERE

Build your next project with GLM-5.4.

Your first $5 of API credit costs $3.