Models

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

glm-5.3 on Vivgrid: Zhipu AI's coding and long-horizon agent model with a 1M-token context window, function calling, and competitive pricing.

glm-5.3 is Zhipu AI's newest coding model. It keeps the glm-5.2 base model and 1M-token context window, and puts its gains into post-training: better long-horizon agent behaviour, more reliable multi-step tool use, and stronger results on coding benchmarks — at the same price as glm-5.2.

On Vivgrid, glm-5.3 is reachable through the unified, OpenAI-compatible endpoint, so it integrates cleanly alongside models from OpenAI, Anthropic, Google, and DeepSeek under one API key.

Specifications

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

Pricing

Pricing in USD per 1M tokens, matching the provider's rates.

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

Use glm-5.3 in your coding agent

glm-5.3 works with the same Vivgrid key and https://api.vivgrid.com/v1 endpoint as every other model in the catalog. Grab your API key from the Vivgrid Console, then drop one of the configurations below into your agent of choice.

OpenCode

OpenCode has Vivgrid built in, so you can use glm-5.3 without writing any config: open /models, search for vivgrid, paste your API key and pick the model. The OpenCode tutorial walks through it step by step.

Prefer to configure it by hand? Install OpenCode:

npm i -g opencode-ai

Declare glm-5.3 under the Vivgrid provider in your global OpenCode config, ~/.config/opencode/opencode.json. The @ai-sdk/openai-compatible provider talks to Vivgrid over Chat Completions (/v1/chat/completions):

~/.config/opencode/opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "model": "vivgrid/glm-5.3",
  "provider": {
    "vivgrid": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Vivgrid",
      "options": {
        "baseURL": "https://api.vivgrid.com/v1",
        "apiKey": "{env:VIVGRID_API_KEY}"
      },
      "models": {
        "glm-5.3": {
          "name": "glm-5.3",
          "tool_call": true,
          "modalities": { "input": ["text"], "output": ["text"] },
          "limit": { "context": 1000000, "output": 128000 }
        }
      }
    }
  }
}

Export your key and launch OpenCode:

export VIVGRID_API_KEY="viv-xxxxxxxxxxxxx"
opencode

Use /models to switch between glm-5.3 and other Vivgrid models mid-session. See the full OpenCode tutorial.

Pi

Install Pi:

npm install -g --ignore-scripts @earendil-works/pi-coding-agent

Add glm-5.3 to the Vivgrid provider in ~/.pi/agent/models.json. Pi talks to Vivgrid over Chat Completions (/v1/chat/completions):

~/.pi/agent/models.json
{
  "providers": {
    "vivgrid": {
      "baseUrl": "https://api.vivgrid.com/v1",
      "apiKey": "viv-xxxxxxxxxxxxx",
      "api": "openai-completions",
      "models": [
        {
          "id": "glm-5.3",
          "input": ["text"],
          "contextWindow": 1000000,
          "maxTokens": 128000
        }
      ]
    }
  }
}

Make it the model Pi starts with in ~/.pi/agent/settings.json:

~/.pi/agent/settings.json
{
  "defaultProvider": "vivgrid",
  "defaultModel": "glm-5.3"
}

Then verify and start Pi:

pi --list-models vivgrid
pi

Or run a one-shot prompt without entering the TUI:

pi -p "explain the auth flow in this repo" --model vivgrid/glm-5.3

See the full Pi tutorial.

API surfaces

The Vivgrid Console catalogs glm-5.3 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.3 directly.

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

Choosing within the GLM 5.3 family

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

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

Ideal use cases

  • Long-horizon coding agents that chain many tool calls
  • Whole-repository reasoning within a 1M-token context
  • Cost-effective drop-in upgrade from glm-5.2 at identical pricing
  • Teams diversifying beyond US-based providers
  • gpt-6-astra — OpenAI's frontier gpt-6 coding model
  • glm-5.2 — same base model and price, prior post-training
  • kimi-k3 — alternative frontier coding model with a 1M context

On this page