Skip to content
Inspire AI Lab

← All articles

cost-ownership··6 min read·by Inspire AI Lab

Hidden costs of running OpenAI at production scale

List-price API math misses about a third of what production usage actually costs. Here are the line items we surface during cost audits.

A finance team running an OpenAI deployment will quote the bill from their dashboard. That number is wrong. Not because OpenAI's billing is opaque (it's actually quite clear) but because the dashboard only shows the API line item. The real cost of production OpenAI usage is 30-50% higher once you include the things that don't appear there.

This is the audit we run when a client asks "how much does our LLM cost really?"

Item 1: Retry traffic

Every production system has retry logic. Network blips, rate limit hits, transient 429s, occasional 5xx — the application catches these and retries.

Retries don't show up as a separate billing line; they show up as more requests. We've seen production systems where 20-30% of total API spend was retries that the engineering team had no awareness of, mostly clustered around rate-limit edges.

Audit method: instrument the API client to log every retry. Reconcile retry count against the billing volume. The delta is invisible cost.

A typical finding: "we're billed for 12B tokens but the application sent 9B because retries doubled some requests."

Item 2: Prompt prefix the user never sees

Production prompts include a system prompt, retrieved context, few-shot examples — invisible to the end user but tokenized and billed. We routinely see clients quoting "we send N tokens per request" based on what the user typed, missing the 1500-4000 hidden prefix tokens.

This is the biggest single bucket. A user who types "what's our refund policy?" generates a 4500-token request, not a 7-token request. The hidden 4493 tokens are 99% of the cost.

Audit method: sample 100 production requests, dump the actual payload sent to OpenAI, count tokens. Compare to what the team estimates the per-request token count to be. Multiply by request volume to get the real bill.

Item 3: Streaming overhead

Streaming responses have their own cost shape. Each chunk is delivered as a separate event over SSE, and OpenAI bills for the full output tokens regardless. But the application's HTTP infrastructure (load balancers, WAFs, observability) sometimes adds per-request overhead — log lines, trace context, request headers.

If you're routing through Cloudflare or a similar edge layer, streaming requests can cost more than non-streaming due to per-event accounting. Not OpenAI's bill, but on the path.

Audit method: check edge / proxy billing for LLM endpoints specifically. We've found 5-15% of total LLM-stack cost living there.

Item 4: Observability

Logging every LLM request and response for debugging + audit. At scale, this means storing 4-10KB per request, multiplied by request volume. Datadog, Honeycomb, or self-hosted log storage all charge for this.

A million requests/month at 8KB average = 8GB/month, growing forever. At enterprise log ingestion rates ($1-2 per GB), that's $8-16 in observability costs — small. But the 10-million-request systems we audit are paying $100-150K/year in log storage attributable to LLM traffic.

Audit method: filter Datadog (or equivalent) bill by integration, look for the slice attributable to LLM SDK instrumentation. Don't forget the secondary stores (cold archive, compliance retention).

Item 5: Eval and monitoring infrastructure

Production LLM systems need eval harnesses (we have a whole article on this). Running the eval set against a new model version isn't free — it's hundreds or thousands of API calls per eval run, repeated weekly or per-deploy.

If your eval set has 1000 examples and you run it weekly, that's 52,000 API calls per year per model variant. At enterprise scale where you're comparing 3-5 model variants, eval traffic alone can be $5-20K/year.

Audit method: check for separate API key usage for the eval system. Often shows up as a meaningful slice of total token consumption.

Item 6: Engineering time

The non-API cost everyone forgets. Production LLM systems need ongoing attention: prompt tuning, eval set updates, model version evaluations, dealing with OpenAI's behavior changes when they update their models, monitoring cost spikes, responding to user feedback.

For a serious production deployment, this is 0.5-1.5 FTE at $200K loaded = $100-300K/year. We've never seen this line item in a client's quoted "LLM cost" but it's always there.

Audit method: ask the team how much of their week goes to LLM-related work. It's typically larger than they thought.

Item 7: Rate-limit absorption

OpenAI has tiered rate limits. Production systems above tier 4 or 5 negotiate custom limits, often paying retainer or signing minimum commit contracts. These contracts may be off-cycle and not show in monthly billing.

Audit method: check finance for any annual or quarterly commits with OpenAI beyond the per-call API charge.

Item 8: Latency-driven over-provisioning

Production latency requirements push teams to use larger / faster / more expensive variants than strictly needed for accuracy. We've audited systems running GPT-4o for tasks where GPT-4o-mini would have matched accuracy at 1/10 the cost — but the team picked the bigger model "because we want speed" without measuring whether the smaller one was fast enough.

Audit method: for each prompt type, run the request against both the expensive and cheaper model variants, measure accuracy and latency. If the cheaper variant is acceptable, you've found savings.

Item 9: Context window inefficiency

OpenAI bills for the full context window passed in, even if the response is short. Teams sending a 30K-token RAG context every time and getting a 200-token answer back are paying for 30K input tokens per request. If only 5K of that context was relevant, you're paying 6× too much.

Audit method: sample retrieved contexts; measure what fraction of the retrieved tokens are actually relevant to the answer. Smarter retrieval (better re-ranking, summary-based retrieval) often cuts context cost dramatically.

What the audit usually finds

A typical mid-sized engagement (10-30M tokens/month visible in the dashboard):

ItemAdd to dashboard cost
Retries+12%
System prompt / few-shot prefix+30% to the per-request math (already in bill, but invisible)
Edge / proxy overhead+5%
Observability storage+8%
Eval traffic+6%
Engineering time+$100-200K/yr
Latency over-provisioningtypically 20-40% of total inference cost
Context inefficiency10-30% of input token cost

The visible bill: $50K/yr. The actual cost: $130K-200K/yr depending on engineering load.

What this means for buy / build / hire

When the question is "should we self-host to save money?" the answer changes if you're comparing the real OpenAI cost (with these hidden items) rather than the dashboard cost.

We've shipped engagements where the dashboard was $80K/yr (looked fine, leadership didn't want to touch it) and the real cost was $260K/yr (very much worth replacing). The audit alone justifies the engagement before any work begins.

The honest summary

  • Dashboard cost is the floor, not the ceiling.
  • Engineering time + observability + retries usually add 30-50%.
  • Latency over-provisioning and context inefficiency are the biggest single optimizations available.
  • The break-even with self-hosting is meaningfully lower than dashboard math suggests.

When we run a cost audit before recommending build / buy / hire, the real numbers shift the recommendation about a third of the time. Worth doing before any major architectural decision.