GPT 6.1 Terra API Costs for Repository Changes and Test Verification
Estimate GPT 6.1 Terra token costs for a repository change and test-verification workflow, with explicit cache assumptions and reproducible arithmetic.
Summary · TL;DR
An illustrative four-call repository-editing task costs $0.58 at the published official rates without caching, or $0.325 under an explicitly assumed cache billing pattern. Equivalent OneMux catalogue-rate estimates are $0.09048 and $0.0507.
Key Takeaways
- Count the full verification loop, including test output sent back to the model and any follow-up edits, rather than pricing a single prompt.
- The worked example assumes a separately billed cache write and four cache reads; actual billing depends on cache creation, retention, matching, and provider behavior.
- Requests above 272K input tokens have different input, output, and cache prices in the supplied catalogue.
- API token estimates exclude test infrastructure, developer review, retries, and other operating costs.
On this page (11)
A useful estimate for an AI-assisted repository change starts with the entire edit-and-test loop, not just the first coding request. For the illustrative four-call task below, GPT 6.1 Terra costs $0.58 at the published official rates without caching, or $0.325 with a separately billed 30-minute cache write and four cache reads. At the corresponding OneMux catalogue rates, the estimates are $0.09048 and $0.0507.
These are arithmetic examples, not measurements or quotes. OneMux is the publisher of this article and provides access to models through an OpenAI-compatible API. Actual charges depend on token usage, cache behavior, and the applicable pricing terms.
GPT 6.1 Terra pricing and units
The following snapshot was captured on November 11, 2026. All prices in the tables are USD per million tokens. The published OneMux-to-official price ratio is 0.156 for the input and output prices in both tiers; it is a price ratio, not a percentage discount. Check the GPT 6.1 Terra model page and current OneMux pricing before budgeting.
| Input context tier | Official input | Official output | OneMux input | OneMux output | Published price ratio |
|---|---|---|---|---|---|
| ≤272K | $1.00 | $5.00 | $0.156 | $0.78 | 0.156 |
| >272K | $2.00 | $7.50 | $0.312 | $1.17 | 0.156 |
Cache prices are also per million tokens. The source describes the standard write price as a 30-minute retention option and the other write price as a 12-hour option. Verify which options and billing behavior apply to your endpoint before relying on them.
| Input context tier | Official cache read | Official 30-minute write | Official 12-hour write | OneMux cache read | OneMux 30-minute write | OneMux 12-hour write |
|---|---|---|---|---|---|---|
| ≤272K | $0.05 | $1.25 | $2.50 | $0.0078 | $0.195 | $0.39 |
| >272K | $0.10 | $2.50 | $5.00 | $0.0156 | $0.39 | $0.78 |
The supplied OrcaRouter article describes the cache prices and the 272K input threshold. Its cache examples use a separate write followed by reads; the calculation below adopts that convention explicitly rather than assuming it applies to every API implementation. The output price above 272K is $7.50, not twice the lower-tier output price.
A four-call repository change: assumptions
Suppose an engineer asks an agent to change a function, run tests, and correct a failure. The four model calls might cover planning, producing an edit, interpreting test output, and producing a correction. The test runner is external to the model; its output becomes input when sent back for interpretation.
For this illustration, assume:
- Each call contains the same 100,000-token stable repository prefix and 20,000 tokens of other input, including task instructions, changes, or test output.
- Each call produces 5,000 output tokens, including any generated code or explanation.
- Every request stays within the ≤272K tier. Token counts are billed as stated, with no additional charges or minimums assumed.
- The cached scenario writes the 100,000-token prefix once at the 30-minute rate, then bills four reads of that prefix. All calls occur within the retention window, and the prefix matches.
- The remaining 20,000 input tokens per call are billed at the ordinary input rate. The cache write is separate from the four reads and is not counted again as ordinary input.
This is a deliberately simplified billing model. A real service may account for the initial request differently, refresh or expire a cache, or report a partial hit. Use its actual usage records rather than assuming this pattern.
Calculate cost per verified-change attempt
Across four calls, the uncached workload contains 480,000 input tokens and 20,000 output tokens. The cached workload contains one 100,000-token write, 400,000 cached-read tokens, 80,000 ordinary input tokens, and the same 20,000 output tokens.
| Scenario | Input and cache arithmetic | Output arithmetic | Total per attempt | Total per 1,000 identical attempts |
|---|---|---|---|---|
| Official, no cache | 0.48 × $1.00 = $0.48 | 0.02 × $5.00 = $0.10 | $0.58 | $580 |
| Official, cached | (0.1 × $1.25) + (0.4 × $0.05) + (0.08 × $1.00) = $0.225 | 0.02 × $5.00 = $0.10 | $0.325 | $325 |
| OneMux, no cache | 0.48 × $0.156 = $0.07488 | 0.02 × $0.78 = $0.0156 | $0.09048 | $90.48 |
| OneMux, cached | (0.1 × $0.195) + (0.4 × $0.0078) + (0.08 × $0.156) = $0.0351 | 0.02 × $0.78 = $0.0156 | $0.0507 | $50.70 |
The decimals in the arithmetic represent millions of tokens. The 1,000-attempt column simply scales each independent attempt, including a fresh cache write for each; it does not assume a cache shared across tasks.
The cached official example saves $0.255 per attempt relative to the uncached example, under these assumptions. That difference is not a guarantee: a changed prefix, an expired entry, different token counts, or different billing treatment changes the result. Neither estimate includes compute for running tests, storage, human review, taxes, or other service costs.
When does the repository prefix pay for its cache write?
Under the example's separate-write convention, compare the same prefix read from cache with the same prefix sent as ordinary input. At the official ≤272K rates, a read saves $0.95 per million prefix tokens compared with ordinary input. A 30-minute write costs $1.25 per million, so two successful reads save $1.90 per million and cover the write. A 12-hour write costs $2.50 per million, so it takes three successful reads to cover it.
These thresholds exclude other tokens and assume one write, identical prefix size, and no expiration. If creating the cache is billed differently from the separate write assumed here, recalculate using the provider's actual usage categories. Failed or partial matches reduce the saving.
Keep the estimate representative of the test loop
- Capture token usage per call. Separate ordinary input, cache reads, cache writes, and output where usage reporting permits. Record whether a call was planning, editing, interpreting tests, or retrying.
- Preserve the reusable prefix. Put stable repository material and instructions before changing task details where the endpoint's cache rules support it. The supplied source identifies changes in early prompt content, tool definitions, or document ordering as potential causes of misses.
- Treat test logs as variable input. Long failure traces and repeated logs can increase both input volume and the chance of crossing a tier boundary. Trim irrelevant output only when it does not remove evidence needed to diagnose the failure.
- Count retries and invalidations. A new repository snapshot, changed instructions, or an expired cache may require another write. Keep the actual number of calls per attempt in the estimate.
- Check the full request near 272K. A 250K stable prefix plus 30K of task and test material is 280K input tokens, not a lower-tier request merely because the prefix is below the threshold. Apply the catalogue's higher tier when its conditions are met.
For sensitive repositories, avoid logging raw code or test output just to diagnose caching. Compare appropriately protected hashes or token counts instead, subject to your organization's security rules. A matching diagnostic hash is not proof that the service recorded a cache hit; verify that in usage reporting.
FAQ
Does test verification count as model output?
The test runner's execution is separate from model token output. If its logs are sent to GPT 6.1 Terra, those logs are model input. A model-generated explanation or patch is output. Test infrastructure charges are outside the token calculation.
Is caching always the lowest-cost approach?
No. A short task, a changing prefix, or a cache that expires before reuse may not recover the write cost. Reducing the repository material sent to only the relevant files is another option, provided the model still has enough context to make and verify the change. Measure the resulting token usage and review quality rather than assuming either approach wins.
Conclusion
Budget repository changes as a sequence of model calls plus separate test-running costs. Start with actual input and output usage, then add cache writes and reads only according to the billing behavior you observe. The four-call example provides a reproducible baseline, not a promise of what a real task will cost.
Sources
- OrcaRouter: GPT-6.1 Terra caching — supplied discussion of cache pricing, reuse, and the 272K threshold.
- OneMux GPT 6.1 Terra catalogue and OneMux pricing — model and price references; the figures above use the supplied November 11, 2026 snapshot.
Published price snapshot
Captured 2026-11-11T17:00:05.802Z from the OneMux published catalogue. Prices retain website billing units; this is not a live benchmark. Tiered, cached or time-based billing may differ. Unknown values are not zero.
| Model | Official input | Official output | OneMux input | OneMux output | Published price ratio |
|---|---|---|---|---|---|
| GPT 6.1 Terra | $1 | $5 | $0.156 | $0.78 | 0.156 |
Current OneMux prices. Compare workload costs only when input/output and billing units match; see each model page for tier conditions.
FAQ
Does test verification count as model output?
Test execution is separate from model output. Logs sent to the model count as input, while generated explanations or patches count as output. Test infrastructure costs are separate.
Is caching always the lowest-cost approach?
No. A changing prefix, insufficient reuse, expiration, or different billing treatment can prevent cache savings. Compare observed usage with an uncached or smaller-context workflow.
Related articles
Guides
GPT 6.1 Terra API Costs for Production Workflows: A Retry and Cache Budget
Estimate GPT 6.1 Terra API costs per completed workflow, including retries, cache writes, recovery rules, and context-tier changes.
Guides
GPT 6.1 Terra API costs for support triage: a reproducible estimate
Estimate GPT 6.1 Terra API costs for human-approved support triage using explicit token volumes, cache assumptions, and comparable official and OneMux rates.
Guides
GPT 6.1 Terra API Cost: A Reproducible Cache Evaluation
Estimate GPT 6.1 Terra API costs with explicit token assumptions, published OneMux and official prices, and a repeatable test for whether prompt caching helps your workload.
Guides
GPT 6.2 Astra API cost for repository changes: a reproducible estimate
Estimate the token cost of repository changes and test verification, including cache use, context tiers, retries, and cost per accepted change.