Leaked AssemblyAI API key? What to do now
Revoke it first, then check what it was used for, cap what your keys can spend and clean up where it leaked. Every AssemblyAI step below comes from AssemblyAI's own docs, checked 21 Nov 2026.
Free. No sign-up.
Most leaked AI keys start as a call made from the browser. The template keeps every AI call on your server and records what each user spends. Buy the template →
What to do now, for AssemblyAI
Get a new AssemblyAI API key
Create a new key in the AssemblyAI dashboard, under Workspace, Manage, API Keys in the sidebar, so your app has one to switch to the moment the leaked key stops working. Then revoke the leaked one straight away, in the next step.
Revoke the key now
Create a new key first, because a project can't lose its last key. Then, under Workspace, Manage, API Keys, click Delete on the leaked key and confirm. This can't be undone. Do this straight after: until it's revoked, anyone who copied it can keep spending. GitHub has no pattern for AssemblyAI keys, and AssemblyAI's docs don't say it scans for leaked keys, so don't expect a warning about one in a public repo.
Keep the new key on the server
Put the new key only in a server-side secret: your host's environment settings, your builder's secrets, or Supabase function secrets. Never in a variable starting NEXT_PUBLIC_, VITE_ or EXPO_PUBLIC_, which are sent to every visitor.
Check usage for charges that weren't yours
The Cost and Usage pages, under Workspace, Manage, can break spend and usage down by API key. They update every 2 minutes, and a streaming session only shows once it's closed. Note the time the key leaked and the time you revoked it.
Cap what any key can spend
AssemblyAI is prepaid: API access pauses when the balance reaches $0, unless auto-pay is on. Streaming sessions that aren't closed properly can push the balance below zero. Alerts under Workspace, Settings, Alerts only notify you. AssemblyAI's docs describe no spend limit setting, so keep auto-pay off or the balance small.
Clean up the repo, after revoking
Remove the key from the code and the git history, but only once it's revoked: anyone who cloned the repo, or a fork, still has it. GitHub's push protection doesn't block AssemblyAI keys, so it won't stop the next one: keep the new key in a .env file that's listed in .gitignore.
If someone ran up charges, ask for them back
Email support@assemblyai.com. AssemblyAI's terms make you responsible for all use under your account, ask you to report unauthorised use promptly, and say paid fees aren't refundable. Say when the key leaked, when you revoked it and which usage wasn't yours.
Checked in AssemblyAI's own docs. Sources: account management, billing and pricing, terms of service. Dashboards move, so if a link is out of date, look for the same setting under account or organisation settings.
Then find every other copy, with your coding agent
Find every place an API key or other secret is exposed in this project, and fix it. Search the code, env files, config and local settings files (such as .claude/settings.local.json), the full git history (with gitleaks or a similar scanner) and the built browser bundle. Flag any secret in a variable with a public prefix such as NEXT_PUBLIC_, VITE_ or EXPO_PUBLIC_, and any AI provider called from browser code. Move every AI call into a server route or function that reads its key from a server-only variable, add .env and local settings files to .gitignore, and list each key that was exposed and where, so I can revoke it. Don't rewrite git history.
Questions
Does AssemblyAI disable a leaked key for you?
GitHub has no pattern for AssemblyAI keys, and AssemblyAI's docs don't say it scans for leaked keys, so don't expect a warning about one in a public repo. Revoke it yourself either way.
Can I cap what an AssemblyAI key spends?
AssemblyAI is prepaid: API access pauses when the balance reaches $0, unless auto-pay is on. Streaming sessions that aren't closed properly can push the balance below zero. Alerts under Workspace, Settings, Alerts only notify you. AssemblyAI's docs describe no spend limit setting, so keep auto-pay off or the balance small.
How do I see what a leaked AssemblyAI key was used for?
The Cost and Usage pages, under Workspace, Manage, can break spend and usage down by API key. They update every 2 minutes, and a streaming session only shows once it's closed.
Will AssemblyAI refund charges from a leaked key?
Email support@assemblyai.com. AssemblyAI's terms make you responsible for all use under your account, ask you to report unauthorised use promptly, and say paid fees aren't refundable.
How do I find where my AssemblyAI key leaked?
Search your code, your git history and your live site's JavaScript for the first few characters of the old key. Common places are browser code, a committed .env or local settings file, and screenshots.
Other providers
- Leaked OpenAI key
- Leaked Anthropic key
- Leaked Google Gemini key
- Leaked xAI key
- Leaked Mistral key
- Leaked DeepSeek key
- Leaked OpenRouter key
- Leaked ElevenLabs key
- Leaked Replicate key
- Leaked fal key
- Leaked Groq key
- Leaked Together AI key
- Leaked Hugging Face key
- Leaked Perplexity key
- Leaked Cohere key
- Leaked Fireworks AI key
- Leaked Cerebras key
- Leaked Pinecone key
- Leaked Moonshot AI key
- Which providers stop a leaked key for you
- Security checklist for vibe-coded apps