Wan3.0, GLM-5.3 Flash, and Qwen3.8 Flash are now live on CometAPI โ†’
ai-comparisons/CometAPI research

GPT-5.6 Sol vs Claude Sonnet 5 vs Gemini 3.7 Flash API Pricing

Compare GPT-5.6 Sol, Claude Sonnet 5, and Gemini 3.7 Flash API pricing using the same workload, including caching, retries, batch, output length costs.

CometAPI
Lei WangAI model and API research team
Updated Sep 1, 2026 10 min read
GPT-5.6 Sol vs Claude Sonnet 5 vs Gemini 3.7 Flash API Pricing
Use this pattern

Make the first API call.

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_COMETAPI_KEY",
    base_url="https://api.cometapi.com/v1",
)

response = client.chat.completions.create(
    model="gpt-5-mini",
    messages=[{"role": "user", "content": "Build this workflow."}],
)

print(response.choices[0].message.content)

How Much Do GPT-5.6 Sol, Claude Sonnet 5, and Gemini 3.7 Flash Cost?

How can you compare AI model pricing across different providers? Start with the same input-output mix, the same currency, and the same definition of a successful result. A single โ€œprice per 1M tokensโ€ is incomplete because input and output tokens are billed at different rates, long-context requests may enter a higher tier, and retries or rejected answers can make the effective cost much higher.

As of August 26, 2026, a workload containing 800,000 uncached input tokens and 200,000 output tokens would cost about $5.76 with GPT-5.6 Sol, $2.88 with Claude Sonnet 5, or $1.08 with Gemini 3.7 Flash at the current CometAPI rates. These models occupy different speed and capability positions, so this is a billing comparisonโ€”not a claim that they deliver identical quality.

How to Compare AI API Pricing Across Providers

This article uses US dollars per 1 million billable text tokens. The worked scenario represents a high-volume support or knowledge workflow with 800,000 input tokens and 200,000 output tokens across many requests. Each request stays below GPT-5.6 Terraโ€™s 272,000-token short-context pricing threshold.

The baseline excludes prompt caching, batch discounts, tool fees, images, audio, and failed or repeated calls. It also assumes that one generated answer is accepted. The formula is:

cost = (input tokens / 1M ร— input rate) + (output tokens / 1M ร— output rate)

Use the actual token counts returned in each response rather than estimating from characters. Tokenizers differ across model families, which means the same text does not necessarily produce the same billable token count.

GPT-5.6 Sol, Claude Sonnet 5, and Gemini 3.7 Flash API Prices

The three model IDs and rates below were rechecked against CometAPIโ€™s live model directory on August 26, 2026. The CometAPI rate is the amount used in the worked calculations. The official column is included as a reference baseline.

GPT-5.6 Sol API Pricing

GPT-5.6 Terra: CometAPI lists $1.60 per 1M input tokens and $9.60 per 1M output tokens, versus the official $2 / $12 rate. Price-update note: the live rate reflects a 20% reduction; CometAPIโ€™s changelog records the Terra reduction on July 31, 2026, and the figure was rechecked after the August 22 pricing review.

Verified update (August 26, 2026): The preceding commented note is retained so its review anchor remains visible. For the calculations in this article, use GPT-5.6 Sol at $3.20 per 1M input tokens and $16 per 1M output tokens, compared with the official $4 / $20 rate. CometAPI announced the promotion on August 24, 2026, and lists it through November 21, 2026.

Claude Sonnet 5 API Pricing

Claude Sonnet 5: As of August 26, 2026, CometAPI lists $1.60 per 1M input tokens and $8 per 1M output tokens, compared with Anthropicโ€™s current $2 / $10 list price. Anthropic updated its launch post on August 10, 2026 to make $2 / $10 permanent; the previously announced September 1 increase to $3 / $15 no longer applies.

Gemini 3.7 Flash API Pricing

Gemini 3.7 Flash: As of August 26, 2026, CometAPI lists $0.60 per 1M input tokens and $3 per 1M output tokens, compared with Googleโ€™s introductory $0.75 / $3.75 rate through December 31, 2026.

Model IDCometAPI input / outputOfficial input / output800K in + 200K out
gpt-5.6-sol$3.20 / $16$4 / $20$5.76
claude-sonnet-5$1.60 / $8$2 / $10$2.88
gemini-3.7-flash$0.60 / $3$0.75 / $3.75$1.08

All prices are USD per 1M tokens. See the dated model pages for GPT-5.6, Claude Sonnet 5, and Gemini 3.7 Flash, plus the CometAPI pricing guide. Claude Sonnet 5: CometAPI lists $1.60 per 1M input tokens and $8 per 1M output tokens, compared with Anthropic's current $2 / $10 list price. Anthropic originally announced $3 / $15 standard pricing for September 2026, but updated the pricing on August 10, 2026 and made the $2 / $10 rate permanent. GPT-5.6 Terra also has a higher long-context tier, so do not apply the short-context number to requests above the published threshold.

Gemini 3.7 Flash has the lowest token bill in this scenario and is positioned as an efficient Flash model. Claude Sonnet 5 is a balanced production model, while GPT-5.6 Sol is the flagship option for harder reasoning and coding workloads. The useful decision is not only โ€œwhich row is cheapest?โ€ but โ€œwhich model produces an acceptable result with the fewest total tokens, retries, and reruns?โ€

What Does 1M Tokens Cost for GPT, Claude, and Gemini?

For the 800K-input and 200K-output baseline, the calculation is straightforward. GPT-5.6 Sol costs 0.8 ร— $3.20 + 0.2 ร— $16 = $5.76. Claude Sonnet 5 costs 0.8 ร— $1.60 + 0.2 ร— $8 = $2.88. Gemini 3.7 Flash costs 0.8 ร— $0.60 + 0.2 ร— $3 = $1.08.

That arithmetic is useful for budgeting, but accepted-output cost is the better production metric. The table below shows what happens when the same workload experiences common operational overhead.

ModelBaseline5% retried10% rerun40% output
GPT-5.6 Sol$5.76$6.05$6.34$8.32
Claude Sonnet 5$2.88$3.02$3.17$4.16
Gemini 3.7 Flash$1.08$1.13$1.19$1.56

โ€œ5% retriedโ€ assumes that 5% of the entire token workload is sent again. โ€œ10% rerunโ€ assumes that one in ten outputs fails a quality check and is regenerated with the same token mix. โ€œ40% outputโ€ keeps the total at 1M tokens but changes the mix to 600K input and 400K output. Because output tokens cost more, verbosity can move the bill faster than traffic growth.

How Much Do Retries and Failed Outputs Add?

How Much Do API Retries and Reruns Cost?

Retries can duplicate billable work. In the baseline, retrying 5% of the workload raises GPT-5.6 Sol from $5.76 to about $6.05, while rerunning 10% after a quality failure raises it to about $6.34. A retry repeats a request after a transport or service failure; a rerun regenerates an answer that was delivered but rejected. Retry only rate limits, timeouts, and temporary server failures. CometAPIโ€™s error and retry guide recommends exponential backoff with jitter and no automatic retry for malformed requests or authentication errors. Cap attempts so a provider incident cannot create a retry storm.

How Much Can Prompt Caching Save?

Cache savings depend on reuse. GPT-5.6 Solโ€™s short-context CometAPI rate lists cache reads at $0.32/M and cache writes at $4/M. If half of the 800K input is a reusable cached prefix, the first run costs about $6.08 because writing 400K cached tokens adds a $0.32 premium over normal input. A later cache-hit run costs about $4.61 instead of $5.76, saving roughly $1.15. Break-even: one successful reuse more than recovers the initial write premium; across the first two runs, the cached path costs about $10.69 versus $11.52 without caching. Other models have different cache rules and minimums, so verify them before budgeting.

How Does Output Length Affect AI API Cost?

Long answers are expensive. Output rates in all three rows are five times the input rates. Set an output limit that matches the task, ask for concise formats, and stop generating once the required structure is complete.

How Much Do Failed AI Outputs Cost?

A failed task can still consume tokens. A request that returns an unusable answer may be technically successful and fully billable. Track format violations, hallucinations, tool failures, and human rejection separately from HTTP errors.

Token price does not measure engineering cost. Provider-specific SDKs, separate invoices, duplicated monitoring, and migration work all add operational cost. When comparing the three families through CometAPI, teams can use the same OpenAI-compatible base URLโ€”https://api.cometapi.com/v1โ€”and change the model ID while keeping one billing and observability layer. Model-specific capabilities still need testing.

How to Reduce GPT, Claude, and Gemini API Costs

How Much Can Batch and Flex Reduce API Costs?

Batch and Flex are processing modes, not automatic discounts on every request. CometAPIโ€™s GPT-5.6 pricing guide says eligible Batch and Flex token rates are about 50% below Standard, while Anthropic lists up to 50% savings for batch processing. Applying a 50% sensitivity to the $5.76 GPT-5.6 Sol baseline gives about $2.88, but treat that as an illustration until the same mode and rate appear in your CometAPI account. Use Batch for asynchronous jobs; use Flex only when variable latency is acceptable.

GPT-5.6 Terra vs Claude Sonnet 5 vs Gemini 3.7 Flash: Which Is Cheapest?

Using the same 800K-input and 200K-output workload at the CometAPI rates checked on August 26, 2026, Gemini 3.7 Flash costs $1.08, Claude Sonnet 5 costs $2.88, and GPT-5.6 Terra costs $3.20. Gemini is the cheapest on raw token cost in this comparison. GPT-5.6 Terra may still be economical for harder tasks if its capability reduces retries or human correction, so compare cost per accepted result before choosing a production route.

Route by task difficulty. Use a low-cost model for classification, extraction, and routine drafts, then escalate only ambiguous or high-value requests. A fallback should match required modalities, tool support, and output formatโ€”not merely have a lower rate.

Budget the output before the call. Set a realistic maximum output and record actual input, output, and cached tokens from the response. The CometAPI cost-estimation guide treats pre-call estimates as budget guards and actual usage as the final measurement.

Cache stable content, not changing context. System instructions, product policies, and long reference documents are good candidates when they repeat. Measure cache hit rate and include cache-write cost; otherwise a cache can look cheaper in theory while saving little in production.

Retry selectively. Add exponential backoff, jitter, and a maximum attempt count. Log the model ID, status, request ID, tokens, and whether the request was a retry. This makes duplicated spend visible.

Optimize cost per accepted result. Run a fixed evaluation set and calculate total API spend / accepted outputs. A more expensive model can be cheaper overall if it needs fewer retries, shorter prompts, or less human correction.

Recheck before launch. Model availability, introductory rates, tier thresholds, and discounts change. Query the Models API or review the public model directory on the day you publish or approve a budget.

FAQ

What does โ€œcost per 1M tokensโ€ actually mean?

It is a normalized rate, not the price of every request. Multiply the modelโ€™s input and output rates by the tokens your workload actually uses. Keep cached tokens, long-context tiers, and task-based charges separate.

Which is cheapest: GPT, Claude, or Gemini?

For the specific models and 800K-input/200K-output workload checked on August 26, 2026, Gemini 3.7 Flash is the lowest-cost option at $1.08 through CometAPI, followed by Claude Sonnet 5 at $2.88 and GPT-5.6 Sol at $5.76. It is not automatically the best choice for every task; compare quality, latency, and accepted-output cost on your own prompts.

Should I compare official prices or aggregator prices?

Compare the price you will actually pay, then retain the official rate as a reference. Use the same date, currency, token mix, tier, and discount assumptions for every row.

Are retries always billed?

Do not assume they are free. A failed transport request may not reach inference, while a timed-out or rejected application result may already have consumed model work. Use actual usage and billing records, and prevent automatic retries of non-retryable errors.

Does prompt caching always reduce cost?

No. Cache writes can cost more than normal input, and savings depend on repeat reads. Calculate the break-even point from the modelโ€™s current write and read rates, then monitor real cache hits.

How often should pricing be checked?

Check it before publishing a price claim, changing a production model, or approving a forecast. Store the model ID and verification date with the calculation so the estimate can be reproduced later.

Conclusion: Which AI API Is Cheapest for Your Workload?

A fair GPT vs Claude vs Gemini pricing comparison uses one dated source, one token mix, and one success definition. Per-token rates create the baseline; caching, retries, output length, and quality failures determine the real bill. CometAPI makes cross-provider testing easier by keeping the endpoint and billing layer consistent, but the lowest-cost model is still the one that meets your quality target with the least total work.

Continue learning

Connect this article to the next decision.

View all topics
Published on Sep 1, 2026
Last updated Sep 1, 2026
0 views
Reviewed for clarity, source attribution and current API terminology.

Ready to cut AI development costs by 20%?

Start free in minutes. Free trial credits included. No credit card required.

Read More