[Integrations](https://spiral.ai/integrations) › [opencode](https://spiral.ai/integrations/opencode) › [Claude Sonnet 5.5](https://spiral.ai/integrations/opencode/claude-sonnet-5-5)

# How to Use Claude Sonnet 5.5 in opencode

Claude Sonnet 5.5 fits bug fixes, small features, and document drafting with clear requirements. Claude Opus 5.5 is the better choice for the hardest work that requires sustained reasoning over many steps.

|  |  |
| --- | --- |
| Model | Claude Sonnet 5.5 |
| Available through | Anthropic |
| Category | LLM |
| Price | Up to $0.05343 per run at the default inputs. $2.60 per 1M input tokens, $0.13 per 1M cached input tokens, $3.25 per 1M cache write tokens, $5.20 per 1M 1-hour cache write tokens, $13.00 per 1M output tokens; for a prompt above 200,000 tokens, $5.20 per 1M input tokens, $0.26 per 1M cached input tokens, $6.50 per 1M cache write tokens, $10.40 per 1M 1-hour cache write tokens, $19.50 per 1M output tokens. |
| Returns | text, json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with Claude Sonnet 5.5 in opencode

- Use Claude Sonnet 5.5 at medium effort to investigate the failing test in this project. Fix the cause, run the affected tests, and report the result.
- Use Claude Sonnet 5.5 to review the current diff for correctness bugs. For each finding, give the file, affected behavior, and smallest useful correction.
- Use Claude Sonnet 5.5 at medium effort to implement the acceptance criteria in this issue. Follow the project's conventions and run checks that exercise each requirement.
- Use Claude Sonnet 5.5 at high effort to trace why this command returns duplicate records. Make a focused fix and verify it against a case that previously failed.
- Use Claude Sonnet 5.5 to draft release notes from this project's changes. Describe user-visible behavior, group related changes, and flag anything the code does not establish.

## How to set up Claude Sonnet 5.5 in opencode

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

### Use Spiral's MCP server

1. **Add the server**: Leave out `--global` to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.

```bash
opencode mcp add spiral --global --url https://api.spiral.ai/mcp
```

2. **Sign in**: Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, `/mcps` starts the same sign-in.

```bash
opencode mcp auth spiral
```

3. **Check it**: Spiral shows as connected.

```bash
opencode mcp list
```

### Use the Spiral skill

1. **Send opencode 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 Claude Sonnet 5.5**: 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": "anthropic",
    "model": "anthropic/claude-sonnet-5.5",
    "input": {
      "messages": [
        {
          "role": "system"
        }
      ]
    }
  }'
```

Then paste one of the prompts above: opencode finds Claude Sonnet 5.5 on Spiral, shows the price and runs it.

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

## Claude Sonnet 5.5 tools and prices

- [Claude Sonnet 5.5](https://spiral.ai/tools/anthropic/anthropic/claude-sonnet-5.5) (Anthropic): Up to $0.05343 per run at the default inputs. $2.60 per 1M input tokens, $0.13 per 1M cached input tokens, $3.25 per 1M cache write tokens, $5.20 per 1M 1-hour cache write tokens, $13.00 per 1M output tokens; for a prompt above 200,000 tokens, $5.20 per 1M input tokens, $0.26 per 1M cached input tokens, $6.50 per 1M cache write tokens, $10.40 per 1M 1-hour cache write tokens, $19.50 per 1M output tokens.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| stop |  | — |  |
| tools |  | — |  |
| reasoning |  | — | Reasoning effort; reasoning tokens count toward max_tokens. |
| max_tokens | 1 to 128000 | — | 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). |
| tool_choice |  | — |  |
| response_format |  | — |  |

## What can you do with Claude Sonnet 5.5 in opencode?

Turn a defined bug report or feature request into code you can review. Ask Claude Sonnet 5.5 to keep the change focused and verify the resulting behavior.

### Fix a reproducible bug

Trace a failing behavior, make a focused correction, and run a check that reproduces the original problem.

### Build a small feature

Turn clear acceptance criteria into a reviewable implementation, with checks tied to the requested behavior.

### Review a code change

Inspect a patch for likely defects and explain each finding with the affected behavior and a suggested correction.

### Draft a decision brief

Turn supplied notes into a concise document with the decision, supporting evidence, unresolved questions, and next steps.

### Prepare a presentation

Develop slide titles, supporting points, and speaker notes from an approved brief and a defined audience.

### Analyze a recurring report

Compare supplied figures, identify changes, and produce an explanation that distinguishes observations from possible causes.

### Localize customer communications

Translate supplied messages while preserving names, numbers, and product terminology. Review the result with speakers of the target language.

## Overview

- [Anthropic Claude](https://spiral.ai/providers/anthropic)
- [All opencode guides](https://spiral.ai/integrations/opencode)

## Claude Sonnet 5.5 in other agents

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

## More opencode guides

- [Claude Sonnet 5](https://spiral.ai/integrations/opencode/claude-sonnet-5)
- [Claude Sonnet Latest](https://spiral.ai/integrations/opencode/claude-sonnet-latest)
- [Claude Sonnet 4.6](https://spiral.ai/integrations/opencode/claude-sonnet-4-6)
- [Codestral 2508](https://spiral.ai/integrations/opencode/codestral-2508)
- [Claude Opus Latest](https://spiral.ai/integrations/opencode/claude-opus-latest)
- [Command A](https://spiral.ai/integrations/opencode/command-a)

## Questions about Claude Sonnet 5.5 in opencode

**Can opencode use Claude Sonnet 5.5?**

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run Claude Sonnet 5.5 like any built-in tool.

**How much does Claude Sonnet 5.5 cost in opencode?**

Up to $0.05343 per run at the default inputs. $2.60 per 1M input tokens, $0.13 per 1M cached input tokens, $3.25 per 1M cache write tokens, $5.20 per 1M 1-hour cache write tokens, $13.00 per 1M output tokens; for a prompt above 200,000 tokens, $5.20 per 1M input tokens, $0.26 per 1M cached input tokens, $6.50 per 1M cache write tokens, $10.40 per 1M 1-hour cache write tokens, $19.50 per 1M output tokens. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your opencode plan is separate.

**Do I need an Anthropic account to use Claude Sonnet 5.5 in opencode?**

No. Spiral runs Claude Sonnet 5.5 on its own Anthropic account. You sign in to Spiral once and never paste a key.

**How long does it take to set up Claude Sonnet 5.5 in opencode?**

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

**Does opencode wait while Claude Sonnet 5.5 runs?**

Claude Sonnet 5.5 runs in the background. opencode starts the run, checks on it and gives you the text, json when it's ready.

**What is Claude Sonnet 5.5 best for?**

Use it for work with a clear target: fixing a bug, building a small feature, analyzing supplied data, or drafting a document. Give it concrete requirements and a defined stopping point.

**When should I choose Claude Opus 5.5 instead?**

Anthropic recommends an Opus model for the hardest tasks that require sustained reasoning over many steps. Claude Sonnet 5.5 is a practical starting point when the task is clearly defined.

**How much text can Claude Sonnet 5.5 handle?**

Its context window holds up to one million tokens, and its standard output limit is 128,000 tokens. Those are token limits, so avoid treating them as fixed page or word counts.

**Which reasoning effort should I use?**

Start with medium effort for clearly specified coding and multistep tool tasks. Move to high when the work becomes harder or longer, and compare results on your actual tasks.

**Does Claude Sonnet 5.5 always check its code?**

No. At low effort, it can skip verification, so ask for a test, build, or other check that exercises the change and have it report the result.

