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

# How to Use GPT-5 Nano in opencode

GPT-5 Nano handles summaries, classification, and routine text extraction. It scored below GPT-5 Mini on OpenAI's long-context retrieval evaluation, so keep tasks focused and check extracted details.

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

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

- Use GPT-5 Nano with minimal reasoning to classify the issue descriptions in this project's issue export as bug, feature request, documentation, or other. Return each issue ID, one label, and a supporting phrase.
- Use GPT-5 Nano to summarize the latest test failure log in this project in at most 150 words. List failing test names and reported errors; keep proposed causes separate from observed failures.
- Use GPT-5 Nano to turn this project's supplied change descriptions into release notes under Fixes, Features, and Documentation. Keep the result under 250 words and preserve issue references.
- Use GPT-5 Nano with minimal reasoning to extract TODO comments from the source passages I select. Return JSON records containing the file path, exact comment, and any explicitly named owner; use null when no owner is stated.
- Use GPT-5 Nano to rewrite the selected README section for someone using the project for the first time. Keep every command, path, and version unchanged, and limit the explanation to 200 words.

## How to set up GPT-5 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 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-nano",
    "input": {
      "messages": [
        {
          "role": "system"
        }
      ]
    }
  }'
```

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

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

## GPT-5 Nano tools and prices

- [GPT-5 Nano](https://spiral.ai/tools/openai/openai/gpt-5-nano) (OpenAI): Up to $0.002134 per run at the default inputs. $0.065 per 1M input tokens, $0.0065 per 1M cached input tokens, $0.52 per 1M output tokens.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| seed |  | — |  |
| tools |  | — |  |
| reasoning |  | — | Reasoning effort; reasoning tokens count toward max_tokens. |
| max_tokens | 16 to 128000 | — | The most output tokens to generate. |
| tool_choice |  | — |  |
| response_format |  | — |  |

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

GPT-5 Nano can turn project issue text, logs, and change descriptions into concise summaries and labels. Use it for focused text tasks that help you decide what to inspect next.

### Support ticket classification

Assign incoming ticket text to billing, account access, bug report, or other. Define each label and request a supporting phrase for review.

### Meeting recaps

Turn a supplied meeting transcript into a short recap with decisions and action items. Keep owners and deadlines tied to what participants actually said.

### Order detail extraction

Extract order numbers, product names, and requested actions from customer messages into consistent records. Represent missing details explicitly.

### Customer feedback labels

Classify reviews by sentiment and product topic. Preserve review IDs so people can trace each label to the original text.

### Release note summaries

Condense supplied change descriptions into short release notes organized by fixes, features, and documentation.

### Plain-language rewrites

Rewrite short notices for easier reading while preserving dates, names, and stated conditions. Specify the audience and target length.

### Developer issue triage

Classify issue descriptions and summarize supplied failure logs. Return concise evidence for each category before a developer investigates.

## Overview

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

## GPT-5 Nano in other agents

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

## More opencode guides

- [GPT-5 Mini](https://spiral.ai/integrations/opencode/gpt-5-mini)
- [GPT-5 Pro](https://spiral.ai/integrations/opencode/gpt-5-pro)
- [GPT-5](https://spiral.ai/integrations/opencode/gpt-5)
- [GPT-5.1](https://spiral.ai/integrations/opencode/gpt-5-1)
- [GPT-4o mini (2024-07-18)](https://spiral.ai/integrations/opencode/gpt-4o-mini-2024-07-18)
- [GPT-5.2](https://spiral.ai/integrations/opencode/gpt-5-2)

## Questions about GPT-5 Nano in opencode

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

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

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

Up to $0.002134 per run at the default inputs. $0.065 per 1M input tokens, $0.0065 per 1M cached input tokens, $0.52 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 Nano in opencode?**

No. Spiral runs GPT-5 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 Nano in opencode?**

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

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

GPT-5 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 Nano good at?**

OpenAI recommends GPT-5 Nano for summarization and classification. Practical starting points include support ticket labels, short meeting recaps, and extracting named details from text.

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

GPT-5 Nano has a 400,000-token context window and a maximum output allowance of 128,000 tokens. Internal reasoning also uses the output allowance, so visible answers can be shorter.

**Does GPT-5 Nano know about recent events?**

Its knowledge cutoff is May 31, 2024. For newer information, provide the relevant source text and ask it to answer from that material.

**Can GPT-5 Nano return structured JSON?**

Yes. Structured Outputs can enforce a supported JSON schema for completed responses that are not refusals, but you still need to check whether the extracted values are correct.

**When should I use minimal reasoning?**

Start with minimal reasoning for simple labels, extraction, formatting, and short rewrites. OpenAI advises against minimal reasoning for planning with multiple steps or workflows that depend heavily on tools.

