Answers · AI keys

Host leaked your AI key: how to ask OpenAI / Anthropic for a refund

Revoke the key, export its usage, then ask the provider through its own support channel. Neither promises a refund. OpenAI's billing article says credits "already used may qualify only for confirmed unauthorized use or a verified billing correction," so stolen usage is at least a case it reviews. Anthropic's says "All credit purchases are non-refundable," so with Anthropic you are asking for an exception, not invoking a policy.

Go to the provider first even if the host offers help. Railway says it can't refund spend made with compromised keys and will escalate a provider case with your proof (Railway: what to rotate); Zeabur says it will help you request fee waivers from providers and takes claims for losses until Nov 30 (Zeabur is shutting down). Either way, the host's incident notice helps, because it shows the usage started somewhere you didn't control.

What each provider says

  • OpenAI. "An exposed API key can allow unauthorized API usage through your account, which can result in charges." On prepaid credits: "Credits are non-refundable unless required by law or contract, or an approved exception applies"; unused credits may qualify for "confirmed unauthorized activity", and credits already used "may qualify only for confirmed unauthorized use or a verified billing correction, subject to applicable law or contract."
  • Anthropic. "If someone obtains and uses your API key, they incur charges on your behalf." On credits: "All credit purchases are non-refundable." Its compromised-key article says to revoke the key and, "If you continue to see any suspicious API activity or have other concerns," contact support.
  • Our note: OpenAI states a path for used credits; Anthropic doesn't. Ask either way, and expect Anthropic to treat it case by case.

Before you ask

  1. Revoke the key. OpenAI: "Delete the affected key through the API key dashboard." Anthropic: on the API keys page of the Claude Console (platform.claude.com/settings/keys), the three-dot menu next to the key, then "Delete API key." Create the replacement on the same page and put it only in your new host's secret store.

  2. Export the usage. OpenAI: "Review your API usage for unexpected activity and keep the details"; it supports tracking usage by API key. Anthropic recommends the Logs (platform.claude.com/logs) and Usage (platform.claude.com/usage) pages for your keys. Note the key's name, the hours and models that aren't yours, and the total.

  3. Cap what a leaked key can spend. OpenAI: an organization or project hard limit "to stop affected API requests when tracked spend reaches that amount" (enforcement "is not instantaneous"). Anthropic: spend limits on the Billing page for custom rate limit orgs; for standard orgs, auto-reload settings, which it calls "a safeguard against unexpected high usage that could result from leaked keys."

  4. Secure the account if more than the key leaked. OpenAI's fraud article: update your password, "Log out of all sessions", rotate the API key. On Platform, Your Profile > Security > Log out of all devices.

Want us to run it for you? The Ship Check Audit lists every key that ever left your server and confirms each old value now gets a 401 or 403: $149, within 48 hours.

Where to ask

  • OpenAI: open a new chat on any Help Center page and "Include details of activity you didn't perform or authorize," or use the Fraudulent Activity webform and choose "Report unauthorized activity involving my account."
  • Anthropic: in the Console, click your initials or name in the lower left, select "Get help", then "Send us a message"; the support bot passes cases that need investigation to the Product Support team, whose reply arrives in the same conversation and by email.

What to send

Our list, built so support can separate your traffic from the attacker's. Never paste the key itself: Anthropic says not to include API keys in support tickets, even to Anthropic.

  • The key's name or ID, and the project (OpenAI) or workspace (Anthropic) it belonged to.
  • The window in UTC: when the host says the breach started, when you noticed, when you revoked the key.
  • The usage export for that window, and the same key's usage for a normal week so the difference is visible.
  • A link to the host's incident notice. For this autumn's breaches, Black October: every AI dev platform breach in one list links each vendor's own notice.
  • What you changed: the replacement key, the spend limit, where the new key now lives.

A card dispute can block the refund

OpenAI, on card charges: "We cannot issue a separate refund while a dispute is active or after funds have already been returned through that dispute," and on prepaid billing, "If a payment is disputed or refunded, credits equivalent to that amount are removed from your account." Our note: if auto-reload charged your card for the attacker's usage, ask the provider first and tell support if you have already opened a dispute.

Then check that the old key is dead

  1. 401 means revoked:

    curl -s -o /dev/null -w "%{http_code}\n" \
      https://api.openai.com/v1/models \
      -H "Authorization: Bearer $OLD_OPENAI_API_KEY"
    
    curl -s -o /dev/null -w "%{http_code}\n" \
      https://api.anthropic.com/v1/models \
      -H "x-api-key: $OLD_ANTHROPIC_API_KEY" \
      -H "anthropic-version: 2023-06-01"
  2. Our note: don't count on automatic revocation here. OpenAI disables keys it finds "on the public internet, or leaked inside an app in an app store," and Anthropic deactivates keys GitHub reports from public repositories. A key read out of a host's database is in neither place.

Ship Check Kit · $29

Rather not run it by hand?

The Ship Check Kit has your coding agent find every key that ever left the server (SC-SEC-01 for git history, SC-SEC-02 for the browser bundle) and then confirm each old value is actually revoked, not just replaced (SC-SEC-03, which fails while an old value still gets anything but a 401 or 403). Three of 44 launch checks, each with the evidence and the fix.

Checked against OpenAI Help: Keeping your OpenAI account secure, OpenAI Help: Setting up and managing prepaid API billing, OpenAI Help: How can I report fraud or suspicious activity?, OpenAI Help: Report fraudulent ChatGPT or API credit purchase charges, Claude Help: What should I do if I suspect my API key has been compromised?, Claude Help: API key best practices, Claude Help: How do I pay for my Claude API usage?, Claude Help: How to get support on 2026-11-05. Only test apps and accounts you own or are allowed to test.