Felo API PlatformFelo API Platform
Back to models

GLM 5.4 API

Free API trial Limited time

GLM5.4 is a text-and-image model designed for coding, video and game creation,3D work, and long-horizon engineering tasks.

GLM5.4 from Z.ai uses a Loop Transformer architecture that runs28 layers from the GLM5 base model through two iterations. It accepts text and image input and provides a1 million tokens context window. Its Generalized Coding approach is described as supporting video generation and editing, game development,3D modeling, and mechanical design. It can also run code in a sandbox and use a headless browser to measure frame rate.

The model is suited to coding and software development, agentic engineering, long-horizon tasks, and cybersecurity, as well as creative and technical projects involving video, games, or3D design. In one coding test, it produced a working single-file HTML result without errors; it can plan before coding and check its work by testing code and catching bugs. Results may vary: it can enter lengthy reasoning loops and use many tokens, add elements that were not requested, and perform weakly on some writing tasks, particularly in lower-resource languages. Official benchmark figures were not available in the provided information.

MODEL ID

glm-5.4
Input / Output
$1.26 / $3.96/ 1M tokens
Released
Context
1M
Max output
128K
Recommended API
messages
Input
Text / Image / Video / File
Output
Text

Highlights

  • Text and image input
  • 1 million tokens context
  • Loop Transformer architecture
  • Sandbox code execution
  • Headless browser frame-rate measurement
  • Code testing and bug checks

Providers

Best price
1 providers

Compare API prices across providers. Select a provider to view all charges and conditions.

Provider · Pricing details
Uptime
$1.4$1.26$4.4$3.96$0.26$0.234

What $10 buys

Input
7.1M tokens
Output
2.3M tokens

Estimated from current input and output prices, before discounts.

Best for

Coding and software developmentVideo generation and editingGame development3D modeling and designAgentic engineering tasksCybersecurity work

Quick Start

Drop-in code to call this model with Felo API Platform compatible APIs.

1

Get your API key

Create a key from your Felo API Platform account and set it as an environment variable.

export FELO_API_KEY="YOUR_API_KEY"
2

Make your first request

Use this model ID with the Felo API Platform endpoint. Optional request headers such as X-Request-Id can help troubleshooting.

glm-5.4

MessagesPOST https://openapi.felo.ai/api/v1/messages

const response = await fetch("https://openapi.felo.ai/api/v1/messages", {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.FELO_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "model": "glm-5.4",
  "max_tokens": 1024,
  "messages": [
    {
      "role": "user",
      "content": "Hello"
    }
  ]
}),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());

Using third-party SDKs

Use compatible SDKs by setting baseURL to https://openapi.felo.ai/api/v1. Use the Anthropic-compatible base URL for Claude-style clients. https://openapi.felo.ai/api.

3

Enable streaming

Add stream: true to receive responses as server-sent events.

curl -N https://openapi.felo.ai/api/v1/messages \
  -H "Authorization: Bearer $FELO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "glm-5.4",
  "max_tokens": 1024,
  "messages": [
    {
      "role": "user",
      "content": "Hello"
    }
  ],
  "stream": true
}'

Parameters

NameTypeDefaultDescription
modelstringglm-5.4Public model ID to call.
max_tokensinteger—Maximum generated tokens.
messagesarray—Conversation messages for Chat Completions.

Frequently asked questions

What is GLM 5.4?

GLM5.4 from Z.ai uses a Loop Transformer architecture that runs28 layers from the GLM5 base model through two iterations. It accepts text and image input and provides a1 million tokens context window. Its Generalized Coding approach is described as supporting video generation and editing, game development,3D modeling, and mechanical design. It can also run code in a sandbox and use a headless browser to measure frame rate. The model is suited to coding and software development, agentic engineering, long-horizon tasks, and cybersecurity, as well as creative and technical projects involving video, games, or3D design. In one coding test, it produced a working single-file HTML result without errors; it can plan before coding and check its work by testing code and catching bugs. Results may vary: it can enter lengthy reasoning loops and use many tokens, add elements that were not requested, and perform weakly on some writing tasks, particularly in lower-resource languages. Official benchmark figures were not available in the provided information.

How is usage billed?

Your bill depends on the provider you use, its prices and your usage. Longer inputs or other conditions may have different prices.

What input types does GLM5.4 support?

It supports text input and image input.

What context and output lengths are specified?

The context window is1 million tokens. No output limit is specified in the provided information.

What tasks is GLM5.4 suited to?

Use cases include coding, video generation and editing, game development,3D modeling, mechanical design, agentic engineering, long-horizon tasks, and cybersecurity.

How does GLM5.4 differ from GLM5.3?

The provided information lists GLM5.3 as a sibling but does not describe how the two models differ.