AI Agent

GPT-6 Astra API Pricing: How Much Does One Coding Task Cost?

Laptop open to a dark-theme code editor with multiple source files visible on screen

Direct answer

How much does a GPT-6 Astra API coding task cost?

As of September 11, 2026: there is no single price. The official Standard rate is $10 input / $50 output per million tokens. In the Artificial Analysis Coding Agent Index, Astra at max effort lands at approximately $7.09 per task. A quick bug fix can stay well under $1; a hard task with high effort, a long context window, and several retries can push into double digits. This article works through the rate card, real-world scenarios, and how Astra compares to Sol and Fable on a per-task basis.

$10/$50
Standard input/output per 1M tokens
~$7
AA Coding Agent max effort / task
272K
Long-context tier trigger threshold

Current pricing and status

Item Current status (2026-09-11)
Model ID gpt-6-astra
Standard short context Input $10 · Cached input $1 · Cache write $12.50 · Output $50 (per 1M tokens)
Long context (input >272K) Entire request repriced: input/cache ~2×, output ~1.5×
Service tiers Batch / Flex = half price; Fast = 2× the applicable rate
reasoning.effort low / medium / high / xhigh / max (no "none" option)
Public benchmark reference AA Coding Agent Index: max ≈ $7.09/task; DeepSWE XHIGH analysis ≈ $6.52/solved
Last verified OpenAI model page and Pricing page

Rate card figures come from the OpenAI GPT-6 Astra model documentation and the API Pricing page. OpenAI's own messaging emphasizes that Astra completes tasks with fewer tokens and fewer retries than its predecessor — that is the core argument for why a 2.5× higher list price can still produce a comparable or cheaper bill in coding agent scenarios. For independent per-task figures, use the Artificial Analysis GPT-6 Astra benchmark article as a cross-check rather than relying on marketing copy alone.

Why "cost per task" matters more than per-token rates

Most people who search for GPT-6 Astra pricing stop at the per-million-token headline. For coding agents, that number only tells part of the story. The real budget drivers are multi-turn tool calls, repeated repository reads, reasoning tokens, failed retries, and the sudden bill jump when a single request crosses the 272K threshold and reprices the entire call at the long-context rate. It is also worth keeping product subscriptions (Codex, ChatGPT Work) separate from direct API access: subscriptions come with usage caps and product packaging; raw API bills are purely token-based.

If your team is already using an agent to edit code, run terminals, or execute overnight tasks, "how many dollars per coding task" is the number your finance team will actually ask about. That is why this article estimates cost by completed outcome, not by raw token consumption.

From per-million tokens to one coding task

Start with order of magnitude. At Standard rates, one million input tokens costs $10 and one million output tokens costs $50. A single agent task is not a one-shot chat completion: it typically involves multiple tool-call rounds, incremental file reads, and reasoning output that all add up before the agent submits its final patch.

Back-of-envelope formula (Standard, ignoring tool surcharges)
Cost ≈ (fresh input × $10 + cache hits × $1 + cache writes × $12.50 + output × $50) / 1,000,000. If any single turn's input exceeds 272K tokens, that full request is repriced at the long-context tier.

A worked example: a medium-difficulty task that accumulates 80K tokens of fresh input, 200K of cache hits, and 40K of output (including reasoning) comes to roughly $0.80 + $0.20 + $2.00 = about $3. Pull effort up to max, double the round count, or let the context window creep past 272K, and the same type of task easily reaches $7–$15. Subsequent tasks on the same repository are meaningfully cheaper once the context is cached; the first cold run, which writes the cache, can actually cost more than the second.

Tool costs stack on top: web search, Code Interpreter / Hosted Shell container time, and file search all have separate OpenAI line items. If your coding agent runs heavy shell commands, watching token counts alone underestimates the real bill. For more on how agents handle structured calls at runtime, the AI Sandbox vs Docker vs Virtual File System comparison covers the infrastructure side that drives many of those tool round-trips.

Three task tiers and their cost ranges

The ranges below are budget planning bands, not guaranteed prices for your codebase. Use the public benchmark anchors as a sanity check and adjust up or down based on your default effort setting and typical repository size.

Task type Typical settings Rough cost per successful task Notes
Small fix / single-file bug medium–high, few turns ~$0.50–$2 Controllable context; high cache hit rate
Medium feature (multi-file + tests) high, 10–15 tool turns ~$2–$6 Closest to an everyday "open a PR" task
Hard SWE / long-running agent xhigh–max ~$6–$12+ Near AA max ≈$7 and DeepSWE XHIGH ≈$6.50 anchors
Full repo in context / uncapped retries any + >272K or unlimited retries $15–several dozen dollars Long-context surcharge + wasted rounds stack fast
Benchmark numbers do not transfer to your CI
DeepSWE, Terminal-Bench, and the AA Coding Agent Index each use specific scaffolding, timeout rules, and scoring methods. The same model running under a different agent framework can produce a very different bill — independent evaluators have documented cases where total spend on the same batch of coding tasks was noticeably higher or lower across frameworks, with scaffolding and effort defaults as the root cause, not the token rate itself.

Astra vs Sol vs Fable: list price ≠ final bill

At the sticker level, Astra is roughly 2.5× the price of GPT-5.6 Sol ($10/$50 vs $4/$20). If token consumption were identical, the Astra bill would be considerably larger. In practice, coding agent economics depend on how many tokens it takes to succeed once.

  • Versus Sol: The Artificial Analysis Coding Agent Index shows Astra max effort at roughly $7.09 per task, about 15% more expensive than Sol max, while scoring around 7 index points higher. OpenAI argues that in scenarios like Terminal-Bench, per-task costs can be comparable or better because Astra resolves tasks in fewer turns.
  • Versus Claude Fable 5.x: Public list prices land in the same $10/$50 tier. The AA data suggests Astra can match Fable's score in the Coding Agent Index at lower per-task cost in some configurations, with similar "same score, lower tokens" narratives appearing in the Intelligence Index as well.
  • Versus a coding IDE subscription: If your main question is about monthly editor seat pricing, that is a separate calculation from raw API costs. Subscriptions bundle usage ceilings and managed infrastructure; API billing is purely per token.

Practical selection advice: run your default pipeline on the cheapest model that meets your SLO (Sol at medium effort covers most PRs). Bring Astra in for tasks that repeatedly fail at lower effort or where the cost of a wrong answer in a release window exceeds the premium. Reducing tool round-trips — for example by batching file reads — has a larger cost impact than toggling model tier, since every wasted turn pays full output rates.

Levers to reduce cost per successful task

  1. Default to medium or high effort: Gate xhigh and max behind explicit complexity signals or a failure threshold. Don't ship max as the default and optimize later.
  2. Budget the context window: Retrieve and inject only the files the agent actually needs. The 272K breakpoint is a hard cliff, not a soft gradient — staying below it avoids a 2× surcharge on every input token in the request.
  3. Invest in caching: Stable system prompts and repeated repository snapshots benefit from prompt cache. Treat the cold-start write cost as a one-time onboarding expense, not your typical per-task rate.
  4. Cap retries: A test that keeps failing after three attempts is unlikely to succeed on attempt ten. Circuit-break the agent and route to a human review instead of burning budget on diminishing returns.
  5. Use Batch/Flex for non-real-time work: Code review, documentation generation, and asynchronous refactors do not need low latency. Half-price Batch/Flex rates are the easiest cost reduction available without changing any model or effort settings.
  6. Monitor the right metrics: Track "dollars per successful task," "dollars per failed task," "average turns per task," and "fraction of requests over 272K" rather than focusing only on the per-million-token average.
Execution environment is a separate budget line
Token optimization solves one side of the cost equation. If the agent needs to compile iOS builds, run Xcode, or execute overnight, you also pay for the compute that hosts those tools. A laptop that sleeps disconnects the agent; that is an infrastructure problem, not a token problem.

Who should care about this, and who should not

This analysis is useful if you

  • Build your own coding agent and pay for the Responses API directly
  • Need to give finance a per-PR or per-task budget estimate
  • Already run on Sol and want to know when upgrading to Astra pays off
  • Care about the non-linear effect of effort, caching, and the 272K threshold on your bill

This is not the right reference if you

  • Only want to know about ChatGPT or Codex monthly subscription pricing
  • Expect a single fixed price that never changes
  • Have no usage logs and want a precise per-task dollar figure
  • Run tasks that rarely use tools or multi-turn edits

FAQ

How much does a GPT-6 Astra API coding task cost?

There is no single number. The official Standard rate is $10/$50 per million tokens. Public coding agent benchmarks show max-effort tasks at roughly $7 per task. A small bug fix can stay under $1; hard tasks with long context can exceed $10.

What is the official GPT-6 Astra API price?

Short-context Standard: $10 input, $1 cached input, $12.50 cache write, $50 output per million tokens. Inputs over 272K reprice the entire request at the long-context tier. Batch/Flex is half price; Fast is 2×.

Is GPT-6 Astra more expensive than GPT-5.6 Sol?

The list price is about 2.5× higher. In coding agent benchmarks, Astra's token efficiency narrows the real-world gap: the AA Coding Agent Index puts max-effort tasks at roughly 15% more expensive, with a higher score. Whether Astra ends up cheaper depends on your scaffolding and effort defaults.

How does reasoning effort affect the bill?

Higher effort generates more reasoning and output tokens. Moving the same task from medium to max can multiply the bill several times over. Use medium or high as a production default and reserve xhigh/max for hard tasks.

What happens when input exceeds 272K tokens?

The full request switches to the long-context tier: input and cached reads at roughly 2×, output at roughly 1.5×. Pasting a large repository into every call is the most common way to hit this.

Can I compare a Codex / ChatGPT subscription to API token costs?

Not directly. Subscriptions include usage caps and product packaging; this article covers raw API token billing. Keep "product subscriptions" and "self-built agent API costs" on separate lines.

How can I reduce cost per completed task?

Lower the default effort tier, cap context under 272K, raise cache hit rate, set retry circuit breakers, and route non-real-time work to Batch/Flex. Use "dollars per successful task" as your primary dashboard metric.

Is the DeepSWE $6.52 figure a reliable estimate for my workload?

No. It is a benchmark average under a specific configuration (XHIGH effort) on a public eval dataset. Use it as an order-of-magnitude anchor only; measure against your own repository and scaffolding.

If you need to run a coding agent on a remote Mac

API token costs and execution environment costs are two separate bills. Token optimization handles one side. If your agent needs to compile iOS, run Xcode, or execute overnight tasks without interruption, you also need a macOS host that stays awake — a sleeping laptop disconnects the session regardless of how well you tuned the prompt cache.

When you have confirmed the need for 24/7 uptime, SSH access, or a shared toolchain away from your laptop, that is the scenario Kvmjet's M4 bare-metal Mac is built for: dedicated hardware you can log into remotely, so agent runs and builds don't depend on a notebook that may sleep. See plans →

Special Offer