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

VS Code · LLMReleased 2025-12-08

How to Use GLM-4.6V in VS Code

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 VS Code

Copy an example into VS Code, 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.

GLM-4.6VVS Code
Try asking
  • 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 VS Code

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

Use Spiral's MCP server

  1. Add the hosted server

    Use Add to VS Code on the console's Agents & MCP page, or run:

    code --add-mcp '{"name":"spiral","type":"http","url":"https://api.spiral.ai/mcp"}'
  2. Sign in

    VS Code asks you to sign in when it first starts the server: sign in to Spiral and click Authorize. No API key. Run MCP: List Servers from the Command Palette to check that Spiral is running.

Use the Spiral skill

  1. Send VS Code 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 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-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: VS Code 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.

OpenRouterLLM
Z.ai: GLM 4.6V
z-ai/glm-4.6v

Settings you can ask for

Ask VS Code for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Seeda whole number
Top ka whole number from 0
Top p0 to 1
Max tokens1 to 32768

The most output tokens to generate.

Temperature0 to 2
Presence penalty-2 to 2
Frequency penalty-2 to 2
Repetition penalty0 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 VS Code?

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.

Questions about GLM-4.6V in VS Code

Can VS Code use GLM-4.6V?

Yes. Add Spiral to VS Code as an MCP server, and VS Code can find and run GLM-4.6V like any built-in tool.

How much does GLM-4.6V cost in VS Code?

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 VS Code plan is separate.

Do I need an OpenRouter account to use GLM-4.6V in VS Code?

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 VS Code?

About two minutes: add the hosted server, then sign in.

Does VS Code wait while GLM-4.6V runs?

GLM-4.6V runs in the background. VS Code 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.

Get started

Start using GLM-4.6V in VS Code

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

Paste this into VS Code:

Set up VS Code

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