Skip to content
Sonic AI

OpenAI API pricing explained: per-token usage on prepaid credit

OpenAI API pricing explained: per-million-token rates for input, cached input and output, Batch discounts, prepaid credit, and a worked monthly bill.

Lokesh Mahala

Lokesh Mahala, CEO & Co-founder

· Updated · 5 min read

A container two-thirds full of blue, with a row of small token squares running out from its base along a line.
On this page

OpenAI API pricing is pure metered usage: you pay per million tokens, at a rate that differs by model and by token type (input, cached input and output), drawn from a prepaid credit balance. There's no subscription, seat or included allowance. Batch requests bill at half the standard rate, and cached input costs up to 90% less.

If you want the purest example of usage-based pricing a finance team will ever reconcile, it's an OpenAI API bill: a meter, several rates, and a balance the meter draws down. Every AI product built on top of it inherits some version of this model, and so does every company that sells "pay per call" of anything, including Twilio, whose per-message pricing adds the one wrinkle OpenAI doesn't have. This teardown is part of a series on how SaaS and API companies price.

OpenAI API pricing per million tokens

OpenAI charges three rates per model, each per million tokens:

ModelInputCached inputOutput
gpt-6-astra$10.00$1.00$50.00
gpt-5.6-sol$4.00$0.40$20.00
gpt-5.6-terra$2.00$0.20$12.00
gpt-4o-mini$0.15$0.075$0.60

Batch API requests bill at 50% of the standard rate, and cached input costs up to 90% less than fresh input. Usage is paid from a prepaid credit balance that expires after a year.

Editorial note. OpenAI rates are from the API pricing page; Twilio rates are US SMS list prices from twilio.com/en-us/sms/pricing/us. Both as of September 2026, both change often (OpenAI with every model launch; Twilio's carrier fees on the carriers' schedule). Neither company is affiliated with Sonic AI. Use the figures to understand the structure, and check the live pages before quoting.

Linear usage pricing: how OpenAI and Twilio compare

Both are linear usage pricing: quantity × unit rate, summed per period, billed in arrears. The differences are all in the shape of the meters:

OpenAITwilio
MetersOne per model, token type and Batch or standard: a dozen or more per customerOne for messages and one per carrier fee, from the same events
RateFlat per unit; no volume banding on the public listFlat per unit, with volume tiers and committed-volume floors for big senders
PaymentPrepaid balance drawn down; statement, not invoicePay-as-you-go from a balance; invoiced with commitment at enterprise
VolumeHundreds of millions of events a monthMillions; each event needs its carrier attribute

Twilio's committed volume is a minimum commitment: the contract says "at least $X a year", the meter says what was sent, and the invoice bills the higher of the two with a shortfall line if usage fell short.

Example: one month of OpenAI API usage

Take an invented customer that runs mostly on gpt-5.6-terra, with some batch work. Its September statement:

MeterTokensRate / 1MAmount
terra, input180,000,000$2.00$360.00
terra, cached input420,000,000$0.20$84.00
terra, output45,000,000$12.00$540.00
terra, Batch input300,000,000$1.00$300.00
terra, Batch output60,000,000$6.00$360.00
September usage$1,644.00, drawn from the prepaid balance

Who else prices per unit: Twilio and pass-through fees

OpenAI is the purest metered model. Twilio is the same model with a twist every payments, logistics and telecom product shares: one unit of usage carries more than one price. An SMS is $0.0083 to Twilio plus a carrier fee that depends on which network delivered it, both metered per message on the same invoice. Large senders sign committed annual volumes for a discount, which turns the linear rate into a minimum commitment with a shortfall true-up. Anthropic, Deepgram and SendGrid price the OpenAI way; Stripe (a percentage plus a fixed fee per transaction) and cloud egress price the Twilio way.

Twilio: per message, plus pass-through:

ComponentRate
SMS, sent or received$0.0083 per message (long code, toll-free, short code)
Carrier fee, outbound SMS$0.0035 AT&T · $0.0045 T-Mobile, Verizon
MMS, sent$0.022
Volume discountsAutomatic at higher monthly volume; tiers not fully published
Committed use"Commit to annual message volumes and receive a discount beyond standard volume tiers"

Twilio example: 250,000 outbound US SMS, split 40% AT&T, 35% T-Mobile, 25% Verizon:

LineQtyRateAmount
SMS sent250,000$0.0083$2,075.00
Carrier fee, AT&T100,000$0.0035$350.00
Carrier fee, T-Mobile87,500$0.0045$393.75
Carrier fee, Verizon62,500$0.0045$281.25
September$3,100.00

The carrier lines are a third of the Twilio bill. A system that only knows "messages × $0.0083" leaves finance rebuilding $1,025 of pass-through by hand every month. On OpenAI the equivalent trap is treating "tokens × rate" as one line when it is five.

Where metered API billing goes wrong

  • One event, several lines. A Twilio message counts once for the base rate and once for its carrier's fee; an OpenAI request counts on input and output meters. The template must fan one row out to multiple meters.
  • Idempotency. Usage arrives from logs, and logs get re-shipped. Every event needs a stable key so a replayed hour never double-bills.
  • Rates on someone else's schedule. Carrier fees change when the carriers say so; model prices change at launch. The catalog needs dated rates so an issued statement keeps the rate it was issued at.
  • Volume versus graduated. When a discount kicks in at 300,000 messages, does it apply to all messages that month or only those above? Different totals; the contract must say the word. See graduated vs volume.
  • Prepaid balance is state. Running balance, expiry and auto-recharge threshold need tracking per customer and showing on the statement, or the first support ticket is "why did my balance drop?"

How to bill per-token pricing on Sonic AI

Both are linear list prices per meter on Sonic, on a monthly in-arrears schedule. OpenAI is one meter per model, token type and tier with a sum aggregation; Twilio is a message meter plus a meter per carrier fee, all fed from the same events by one usage template with a per-event idempotency key. Volume discounts are a volume or graduated list price depending on the contract's wording, and a committed annual volume is a minimum commitment group over the covered meters, with the shortfall computed at period end. If you resell prepaid credit, the top-up is an invoice and the monthly usage draws against it, so the customer sees both documents.

See the Metering agent, usage-based billing explained, and minimum commitment billing.

Checklist if you price like OpenAI

  • How many meters do you really have once split by SKU, tier and pass-through? Enumerate them.
  • Are events idempotent from the source?
  • Are rates dated in the catalog?
  • Is your discount volume or graduated, and is a commitment's shortfall a computed line?

Bring a month of usage logs and your rate card to a demo. We'll run them through a template on the call.

Other APIs priced like OpenAI

Per-unit metered pricing with many meters is the model behind Anthropic, Deepgram and SendGrid; Twilio (above) adds pass-through fees and committed volume; Stripe adds a percentage rate. When a plan includes an allowance before the per-unit rate applies, you are looking at Cloudflare Workers or ElevenLabs; when the rate steps with volume, at AWS S3; when a year of it is bought up front, at Snowflake.

Related terms: usage-based billing, meter, idempotency, minimum commitment.

Lokesh Mahala

Written by

Lokesh Mahala

CEO & Co-founder, Sonic AI · LinkedIn

Lokesh is the Cofounder & CEO of Sonic AI. Before starting Sonic, Lokesh was an engineer at Stripe for 4 years building Stripe's Revenue and Finance Automation suite. He was a founding engineer at Recko (acquired by Stripe in 2021) where he built reconciliation solutions for B2C companies. He completed his bachelors from IIT Roorkee.

FAQ

How much does the OpenAI API cost per token?

OpenAI prices per million tokens, with separate rates for input, cached input and output on each model. As of September 2026, gpt-5.6-terra is $2.00 per million input tokens, $0.20 cached and $12.00 output, while gpt-4o-mini is $0.15, $0.075 and $0.60. Rates change with model launches, so check OpenAI's pricing page before quoting.

What is cached input on the OpenAI API?

Cached input is input the API has seen recently, such as a long system prompt repeated across requests, and OpenAI bills it at a much lower rate. On gpt-5.6-terra, cached input is $0.20 per million tokens against $2.00 for fresh input, a 90% saving, so prompts that reuse the same opening cost far less.

How does the OpenAI Batch API reduce cost?

Batch API requests are billed at 50% of the standard rate in exchange for slower, asynchronous processing. On gpt-5.6-terra that makes input $1.00 and output $6.00 per million tokens. Each Batch rate is its own meter on the statement, so a month with batch work shows separate lines for standard and Batch usage.

Do OpenAI API credits expire?

Yes. OpenAI API usage is paid from a prepaid credit balance, and purchased credits expire after a year. The balance is drawn down as tokens are used, so a monthly statement shows usage against the balance rather than an invoice for a fixed fee. Track the running balance and the expiry date alongside each month's usage.

See Sonic run on one of your contracts.

A 30-minute call with the team, using your own contract.

Book a demo