Skip to content
Ali Hassan, home

Blog5 min read

OpenAI API pricing: what each model costs to run

OpenAI API pricing for GPT-6 Astra, Sol and Luna: per-token rates, cached input and the Batch API discount. Compare a worked monthly bill in the calculator.

By Ali Hassan, Senior engineer for SaaS and AI products

The OpenAI API charges per token, not a flat monthly fee: one rate for the tokens you send and a higher one for the tokens the model writes back, quoted per million tokens. As of 29 November 2026, GPT-6 Luna costs $0.10 per million input tokens and $0.50 per million output tokens, GPT-6.1 Sol costs $2 and $10, and GPT-6 Astra costs $10 and $50. Prompt caching and the Batch API take a large slice off those list prices, and that is where most of the real saving is.

How is the OpenAI API priced?

Every request has two prices: the input tokens you send and the output tokens the model returns. Output costs five times input on each of these models, so a feature that writes long answers costs more than its prompt size suggests. A token is roughly three-quarters of a word. These are OpenAI's standard rates per million tokens, with the cached-input rate a repeated prompt is billed at.

ModelInputOutputCached input
GPT-6 Luna$0.10$0.50$0.01
GPT-6.1 Sol$2.00$10.00$0.10
GPT-6 Astra$10.00$50.00$1.00

Prices as of 29 November 2026, for prompts up to 272,000 tokens; above that the rate steps up. They change, so check OpenAI's pricing page before you budget, or compare them with Claude and Gemini in the API pricing calculator.

What changes the price you pay?

  • Prompt caching. When the start of a prompt repeats across requests (a system prompt, instructions, a document everyone asks about), OpenAI bills that prefix at the cached-input rate: $1 per million on GPT-6 Astra against $10 to send it fresh, and $0.10 on GPT-6.1 Sol against $2. Writing to the cache costs about 1.25 times the input rate.
  • The Batch API. Requests that can wait run asynchronously at half the standard price, input and output both: $5 and $25 per million on GPT-6 Astra instead of $10 and $50. The caching and batch discounts stack.
  • Long prompts. The rates above hold for prompts up to 272,000 tokens. Go past that and the whole request moves to a higher long-context rate, so a few oversized prompts can quietly lift the bill.

A worked monthly bill

Take a support feature that sends 2,000 input tokens per request (a system prompt, a few retrieved passages and the question) and gets back 400 output tokens, across 100,000 requests a month. That is 200 million input tokens and 40 million output tokens. At list price, the model you pick decides almost the whole bill:

  • GPT-6 Luna: $20 input plus $20 output, $40 a month
  • GPT-6.1 Sol: $400 input plus $400 output, $800 a month
  • GPT-6 Astra: $2,000 input plus $2,000 output, $4,000 a month

Now cache the 1,500-token system prompt on GPT-6.1 Sol. With steady traffic it is read from the cache on almost every request. 150 million cached input tokens at $0.10 per million is $15, the remaining 50 million fresh tokens are $100, and output stays at $400, for about $515 a month plus a few dollars of cache writes. That is roughly a third off from one change, and output is now almost 80% of the bill. Once caching is in place, the next saving comes from shorter answers, not a shorter prompt.

How does OpenAI compare with Claude and Gemini?

At matching tiers the list prices are close. GPT-6.1 Sol costs $2 input and $10 output per million, the same as Claude Sonnet 5.5, and GPT-6 Luna matches Claude Haiku 5.5 at $0.10 and $0.50. Google's Gemini 3.1 Pro is $2 and $12, a little dearer on output. The real differences sit in the discounts above and in how many tokens each model needs to do your task well.

Those are worth measuring on your own requests. Claude API pricing and Gemini API pricing cover the other two vendors in detail, and what a ChatGPT feature costs to run has the full cross-vendor table.

Which OpenAI model should you choose?

Price per token is only half of it. OpenAI API pricing rewards the smallest model that clears your quality bar, but a cheap model that needs two attempts, or gets one answer in ten wrong, can cost more than a dearer one that is right first time. The way I choose is to build a test set from real questions, run it on the cheapest model that might work, and move up a tier only where the results fall short.

In practice that means a mix, not one model: a small model for routing, classification and extraction, and a larger one only where it is needed. On the bill above, shifting routine replies from GPT-6.1 Sol to GPT-6 Luna takes those requests from $800 to $40 a month. I put the model behind an interface in every product I build, so changing it later is a configuration change, not a rewrite.

Measure before you switch

Every lever here is a guess until you know what one request costs today and which part of it is expensive. You cannot tell whether caching or a smaller model is worth the effort until you have a real per-request number to compare against.

On an AI audit reviewer I built for a CPA firm, logging input and output tokens on every model call put a review at a measured $0.24 to $0.28, not an estimate, and it found a setting that produced more findings at 63% of the cost. If your OpenAI bill is climbing faster than your usage, an LLM cost and RAG quality audit measures cost per request on your real traffic and ranks the changes by what they save.

From the work

  • AI reply grounded in cited help-centre content, shadow-mode draft metrics per channel, and metered AI credits in billing.

    Evoriqa

    My own SaaS: a multi-tenant AI customer-support platform, live in production, built by the person who also pays its inference bill.

    Live in production

    • Next.js
    • TypeScript
    • PostgreSQL
  • Exception report, upload screen and style-guide admin of an AI tool that reviews financial statements for $0.24 each.

    AI audit reviewer

    A draft financial-statement package goes in; a categorised exception report comes back in about 90 seconds, at a measured $0.24-0.28 per review.

    • Python
    • FastAPI
    • Anthropic Claude

The offer this article leads to: AI accuracy and cost audit, typically $1.5k-$3k.

Tell me what you’re building and where it’s stuck.

I’ll tell you the cleanest path forward, including if it’s “don’t build that.”

Email only, on purpose: it reaches me, not a sales team.

Or write tocontact@alihassan.dev

Ali Hassan in a dark winter jacket, looking off to one side, standing in a stone courtyard with a minaret and cloudy sky behind him.