How to check for unexpected AI charges after a key leak

Start with the issuing project's usage and invoice. Compare model requests, timing and volumes against your application's expected traffic during the exposure window.

Example

Daily spend is usually $12. An exposed development key was valid for two hours, and the project shows activity while the staging service was idle.

What to do

  1. Revoke the key and record the reported exposure and revocation times in a common time zone.
  2. Filter the issuer's usage by project, identifier if available, model and time. Compare it with expected application request counts.
  3. Save an export with usage totals and request identifiers. Ask the provider to review unexplained charges and configure alerts for the new key or project.

How to verify

You can account for normal traffic and show the provider a bounded time range for any remaining discrepancy.

Limits

Usage aggregation can be delayed. A gateway only reports traffic that passed through it.

Spendplane for this workflow

Try masking with fictional data

Related reading