How to Use GLM-4.6V in Gemini CLI
GLM-4.6V reads complex documents, turns UI screenshots into code, and reasons over visual tool results. Its 106B parameters distinguish it from the 9B GLM-4.6V-Flash, which targets local deployment and low latency.
Prompts to try with GLM-4.6V in Gemini CLI
Copy an example into Gemini CLI, or ask in your own words.
Use GLM-4.6V to recreate the supplied UI screenshot in this project. Inspect the existing components first, reuse matching ones, and implement the visible layout, spacing, typography, and colors.
Use GLM-4.6V to compare the current page screenshot with the reference. Identify the five most visible differences, update the relevant components and styles, and capture another screenshot for review.
Use GLM-4.6V to inspect the circled area in this screenshot. Move the button left to align with the form labels, update the corresponding project styles, and show the resulting screenshot.
Use GLM-4.6V to read the table in the supplied report image and create a data fixture for this project. Preserve the printed labels and units, include page references, and flag values that are unreadable.
Use GLM-4.6V to review the desktop and mobile screenshots of this project. List visible layout problems by screen size, fix the relevant CSS, and verify the changes with new screenshots.
How to set up GLM-4.6V in Gemini CLI
Pick the way that suits you. Each takes about two minutes.
Use Spiral's MCP server
- Add the server
Or add it to ~/.gemini/settings.json yourself:
gemini mcp add --scope user --transport http spiral https://api.spiral.ai/mcp
- Sign in
Start gemini and run:
/mcp auth spiral
- Check it
In Gemini CLI, run /mcp. From your shell:
gemini mcp list
Use the Spiral skill
- Send Gemini CLI 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-4.6V
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-4.6v", "input": { "messages": [ { "role": "system" } ] } }'
Then paste one of the prompts above: Gemini CLI finds GLM-4.6V on Spiral, shows the price and runs it.
GLM-4.6V providers and prices
Spiral runs GLM-4.6V through OpenRouter. Open a card for today's price, with every fee included.
Up to $0.004807 per run at the default inputs. $0.39 per 1M input tokens, $1.17 per 1M output tokens.
Settings you can ask for
Ask Gemini CLI 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 | ||
| Max tokens | 1 to 32768 | The most output tokens to generate. | |
| Temperature | 0 to 2 | ||
| Presence penalty | -2 to 2 | ||
| Frequency penalty | -2 to 2 | ||
| Repetition penalty | 0 to 2 |
Every API field of Z.ai: GLM 4.6V is on its tool page: open its card above.
What can you do with GLM-4.6V in Gemini CLI?
Turn UI references into working frontend code and use rendered screenshots to guide revisions with GLM-4.6V. A coding agent can connect that visual analysis to the project's components and styles.
Build a frontend from a screenshot
Turn a reference UI into HTML/CSS, with explicit instructions for layout, spacing, colors, and components.
Review a visual frontend change
Compare a rendered page with its reference screenshot and request corrections to specific visible differences.
Extract information from complex reports
Read text alongside tables and figures, then organize the requested information with page references.
Compare reports across organizations
Build a comparison table from several reports, preserving units, reporting periods, and the source page for each value.
Explain a chart
Describe axes, units, visible trends, and supporting labels, while separating plotted values from estimates.
Turn slides into a briefing
Summarize a presentation's argument using evidence from its diagrams, charts, and slide text.
Compare research figures
Read figures and tables from multiple papers to explain where their methods, measurements, and conclusions differ.
Summarize a recorded demonstration
Review a video for the main events and request timestamps for the moments that support the summary.
More on GLM-4.6V and Gemini CLI
Overview
GLM-4.6V in other agents
Questions about GLM-4.6V in Gemini CLI
Can Gemini CLI use GLM-4.6V?
Yes. Add Spiral to Gemini CLI as an MCP server, and Gemini CLI can find and run GLM-4.6V like any built-in tool.
How much does GLM-4.6V cost in Gemini CLI?
Up to $0.004807 per run at the default inputs. $0.39 per 1M input tokens, $1.17 per 1M output tokens. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Gemini CLI plan is separate.
Do I need an OpenRouter account to use GLM-4.6V in Gemini CLI?
No. Spiral runs GLM-4.6V 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-4.6V in Gemini CLI?
About two minutes: add the server, then sign in, then check it.
Does Gemini CLI wait while GLM-4.6V runs?
GLM-4.6V runs in the background. Gemini CLI starts the run, checks on it and gives you the text, json when it's ready.
What is GLM-4.6V useful for?
Use it to analyze documents where layout, charts, tables, and figures matter, or to turn UI screenshots into frontend code. It also supports visual tool use.
How much material can GLM-4.6V handle at once?
Its context window is 128K tokens. Z.ai gives approximate examples of 150 complex document pages, 200 slides, or a one-hour video; treat these as capacity examples rather than guaranteed limits for every input.
Can GLM-4.6V help reproduce or fix a webpage?
Yes. It can generate HTML/CSS from a UI screenshot and accept visual editing instructions. For a focused revision, mark the area and describe the change you want.
Is GLM-4.6V a good default for text-only questions?
Its documented focus is visual work, and Z.ai says pure text question answering still needs improvement. Choose it when the answer depends on what a document, chart, or screenshot shows.
Which generation settings are a useful starting point?
The released configuration uses temperature 0.8, top-p 0.6, and top-k 2. Use those as a baseline when comparing results on your own visual tasks.
Start using GLM-4.6V in Gemini CLI
One Spiral account for every tool your agent needs. No subscription; you pay per run.
Paste this into Gemini CLI:
set up https://spiral.ai/SKILL.md


