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

n8n · LLMReleased 2026-06-16

How to Use GLM-5.2 in n8n

GLM-5.2 suits codebase audits, cross-file refactoring, and engineering tasks that need sustained context. Compared with GLM-5.1, it expands the context window from 200K to 1M tokens and adds control over reasoning effort.

Prompts to try with GLM-5.2 in n8n

Copy an example into n8n, or ask in your own words.

Each morning, use GLM-5.2 to review the supplied build logs. Group related failures and suggest the next diagnostic check.

GLM-5.2n8n
Try asking
  • Each night, use GLM-5.2 to compare today's API change summaries with the supplied contracts. Report potential compatibility breaks with supporting excerpts.

  • Every week, use GLM-5.2 to review the supplied performance measurements. Flag regressions and propose reproducible follow-up experiments.

  • Each day, use GLM-5.2 to compare the supplied implementation updates against acceptance criteria. List completed, blocked, and unverified work.

  • Every Friday, use GLM-5.2 to review the supplied architecture decisions. Identify conflicting constraints and propose questions for the engineering review.

How to set up GLM-5.2 in n8n

Pick the way that suits you. Each takes about two minutes.

Use the Spiral skill

  1. Send n8n 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.

Use Spiral's MCP server

  1. Create a key

    Create a key under API keys in the console.

  2. Add an MCP Client node

    In a workflow, add an MCP Client node (or, under an AI Agent node, an MCP Client Tool) and set:

    https://api.spiral.ai/mcp
  3. Pick a tool

    The node lists Spiral's tools. In an MCP Client node pick one, such as run, and give it its arguments:

    {
      "provider": "fal",
      "model": "fal-ai/flux/schnell",
      "input": { "prompt": "a lighthouse at dawn" },
      "wait": true
    }
  4. Run GLM-5.2 in a workflow step

    Give the step an instruction like the ones below and run it on your trigger or schedule. Spiral finds GLM-5.2, prices it and runs it each time the step fires.

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

Call the Spiral API

  1. Create an API key

    In the console, under API keys.

  2. Run GLM-5.2

    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-5.2",
        "input": {
          "messages": [
            {
              "role": "system"
            }
          ]
        }
      }'

Then paste one of the prompts above: n8n finds GLM-5.2 on Spiral, shows the price and runs it.

GLM-5.2 providers and prices

Spiral runs GLM-5.2 through OpenRouter. Open a card for today's price, with every fee included.

OpenRouterLLM
Z.ai: GLM 5.2
z-ai/glm-5.2

Settings you can ask for

Ask n8n for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Seeda whole number
Min p0 to 1
Top ka whole number from 0
Top p0 to 1
Logprobson or off
Max tokens1 to 943718

The most output tokens to generate.

Temperature0 to 2
Top logprobs0 to 20
Presence penalty-2 to 2
Reasoning effortnone, high, or xhighhigh

How much the model reasons.

Frequency penalty-2 to 2
Repetition penalty0 to 2
Parallel tool callson or off

Every API field of Z.ai: GLM 5.2 is on its tool page: open its card above.

What can you do with GLM-5.2 in n8n?

Review recurring engineering evidence with GLM-5.2 to surface failures and track unresolved work. Define the evidence each run receives and require a concise report of changes and uncertainties.

Map an unfamiliar codebase

Ask GLM-5.2 to identify module responsibilities, API contracts, dependencies, and the constraints a future change must preserve.

Refactor across files

Give GLM-5.2 a bounded refactoring goal, protected behavior, and acceptance checks. Request a plan followed by implementation and verification.

Plan an API migration

Have GLM-5.2 compare existing and proposed contracts, order dependent changes, and define compatibility tests.

Investigate a complex bug

Supply GLM-5.2 with textual logs, reproduction steps, and relevant code. Request competing explanations and tests that distinguish them.

Optimize measured bottlenecks

Give GLM-5.2 profiling results and performance targets. Ask for a focused change and a repeatable before-and-after measurement.

Implement a detailed specification

Ask GLM-5.2 to turn requirements into an implementation plan, working code, and acceptance checks while tracking unresolved decisions.

Questions about GLM-5.2 in n8n

Can n8n use GLM-5.2?

Yes. Add Spiral to n8n as an MCP server, and n8n can find and run GLM-5.2 like any built-in tool.

How much does GLM-5.2 cost in n8n?

Up to $0.036211 per run at the default inputs. $0.0091 per 1M input tokens, $8.84 per 1M output tokens. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your n8n plan is separate.

Do I need an OpenRouter account to use GLM-5.2 in n8n?

You need no OpenRouter account. n8n uses one Spiral API key for every tool, and Spiral runs GLM-5.2 on its own OpenRouter account.

How long does it take to set up GLM-5.2 in n8n?

About two minutes: create a key, then add an MCP Client node, then pick a tool.

Does n8n wait while GLM-5.2 runs?

GLM-5.2 runs in the background. n8n starts the run, checks on it and gives you the text, json when it's ready.

What is GLM-5.2 best suited for?

Start with engineering work that spans many steps: implementing a specification, debugging a complex failure, or optimizing an existing system. Its training specifically covers sustained coding tasks.

How does GLM-5.2 differ from GLM-5.1?

GLM-5.2 increases the maximum context from 200K to 1M tokens and adds reasoning effort control. That gives you more room for project context and a way to choose how much reasoning a task receives.

Can GLM-5.2 write a million-token response?

Z.ai specifies a 1M-token context window and a separate 128K-token maximum output. Plan large deliverables in sections that fit the output limit.

Can GLM-5.2 directly analyze images or audio?

Z.ai lists text as both its input and output modality. Supply a text transcript, extracted text, or a written description when the original material uses another format.

When should I choose higher reasoning effort?

High balances reasoning depth and latency. Try Max for difficult debugging, hard math, or plans with several dependent steps, then compare the results on your actual task.

Get started

Start using GLM-5.2 in n8n

One Spiral account for every tool your agent needs. No subscription; you pay per run.

Paste this into n8n:

Set up n8n

set up https://spiral.ai/SKILL.md
Are you an AI agent? See setup options