GPT-6.1 Terra API Pricing and Codex: When to Choose Sol

Choose GPT-6.1 Terra for bounded coding and computer-use work, with Sol or Astra handling harder tasks. Set it up in Codex or the Responses API, compare independent coding results, and calculate token, cache, long-context, speed-mode, and OpenRouter funding costs.

Contents
GPT-6.1 Terra API Pricing and Codex: When to Choose Sol

Use GPT-6.1 Terra for scoped coding work and repeatable computer-use tasks with clear acceptance checks. Keep GPT-6.1 Sol or GPT-6 Astra for ambiguous debugging and complex changes across a codebase. As of 2026-10-27, Terra’s standard API rates are $1 per million input tokens and $5 per million output tokens.

Those input and output rates are half Sol’s current standard rates. Your cost per completed task also depends on reasoning, retries, cache writes, and context length.

When should you choose Terra instead of Sol?

Choose Terra when checking the result is straightforward and failures are cheap to correct. A localized patch, a test update, or a repeatable application task is a useful starting point.

OpenAI reports a substantial coding improvement over the previous Terra. At maximum reasoning effort, GPT-6.1 Terra scores 50.3% on Terminal-Bench 4.0, compared with GPT-5.6 Terra’s published 21.5%. The launch announcement still recommends Sol or Astra for the most complex coding tasks.

Independent results show why token price alone is insufficient. As of 2026-10-27, Artificial Analysis publishes these Codex results:

Model in CodexReasoning effortCoding Agent Index v2.0Average API cost per taskAverage agent runtime
GPT-6.1 Terraxhigh48$0.6916.4 minutes
GPT-6.1 Terramax48$1.2426.1 minutes
GPT-6.1 Solmax54$1.5023.7 minutes
GPT-6 Astramax55$7.0424.8 minutes

The index combines three benchmarks with different scoring methods. Its points are not a universal task-success percentage. The methodology calculates API cost from task attempts, including applicable cache reads and writes.

Terra at max costs less than Sol at max in this suite, but takes longer and scores lower. Terra at xhigh reaches the same rounded index score for less money. Test that setting before assuming max offers the best value.

OpenAI’s roughly ninefold cost advantage over Opus and greater-than-threefold speed claims concern its Agents’ Last Exam computer-use evaluation. Those results do not establish the same advantage for coding.

For a difficult production bug, start with Sol. For repetitive work with a reliable test or visible end state, test Terra first.

Run GPT-6.1 Terra in Codex

Use Codex CLI 0.159.0 or later and select gpt-6.1-terra explicitly. The official model instructions document both that minimum version and the launch command.

As of 2026-10-27, Terra is available in Work and Codex on Plus, Pro, Business, Enterprise, and Edu plans. The dated product update includes Business explicitly. Terra is unavailable in Chat, and Enterprise access depends on workspace availability and administrator controls. It does not support UAE inference residency.

For macOS or Linux, open your repository directory in Bash. The official Codex repository documents this installer:

curl -fsSL https://chatgpt.com/codex/install.sh | sh
codex --version
codex login
codex login status
codex -m gpt-6.1-terra

Confirm the version is at least 0.159.0. Complete the browser login with your eligible ChatGPT account.

Inside the session, use /status to check the active model. Use /model to select an available reasoning effort. Both are covered in the CLI command reference.

For a simple access check, ask Codex to identify the repository’s test command and explain an existing test. A completed response verifies more than a successful login alone.

If Terra is unavailable, check the CLI version, account eligibility, and workspace controls. Also inspect provider settings in ~/.codex/config.toml and trusted project .codex/config.toml files. The -m flag selects a model; it does not replace your provider configuration.

ChatGPT login uses subscription access. API-key login bills the OpenAI Platform account instead. Terra can stretch a subscription allowance further, but API prices do not determine a fixed number of included tasks.

Terra also supports Codex Fast mode, where available, through /fast. It consumes included subscription limits at 2.5× Standard. Purchased credits and Enterprise pay-as-you-go usage are charged at 2× Standard.

Call Terra through the Responses API

Use the Responses API for an application or agent. Terra requires it for tool calling.

The model reference lists these specifications as of 2026-10-27:

SettingDocumented value
API model IDgpt-6.1-terra
reasoning.effortnone, low, medium, high, xhigh, max
API reasoning defaultmedium
Context window1,050,000 tokens
Maximum output128,000 tokens
Knowledge cutoff2026-06-01
Input and outputText and image input; text output
Tool-calling interfaceResponses API

The API context specification does not establish Codex’s usable context budget. Codex obtains context limits and other settings through its model catalog. Check the session’s context display before planning a million-token coding run.

For a direct API check, you need an OpenAI Platform key, available API billing, Bash, a current curl, and jq. Paste your key when read waits for input, then press Enter:

set -o pipefail
read -rs OPENAI_API_KEY && export OPENAI_API_KEY

curl --silent --show-error --fail-with-body \
  https://api.openai.com/v1/responses \
  --header "Authorization: Bearer ${OPENAI_API_KEY}" \
  --header "Content-Type: application/json" \
  --data '{
    "model": "gpt-6.1-terra",
    "reasoning": {"effort": "medium"},
    "service_tier": "default",
    "max_output_tokens": 4096,
    "prompt_cache_options": {"mode": "explicit"},
    "store": false,
    "input": "Fix this Python function so empty input returns None, then provide two pytest tests: def first(xs): return xs[0]"
  }' |
  jq '{
    id, model, status, service_tier,
    text: ([.output[]? | select(.type == "message")
      | .content[]? | select(.type == "output_text") | .text] | join("\n")),
    usage, error, incomplete_details
  }'

This follows the Responses request format. The selector extracts text from message items in the response’s output array.

A successful result has status equal to completed, generated code and tests in text, and token counts in usage. This is a synchronous request, so it needs no polling.

The example selects Standard processing explicitly. It also selects explicit caching without breakpoints, which prevents cache writes for this request.

If the result is incomplete, inspect incomplete_details. The output limit includes reasoning tokens, so a small limit can expire before the answer finishes. For HTTP errors, check the documented error code: authentication, exhausted credits, and rate limits require different fixes.

For computer use, add the runtime described in the computer-use guide. Your application must execute permitted actions and return updated screenshots. The text request above does not operate a browser or desktop.

Calculate GPT-6.1 Terra API pricing

Calculate each request from its ordinary input, cache reads, cache writes, and billed output. Counting only visible answer text understates reasoning-model usage.

These are direct OpenAI Standard prices in USD per million tokens, verified on 2026-10-27:

Token categoryRequests with at most 272,000 input tokensRequests with more than 272,000 input tokens
Ordinary input$1.00$2.00
Cached input reads$0.05$0.10
Cache writes, 30-minute retention$1.25$2.50
Cache writes, 12-hour retention$2.50$5.00
Output$5.00$7.50

The model pricing rules apply the long-context adjustment to the full request. Cached reads and cache writes also receive the input-side multiplier.

Consider an estimated request with 100,000 ordinary input tokens and 10,000 billed output tokens:

(100,000 × $1.00 + 10,000 × $5.00) / 1,000,000 = $0.15

At Sol’s $2 input and $10 output rates, the identical token workload costs $0.30. That comparison assumes equal token counts; an actual coding run may use different counts.

These examples assume Standard processing, no regional premium, and no additional tools or hosting charges. Taxes and gateway fees are separate. Billed output includes reasoning tokens.

What happens above 272K input tokens?

Crossing 272,000 input tokens changes the rates for the whole request. The increase is not limited to the excess tokens.

For an estimated request with 300,000 ordinary input tokens and 10,000 billed output tokens:

(300,000 × $2.00 + 10,000 × $7.50) / 1,000,000 = $0.675

The input rate doubles, while the output rate rises by 50%. Check each request separately in a long agent session. An accumulated conversation can cross the threshold even when the latest instruction is short.

Keep only context that the next step needs. Compare the resulting token counts and task quality before choosing a larger context budget.

How should you count cache writes?

Treat cache writes as their own input category. Their listed rates already include processing those tokens; do not add ordinary input charges again.

The prompt-caching guide exposes these fields:

  • usage.input_tokens: total input.
  • usage.input_tokens_details.cached_tokens: billed cache reads.
  • usage.input_tokens_details.cache_write_tokens: billed cache writes.

Ordinary input equals total input minus reads minus writes. For mixed write lifetimes, use cache_write_tokens_details.ttl_30m_tokens and ttl_12h_tokens.

An estimated request with 100,000 tokens written to a 30-minute cache and 10,000 output tokens costs:

(100,000 × $1.25 + 10,000 × $5.00) / 1,000,000 = $0.175

A later request with 100,000 cached reads and the same output count costs $0.055. That later saving assumes the prefix matches and qualifies for reuse.

For reusable context, choose prompt_cache_options.ttl as "30m" or "12h". For changing context that will not be reused, explicit breakpoints can avoid unnecessary writes.

When do Batch, Flex, and Fast change the bill?

Use discounted processing for work that can tolerate delays. Keep interactive coding on Standard unless faster processing justifies the premium.

As of 2026-10-27:

  • Batch: token prices are 50% below Standard. The Batch API uses asynchronous jobs with a 24-hour completion window.
  • Flex: token prices are 50% below Standard. Set service_tier to "flex" for slower processing with possible resource unavailability.
  • Fast: token prices are 2× Standard. Set service_tier to "fast" and inspect the returned tier, as described in the Fast guide.

Regional processing adds a 10% premium where available. These API charges are separate from Codex’s subscription-allowance multipliers.

Use OpenRouter with its own model ID and fees

Use OpenRouter when it fits your existing routing and billing setup. Its Terra listing is verified, but its model ID and conversation-state behavior differ from direct OpenAI.

As of 2026-10-27, the OpenRouter catalog lists these routes and rates:

RouteModel IDFull Responses URL
Direct OpenAIgpt-6.1-terrahttps://api.openai.com/v1/responses
OpenRouteropenai/gpt-6.1-terrahttps://openrouter.ai/api/v1/responses

Use your own key from the selected provider with Bearer authentication. For an OpenRouter SDK client, the base URL is https://openrouter.ai/api/v1.

OpenRouter lists $1 input, $5 output, $0.05 cached reads, and $1.25 cache writes per million tokens. Its catalog independently specifies higher rates above 272,000 prompt tokens: $2, $7.50, $0.10, and $2.50 respectively.

The OpenRouter Responses interface is stateless. Send conversation history with each request. Setting store: true or a non-null previous_response_id returns HTTP 400.

Include the funding fee in cash estimates. OpenRouter Standard charges 5.5% when you buy credits. Card purchases have a minimum fee of $0.80.

For example, $100 of Standard credits costs $105.50 before applicable tax. One hundred of the earlier $0.15 requests consume $15 in model credits. Allocating the funding fee proportionally gives:

100 × $0.15 × 1.055 = $15.825, or about $15.83.

That is an allocated cash-cost estimate. The fee is paid when funding the account, not on each request. A smaller $10 purchase incurs the $0.80 minimum, so the same 5.5% allocation would be inaccurate.

Before moving an existing agent, check its state handling and required tools. A matching text request does not establish compatibility with every tool in its loop.

Assign Terra work with a clear acceptance check

Start by moving one bounded task class to Terra and measuring the complete result. Keep your current model for work that requires repeated interpretation or integration.

For a UI regression, let Sol define the failing behavior and acceptance check. Give Terra the affected component, the relevant test command, and the expected rendered result. Have Sol review the patch and handle changes that cross component boundaries.

This division is a workflow recommendation drawn from the coding evidence. The cited benchmarks did not test a Sol coordinator with Terra subagents.

Measure total inference spending across the first attempt, retries, and model review. Divide that spending by accepted results, and track human review time separately. Also record whether the first attempt passed and how long the whole task took.

A lower Terra token rate helps only if those totals improve. If a task repeatedly needs Sol to rescue it, assign that task class to Sol directly. For repeatable computer-use work, require a visible end state that your application can check before accepting completion.

Ready to optimize your LLM workflow?

Join thousands of developers building faster, smarter, and more cost-effective AI applications with BetterToken.

Get Started for Free