# GLM 5.4 API

Canonical: https://bettertoken.ai/en/glm-5-4-api/
Prices as of: 2026-11-24

GLM 5.4 API — $1.05/M Input, 25% Off

Use GLM-5.4 from $1.05/M input tokens, with image input and 1M context. First $5 of credit for $3. One BetterToken API key for GLM, Claude, GPT and Gemini.

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

## 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

| Capability                    | Result                                              |
| ----------------------------- | --------------------------------------------------- |
| Image input (base64)          | 3 of 3 colour images identified correctly           |
| Tool calling                  | returned the expected function call                 |
| JSON Schema output            | schema-valid JSON returned                          |
| Reasoning effort (low / high) | both accepted; thinking tokens are billed as output |
| Long input                    | 647,652 input tokens accepted in one request        |

## GLM 5.4 API pricing

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.

### All GLM models on BetterToken

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

- `glm-5.4` (per million tokens): Input $1.05; Output $3.30; Cache read $0.195.
- `glm-5.3` (per million tokens): Input $1.05; Output $3.30; Cache read $0.195.
- `glm-5.3-flash` (per million tokens): Input $0.1125; Output $0.375; Cache read $0.0225.
- `glm-5.2` (per million tokens): Input $1.05; Output $3.30; Cache read $0.195.

## Get a GLM 5.4 API key and make your first call

### OpenAI Chat Completions

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

```sh
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

### How much does the GLM 5.4 API cost?

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.

### How do I get a GLM 5.4 API key?

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 vs GLM-5.3: which should I choose?

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.

### What is the GLM-5.4 context window?

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.

### Do I need a Z.ai account or Coding Plan subscription?

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

### Which API and SDKs can I use?

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

### Can GLM-5.4 process images?

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

### How do I control thinking and how is it billed?

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.

### Does GLM-5.4 support tool calls, JSON and streaming?

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

### How much do cache reads cost?

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

### Which models can I use with the same account?

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

### How can I pay? Is there a monthly fee?

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.

BetterToken is an independent service. GLM and related model names belong to their respective owners.
