[Integrations](https://spiral.ai/integrations) › [opencode](https://spiral.ai/integrations/opencode) › [GPT-5.4 Nano](https://spiral.ai/integrations/opencode/gpt-5-4-nano)

# How to Use GPT-5.4 Nano in opencode

Use GPT-5.4 Nano for classification, extraction, ranking, and small coding tasks. Give it a narrow assignment, a fixed output format, and explicit rules for uncertain cases.

|  |  |
| --- | --- |
| Model | GPT-5.4 Nano |
| Available through | OpenAI |
| Category | LLM |
| Price | Up to $0.006666 per run at the default inputs. $0.26 per 1M input tokens, $0.026 per 1M cached input tokens, $1.625 per 1M output tokens. |
| Returns | text, json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with GPT-5.4 Nano in opencode

- Use GPT-5.4 Nano to find where this project validates email addresses. Return up to five file paths, the relevant symbols, and one supporting excerpt per match; report no match if none exists.
- Use GPT-5.4 Nano to classify the current test failures as assertion, timeout, dependency, configuration, or unknown. Return a short JSON array with the test name, category, and supporting error text.
- Use GPT-5.4 Nano to inspect the pagination function and fix only an off-by-one error if present. Add a focused boundary test and report the change and test result.
- Use GPT-5.4 Nano to extract the public routes from this project's route definitions. Return method, path, and handler as short JSON; use null for anything the definitions do not state.
- Use GPT-5.4 Nano with no extra reasoning to rank up to five existing tests by relevance to the current diff. Return test paths and one sentence of evidence for each ranking.

## How to set up GPT-5.4 Nano 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 GPT-5.4 Nano**: 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": "openai",
    "model": "openai/gpt-5.4-nano",
    "input": {
      "messages": [
        {
          "role": "system"
        }
      ]
    }
  }'
```

Then paste one of the prompts above: opencode finds GPT-5.4 Nano on Spiral, shows the price and runs it.

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

## GPT-5.4 Nano tools and prices

- [GPT-5.4 Nano](https://spiral.ai/tools/openai/openai/gpt-5.4-nano) (OpenAI): Up to $0.006666 per run at the default inputs. $0.26 per 1M input tokens, $0.026 per 1M cached input tokens, $1.625 per 1M output tokens.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| seed |  | — |  |
| tools |  | — |  |
| top_p | … to 1 | — | Taken only at reasoning effort "none", this model's default. |
| logprobs |  | — | Taken only at reasoning effort "none", this model's default. |
| reasoning |  | — | Reasoning effort; reasoning tokens count toward max_tokens. |
| max_tokens | 16 to 128000 | — | The most output tokens to generate. |

## What can you do with GPT-5.4 Nano in opencode?

Find relevant code, categorize failures, and make small corrections with GPT-5.4 Nano. Define one assignment at a time and request concrete evidence or a focused test.

### Support request routing

Have GPT-5.4 Nano label requests as billing, technical, account, or other. Define each category and send unclear requests for review.

### Order detail extraction

Extract order numbers, product names, and requested actions from customer messages with GPT-5.4 Nano. Return null for missing details.

### Search result ranking

Use GPT-5.4 Nano to rank supplied passages against a question. Return passage IDs and short evidence-based reasons.

### Customer feedback tagging

Assign predefined topic and sentiment labels to feedback with GPT-5.4 Nano. Include examples of mixed feedback to clarify the rules.

### Codebase navigation

Ask GPT-5.4 Nano to find the functions and files associated with one feature. Request paths, symbols, and supporting excerpts.

### Targeted code edits

Give GPT-5.4 Nano one small correction, such as fixing a boundary condition. Specify the expected behavior and request a focused test.

### Failure categorization

Classify supplied error messages with GPT-5.4 Nano using a fixed taxonomy. Keep unknown failures in a separate review category.

### Structured meeting actions

Use GPT-5.4 Nano to extract explicitly stated actions, owners, and deadlines from meeting text. Leave unstated owners and dates empty.

## Overview

- [OpenAI](https://spiral.ai/providers/openai)
- [All opencode guides](https://spiral.ai/integrations/opencode)

## GPT-5.4 Nano in other agents

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

## More opencode guides

- [GPT-5.4](https://spiral.ai/integrations/opencode/gpt-5-4)
- [GPT-5.4 Pro](https://spiral.ai/integrations/opencode/gpt-5-4-pro)
- [GPT-5.3-Codex](https://spiral.ai/integrations/opencode/gpt-5-3-codex)
- [GPT-5.4 mini](https://spiral.ai/integrations/opencode/gpt-5-4-mini)
- [GPT-5.2 Pro](https://spiral.ai/integrations/opencode/gpt-5-2-pro)
- [GPT-5.5](https://spiral.ai/integrations/opencode/gpt-5-5)

## Questions about GPT-5.4 Nano in opencode

**Can opencode use GPT-5.4 Nano?**

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run GPT-5.4 Nano like any built-in tool.

**How much does GPT-5.4 Nano cost in opencode?**

Up to $0.006666 per run at the default inputs. $0.26 per 1M input tokens, $0.026 per 1M cached input tokens, $1.625 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 OpenAI account to use GPT-5.4 Nano in opencode?**

No. Spiral runs GPT-5.4 Nano on its own OpenAI account. You sign in to Spiral once and never paste a key.

**How long does it take to set up GPT-5.4 Nano in opencode?**

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

**Does opencode wait while GPT-5.4 Nano runs?**

GPT-5.4 Nano runs in the background. opencode starts the run, checks on it and gives you the text, json when it's ready.

**What is GPT-5.4 Nano best for?**

Classification, data extraction, ranking, and small coding assignments. Good starting points include labeling support requests, extracting order details, and ranking supplied search results.

**Where does GPT-5.4 Nano need more help?**

OpenAI recommends sending ambiguous or planning-heavy work to a stronger model. Keep assignments narrow and define what should happen when the evidence is missing or unclear.

**How much text can GPT-5.4 Nano handle?**

The context window is 400,000 tokens, with a maximum input of 272,000 tokens and maximum output of 128,000 tokens. These are token limits, so avoid treating them as fixed word or page counts.

**How should I prompt GPT-5.4 Nano?**

State one task, define the allowed answers, and specify how to handle uncertain cases. Prefer fixed labels, short JSON, or a template; include examples when the labeling rules need clarification.

**Should I increase reasoning effort for every task?**

Start with the default of no extra reasoning for simple labeling or extraction, then compare results on difficult examples before increasing it. Lower effort favors speed, and reasoning tokens share the generated-token budget with the visible answer.

