Guides / failed call cost

What a failed LLM call actually costs

A failed call still bills for every token the model generated before your code gave up. Timeouts, cancelled streams, truncated structured output and guardrail rejections all produce tokens you pay for and never read. Culpa, a local-first LLM cost, margin, and forecast ledger, meters failed calls alongside successful ones, so the cost of failure stops hiding inside the gap between your numbers and the invoice.

Why this happens

Failure feels free because HTTP taught everyone to expect that. A request that errors costs a round trip and nothing more. Model calls invert that: generation is the expensive part and it happens before your code learns anything went wrong. A twenty-second client timeout on a call that needed twenty-six seconds bills for everything produced in those twenty seconds. The customer got nothing, your logs record an error, and the meter ran the whole time.

What this usually looks like

  • Your cost model reconciles well on quiet days and reads low whenever error rates rise.
  • Client timeouts are set from a latency target with no reference to what generation costs.
  • Streaming responses get abandoned when a user navigates away and nobody counts those tokens.
  • Guardrail rejections are logged as safety events and never as spend.

Free, no card, no account

Run the free Cost Leak Scan

It shows your most expensive conversation before you install anything.

Run a free scan

Mistakes that cost the most

MistakeWhy it hurtsDo instead
Setting a client timeout below the model's realistic completion time.You pay for almost the whole response and then discard it, which is the most expensive outcome available.Set timeouts from a measured completion distribution, and cancel generation server-side rather than just disconnecting.
Excluding errored calls from your cost model.The model then understates spend by your failure rate and is most wrong on the days you most need it.Record token usage on the error path too. A failure with no usage record is invisible spend.
Rejecting output after generation rather than constraining it before.A guardrail that reads a finished response has already paid for every token in it.Constrain at the request, with schemas and stop conditions, so bad output costs less to prevent than to reject.

Run this check tonight

  1. Check whether your error-handling path records token usage. Most don't, and that's the whole blind spot.
  2. Compare your longest acceptable latency against your measured p95 generation time.
  3. Count abandoned streams last month and estimate tokens produced before each abandonment.
  4. Total guardrail rejections and price the responses they threw away.
  5. Compare calculated spend against the invoice on your worst error day rather than on a normal one.

A twenty-second timeout on a twenty-six second call

Illustrative example

A call on GPT-5.5 at real rates of $0.005 per 1k input and $0.030 output. The prompt is 6,000 tokens and a complete response runs 1,800 tokens. The client disconnects at twenty seconds, by which point the model has produced 1,400 tokens. Volumes are modelled.

Input billed regardless: 6 x $0.005 = $0.030
Output generated before the disconnect: 1.4 x $0.030 = $0.042
Abandoned call total = $0.072, for nothing the customer ever saw
The same call completing: $0.030 + (1.8 x $0.030) = $0.030 + $0.054 = $0.084
At 3% of 800,000 monthly calls abandoned: 24,000 x $0.072 = $1,728 a month

Giving up at 78% of the way through saved 14% of the cost and delivered zero of the value. A timeout bounds latency and does almost nothing about spend.

Every number, with its confidence and source

FigureWhat it meansConfidenceSource
$0.072modelled cost of one abandoned call on GPT-5.5 that delivered nothingcalculated(6 x $0.005) + (1.4 x $0.030) per 1k, using real GPT-5.5 rates from the price book, effective 2026-07-02. Token counts and the abandonment point are modelled.
86%share of a successful call's cost still paid when the call is abandoned near the endcalculated$0.072 divided by $0.084, from the teardown arithmetic.

What a generic answer can’t know

A provider bills the tokens it generated and has no idea your client had already hung up. Separating spend that produced a delivered answer from spend that produced nothing needs the outcome of each call recorded next to its token counts. Culpa keeps both on your infrastructure, where your prompts and responses stay, and counts the calls to run your plan.

Questions founders ask next

Do I pay for an LLM call that timed out?

Yes, for everything generated before the call stopped. Input bills in full the moment the request is accepted, and output bills for whatever the model produced, whether or not your client was still listening when it arrived.

Does cancelling a stream stop the charge?

It stops further generation only if the cancellation reaches the provider. Simply abandoning the connection on the client side can leave the server generating, so the saving depends on cancelling properly rather than just walking away.

How is failed call cost different from retry cost?

A retry is a second attempt you chose to make. A failed call is a single attempt that billed and delivered nothing. Retries multiply the cost of failures, which is why teams usually find both problems in the same week.

On your infrastructure

Culpa runs on your infrastructure. Your prompts and responses never leave it. Culpa counts calls to run your plan, and it fails open, so if it ever breaks your app keeps running.


How Culpa works

Find the culprit. Not just the total.

Your dashboard shows what you spent. It stops short of who spent it. Culpa shows the conversation, the user and the feature behind it.

Your prompts stay local.

Culpa runs on your own infrastructure. What you send to a model reaches us at no point.

Every dollar has a name.

Follow any charge to the conversation, the user, the feature and the customer behind it.

See the bill before it lands.

Cost your next feature before you ship it. You get the likely bill and the worst case, at best, median, p90 and p99.

Three steps to your first answer.

1

Change one base URL.

Or drop in the Python or TypeScript library.

2

Find your most expensive conversation.

In the first session, not the first week.

3

Cost your next feature before you ship it.

Base URLhttp://localhost:4545/v1Your traffic keeps flowing if Culpa ever stops.

Why the bill went up

Example dashboard

Calls traced

418,209

across 3 projects

Spend this week

$378.41

+ $182 vs last week

Failed calls

312

74% retried, and you paid for all of them

+ $182 this week traced to one culprit

Spend over 14 days

$0$20$40$60$8024262830020406
user_384report_generatorconv_91fprompt_v1894,220 tokens3 retries$6.81

Most expensive users

user_384$38.42
user_119$21.07
user_562$14.90
user_204$8.30
user_871$5.10

Next week forecast

Best$180
Median$240
p90$310
p99$395

Graded against reality. Accuracy shown as results land.

Free, no card, no account

Run the free Cost Leak Scan

It shows your most expensive conversation before you install anything.

Run a free scan

Keep reading


Sources: OpenAI API pricing. Last reviewed 2026-08-01. Plain text version.