How to Use GPT-6.2 Astra in opencode
GPT-6.2 Astra fits complex code changes, document work, and web prototypes. Choose it over GPT-6.2 Astra Pro when the task does not need pro reasoning's extra model work.
Prompts to try with GPT-6.2 Astra in opencode
Copy an example into opencode, or ask in your own words.
Use GPT-6.2 Astra to inspect this repository's checkout flow and refactor duplicated validation. Preserve public behavior, follow project conventions, and run the relevant checks.
Use GPT-6.2 Astra to build an appointment-booking prototype in this project. Use system typography, documentary photography, and a weekly calendar; verify booking, cancellation, and mobile navigation.
Use GPT-6.2 Astra to implement the requirements in this project's design brief. Reuse existing components, preserve established conventions, and finish with completed work, test results, and blockers.
Ask GPT-6.2 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.2 Astra on this function, then tell me what the call cost.
How to set up GPT-6.2 Astra in opencode
Pick the way that suits you. Each takes about two minutes.
Use Spiral's MCP server
- 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.
opencode mcp add spiral --global --url https://api.spiral.ai/mcp
- 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.
opencode mcp auth spiral
- Check it
Spiral shows as connected.
opencode mcp list
Use the Spiral skill
- Send opencode this message
Your agent reads Spiral's skill and sets itself up.
set up https://spiral.ai/SKILL.md
- Sign in or paste a key
Approve Spiral in the browser, or give the agent a key from the console.
Use the Spiral CLI
- Install and sign in
Installs the Spiral CLI, signs you in and adds its skill to your coding agents.
npx -y spiral-cli@latest init
Call the Spiral API
- Create an API key
In the console, under API keys.
- Run GPT-6.2 Astra
One request; the result comes back by polling or a webhook.
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.2-astra", "input": { "messages": [ { "role": "user", "content": "Hello!" } ] } }'
Then paste one of the prompts above: opencode finds GPT-6.2 Astra on Spiral, shows the price and runs it.
GPT-6.2 Astra providers and prices
Spiral runs GPT-6.2 Astra through OpenAI. Open a card for today's price, with every fee included.
Up to $0.213447 per run at the default inputs. $10.40 per 1M input tokens, $0.52 per 1M cached input tokens, $13.00 per 1M cache write tokens, $52.00 per 1M output tokens.
Settings you can ask for
Ask opencode for any of these in your prompt.
| Setting | Allowed values | Default | Description |
|---|---|---|---|
| Seed | a whole number | ||
| Max tokens | 16 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). | |
| Reasoning effort | low, medium, high, or xhigh | How much the model reasons. | |
| Parallel tool calls | on or off |
Every API field of GPT-6.2 Astra is on its tool page: open its card above.
What can you do with GPT-6.2 Astra in opencode?
Turn a project brief into code changes and verification with GPT-6.2 Astra. Use repository conventions and acceptance criteria to guide implementation and review.
Refactor an existing application
Use GPT-6.2 Astra to revise connected components while preserving the behavior their callers rely on. Give it the acceptance criteria and project conventions.
Investigate a difficult bug
Ask GPT-6.2 Astra to compare failure evidence, isolate the cause, and propose a focused patch with a regression check.
Review a complex code change
Have GPT-6.2 Astra inspect a proposed change for behavior regressions, overlooked callers, and missing verification.
Build a web prototype
Give GPT-6.2 Astra a written brief, visual direction, and required interactions. Request interface code and checks against the brief.
Draft a professional report
Use GPT-6.2 Astra to turn supplied evidence into a report that follows your template, with unsupported conclusions marked for review.
Prepare a presentation narrative
Ask GPT-6.2 Astra for slide titles, concise supporting copy, and a logical sequence that follows your presentation conventions.
More on GPT-6.2 Astra and opencode
Overview
GPT-6.2 Astra in other agents
Questions about GPT-6.2 Astra in opencode
Can opencode use GPT-6.2 Astra?
Yes. Add Spiral to opencode as an MCP server, and opencode can find and run GPT-6.2 Astra like any built-in tool.
How much does GPT-6.2 Astra cost in opencode?
Up to $0.213447 per run at the default inputs. $10.40 per 1M input tokens, $0.52 per 1M cached input tokens, $13.00 per 1M cache write tokens, $52.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.2 Astra in opencode?
No. Spiral runs GPT-6.2 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.2 Astra in opencode?
About two minutes: add the server, then sign in, then check it.
Does opencode wait while GPT-6.2 Astra runs?
GPT-6.2 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.2 Astra good at?
Complex code changes and professional documents are strong fits. Give it a concrete deliverable, such as a tested refactor or a report that follows an existing template.
How much context can GPT-6.2 Astra handle?
OpenAI documents a 1,050,000-token context window, with up to 922,000 input tokens and 128,000 output tokens. GPT-6.2 Astra Pro uses the same underlying model.
Does the output limit mean 128,000 tokens of visible text?
The allowance also covers internal reasoning and non-visible formatting. Leave room for that work when requesting a long answer.
What should I include in a coding prompt?
State the change, project conventions, and behavior that callers must retain. For a frontend, specify imagery and typography so the design has a clear target.
What weakness should I check for?
OpenAI found cases where the model omitted mentioning blocked work. Ask the final response to list unavailable evidence, unfinished tasks, and checks it could not run.
Start using GPT-6.2 Astra in opencode
One Spiral account for every tool your agent needs. No subscription; you pay per run.
Paste this into opencode:
set up https://spiral.ai/SKILL.md


