How to Use GLM 5.2 (batch) in OpenClaw
Use GLM 5.2 for complex debugging, code migrations, and research that needs substantial context. It expands on GLM 5.1 with a 1M-token context for sustained work across large projects.
Prompts to try with GLM 5.2 (batch) in OpenClaw
Copy an example into OpenClaw, or ask in your own words.
Every morning, use GLM 5.2 to compare newly collected incident reports with the previous seven days. Summarize recurring symptoms, new patterns, and questions that need investigation, citing report identifiers.
Each Friday, use GLM 5.2 to synthesize this week's collected research excerpts. Group findings by topic, identify contradictions, and link each conclusion to its source.
Each day, use GLM 5.2 to extract issues from newly received customer feedback text into JSON. Include the issue category, supporting excerpt, and source identifier; leave unsupported values empty.
Each week, use GLM 5.2 to compare the collected project updates with the recorded requirements. Report changed assumptions, unresolved dependencies, and decisions that need attention.
Every Monday, use GLM 5.2 to review newly collected API release notes against our recorded integration requirements. Produce a migration assessment with affected behavior and proposed verification checks.
How to set up GLM 5.2 (batch) in OpenClaw
Pick the way that suits you. Each takes about two minutes.
Use the Spiral skill
- Send OpenClaw this message
Your agent reads Spiral's skill and sets itself up.
set up https://spiral.ai/SKILL.md
- 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
- Add the server
On the machine that runs OpenClaw's Gateway:
openclaw mcp add spiral \ --url https://api.spiral.ai/mcp \ --transport streamable-http \ --auth oauth
- Sign in
In Settings › MCP, select Sign in on the Spiral server, sign in to Spiral and click Authorize. No API key.
openclaw mcp login spiral
- Reload and check
A running Gateway may keep its old tool list: restart it, or Save & Publish in the Control UI.
openclaw mcp reload openclaw mcp doctor spiral --probe
Use the Spiral CLI
- 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
- Create an API key
In the console, under API keys.
- Run GLM 5.2 (batch)
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:batch", "input": { "messages": [ { "role": "user", "content": "Hello!" } ] } }'
Then paste one of the prompts above: OpenClaw finds GLM 5.2 (batch) on Spiral, shows the price and runs it.
GLM 5.2 (batch) providers and prices
Spiral runs GLM 5.2 (batch) through OpenRouter. Open a card for today's price, with every fee included.
Up to $0.005282 per run at the default inputs. $0.4186 per 1M input tokens, $1.2857 per 1M output tokens.
Settings you can ask for
Ask OpenClaw for any of these in your prompt.
| Setting | Allowed values | Default | Description |
|---|---|---|---|
| Seed | a whole number | ||
| Min p | 0 to 1 | ||
| Top k | a whole number from 0 | ||
| Top p | 0 to 1 | ||
| Logprobs | on or off | ||
| Max tokens | 1 to 943718 | 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). | |
| Temperature | 0 to 2 | ||
| Top logprobs | 0 to 20 | ||
| Presence penalty | -2 to 2 | ||
| Reasoning effort | none, high, or xhigh | high | How much the model reasons. |
| Frequency penalty | -2 to 2 | ||
| Repetition penalty | 0 to 2 |
Every API field of Z.ai: GLM 5.2 (batch) is on its tool page: open its card above.
What can you do with GLM 5.2 (batch) in OpenClaw?
GLM 5.2 can compare recurring batches of text with accumulated background and produce a consistent review. Define the comparison period, evidence requirements, and report structure for each run.
Repository architecture review
Map module responsibilities, dependencies, and API boundaries before planning a change to a large codebase.
API and SDK migrations
Plan and implement changes across callers, adapters, and tests while preserving specified behavior.
Complex bug investigations
Compare code, logs, and failure reports to develop a testable explanation and a targeted fix.
Performance optimization
Use profiling evidence to propose changes, run comparisons, and report whether the measured bottleneck improved.
Research synthesis
Compare lengthy source material, identify disagreements, and produce a brief with evidence for each conclusion.
Structured document extraction
Turn supplied text into JSON records with consistent categories, supporting excerpts, and explicit missing values.
More on GLM 5.2 (batch) and OpenClaw
Overview
GLM 5.2 (batch) in other agents
Questions about GLM 5.2 (batch) in OpenClaw
Can OpenClaw use GLM 5.2 (batch)?
Yes. Add Spiral to OpenClaw as an MCP server, and OpenClaw can find and run GLM 5.2 (batch) like any built-in tool.
How much does GLM 5.2 (batch) cost in OpenClaw?
Up to $0.005282 per run at the default inputs. $0.4186 per 1M input tokens, $1.2857 per 1M output tokens. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your OpenClaw plan is separate.
Do I need an OpenRouter account to use GLM 5.2 (batch) in OpenClaw?
No. Spiral runs GLM 5.2 (batch) on its own OpenRouter account. You sign in to Spiral once and never paste a key.
How long does it take to set up GLM 5.2 (batch) in OpenClaw?
About two minutes: add the server, then sign in, then reload and check.
Does OpenClaw wait while GLM 5.2 (batch) runs?
GLM 5.2 (batch) runs in the background. OpenClaw starts the run, checks on it and gives you the text, json when it's ready.
What is GLM 5.2 good at?
GLM 5.2 is suited to engineering tasks that require keeping substantial context across multiple steps, including debugging, migrations, and performance work. It also fits long-document analysis and research synthesis.
How much context and output can GLM 5.2 handle?
Z.ai documents a 1M-token context window and a separate maximum output of 128K tokens. Treat those as the maker's published limits when planning a large task.
Can GLM 5.2 return JSON?
Yes, Z.ai documents structured output support, including JSON. Specify the expected structure and how to represent missing information.
When should I increase thinking effort?
Consider greater thinking effort for difficult debugging or engineering decisions. Z.ai describes effort control as a tradeoff between coding performance and latency; compare results on a representative task.
Where does GLM 5.2 still fall short?
Extended engineering work remains a limitation: Z.ai reports that GLM 5.2 trails Claude Opus 4.8 on SWE-Marathon. For a long implementation, request intermediate checks and explicit verification results.
Start using GLM 5.2 (batch) in OpenClaw
One Spiral account for every tool your agent needs. No subscription; you pay per run.
Paste this into OpenClaw:
set up https://spiral.ai/SKILL.md


