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

Google Antigravity · LLMReleased 2025-03-13

How to Use Gemma 3 4B in Google Antigravity

Gemma 3 4B fits document summaries, multilingual drafts, and small coding tasks. It keeps the 128K context window of Gemma 3 12B and Gemma 3 27B, but scores lower on Google's coding benchmarks.

Prompts to try with Gemma 3 4B in Google Antigravity

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

Use Gemma 3 4B to summarize this project's README and contribution guide in 200 words. Cover the purpose, main components, and development conventions, citing the relevant files.

Gemma 3 4BGoogle Antigravity
Try asking
  • Use Gemma 3 4B to explain the selected function in plain English. Give one normal input and one edge case, and identify any behavior that the code does not make clear.

  • Use Gemma 3 4B to draft a helper that removes duplicate strings while preserving their original order. Follow the project's existing language and style, and include examples for empty input and repeated values.

  • Use Gemma 3 4B to turn the current diff into release notes under 150 words. Include only behavior supported by the changed code, with a file reference for each bullet.

  • Use Gemma 3 4B to extract action items from the project's planning document. Return only a JSON array with task, owner, deadline, and evidence keys; use null for unstated owners or deadlines.

How to set up Gemma 3 4B 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 Gemma 3 4B

    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": "google/gemma-3-4b-it",
        "input": {
          "messages": [
            {
              "role": "system"
            }
          ]
        }
      }'

Then paste one of the prompts above: Google Antigravity finds Gemma 3 4B on Spiral, shows the price and runs it.

Gemma 3 4B providers and prices

Spiral runs Gemma 3 4B through OpenRouter. Open a card for today's price, with every fee included.

OpenRouterLLM
Google: Gemma 3 4B
google/gemma-3-4b-it

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 16384

The most output tokens to generate.

Temperature0 to 2
Top logprobs0 to 20
Presence penalty-2 to 2
Frequency penalty-2 to 2
Repetition penalty0 to 2

Every API field of Google: Gemma 3 4B is on its tool page: open its card above.

What can you do with Gemma 3 4B in Google Antigravity?

Gemma 3 can turn project documentation into explanations, draft small code changes, and extract structured notes. Give it a bounded task with the relevant files, then review the result against the source and tests.

Report summaries

Turn a supplied report into a short brief with findings, supporting passages, and unanswered questions.

Questions about documentation

Answer a specific question from supplied documentation and include the passage supporting the answer.

Email drafts from notes

Convert meeting notes into a follow-up email that preserves stated decisions, owners, and dates.

Multilingual support drafts

Draft a customer reply in the requested language using supplied policy text and approved terminology.

Small code changes

Draft a focused helper function or explain a short code snippet. Review the result and test its behavior.

Text extraction into JSON

Extract names, dates, and action items from supplied text into a defined JSON structure, leaving missing values empty.

Questions about Gemma 3 4B in Google Antigravity

Can Google Antigravity use Gemma 3 4B?

Yes. Add Spiral to Google Antigravity as an MCP server, and Google Antigravity can find and run Gemma 3 4B like any built-in tool.

How much does Gemma 3 4B cost in Google Antigravity?

Up to $0.000536 per run at the default inputs. $0.065 per 1M input tokens, $0.13 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 Gemma 3 4B in Google Antigravity?

No. Spiral runs Gemma 3 4B on its own OpenRouter account. You sign in to Spiral once and never paste a key.

How long does it take to set up Gemma 3 4B in Google Antigravity?

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

Does Google Antigravity wait while Gemma 3 4B runs?

Gemma 3 4B runs in the background. Google Antigravity starts the run, checks on it and gives you the text, json when it's ready.

What is Gemma 3 4B useful for?

Start with document summaries, questions about supplied material, email drafts, and small coding tasks. Give it a defined task and the source material it needs.

How much context can Gemma 3 4B handle?

Gemma 3 4B supports a 128K-token context window, matching Gemma 3 12B and Gemma 3 27B. Keep the material relevant to the question instead of filling the window by default.

Which languages does Gemma 3 support?

Google reports out-of-the-box support for over 35 languages and pretrained support for over 140. For multilingual drafts, specify the target language, audience, and terms to preserve.

Can Gemma 3 return JSON?

Yes, Google documents structured output support. State the required keys, give an example object, and validate the returned JSON before using it.

Where does Gemma 3 need extra checking?

It can give inaccurate or outdated answers, and highly complex tasks can be challenging. Supply current evidence for factual work and split broad requests into smaller tasks.

Get started

Start using Gemma 3 4B 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