How to Use GPT-5.4 in opencode
GPT-5.4 handles coding, research synthesis, and work involving spreadsheets and documents. Choose it for general work; GPT-5.4 Pro spends more compute reasoning through difficult problems.
Prompts to try with GPT-5.4 in opencode
Copy an example into opencode, or ask in your own words.
Use GPT-5.4 to investigate the failing tests in this project. Reproduce one failure, trace its cause, implement a focused fix, and run the relevant checks. Summarize the cause and result in under 250 words.
Use GPT-5.4 to trace the checkout flow through this repository. Identify where input validation happens and where errors reach the user. Return an ordered walkthrough and three concrete failure cases to test.
Use GPT-5.4 to review the current diff against the project's requirements. Report behavior changes and likely regressions with file references. Finish with a short list of unresolved questions.
Ask GPT-5.4 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-5.4 on this function, then tell me what the call cost.
How to set up GPT-5.4 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-5.4
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-5.4", "input": { "messages": [ { "role": "system" } ] } }'
Then paste one of the prompts above: opencode finds GPT-5.4 on Spiral, shows the price and runs it.
GPT-5.4 providers and prices
Spiral runs GPT-5.4 through OpenAI. Open a card for today's price, with every fee included.
Up to $0.079987 per run at the default inputs. $3.25 per 1M input tokens, $0.325 per 1M cached input tokens, $19.50 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 | ||
| Top p | a number up to 1 | Taken only at reasoning effort "none", this model's default. | |
| Logprobs | on or off | Taken only at reasoning effort "none", this model's default. | |
| Max tokens | 16 to 128000 | The most output tokens to generate. | |
| Temperature | 0 to 2 | Taken only at reasoning effort "none", this model's default. | |
| Top logprobs | 0 to 20 | Taken only at reasoning effort "none", this model's default. | |
| Presence penalty | -2 to 2 | Taken only at reasoning effort "none", this model's default. | |
| Reasoning effort | none, low, medium, high, or xhigh | none | How much the model reasons. |
| Frequency penalty | -2 to 2 | Taken only at reasoning effort "none", this model's default. | |
| Parallel tool calls | on or off |
Every API field of GPT-5.4 is on its tool page: open its card above.
What can you do with GPT-5.4 in opencode?
Turn project code and technical requirements into fixes, reviews, and implementation plans with GPT-5.4. Give the agent a concrete completion check and ask it to explain the evidence behind its changes.
Find the cause of a bug
Trace a failure through code and logs, propose a focused fix, and define a check that reproduces the original problem.
Review a migration plan
Compare the proposed changes with existing behavior. List dependencies, compatibility risks, and checks needed before rollout.
Compare competing proposals
Turn supplied proposals into a decision table using explicit criteria. Separate documented commitments from assumptions and unanswered questions.
Prepare a research brief
Combine supplied sources into a concise explanation with supporting passages, conflicting claims, and gaps that need further research.
Check spreadsheet logic
Review supplied formulas and assumptions for inconsistent units, missing dependencies, and totals that need reconciliation.
Draft a presentation
Turn a business brief into a slide outline with a clear recommendation, supporting evidence, and speaker notes.
Explain a difficult technical decision
Compare engineering approaches against stated constraints. Describe tradeoffs, identify missing measurements, and recommend the next experiment.
Produce a recurring operations brief
Summarize supplied updates into changes, blockers, and next actions. Keep each conclusion tied to the evidence available for that run.
More on GPT-5.4 and opencode
Overview
GPT-5.4 in other agents
More opencode guides
Questions about GPT-5.4 in opencode
Can opencode use GPT-5.4?
Yes. Add Spiral to opencode as an MCP server, and opencode can find and run GPT-5.4 like any built-in tool.
How much does GPT-5.4 cost in opencode?
Up to $0.079987 per run at the default inputs. $3.25 per 1M input tokens, $0.325 per 1M cached input 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 OpenAI account to use GPT-5.4 in opencode?
No. Spiral runs GPT-5.4 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 in opencode?
About two minutes: add the server, then sign in, then check it.
Does opencode wait while GPT-5.4 runs?
GPT-5.4 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 good at?
GPT-5.4 combines coding and reasoning with document, spreadsheet, and presentation work. Useful tasks include investigating bugs, comparing evidence, and turning business requirements into a draft deliverable.
How much can GPT-5.4 read and write?
GPT-5.4 and GPT-5.4 Pro each have a 1,050,000-token context window and a 128,000-token maximum output. Internal reasoning also uses the output budget, so that ceiling does not mean 128,000 tokens of visible text.
Does GPT-5.4 know recent events?
GPT-5.4 and GPT-5.4 Pro have an August 31, 2025 knowledge cutoff. Supply current source material when asking about later events or changes.
What does reasoning effort change?
It controls how much internal reasoning the model does before answering. Compare results on your actual task, and leave enough output space for both reasoning and the final answer.
How should I prompt GPT-5.4?
State the deliverable, the required sections, and a length limit. For example, ask for a recommendation, its supporting evidence, and unresolved questions in under 500 words.
Start using GPT-5.4 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


