[Integrations](https://spiral.ai/integrations) › [Windsurf](https://spiral.ai/integrations/windsurf) › [Granite 4.2 8B](https://spiral.ai/integrations/windsurf/granite-4-2-8b)

# How to Use Granite 4.2 8B in Windsurf

Granite 4.2 8B handles coding, tool use, and multi-step reasoning. Unlike Granite 4.2 3B, it received additional agent training for software engineering, terminal tasks, and search.

|  |  |
| --- | --- |
| Model | Granite 4.2 8B |
| Available through | OpenRouter |
| Category | LLM |
| Price | Up to $0.000803 per run at the default inputs. $0.078 per 1M input tokens, $0.195 per 1M output tokens. |
| Returns | text, json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with Granite 4.2 8B in Windsurf

- Use Granite 4.2 8B to investigate the project's failing tests. Trace the first failure to its cause, make the smallest justified patch, and rerun the relevant tests. Report the change and any remaining failures.
- Use Granite 4.2 8B to trace how this project validates incoming requests. Read the relevant files, identify inconsistent validation rules, and propose a focused change with a concrete before-and-after example.
- Use Granite 4.2 8B to diagnose the latest build failure from the terminal output. Check the project's configuration before suggesting commands, then verify whether the proposed fix resolves the failure.
- Use Granite 4.2 8B to review this project's tool descriptions. Identify ambiguous arguments and missing failure cases, then revise the descriptions and show example calls for success, missing information, and tool errors.
- Use Granite 4.2 8B to review the project's Spanish support messages against its English messages. Follow existing Spanish examples, preserve product names and interpolation tokens, and flag wording that needs a human language review.

## How to set up Granite 4.2 8B in Windsurf

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

### Use Spiral's MCP server

1. **Add the server**: Open the Customize page from the Agents window and click MCPs. Under This computer, open the config file, or edit it directly: `~/.config/devin/mcp_config.json` on macOS and Linux, `%APPDATA%\devin\mcp_config.json` on Windows. Add this:

```json
{
  "mcpServers": {
    "spiral": {
      "url": "https://api.spiral.ai/mcp"
    }
  }
}
```

2. **Sign in**: Click Authenticate on the Spiral server in Customize › MCPs, or let the agent call Spiral once: your browser opens. Sign in to Spiral, pick the organization and click Authorize. No API key.

```bash
devin mcp login spiral
```

3. **Check it**: Spiral is listed under This computer in Customize › MCPs. From the terminal:

```bash
devin mcp list
```

### Use the Spiral skill

1. **Send Windsurf 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 Granite 4.2 8B**: 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": "ibm-granite/granite-4.2-8b",
    "input": {
      "messages": [
        {
          "role": "system"
        }
      ]
    }
  }'
```

Then paste one of the prompts above: Windsurf finds Granite 4.2 8B on Spiral, shows the price and runs it.

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

## Granite 4.2 8B tools and prices

- [IBM: Granite 4.2 8B](https://spiral.ai/tools/openrouter/ibm-granite/granite-4.2-8b) (OpenRouter): Up to $0.000803 per run at the default inputs. $0.078 per 1M input tokens, $0.195 per 1M output tokens.

## Settings you can ask for

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

## What can you do with Granite 4.2 8B in Windsurf?

Turn a failing test or terminal error into a patch you can check with Granite 4.2 8B. Give the agent a concrete failure, relevant project files, and a clear definition of success.

### Fix a reproducible software bug

Ask Granite 4.2 8B to trace a failing test, propose a focused patch, and check the result against that test.

### Diagnose a terminal failure

Give Granite 4.2 8B command output and the expected result. Request the next diagnostic command and an explanation of what its result would establish.

### Research a question across sources

Have Granite 4.2 8B use available search tools to collect evidence, compare conflicting claims, and draft an answer with citations.

### Answer questions about policy text

Supply relevant policy passages to Granite 4.2 8B and request an answer with supporting excerpts and unresolved questions.

### Draft multilingual support replies

Give Granite 4.2 8B an approved policy, a customer message, and examples in a supported language. Request a reply that preserves product names and policy terms.

### Investigate a service incident

Ask Granite 4.2 8B to compare incident reports with available status-tool results, separate observations from hypotheses, and identify the next check.

### Plan a multi-step tool task

Give Granite 4.2 8B a goal and clearly described tools. Ask it to identify dependencies, request missing information, and verify tool results before continuing.

## Overview

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

## Granite 4.2 8B in other agents

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

## More Windsurf guides

- [Gemma 4 31B](https://spiral.ai/integrations/windsurf/gemma-4-31b)
- [Grok 4.20](https://spiral.ai/integrations/windsurf/grok-4-20)
- [Gemma 4 26B A4B](https://spiral.ai/integrations/windsurf/gemma-4-26b-a4b)
- [Grok 4.20 Multi-Agent](https://spiral.ai/integrations/windsurf/grok-4-20-multi-agent)
- [Gemma 3 4B](https://spiral.ai/integrations/windsurf/gemma-3-4b)
- [Grok 4.3](https://spiral.ai/integrations/windsurf/grok-4-3)

## Questions about Granite 4.2 8B in Windsurf

**Can Windsurf use Granite 4.2 8B?**

Yes. Add Spiral to Windsurf as an MCP server, and Windsurf can find and run Granite 4.2 8B like any built-in tool.

**How much does Granite 4.2 8B cost in Windsurf?**

Up to $0.000803 per run at the default inputs. $0.078 per 1M input tokens, $0.195 per 1M output tokens. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Windsurf plan is separate.

**Do I need an OpenRouter account to use Granite 4.2 8B in Windsurf?**

No. Spiral runs Granite 4.2 8B on its own OpenRouter account. You sign in to Spiral once and never paste a key.

**How long does it take to set up Granite 4.2 8B in Windsurf?**

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

**Does Windsurf wait while Granite 4.2 8B runs?**

Granite 4.2 8B runs in the background. Windsurf starts the run, checks on it and gives you the text, json when it's ready.

**What is Granite 4.2 8B useful for?**

Use it for coding tasks, tool-assisted work, and problems that require several decisions. IBM specifically trained it on software engineering, terminal coding, and search workflows.

**How much context can Granite 4.2 8B handle?**

IBM documents a native 128K-token context window. For long-document work, ask a focused question and request supporting passages so you can check the answer.

**Does Granite 4.2 always need to think before answering?**

It supports thinking, non-thinking, and low-effort thinking modes. Use full thinking for multi-step problems, brief thinking for simpler decisions, and direct answers for straightforward requests.

**Which languages does Granite 4.2 support?**

IBM lists English, German, Spanish, French, Japanese, Portuguese, Arabic, Czech, Italian, Korean, Dutch, and Chinese. Performance can differ from English, so include examples of the wording and format you want.

**Which sampling settings should I start with?**

IBM recommends temperature 1.0 and top-p 0.95 for chat, reasoning, and tool calling. Start there before experimenting with other values.

