[Integrations](https://spiral.ai/integrations) › [opencode](https://spiral.ai/integrations/opencode) › [GPT-6 Astra](https://spiral.ai/integrations/opencode/gpt-6-astra)

# How to Use GPT-6 Astra in opencode

GPT-6 Astra handles complex coding, research, and document work. Choose it for regular agent tasks; Pro uses the same underlying model with additional reasoning for harder problems.

|  |  |
| --- | --- |
| Model | GPT-6 Astra |
| Available through | OpenAI |
| Category | LLM |
| Price | Up to $0.26681 per run at the default inputs. $13.00 per 1M input tokens, $1.30 per 1M cached input tokens, $16.25 per 1M cache write tokens, $65.00 per 1M output tokens. |
| Returns | text, json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with GPT-6 Astra in opencode

- Use GPT-6 Astra to investigate the failing checkout test in this repository. Trace the cause, implement the smallest complete fix, and run the affected tests. Finish with the cause, change, and verification result.
- Use GPT-6 Astra to implement keyboard navigation for the existing settings dialog. Follow the project's conventions, verify focus movement and dismissal, and continue until the requested behavior works.
- Use GPT-6 Astra to inspect the repository's instructions for redundant testing requirements. Propose targeted edits that preserve necessary checks and tie each requirement to the changes it actually covers.
- Ask GPT-6 Astra through Spiral to review the diff on this branch and list the three riskiest changes. Save the result in ./assets.
- Get a second opinion from GPT-6 Astra on this function, then tell me what the call cost.

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

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

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

## GPT-6 Astra tools and prices

- [GPT-6 Astra](https://spiral.ai/tools/openai/openai/gpt-6-astra) (OpenAI): Up to $0.26681 per run at the default inputs. $13.00 per 1M input tokens, $1.30 per 1M cached input tokens, $16.25 per 1M cache write tokens, $65.00 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-6 Astra in opencode?

Turn a bug report or technical requirement into an implemented, checked change. Define the affected behavior and completion criteria so Astra can carry the work through.

### Investigate and fix a software defect

Ask Astra to trace a reproducible failure, implement a focused fix, and verify the affected behavior. Define the stopping point as a working result with a short explanation of the evidence.

### Review a difficult technical decision

Give Pro competing designs, requirements, and known constraints. Request a recommendation that names failure modes, unresolved assumptions, and evidence that could change the decision.

### Turn research into a decision memo

Provide source material and a concrete question. Request a concise memo that separates supported conclusions, conflicting evidence, and open questions.

### Check a website's behavior

With browser tools available, ask Astra to exercise a specific user journey, record reproducible failures, and verify corrections.

### Review a scientific analysis

Provide observations, methods, and the question under investigation. Ask Astra to inspect the calculations, identify competing explanations, and suggest a test that distinguishes them.

### Create a report from source material

Specify the audience, required sections, and length. Ask Astra to produce the report and identify any conclusions the supplied evidence cannot support.

## Overview

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

## GPT-6 Astra in other agents

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

## More opencode guides

- [GPT-5.6 Terra Pro](https://spiral.ai/integrations/opencode/gpt-5-6-terra-pro)
- [GPT-6 Astra Pro](https://spiral.ai/integrations/opencode/gpt-6-astra-pro)
- [GPT-5.6 Terra](https://spiral.ai/integrations/opencode/gpt-5-6-terra)
- [GPT-6 Luna](https://spiral.ai/integrations/opencode/gpt-6-luna)
- [GPT-5.6 Sol Pro](https://spiral.ai/integrations/opencode/gpt-5-6-sol-pro)
- [GPT-6 Luna Pro](https://spiral.ai/integrations/opencode/gpt-6-luna-pro)

## Questions about GPT-6 Astra in opencode

**Can opencode use GPT-6 Astra?**

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

**How much does GPT-6 Astra cost in opencode?**

Up to $0.26681 per run at the default inputs. $13.00 per 1M input tokens, $1.30 per 1M cached input tokens, $16.25 per 1M cache write tokens, $65.00 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-6 Astra in opencode?**

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

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

**Does opencode wait while GPT-6 Astra runs?**

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

**What is GPT-6 Astra good at?**

It is built for complex reasoning, coding, research, computer use, and document creation. Useful assignments include investigating a bug, comparing research evidence, or turning source material into a finished report.

**How does GPT-6 Astra Pro differ from GPT-6 Astra?**

Pro uses the same underlying model in Pro reasoning mode, with additional model work aimed at higher-quality answers to complex tasks. Use regular Astra for routine work and consider Pro for a difficult analysis or review.

**How much material can GPT-6 Astra handle?**

The documented context window is 1,050,000 tokens, with up to 922,000 input tokens and 128,000 output tokens. Reasoning also consumes the generated-token allowance, so 128,000 tokens does not mean an answer of that length.

**Can GPT-6 Astra understand images or generate media?**

Its native inputs are text and images, and its native output is text. Use image input for analysis; generating image, audio, or video files requires separate tools or models.

**Why does GPT-6 Astra sometimes stop before finishing?**

OpenAI documents a tendency to ask for clarification where users expect reasonable assumptions. State what counts as finished, which decisions it can make independently, and which missing details actually require a question.

