---
title: "Unexpected AI API Usage: How to Investigate a Stolen Key"
description: "Investigate unusual AI API charges. Match provider usage to your applications, preserve evidence, revoke suspect keys and verify that legitimate traffic recovers."
url: "https://hacked.co.in/blog/unexpected-ai-api-usage-stolen-key/"
---

# Unexpected AI API usage: how to investigate a suspected stolen key

A spike in model API usage can come from a legitimate workload or a stolen key. Here’s how to tell them apart, preserve the evidence and contain the affected application.

Published

15 November 2026

Reading time

3 min

[Call the incident line: +91 22 4164 2220](tel:+912241642220)Answered 24/7 for active incidents.

On this page (4)

An unexpected spike in your AI bill leaves you with an immediate question. Which application made the requests? A legitimate batch job, a retry loop or a leaked key can all push up the same graph. If you can only see a total for the whole organisation, get to the level of an individual project or credential before drawing a conclusion.

In a November report, Amazon Threat Intelligence described a campaign in which stolen model credentials paid for more AI calls used in subsequent criminal activity. That puts unusual model usage on the incident response desk alongside unusual sign-ins or cloud activity. Here is how finance, engineering and security can work from the same evidence.

## Match usage to the applications that should have generated it

Start with the provider’s usage records for the affected period. Note the time zone, the affected project, the model and the credential identifier, if your provider exposes it. Compare the activity export with your application or gateway logs for the same period. Look for changes you can account for, such as a deployment, a backlog replay or a switch to a different model. Keep any provider request IDs that help tie the two sides together.

Document how complete your logs are. A gap in application telemetry can leave legitimate requests unaccounted for. If several applications use the same key, list them and their owners, and compare their recorded activity before treating a mismatch as confirmed abuse. An invoice helps establish the amount billed. The activity and application records help establish what happened.

## Preserve enough evidence to act on the right credential

Capture the relevant provider usage export, alert timestamp and project or key identifiers. Preserve the related gateway, application and secrets-management logs where available, along with the relevant changes to deployments and permissions. Record who collected each export and the time range it covers. Leave the secret value out of the incident ticket and any support request. If suspicious traffic is still running, start containment while someone else collects the records. See the guide to [preserving evidence before rebuilding](https://hacked.co.in/blog/preserve-evidence-before-you-rebuild/).

Work out what the affected credential could do. Some keys only call a model. Others can reach additional resources associated with a project. Review the key’s actual permissions and the provider's audit records before describing the incident as unauthorised consumption, access to stored data or both.

## Revoke the suspect key and check what keeps working

Have the application owner and the responder coordinate revocation and recovery. When active misuse is likely, revoke the suspect key promptly and restore necessary workloads with scoped replacements. Confirm that expected traffic succeeds on the replacement and that the old credential can no longer make requests. Check the provider records again for unexplained usage, allowing for the provider’s normal reporting delay. Where a leaked secret may have sat alongside other credentials, widen the review to those credentials as well.

Alerting can buy time. Check whether a spend threshold only sends a notification or actually stops requests, who receives the alert and whether they can reach someone authorised to revoke a credential. An organisation-wide block may also stop healthy applications, so agree when that trade-off is justified.

## Make the next alert easier to resolve

Give production workloads distinct, narrowly scoped credentials where the provider supports them. Keep a simple record of the application, its project, the key identifier, the owner and the person who can revoke it out of hours. During a drill, pick a workload and see whether the on-call team can trace activity to its owner and replace a test credential while a separate workload keeps running.

Carry the evidence, containment decisions and recovery checks into your [incident timeline](https://hacked.co.in/blog/first-72-hours-after-a-breach/). A closed investigation should explain which usage you could account for, which calls remain unexplained, what access was removed and how you verified recovery.

If this is happening now

## Preservation first, and the filing is due either way.

The acts that end an investigation are the ones somebody reaches for in the first ten minutes: power it off, restore over the top, re-image it, clean up the page. Tell us what you have found and what has already been touched, and you will get the containment order, the preservation steps and your filing position in writing. Security Brigade has been CERT-In empanelled since 2008 and works incidents 24/7.

[What happens when you call](https://hacked.co.in/what-happens-when-you-call/)

[Call the incident line: +91 22 4164 2220](tel:+912241642220)[The First 72 Hours](https://hacked.co.in/resources/first-72-hours-incident-pack/)[Describe the incident](https://hacked.co.in/contact/?service=incident-response)

## Continue reading

[All articles →](https://hacked.co.in/blog/)

[Ransomware recovery: the paths out, in the order they are triedData comes back one of four ways: a backup restore that has actually been verified, a free decryptor for the family you are really dealing with, forensic recovery of what survives on the disk, and last, only as a last resort, the ransom. Each one turns on a fact about your environment you can establish before you commit to it, and none of them is worth doing until the estate is clean.](https://hacked.co.in/blog/ransomware-recovery-paths-out/)[What ransomware negotiation actually looks likeThe sanctions question comes before the price question, and it decides whether there is anything to discuss at all. What a negotiation channel does, in the order it does it: who is on the other end under a ransomware-as-a-service model, why proof of decryption has to be run on files you choose, what a deletion promise is and is not, and why the six-hour CERT-In filing runs whatever is happening in the chat.](https://hacked.co.in/blog/what-ransomware-negotiation-looks-like/)[Which ransomware is this, and what the family name decidesYou know you are encrypted. You do not yet know by what, and the questions that follow are all questions about the family: whether a free decryptor already exists for it, whether its operator publishes stolen data, whether the group appears on a sanctions list. Three things the payload left on your screen name it, two free services will read them for you, and none of it needs a vendor or a tool you do not have.](https://hacked.co.in/blog/which-ransomware-is-this/)
