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

Google Antigravity · LLM

How to Use GLM 5.2 (batch) in Google Antigravity

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 Google Antigravity

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

Use GLM 5.2 to review this repository and map its modules, dependencies, API contracts, and main data flows. Identify three areas where a change could affect unrelated behavior, citing the relevant files.

GLM 5.2 (batch)Google Antigravity
Try asking
  • Use GLM 5.2 to migrate this project's deprecated SDK calls to the supported equivalents. First identify affected callers and compatibility risks, then implement the migration and run the relevant tests.

  • Use GLM 5.2 to investigate the failing integration test. Trace the behavior across the relevant files, reproduce the failure, make a targeted fix, and report the verification results.

  • Use GLM 5.2 with greater thinking effort to investigate the slowest path in this project's profiling results. Establish a baseline, test one proposed optimization, and compare correctness and performance.

  • Use GLM 5.2 to decouple this project's authentication module from its storage implementation. Preserve public API signatures and runtime behavior, explain the impact scope, and verify the change.

How to set up GLM 5.2 (batch) in Google Antigravity

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

Use Spiral's MCP server

  1. Open the MCP config

    * Antigravity App: click Customizations, then Installed. In the MCP Servers section, click Copy Config File Path and open that file. * Antigravity IDE: click … at the top of the agent side panel, select MCP Servers, then Manage MCP Servers › View raw config. * Antigravity CLI: edit ~/.gemini/config/mcp_config.json.

  2. Add the server

    Add Spiral under mcpServers:

    {
      "mcpServers": {
        "spiral": {
          "serverUrl": "https://api.spiral.ai/mcp"
        }
      }
    }
  3. Sign in

    In the Antigravity App, open Customizations › Installed. Under MCP Servers, click Authenticate next to Spiral. Sign in to Spiral, pick the organization and click Authorize. Copy the authorization code the browser shows, paste it into Enter authorization code and click Submit. No API key.

Use the Spiral skill

  1. Send Google Antigravity 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 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: Google Antigravity 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.

OpenRouterLLM
Z.ai: GLM 5.2 (batch)
z-ai/glm-5.2:batch

Settings you can ask for

Ask Google Antigravity 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. 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).

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

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 Google Antigravity?

GLM 5.2 can carry substantial project context through debugging, migrations, and performance work. Give the agent clear boundaries and require evidence that the requested behavior works.

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.

Questions about GLM 5.2 (batch) in Google Antigravity

Can Google Antigravity use GLM 5.2 (batch)?

Yes. Add Spiral to Google Antigravity as an MCP server, and Google Antigravity can find and run GLM 5.2 (batch) like any built-in tool.

How much does GLM 5.2 (batch) cost in Google Antigravity?

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 Google Antigravity plan is separate.

Do I need an OpenRouter account to use GLM 5.2 (batch) in Google Antigravity?

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 Google Antigravity?

About two minutes: open the MCP config, then add the server, then sign in.

Does Google Antigravity wait while GLM 5.2 (batch) runs?

GLM 5.2 (batch) runs in the background. Google Antigravity 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.

Get started

Start using GLM 5.2 (batch) in Google Antigravity

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

Paste this into Google Antigravity:

Set up Google Antigravity

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