Spiral gives your agent every tool with one account. Browse the tools →

OpenRouterLLMReleased 2026-08-27

Z.ai: GLM Flash Latest

~z-ai/glm-flash-latest

Generate and analyse text with Z.ai: GLM Flash Latest from OpenRouter through one Spiral API key. This model always redirects to the latest model in the GLM Flash family. It runs in the background and returns text and structured JSON. Pay as you go, with no subscription.

Pricing

Up to $0.00042 per run at the default inputs. $0.05187 per 1M input tokens, $0.10192 per 1M output tokens.

Limits

Runs
In the background
Returns
text, json
Longest queue wait
1 hour
Run deadline
30 minutes
Longest run, end to end
225 minutes
Largest inline input
1 MB
Largest input file
2 GB
Largest output
5 GB

Use Z.ai: GLM Flash Latest in your AI agent

Input

FieldKindDefaultDescription
messages requiredJSON—

The conversation so far, oldest first.

seednumber (whole)—
stopJSON—
min_pnumber
0 to 1
—
toolsJSON—
top_knumber (whole)
0 to …
—
top_pnumber
0 to 1
—
logprobstrue or false—
reasoningJSON—

Reasoning effort; reasoning tokens count toward max_tokens.

max_tokensnumber (whole)
1 to 131072
—

The most output tokens to generate. On a reasoning model the reasoning tokens count toward it: a cap too low for the effort can end with no answer (finish_reason length).

temperaturenumber
0 to 2
—
tool_choiceJSON—
top_logprobsnumber (whole)
0 to 20
—
response_formatJSON—
presence_penaltynumber
-2 to 2
—
reasoning_effortone of
low, high, max
max

How much the model reasons.

frequency_penaltynumber
-2 to 2
—
repetition_penaltynumber
0 to 2
—
parallel_tool_callstrue or false—

How to use Z.ai: GLM Flash Latest

From your AI agent, the command line or your own code. One Spiral account runs it every way.

Use Spiral's MCP server

  1. Add Spiral's MCP server

    Any MCP client takes https://api.spiral.ai/mcp with your API key as a Bearer token. In Claude Code:

    claude mcp add spiral --transport http https://api.spiral.ai/mcp \
      --header "Authorization: Bearer $SPIRAL_API_KEY"
  2. Ask for Z.ai: GLM Flash Latest

    Your agent finds it on Spiral, shows the price and runs it.

    Use Z.ai: GLM Flash Latest from OpenRouter on Spiral.

Use the Spiral skill

  1. Send your agent this message

    Your agent reads Spiral's skill and sets itself up.

    set up https://spiral.ai/SKILL.md
  2. Sign in or paste a key

    Approve Spiral in the browser, or give the agent a key from the console.

  3. Ask for Z.ai: GLM Flash Latest

    Your agent finds it on Spiral, shows the price and runs it.

    Use Z.ai: GLM Flash Latest from OpenRouter on Spiral.

Use the Spiral CLI

  1. Install and sign in

    Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

    npx -y spiral-cli@latest init
  2. Run Z.ai: GLM Flash Latest

    Waits for the result and saves the run and its files under .spiral/runs.

    spiral runs create \
      --provider openrouter \
      --model '~z-ai/glm-flash-latest' \
      --input '{
        "messages": [
          {
            "role": "system"
          }
        ]
      }' \
      --wait --save

Call the Spiral API

  1. Create an API key

    In the console, under API keys.

  2. Run Z.ai: GLM Flash Latest

    One request; the result comes back by polling or a webhook.

    curl https://api.spiral.ai/v1/runs \
      -H "Authorization: Bearer $SPIRAL_API_KEY" \
      -H "Content-Type: application/json" \
      -H "Idempotency-Key: $(uuidgen)" \
      -d '{
        "provider": "openrouter",
        "model": "~z-ai/glm-flash-latest",
        "input": {
          "messages": [
            {
              "role": "system"
            }
          ]
        }
      }'

Provider

Frequently asked questions

How much does Z.ai: GLM Flash Latest cost?

Up to $0.00042 per run at the default inputs. $0.05187 per 1M input tokens, $0.10192 per 1M output tokens. It is paid from your prepaid Spiral balance as you use it, with no subscription.

How long does Z.ai: GLM Flash Latest take to run?

It runs in the background: the request returns a run id at once, and you poll `GET /v1/runs/{id}` or name a webhook to hear when it finishes. A run can take at most 225 minutes, end to end.

What input does Z.ai: GLM Flash Latest take?

It needs `messages`. It also takes 18 optional fields: `seed`, `stop`, `min_p` and 15 more. Each field's type, allowed values and default are listed on this page.

What does Z.ai: GLM Flash Latest return?

A finished run returns text and json output. Each output up to 5 GB is stored as a copy; a larger output comes back as the provider's own link where the provider gives one, and otherwise that output is not delivered and you are not charged for it; a run with nothing delivered fails as too large, without a charge.

What are the limits of Z.ai: GLM Flash Latest?

Longest queue wait: 1 hour; largest inline input: 1 MB; largest input file: 2 GB.

How do I use Z.ai: GLM Flash Latest through an API?

Send `POST /v1/runs` with `"provider": "openrouter"`, `"model": "~z-ai/glm-flash-latest"` and its input, using one Spiral API key.

How do I see what a run of Z.ai: GLM Flash Latest will cost before I start it?

Send the same request to `POST /v1/estimate`: it prices that exact input without running it.

What happens if a run of Z.ai: GLM Flash Latest fails?

Only for work the provider billed. A run that fails before the provider does billable work is not charged, and its hold goes back to your balance; a failure the provider bills for is charged for the work the provider billed, at the tool's price. Each failed run's error says why it failed and what it was charged.

Do I need an account with OpenRouter to use Z.ai: GLM Flash Latest?

No. Spiral runs it on its own OpenRouter account and charges your Spiral balance.

Can my AI agent use Z.ai: GLM Flash Latest?

Yes. Any agent connected to Spiral's MCP server, CLI or agent skill runs it with the same API key, and there are guides for using it from Amp, ChatGPT, Claude, Claude Code, Cline, Codex, Cursor, Devin, dots, Factory Droid, Gemini, Gemini CLI, Google Antigravity, goose, Grok, Grok Build, Hermes, Instinct, Manus, Muse, Muse Code, n8n, Notion, OpenClaw, opencode, Perplexity, Raycast, VS Code, Windsurf and Zapier.

Can I cap what an agent spends on Z.ai: GLM Flash Latest?

Yes. Give each agent its own API key with a spend cap: a run whose estimate would pass the cap is refused before it starts.