AIFeed

Show HN: LLM API cost and carbon calculator for your own token mix

Original text(via HN AI)

Short answer

SOMA AI's free LLM API cost and carbon calculator compares the monthly list-price cost of Anthropic, OpenAI, Google and Mistral-served models for your own token mix, with the electricity, water and CO2e estimated from SOMA AI's open SAEF factors. Enter monthly input and output tokens, the share of input that is cached, batch on or off and a region, pick the models, and the table shows list price, price with caching and batch where the provider offers them, and the SAEF estimate side by side.

For the default example below, 100 million input tokens, 20 million output tokens and 30% of input cached, Cheapest at list price for this mix: Gemini 3.8 Flash, $129.75 a month. Lowest estimated CO2e: gpt-5.6-terra, gpt-5.4-mini, Gemini 3.8 Flash, 0.809 kg a month each, a tie because they share a SAEF class. For seat-based tools such as ChatGPT or Copilot, use the free SOMA AI footprint calculator.

Compare models for your token mix

List prices are USD per million tokens on the standard paid tier, checked 23 November 2026. They are list prices, not your invoice. Carbon figures are estimates.

Cheapest at list price for this mix: Gemini 3.8 Flash, $129.75 a month. Lowest estimated CO2e: gpt-5.6-terra, gpt-5.4-mini, Gemini 3.8 Flash, 0.809 kg a month each, a tie because they share a SAEF class.

Gemini 3.8 Flash Google. Scheduled change: From 1 January 2027 input 1.50, cached 0.15, output 7.50, storage 1.00, batch rates double tooA$150.00$129.750.809 0.511 to 1.162.285.52
gpt-5.4-mini OpenAIA$165.00$144.750.809 0.511 to 1.162.285.52
Z.ai GLM 5.3 (served by Mistral) MistralC$228.00$190.2010.6 4.57 to 15.527.967.4
Claude Sonnet 5.5 AnthropicB$400.00$343.002.78 1.84 to 3.337.4818.1
gpt-5.6-terra OpenAIA$440.00$386.000.809 0.511 to 1.162.285.52
Claude Opus 5.5 AnthropicC$800.00$686.0010.6 4.57 to 15.527.967.4

What does the default example show?

The table is rendered from the default inputs: 100 million input tokens and 20 million output tokens a month, 30% of input cached, batch off, served from US East - N. Virginia. It is the same arithmetic the calculator runs, so a crawler or a reader without JavaScript sees the same numbers.

ModelSAEF classList-price cost, USD a monthWith caching and batch, USD a monthEstimated kg CO2e a month, class rangeEstimated kWh a monthEstimated litres of water a month
Claude Opus 5.5 AnthropicC$800.00$686.0010.6 4.57 to 15.527.967.4
Claude Sonnet 5.5 AnthropicB$400.00$343.002.78 1.84 to 3.337.4818.1
gpt-5.6-terra OpenAIA$440.00$386.000.809 0.511 to 1.162.285.52
gpt-5.4-mini OpenAIA$165.00$144.750.809 0.511 to 1.162.285.52
Gemini 3.8 Flash Google. Scheduled change: From 1 January 2027 input 1.50, cached 0.15, output 7.50, storage 1.00, batch rates double tooA$150.00$129.750.809 0.511 to 1.162.285.52
Z.ai GLM 5.3 (served by Mistral) MistralC$228.00$190.2010.6 4.57 to 15.527.967.4

How does it calculate?

  • Cached input tokens = input tokens times the cached share. Fresh input tokens = input tokens minus cached input tokens.
  • List-price cost = (input tokens times input price + output tokens times output price) divided by one million, using the provider's list price for each token type.
  • Cost with caching = (fresh input times input price + cached input times cached-input price + output times output price) divided by one million. Cache-write and cache-storage charges are not included.
  • Cost with batch = the same sum times 0.5 on Anthropic, OpenAI and Google rows, where each provider states a 50% discount. Where a model has no cached-input batch price, or stacking is not confirmed, cached tokens are billed at the batch input price. Batch is not applied to Mistral-served rows.
  • CO2e and electricity: SAEF effective tokens = (output tokens + a weight times fresh input + a smaller weight times cached input) divided by a token basis, then times the class factor for the region. CO2e adds hardware, construction and amortised training terms. The range is the spread of SAEF models within the class. See the methodology page and the factor table.
  • Water: on-site cooling plus the water behind the electricity, where the region has water data, in litres. Regions without water data show n/a.

Prices are from Anthropic, OpenAI, Google and Mistral, checked 23 November 2026. For per-million-token prices next to carbon for every verified row, see the price and carbon table, also a CSV download under CC BY 4.0.

What does this tool not claim?

  • That the cost is your invoice. It is list price times your token counts, without negotiated discounts, cache-write or storage charges, long-context rates or regional uplifts.
  • That any carbon, electricity or water figure is a measurement or a figure for the named model. It is an SAEF estimate for the model's class, and the range shows the spread inside that class.
  • That a cheaper model is a lower-carbon model, or that a model is good enough for your task. Test quality on your own requests.
  • That token counts are comparable across models. Tokenizers differ, so the same text can bill as different numbers of tokens.
  • That a provider runs a model in the region you pick. The region is an input to the estimate.
  • That prices are current. Some change on dates already published, shown next to the model.

Short answers

Keep reading

  • The free SOMA AI footprint calculator. For seat-based tools such as ChatGPT and Copilot
  • What do one million LLM tokens cost, and what do they emit? Prices next to SAEF estimates for every verified row
  • How do I reduce both the cost and the emissions of our LLM API usage? All six API levers with their cost and carbon direction
  • AI cost and carbon optimisation
  • Does prompt caching cut LLM cost and emissions, and by how much?
  • How much do you save by routing LLM requests to a smaller model?

The text above was extracted automatically from the source page and may miss images, tables or code blocks. The original is authoritative.

Published by HN AI
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗