My ElevenLabs key leaked. What do I do?
Disable the leaked key, create a replacement with the same permissions, switch your server to it, then delete the old key. ElevenLabs auto-disables keys that GitHub secret scanning finds in public repos (reason exposed_publicly) and emails the owners. Keys leaked anywhere else stay live until you act. Add a credit quota and IP allowlist to the new key.
Last updated 2026-11-25 · Reviewed by ProofForge
Is it this key?
Format: sk_
Blast radius: Generate audio on your workspace's credits, and reach whatever endpoints the key's scope allows (voices, history).
The first 10 minutes
| When | Do | How |
|---|---|---|
| 0–2 min | Disable | Disable the key in the dashboard, or call the Disable API key endpoint with api_key_name=self using the leaked key. |
| 2–5 min | Replace | Create a new key and copy the old key's permissions. Add a credit quota and IP allowlist. Set ELEVENLABS_API_KEY on the server and redeploy. |
| 5–7 min | Delete | Delete the old key once nothing uses it. |
| 7–10 min | Check usage | Review usage and history for generations you didn't make. Remove the key from client code and git history. |
Stop the next leak
- Keep the key in a server-side env var. Never use a
VITE_,NEXT_PUBLIC_orEXPO_PUBLIC_variable or hard-code it in frontend code. - Call the provider from your backend or an edge function, and add
.env*to.gitignore. - Re-scan the live site after every deploy. Keys also leak through JS bundles, source maps and exposed
.envor.gitpaths.
Check your live app
A free, read-only public-surface scan. It cannot diagnose private sessions or every cause described above.
FAQ
Will ElevenLabs catch a GitHub leak?
Yes. It's a GitHub secret scanning partner, and keys found in public repos are auto-disabled unless third-party disabling is turned off for the key (the default on Enterprise plans).
Can I restrict a key?
Yes: scope restriction, a credit quota, and an IP allowlist.
Can I call ElevenLabs from the browser?
Not with your API key. Use a server route.