Skip to content

My ElevenLabs key leaked. What do I do?

Short answer

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

WhenDoHow
0–2 minDisableDisable the key in the dashboard, or call the Disable API key endpoint with api_key_name=self using the leaked key.
2–5 minReplaceCreate 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 minDeleteDelete the old key once nothing uses it.
7–10 minCheck usageReview 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_ or EXPO_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 .env or .git paths.

Check your live app

A free, read-only public-surface scan. It cannot diagnose private sessions or every cause described above.

Read-only. No writes or row contents.

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.

Sources

Related

Read as Markdown · Scan methodology