Models

glm-5.4 — API, Pricing & Context Window | Vivgrid

Use GLM-5.4 on Vivgrid with a 1M-token context window, up to 128,000 output tokens, and text or image inputs.

glm-5.4 is Zhipu AI's flagship model for coding and long-running agents. It succeeds glm-5.3 at the same per-token price and adds image input.

Send requests to Vivgrid's OpenAI-compatible Chat Completions API (/v1/chat/completions) with model: "glm-5.4". Set reasoning_effort to low, high, or max to control how much reasoning the model performs. The model is served from APAC and is accessible worldwide.

Specifications

ProviderZhipu AI
Model IDglm-5.4
Best forCoding
Available onVibe coding, Chat Completions
Context window1,000,000 tokens
Max output128,000 tokens
ModalitiesText, Image
Tool / function callingYes
Knowledge cutoff—
Acceleration🌐 Global (Centralized)

Pricing

Pricing in USD per 1M tokens.

InputCached inputOutput
$1.20$0.30$4.20

What one request costs

The rates above applied to a 20K-token prompt with a 2K-token reply — a typical single agent turn, small enough that every request is billed at the base rate.

RequestCost
Cold prompt, nothing cached$0.0324
Warm prompt, 90% of the input served from cache$0.0162

API surfaces

The Vivgrid Console catalogs glm-5.4 on 2 surfaces, all behind the same API key. The endpoint shown is the one the Console previews for that surface.

SurfacePrimary endpointUse it for
Vibe coding/chat/completionsCoding CLIs and IDE agents that drive the model themselves — point the tool at Vivgrid and keep your own loop.
Chat Completions/chat/completionsAgent projects, where Vivgrid injects the model, system prompt and tools server-side, and Model API calls that name the model per request.

Quick start

Get an API key from the Vivgrid Console, then call glm-5.4 directly.

curl https://api.vivgrid.com/v1/chat/completions \
  -H "Authorization: Bearer $VIVGRID_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-5.4",
    "messages": [
      { "role": "user", "content": "Say hello in English, Chinese and Spanish." }
    ],
    "stream": true
  }'

Choosing within the GLM family

Prices are USD per 1M tokens at the base rate. Rows marked this page are the model described here.

ModelContextMax outputInputOutput
glm-5.4 — this page1,000,000128,000$1.20$4.20
glm-5.31,000,000128,000$1.20$4.20
glm-5.3-flash1,000,000128,000$0.15$0.50

Ideal use cases

  • Navigate large repositories and coordinate changes across multiple files.
  • Use screenshots to investigate UI regressions alongside the relevant source code.
  • Chain tool calls in long-running coding and debugging sessions.
  • Analyze technical documents and diagrams alongside text.

On this page