How to Use GLM 5.3 Prime in opencode
GLM 5.3 Prime is built for coding, technical conversations, and tasks that need several rounds of tool use. It retains GLM 5.3’s capabilities while accelerating output generation, with a reported 1.5–2× increase in output throughput.
Prompts to try with GLM 5.3 Prime in opencode
Copy an example into opencode, or ask in your own words.
Use GLM 5.3 Prime with maximum reasoning to investigate the failing tests in this repository. Reproduce one failure, fix its cause, and run the relevant checks. Summarize the change and test results.
Use GLM 5.3 Prime to inspect this project's authentication code. Trace session expiration, identify inconsistent behavior, and add a regression test for any confirmed bug before fixing it.
Use GLM 5.3 Prime to review the API specification in this repository and implement a typed client. Cover documented errors and pagination, and test against the existing fixtures.
Use GLM 5.3 Prime to plan a migration from the deprecated library used in this project. Inspect its actual usage, list compatibility risks, and propose a sequence of changes with acceptance checks.
Use GLM 5.3 Prime to analyze the benchmark results and relevant code in this project. Identify one measurable bottleneck, implement a focused improvement, and compare correctness and performance before and after.
How to set up GLM 5.3 Prime in opencode
Pick the way that suits you. Each takes about two minutes.
Use Spiral's MCP server
- Add the server
Leave out --global to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.
opencode mcp add spiral --global --url https://api.spiral.ai/mcp
- Sign in
Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, /mcps starts the same sign-in.
opencode mcp auth spiral
- Check it
Spiral shows as connected.
opencode mcp list
Use the Spiral skill
- Send opencode 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 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.3 Prime
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.3-prime", "input": { "messages": [ { "role": "system" } ] } }'
Then paste one of the prompts above: opencode finds GLM 5.3 Prime on Spiral, shows the price and runs it.
GLM 5.3 Prime providers and prices
Spiral runs GLM 5.3 Prime through OpenRouter. Open a card for today's price, with every fee included.
Up to $0.028192 per run at the default inputs. $2.184 per 1M input tokens, $6.864 per 1M output tokens.
Settings you can ask for
Ask opencode for any of these in your prompt.
| Setting | Allowed values | Default | Description |
|---|---|---|---|
| Seed | a whole number | ||
| Top k | a whole number from 0 | ||
| Top p | 0 to 1 | ||
| Logprobs | on or off | ||
| Max tokens | 1 to 131072 | The most output tokens to generate. | |
| Temperature | 0 to 2 | ||
| Top logprobs | 0 to 20 | ||
| Presence penalty | -2 to 2 | ||
| Reasoning effort | low, high, or max | max | How much the model reasons. |
| Frequency penalty | -2 to 2 |
Every API field of Z.ai: GLM 5.3 Prime is on its tool page: open its card above.
What can you do with GLM 5.3 Prime in opencode?
GLM 5.3 Prime can help carry a code change through investigation, implementation, and verification. Give it the relevant project files and acceptance checks so the work ends with a reviewable result.
Fix a reproducible bug
Give GLM 5.3 Prime the failure, relevant code, and expected behavior. Ask for a reproduction, a focused correction, and evidence that the correction works.
Plan a code migration
Ask GLM 5.3 Prime to map dependencies, identify compatibility risks, and divide a migration into changes with explicit acceptance checks.
Design regression tests
Have GLM 5.3 Prime turn a bug report or behavior specification into test cases covering ordinary inputs, boundary conditions, and failure paths.
Draft an API client
Provide a textual API specification and ask GLM 5.3 Prime for client code, response handling, and tests tied to documented behavior.
Triage technical incidents
Give GLM 5.3 Prime timestamped logs and deployment notes. Request an evidence-based timeline, competing explanations, and the next diagnostic checks.
Extract structured records
Ask GLM 5.3 Prime to convert supplied text into JSON using an explicit structure. Validate required properties and types before passing the records onward.
Compare implementation approaches
Ask GLM 5.3 Prime to evaluate technical approaches against stated requirements and explain which assumptions could change the recommendation.
More on GLM 5.3 Prime and opencode
Overview
GLM 5.3 Prime in other agents
More opencode guides
Questions about GLM 5.3 Prime in opencode
Can opencode use GLM 5.3 Prime?
Yes. Add Spiral to opencode as an MCP server, and opencode can find and run GLM 5.3 Prime like any built-in tool.
How much does GLM 5.3 Prime cost in opencode?
Up to $0.046986 per run at the default inputs. $3.64 per 1M input tokens, $11.44 per 1M output tokens. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your opencode plan is separate.
Do I need an OpenRouter account to use GLM 5.3 Prime in opencode?
No. Spiral runs GLM 5.3 Prime 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.3 Prime in opencode?
About two minutes: add the server, then sign in, then check it.
Does opencode wait while GLM 5.3 Prime runs?
GLM 5.3 Prime runs in the background. opencode starts the run, checks on it and gives you the text, json when it's ready.
How does GLM 5.3 Prime differ from GLM 5.3?
Prime accelerates output generation while retaining GLM 5.3’s capabilities. The reported improvement is 1.5–2× output throughput, rather than a separate increase in reasoning quality.
How much text can GLM 5.3 Prime handle?
It supports a 1M-token context window and up to 128K output tokens. For a large task, ask for a specific deliverable, such as a migration plan or a focused patch, rather than an unrestricted response.
Can GLM 5.3 Prime read screenshots or generate images?
GLM 5.3 Prime accepts text and produces text. Provide error messages, extracted text, or a written description when the original material is visual.
Can I turn reasoning off?
Reasoning stays enabled. You can choose low, high, or maximum reasoning effort; maximum is the default.
Can GLM 5.3 Prime return reliable JSON?
It can return JSON, but JSON-schema enforcement is not supported. Describe the required structure, then validate the result before using it in an automated workflow.
Start using GLM 5.3 Prime in opencode
One Spiral account for every tool your agent needs. No subscription; you pay per run.
Paste this into opencode:
set up https://spiral.ai/SKILL.md


