[Integrations](https://spiral.ai/integrations) › [goose](https://spiral.ai/integrations/goose) › [Gemma 3 4B](https://spiral.ai/integrations/goose/gemma-3-4b)

# How to Use Gemma 3 4B in goose

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.

|  |  |
| --- | --- |
| Model | Gemma 3 4B |
| Available through | OpenRouter |
| Category | LLM |
| Price | Up to $0.000536 per run at the default inputs. $0.065 per 1M input tokens, $0.13 per 1M output tokens. |
| Returns | text, json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with Gemma 3 4B in goose

- 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.
- 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 goose

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

### Use Spiral's MCP server

1. **Add the extension**: In goose Desktop, open the sidebar, click Extensions, then Add custom extension. Enter:

2. **Sign in**: When goose first connects to Spiral, your browser opens. Sign in to Spiral, pick the organization and click Authorize. No API key. If the browser does not open, goose prints the link to open yourself.

### Use the Spiral skill

1. **Send goose 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.

```bash
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.

```bash
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: goose finds Gemma 3 4B on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/goose

## Gemma 3 4B tools and prices

- [Google: Gemma 3 4B](https://spiral.ai/tools/openrouter/google/gemma-3-4b-it) (OpenRouter): Up to $0.000536 per run at the default inputs. $0.065 per 1M input tokens, $0.13 per 1M output tokens.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| seed |  | — |  |
| stop |  | — |  |
| min_p | 0 to 1 | — |  |
| top_k | 0 to … | — |  |
| top_p | 0 to 1 | — |  |
| logprobs |  | — |  |

## What can you do with Gemma 3 4B in goose?

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.

## Overview

- [OpenRouter](https://spiral.ai/providers/openrouter)
- [All goose guides](https://spiral.ai/integrations/goose)

## Gemma 3 4B in other agents

- [Amp](https://spiral.ai/integrations/amp/gemma-3-4b)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/gemma-3-4b)
- [Claude](https://spiral.ai/integrations/claude-desktop/gemma-3-4b)
- [Claude Code](https://spiral.ai/integrations/claude-code/gemma-3-4b)
- [Cline](https://spiral.ai/integrations/cline/gemma-3-4b)
- [Codex](https://spiral.ai/integrations/codex/gemma-3-4b)
- [Cursor](https://spiral.ai/integrations/cursor/gemma-3-4b)
- [Devin](https://spiral.ai/integrations/devin/gemma-3-4b)
- [dots](https://spiral.ai/integrations/dots/gemma-3-4b)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/gemma-3-4b)
- [Gemini](https://spiral.ai/integrations/gemini/gemma-3-4b)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/gemma-3-4b)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/gemma-3-4b)
- [Grok](https://spiral.ai/integrations/grok/gemma-3-4b)
- [Grok Build](https://spiral.ai/integrations/grok-build/gemma-3-4b)
- [Hermes](https://spiral.ai/integrations/hermes/gemma-3-4b)
- [Instinct](https://spiral.ai/integrations/instinct/gemma-3-4b)
- [Manus](https://spiral.ai/integrations/manus/gemma-3-4b)
- [Muse](https://spiral.ai/integrations/muse/gemma-3-4b)
- [Muse Code](https://spiral.ai/integrations/muse-code/gemma-3-4b)
- [n8n](https://spiral.ai/integrations/n8n/gemma-3-4b)
- [Notion](https://spiral.ai/integrations/notion/gemma-3-4b)
- [OpenClaw](https://spiral.ai/integrations/openclaw/gemma-3-4b)
- [opencode](https://spiral.ai/integrations/opencode/gemma-3-4b)
- [Perplexity](https://spiral.ai/integrations/perplexity/gemma-3-4b)
- [Raycast](https://spiral.ai/integrations/raycast/gemma-3-4b)
- [VS Code](https://spiral.ai/integrations/vscode/gemma-3-4b)
- [Windsurf](https://spiral.ai/integrations/windsurf/gemma-3-4b)
- [Zapier](https://spiral.ai/integrations/zapier/gemma-3-4b)

## More goose guides

- [Gemma 3 27B IT](https://spiral.ai/integrations/goose/gemma-3-27b-it)
- [Gemma 4 26B A4B](https://spiral.ai/integrations/goose/gemma-4-26b-a4b)
- [Gemma 3 12B](https://spiral.ai/integrations/goose/gemma-3-12b)
- [Gemma 4 31B](https://spiral.ai/integrations/goose/gemma-4-31b)
- [Gemma 2 27B Instruct](https://spiral.ai/integrations/goose/gemma-2-27b-instruct)
- [Granite 4.2 8B](https://spiral.ai/integrations/goose/granite-4-2-8b)

## Questions about Gemma 3 4B in goose

**Can goose use Gemma 3 4B?**

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

**How much does Gemma 3 4B cost in goose?**

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

**Do I need an OpenRouter account to use Gemma 3 4B in goose?**

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 goose?**

About two minutes: add the extension, then sign in.

**Does goose wait while Gemma 3 4B runs?**

Gemma 3 4B runs in the background. goose 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.

