How to dispute an AI API charge: the records you need
Short answer: most surprising AI API charges are real usage: your own retries, re-runs and resent context. Check that first. When something really looks wrong, a request is easy to check if it lists request IDs, times, model and token counts next to the invoice line, and asks one specific question.
Below: how to tell an error from normal billing, the records to keep, where each provider says to go, and a message you can adapt. Whether money comes back is the provider's decision under its own terms.
Step 1: is it really a billing error?
Before writing to anyone, rule out the charges that are working as designed:
- Your own repeats. A request sent twice is billed twice, even when the answer is the same. Double-clicks, page refreshes, scheduled jobs running again and agent steps repeating all count. See how to spot duplicate AI API charges.
- Requests that timed out on your side. Anthropic's billing article says a request that was on track to succeed is still charged if your client disconnects or times out partway through. A retry after that is a second request.
- Automatic retries. Anthropic's documentation says its official SDK retries connection errors, rate limits and server errors twice by default. Anthropic also says failed requests aren't charged, so a retry after a real failure shouldn't double the bill, but a retry after a client-side timeout can.
- Expensive tokens you didn't see. Thinking tokens, cache writes and resent history all count. See why a Claude API bill can be higher than expected.
What's left is worth raising: the same request ID billed twice, a request that returned an error but was charged, usage on a day or model you didn't use, or an invoice that doesn't match the usage it covers.
Step 2: collect the records
Request IDs (the most useful item)
- Anthropic: every API response has a
request-idheader (for examplereq_018EeWyXxfu5pfWkrYcMdjWG), and error bodies repeat it asrequest_id. Anthropic's docs ask you to include it when contacting support about a request. The Python and TypeScript SDKs expose it as_request_idon the response. - OpenAI: every response has an
x-request-idheader, which OpenAI recommends logging in production for troubleshooting with its support team. You can also send your ownX-Client-Request-Id; OpenAI says that if a timeout means you never got a response, support can use that value to look up whether and when the request arrived.
If you don't log them yet, start now: a request ID you didn't save can't be shown later.
# Python, Anthropic SDK: log the ID and usage of every request
msg = client.messages.create(model=MODEL, max_tokens=1024, messages=messages)
log.info("anthropic request_id=%s model=%s usage=%s", msg._request_id, msg.model, msg.usage)
For each charge you question
- Date and time (with time zone), model, and the request ID
- The
usageblock from the response: input, output, cache read and cache write tokens - What your code did: one call, or a retry (and why)
- The HTTP status you received, if it was an error
Billing records
- Anthropic: the Claude Console Billing page shows current-period charges, credit balance and usage; users with the Admin or Billing role can download past invoices from Invoice history. Receipts are also emailed with the subject "Your receipt from Anthropic".
- OpenAI: Billing history in the API organization that was charged.
Step 3: know the rules before you ask
- Anthropic (Claude Help Center): you're billed only for successful API calls and completed tasks; failed requests aren't charged. Credit purchases are non-refundable, and credits expire one year after purchase. Issued invoices can't be changed. For help, use the Help Center's support link; for monthly invoicing or hands-on support, Anthropic points to its Sales team.
- OpenAI (OpenAI Help Center): if you don't recognize a charge, check the purchase record first; Support can investigate and review refund eligibility. For charges you think are fraudulent, OpenAI asks you to use its Fraudulent Activity form and to contact your bank promptly. OpenAI says it can't issue a separate refund while a bank dispute is open.
Note the difference: a credit purchase you made yourself is a different question from usage that was billed in error. Ask about the usage: "these requests failed but were charged" or "this request ID appears twice".
Step 4: send one clear message
Short, specific and checkable works best. Adapt this:
Subject: Billing question: requests charged twice / charged after errors
Organization: [org name or ID]
Period: [dates, time zone]
I believe these requests were billed incorrectly:
[time] [model] request ID [req_...] status [200/500] tokens in/out [n/n]
[time] [model] request ID [req_...] status [200/500] tokens in/out [n/n]
What I think happened: [same request ID appears twice in the usage export /
these returned an error and your billing page says failed requests aren't charged].
Invoice or billing line: [invoice number, line, amount].
Could you check these request IDs and, if they were billed in error, credit the
amount of [$x] to the account? Logs and usage exports are attached.
Keep a copy of what you sent, the date, and any conversation or ticket ID you get back. If the first reply doesn't address the request IDs, reply to the same thread and ask for them to be checked.
What to expect
A provider decides under its own terms whether to credit or refund anything; nobody can promise an outcome. Clear records help in two ways: they make a real error quick to confirm, and they often show that a charge was correct, which is worth knowing too. Either way, it tells you what to fix in your own code.
Free one-page checklist: AI API bill checklist (PDF), ten checks to print or share.
Keep the records without thinking about it
NeverPayTwice is a small app we make. Its live meter runs on your own computer between your code and the API (Anthropic, OpenAI, Google Gemini and compatible APIs) and keeps a receipt for every request: time, model, request ID, tokens and cost. It flags repeat charges, keeps a refund ledger, and prints a double-spend statement listing the request IDs. It never blocks or changes a request, nothing is uploaded, and API keys are never stored. Mac, Windows or Linux, $9 one time.
See the receipts and double-spend statement with sample data first, no sign-up.