Inference Key Abuse Detection & Spend Caps Kit

Stolen AI provider keys get used to run someone else's workload on your bill. This kit gives an Oct 21 response section (Railway's provider-specific guidance), a per-provider revoke-and-review checklist, a key register with owners, expected models and caps, a spend-cap policy, and key_abuse_check.py, which reads your usage export and flags spikes, unexpected models or IPs, cap breaches and keys still active after a possible exposure. Never needs a key value. Includes a per-bot guide (Grok Bot, OpenClaw, ChatGPT, Claude, Cursor, n8n, Manus; Instinct, Muse and Dot marked unverified). v2: --afk-json output and module.json plug into the Agent Cyber Defense Dashboard.

Doc / CSV / Python script (ZIP + PDF)Stolen AI provider keys get used to run someone else's workload on your bill. This kit gives an Oct 21 response section (Railway's provider-specific guidance), a per-provider revoke-and-review checklist, a key register with owners, expected models and caps, a spend-cap policy, and key_abuse_check.py, which reads your usage export and flags spikes, unexpected models or IPs, cap breaches and keys still active after a possible exposure. Never needs a key value. Includes a per-bot guide (Grok Bot, OpenClaw, ChatGPT, Claude, Cursor, n8n, Manus; Instinct, Muse and Dot marked unverified). v2: --afk-json output and module.json plug into the Agent Cyber Defense Dashboard.

Inference Key Abuse Detection & Spend Caps Kit results tile highlighted in the Agent Cyber Defense Dashboard (sample walkthrough data)
Sample walkthrough data · Agent Cyber Defense Dashboard

What's inside

Verify it works

  1. python3 key_abuse_check.py --selftest prints selftest ok.
  2. python3 key_abuse_check.py usage_example.csv --register key_register.csv --exposed-since 2026-10-21 flags the example spike, unexpected model and unrevoked key, and exits 1.
  3. Export daily usage per key from each provider console into the same columns (key ids or names only, never key values) and fill in your register.
  4. Set the caps in 02 at each provider, mark provider_cap_set=yes, re-run until it exits 0.
  5. Dashboard: add --afk-json to any command above and save the output as results/inference-keys.json; load it in the Agent Cyber Defense Dashboard. Python 3.9+, no installs. Read-only: nothing is changed, sent or uploaded.

Oct 2026 update (section 04)

Preview

First part of the main document, shown as-is:

Oct 21 incident response: AI provider keys

Facts we rely on (Oct 21, 2026; wording follows the sources)

Steps for each provider key that lived in Railway, a LiteLLM proxy, or a host that ran litellm 1.107.0

  1. Disable or delete the key at the provider (not just in the host's dashboard). Railway's xAI guide notes disabling is reversible and keeps usage history, which helps the review. (https://blog.railway.com/p/security-disclosure-recommendation-check-for-unexpected-grok-usage)
  2. Check Admin keys too. Railway's Anthropic guide says to delete any Admin API key that may also have been exposed. (https://blog.railway.com/p/security-disclosure-recommendation-check-for-unexpected-anthropic-usage)
  3. Create the replacement scoped as narrowly as the provider allows (one workspace/team, one project), and deploy it. Confirm successful requests.
  4. Review usage from Oct 21 onward: requests, cost, models and, where available, source. Compare with your normal day. Use the kit script on the export.
  5. Set spend and rate limits now at each provider (policy 02) so a future leak has a ceiling.
  6. LiteLLM proxy users: rotate every provider key stored in the proxy DB plus master and virtual keys, per LiteLLM's notice. (https://docs.litellm.ai/blog/security-incident-oct-21-2026)
  7. If you see usage you didn't make, contact the provider's support with dates and key ids, and keep exports for your records.

← All kits