Nexus Void AI Research
LLM API key, API key security, LLMjacking, incident response, OpenAI, Anthropic, Gemini, AWS Bedrock, secrets management
LLM API Key Compromised? The 2026 Response Checklist
LLM API key compromised? A step-by-step checklist for OpenAI, Anthropic, Gemini and Bedrock: revoke, cap spend, investigate, recover costs, prevent.
If your LLM API key is compromised, work in this order: delete or deactivate the key at the provider, set a hard spend limit before anything else, rotate every secret stored next to it, and remove keys the attacker created. Then date the leak, find how it escaped, and ask billing support for a review.
Last updated 1 December 2026.
This is the working checklist for OpenAI, Anthropic, Google Gemini and AWS Bedrock keys. For the generic runbook that covers any leaked secret, see what to do when an API key leaks. For background on why attackers want AI keys, read what is LLMjacking.
What should you do in the first 15 minutes?
Contain the damage before you investigate. Kill the stolen key at every provider it touches, put a hard spend cap on each account, and rotate every secret that lived beside it. A clean root cause can wait an hour; a live key with no cap cannot.
How fast? Google's threat intelligence team saw one actor make more than 500,000 LLM API calls in under eight hours, and individual incidents pass $100,000 in a single day (GTIG, 3 November 2026).
Delete the Anthropic key. Claude Console, API keys page, the three-dot menu next to the key, then Delete API key. Anthropic says to check every workspace (Anthropic support).
Delete the OpenAI key. Select the trash icon next to it on the API keys page at platform.openai.com/api-keys (OpenAI help).
Replace and disable the Gemini key. Google's order is create a replacement, deploy it, then disable the old key (Gemini API key docs). Keys made in the Cloud console live on the Credentials page (Google Cloud docs).
Deactivate the Bedrock key. Bedrock console, API keys, select the key, Actions, then Deactivate, Reset or Delete. Short-term keys are invalidated by ending the session that made them, or by denying
bedrock:CallWithBearerToken(AWS docs).Set hard spend limits now. Anthropic: Settings, Spend limits, per workspace (docs). OpenAI: Project settings, Limits, turn on Enforce a hard limit (docs). AI Studio: the Spend page cap. Budget alerts alone stop nothing, and that applies to every provider.
Rotate everything stored next to it. If the key came out of a vault or env file, assume every other secret there is out too: other API keys, database credentials, service account keys.
Revoke what the attacker created. GTIG saw attackers enable AI services the victim never used and mint their own API keys. Re-list keys in every Anthropic workspace and OpenAI project, run
gcloud services api-keys list, and check CloudTrail forCreateUserandCreateServiceSpecificCredential, since Bedrock long-term keys are IAM users.
What should you investigate in the first 24 hours?
Find when the abuse started and how the key got out. The first spike in provider usage gives you a date. Compare it with deploys, commits and secret-access logs. Skip this and the replacement key sits in the same leaky place as the old one.
Date the leak from provider usage. Anthropic: the Usage and Logs pages in the Claude Console (Anthropic). OpenAI: the Usage page. AI Studio: Dashboard, Usage. AWS: Cost Explorer, which AWS says is available 24 hours after you enable it, so turn it on now (AWS docs).
Look for unfamiliar models and tiny calls. GTIG saw actors test stolen keys with
max_tokens=1requests that slip under alerts.Check secret-access and cloud audit logs. On Google Cloud, reads of a secret are Data Access audit logs, which are off by default for most services (Cloud Logging docs). If they were off, there is no history; turn them on now. On AWS, CloudTrail logs Bedrock API calls, though the key itself is not logged.
Find the leak path. Keys escape through git history, frontend bundles, logs, Docker layers, CI and over-broad IAM. Our breakdown of how an API key leaks from a secret manager has a check for each of nine paths.
Save the evidence. Export usage graphs, first and last abusive timestamps, key IDs and the revocation time before you open a billing case.
How do you find every other exposed key?
Assume the stolen key was not the only one. Search all of them, find every place your code talks to an LLM provider, and check whether each key you find still works. One leak usually means the habit behind it shows up elsewhere too.
Run a free ARGUS scan across every repo. It finds secrets in code (built on gitleaks), marks each one live, rotated or test, flags every place your code calls OpenAI, Anthropic or other LLM providers, and opens a verified fix pull request that you review and merge. Start a free scan. It does not watch your provider bills; that stays with the usage pages above.
Search history and bundles by hand too. Our guides to finding hardcoded secrets and removing secrets from git history walk through it.
Audit every Google API key in Gemini projects. In February 2026, researchers at Truffle Security found 2,863 live Google API keys in public web pages that could call Gemini once the Generative Language API was enabled in the project (The Hacker News). Our Gemini API key security guide covers the audit.
Can you get the burned credits back?
Sometimes, but plan as if the charges are yours. No provider we checked publishes a refund promise for stolen API keys. Each has a route for unauthorized charges, and a case with clean evidence and proof of fixes gets the fairest review.
OpenAI. OpenAI says its team can investigate and review refund eligibility, but unauthorized charges must be validated before a refund, and the security steps must be completed first. Fraud goes through its fraudulent activity webform (OpenAI help).
Anthropic. Anthropic's compromised-key article says to contact its Support team if suspicious activity continues (Anthropic support). It says nothing about refunds.
Google (AI Studio and Cloud). A Billing Account Administrator opens Help and support, Billing, then Get billing support (Google Cloud docs). Google reviews compromise cases on an individual basis (Cloud Billing docs). Prepay Gemini credits are not refundable except when switching account types (Gemini billing docs).
AWS. Support Center, Create case, Account and billing support. AWS says all account owners get account and billing support free of charge (AWS docs).
Our read: a founder told us this week that about $700 of Anthropic and Gemini credits were burned. That founder was lucky on scale, not on controls. The same leak with no cap sits one bad weekend away from the GTIG numbers.
How do you prevent the next compromised key?
Assume another key will leak and make it cheap when it does. Split keys so one leak hits one service, cap spend at the smallest scope each provider offers, restrict what keys can call, prefer short-lived credentials, and stop secrets at the pull request before they reach main.
One key per service and environment. Anthropic recommends separate keys for development, testing and production (Anthropic). Revoke one without an outage.
Spend caps per provider. Anthropic usage tiers carry monthly caps of $500 on Start and $1,000 on Build; set your own limit lower (Anthropic docs). Gemini Tier 1 caps at $250 a month and Tier 2 at $2,000 (Gemini billing docs).
Restrict Gemini keys. Google's docs say unrestricted API keys are insecure (Google Cloud docs). Allow only the Gemini API and your servers' IP addresses. OpenAI also supports key expiry dates and IP allowlists (OpenAI help).
Use short-lived credentials on Bedrock. AWS says long-term Bedrock keys are for exploration only; short-term keys last up to 12 hours (AWS docs). AWS Budgets actions can apply an IAM policy or SCP when a threshold is crossed (AWS docs).
Gate every pull request. ARGUS PR Reviewer checks every PR for secrets and can block the merge. See also securing a GitHub Actions pipeline.
Route model calls through one gateway. A server-side AI gateway holds the provider keys, enforces quotas and keeps keys out of browsers and laptops. See OWASP's Secrets Management Cheat Sheet.
Where are the controls for each provider?
Each provider puts the kill switch, spend cap, usage view and billing contact in a different place. Every cell comes from the provider's own documentation, checked on 1 December 2026; where we found nothing, it says so. Bookmark it before you need it.
Provider | Disable key | Set spend cap | Where to see usage | Billing support |
|---|---|---|---|---|
Anthropic | Claude Console, API keys, three-dot menu, Delete API key (check every workspace) | Settings, Spend limits, per workspace and organization | Usage and Logs pages in the Claude Console | Contact Anthropic Support; refund policy not documented |
OpenAI | API keys page, trash icon next to the key | Project settings, Limits, Enforce a hard limit | Usage page (platform.openai.com/usage) | Support or fraud webform; refund only after validation |
Google Gemini (AI Studio) | Create replacement, deploy, then disable the old key | Spend page project cap (experimental) plus tier caps | Dashboard, Usage | Help and support, Billing, Get billing support; reviewed individually |
Google Cloud (Gemini keys) | Credentials page (console.cloud.google.com/apis/credentials) | Alerts-only budgets do not cap; Pub/Sub budget notification can disable billing | Cloud Billing reports; Data Access audit logs (off by default) | Same Cloud Billing support case |
AWS Bedrock | Bedrock console, API keys, Actions, Deactivate; short-term: end session or deny CallWithBearerToken | Per-key dollar cap not documented; AWS Budgets actions apply IAM policy or SCP | Cost Explorer; CloudTrail for API calls | Support Center, Account and billing support, free |
Frequently asked questions
What should I do first if my LLM API key is compromised?
Delete or deactivate the key at the provider, then set a hard spend limit on the account or project before you investigate. Create the replacement key only after the limit is on. Then rotate every other secret that was stored or used alongside the stolen key.
My OpenAI API key was stolen. What should I do?
Delete it with the trash icon on the API keys page, check the Usage page for activity you did not make, and turn on a hard project spend limit. If you see charges you do not recognise, contact OpenAI support. OpenAI says unauthorized charges must be validated before any refund.
My Anthropic API key was compromised. What should I do?
Delete it from the API keys page in the Claude Console, checking every workspace. Set a workspace spend limit under Settings, review the Usage and Logs pages to date the abuse, and contact Anthropic Support if suspicious activity continues. Anthropic does not publish a refund policy for stolen keys.
My Gemini API key was compromised. What should I do?
Create a replacement key, deploy it, then disable the old one, as Google advises. Check usage in AI Studio, re-list every API key in the project, and set a spend cap. For unauthorized charges, a Billing Account Administrator can open a Cloud Billing support case.
Will the provider refund credits used with my stolen key?
Maybe, but none of the four providers promises it. OpenAI reviews refund eligibility after validation, Google reviews compromise cases individually, AWS takes billing appeals through Support, and Anthropic asks you to contact Support. Send timestamps, usage exports and the fixes you made.
Is rotating the API key enough?
No. Rotation stops the stolen copy, but the new key leaks the same way if the cause is still there. Rotate everything stored next to it, remove keys the attacker created, find the leak path, and cap spend per project.
Can a secret scanner tell me if my key is being abused?
No. A secret scanner finds keys in code and tells you whether they are live, but it does not watch provider bills. Use the provider's usage pages and spend limits for abuse, and a scanner to find where keys leak.
How do I stop the next LLM API key from being stolen?
Give each service its own key, set a hard spend limit for each project or workspace, restrict Gemini keys to the Gemini API, use short-term credentials on Bedrock, scan every pull request for secrets, and route model calls through one server-side gateway.
Related reading
Find the next leaked key before an attacker does. ARGUS scans every repo for secrets and marks each one live, rotated or test, maps every place your code calls an LLM provider, and blocks risky pull requests at merge. It does not watch your provider bill, so keep the spend caps above. 50 teams use ARGUS today. Free plan; Pro is $49/month and Team $199/month with unlimited seats. Start a free ARGUS scan or read how ARGUS works.
DATA SOURCES
Google Threat Intelligence Group, LLMjacking (3 Nov 2026): https://cloud.google.com/blog/topics/threat-intelligence/llmjacking-monetizing-compromised-cloud-models; The Hacker News, public Google Cloud API keys with Gemini access (28 Feb 2026): https://thehackernews.com/2026/02/thousands-of-public-google-cloud-api.html; Anthropic Support, Suspected compromised API key: https://support.claude.com/en/articles/8384961-what-should-i-do-if-i-suspect-my-api-key-has-been-compromised; Anthropic Support, API key best practices: https://support.claude.com/en/articles/9767949-api-key-best-practices-keeping-your-keys-safe-and-secure; Anthropic, Rate limits and spend limits: https://platform.claude.com/docs/en/api/rate-limits; OpenAI Help, Best practices for API key safety: https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety; OpenAI, Spend limits: https://developers.openai.com/api/docs/guides/spend-limits; OpenAI Help, Charges you don't recognize: https://help.openai.com/en/articles/7242625-what-do-i-do-if-i-see-a-charge-i-don-t-recognize; Google AI Studio, Gemini API keys: https://aistudio.google.com/docs/api-key; Google AI Studio, Billing: https://aistudio.google.com/docs/billing; Google Cloud, Manage API keys: https://docs.cloud.google.com/docs/authentication/api-keys; Google Cloud, Budgets: https://docs.cloud.google.com/billing/docs/how-to/budgets; Google Cloud, Resolve Cloud Billing issues: https://docs.cloud.google.com/billing/docs/how-to/resolve-issues; Google Cloud, Get billing support: https://docs.cloud.google.com/support/docs/get-billing-support; Google Cloud, Data Access audit logs: https://docs.cloud.google.com/logging/docs/audit/configure-data-access; AWS, Amazon Bedrock API keys: https://docs.aws.amazon.com/bedrock/latest/userguide/api-keys.html; AWS, Budget actions: https://docs.aws.amazon.com/cost-management/latest/userguide/budgets-controls.html; AWS, Getting help with your bills: https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-get-answers.html; OWASP, Secrets Management Cheat Sheet: https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html