Best for · AI tools

ElevenLabs API keys: how to get one, how to lock it down, and what it costs to use

We read every plan page. Paid links are labelled. Money never changes a ranking. How we pick.

Verdict Our pick

The bar guide has a call.

The vectaai bar guide pointing at the verdict
  • a user key for testing, a service account key for anything live, never put either in browser or app code (use single-use tokens there), and set a credit limit on day one.

Compared here

  • 01User API key
  • 02Service account API key
  • 03Single-use token

Short answer

You create an ElevenLabs API key in your dashboard's personal API keys settings, then send it in the xi-api-key header on every request; the official SDKs and docs use the ELEVENLABS_API_KEY environment variable for it. There are two kinds: user API keys, which belong to you and need a Full Seat, and service account keys, which belong to the workspace and are meant for production. Every key can be limited by scope (which endpoints), credit quota, IP allowlist and, for user keys, an expiry from 15 minutes to 30 days.

The free API plan works with a key: 10,000 characters a month on the v4, v3 and Multilingual v2 models, per ElevenLabs' API pricing page. Use a user key for testing, a service account key for anything live, never put either in browser or app code (use single-use tokens there), and set a credit limit on day one.

Get ElevenLabsSee 1Password (store keys)See Bitwarden (store keys)

Sponsored links. We may earn a commission; it never changes the pick.

At a glance

From elevenlabs.io/docs (authentication and API keys pages) and elevenlabs.io/pricing/api, read 4 December 2026. US dollars, monthly billing.
User API keyService account API keySingle-use token
Belongs toOne personA workspace service accountA short session
Who can createUsers with a Full SeatWorkspace admins, multi-seat customersYour server, for certain endpoints
Best forPersonal projects, scripts, testingBackends, automation, productionBrowser or app clients
ExpiryOptional: 15 minutes to 30 days, or neverDoes not expireValid for a limited time
Survives staff changesNo, tied to the personYesn/a
Scopes, credit limit, IP allowlistYesYesn/a
Rotate via APINo, dashboardYes, create and delete endpointsn/a

Money first. ElevenLabs runs an affiliate program, and we link to it through /go/. The password manager links may earn us something too. None of that changes the how-to: every step below comes from ElevenLabs' own documentation, read on 4 December 2026.

Second, this is a guide, not a hands-on test. We read the authentication docs, the API keys admin docs and the API pricing page. Where they do not say something, such as the exact menu labels for scopes, we say so instead of guessing.

The 60-second version

  1. Sign in to ElevenLabs.
  2. Open your personal API keys settings in the dashboard.
  3. Create a key. Set an expiry, a credit limit, scopes and an IP allowlist if you can.
  4. Copy it into an environment variable called ELEVENLABS_API_KEY or into your password manager. You may not see it again.
  5. Send it in the xi-api-key header, or pass it to the SDK.

That is it. The rest of this page is about doing it so a leaked key does not cost you a month's budget overnight.

Two kinds of key, and which one you want

ElevenLabs' API keys documentation describes two types.

User API keys belong to one person and inherit that person's access to the workspace. Good for personal projects, scripts and testing. The docs warn: "Because they are tied to a person, a user API key is affected if that user's access changes." And: "Creating personal API keys requires a Full Seat." If you are on a team and the create button is missing, that is probably why.

Service account API keys belong to a workspace service account. They keep working when people join or leave and do not expire. ElevenLabs recommends them for backends, automation and production. They are available to multi-seat customers and managed by workspace admins, under Workspace settings, Service Accounts, or through the API.

The rule of thumb: build with a user key, ship with a service account key. If your live product runs on a developer's personal key, it breaks the day that developer leaves.

How to use the key in code

From ElevenLabs' authentication docs: "All API requests should include your API key in an xi-api-key HTTP header."

With curl:

curl 'https://api.elevenlabs.io/v1/models' \
  -H 'Content-Type: application/json' \
  -H "xi-api-key: $ELEVENLABS_API_KEY"

With the Python SDK:

import os
from elevenlabs.client import ElevenLabs

elevenlabs = ElevenLabs(api_key=os.environ["ELEVENLABS_API_KEY"])

With the JavaScript SDK:

import { ElevenLabsClient } from "@elevenlabs/elevenlabs-js";

const elevenlabs = new ElevenLabsClient({
  apiKey: process.env.ELEVENLABS_API_KEY,
});

The docs' own examples write 'YOUR_API_KEY' directly in the code. Fine for a demo, a bad habit for anything else. Reading from an environment variable keeps the key out of your repository, which is where most leaks start.

Lock the key down: four settings worth two minutes

The docs list four restrictions. Use all of them you can.

  1. Scopes. Limit which API endpoints the key can call. A key that only needs text to speech should not be able to clone voices or manage the workspace. The docs do not detail the scope menu, so check what your dashboard offers.
  2. Credit quota. Set a custom credit limit per key. This is the single best protection against a surprise bill. A leaked key with a small cap is an annoyance, not a disaster.
  3. IP allowlisting. Only accept requests from your server's addresses. Others get a 403 error. Each key takes 1 to 100 entries: IPv4, IPv6 or CIDR ranges. Private ranges are not accepted.
  4. Expiry (user keys only). Pick from 15 minutes to 30 days, or keep the default of never. Expired keys get a 401 error. You can extend or clear the expiry before it lapses.

For a hobby project, a credit limit and a 30-day expiry already put you ahead of most people.

Browser and mobile apps: use single-use tokens

The docs are clear: "Remember that your API key is a secret." Do not put it in code that runs in a browser or an app, because anyone can open the developer tools or unpack the app and read it.

For those cases ElevenLabs offers single-use tokens for certain endpoints. Your server, which holds the real key, asks for a short-lived token and passes it to the client. The client connects with the token. The key never leaves your server. If you are building a voice agent in a web page or a React Native app, this is the pattern. Our ElevenLabs React Native SDK page covers the mobile side.

Rotating and revoking keys

From the API keys docs:

  • Rotate: create a new key, switch your apps to it, then delete the old one. The docs advise you to "copy the permissions from the old key to the new one" so nothing breaks.
  • Service accounts: create the replacement under the same account, in the dashboard or with the create and delete endpoints. Handy for automated rotation.
  • Revoke in a hurry: a key holder can disable a compromised key with the Disable API key endpoint, passing api_key_name=self as confirmation.

Rotate on a schedule, and always when someone with access leaves.

If a key leaks

ElevenLabs is part of GitHub's secret scanning partner program. A key committed to a public repository is automatically disabled, with the disable_reason set to exposed_publicly, and the workspace owner and key owner get an email. This is on by default for non-Enterprise plans and off by default for Enterprise, and admins can change it per key or for the whole workspace.

If you got that email, our ElevenLabs API key leaked page has the ten-minute fix. The short version: new key, update apps, delete old key, check usage.

What using the API costs

The key is free. The characters are not. From the API pricing page, in US dollars a month:

PlanPricev4, v3, Multilingual v2 charactersTurbo-class charactersConcurrent calls
Free$010,00020,0004
Starter$6 (first month $1)75,000150,0006
Creator$22 (first month $11)275,000550,00010
Pro$991,238,0002,475,00020
Scale$2993,738,0007,475,00030
Business$99012,375,00024,750,00040

Beyond your allowance, the page lists $0.08 per 1,000 characters on Eleven v4, v3 and Multilingual v2, and $0.04 on the Turbo, Flash and v3 Conversational models. The concurrency numbers are for Speech Engine and Realtime calls. On Free, Voice Library voices cannot be used through the API.

The page did not label each row with its plan name in the text we read, so we matched rows by order and the Free figures in its FAQ. Check the live page before you budget. Our ElevenLabs pricing and ElevenLabs credits pages explain how characters and credits map to the app plans.

Where to keep the key

  • On your laptop: an environment variable loaded from a local file that is listed in .gitignore, or a password manager's command-line tool.
  • On a server: your host's secrets manager or environment settings.
  • Shared with a team: a team password manager vault, not a chat message.
  • Never: in the repository, in a screenshot, in a support ticket, or in a prompt to an AI assistant.

Using ElevenLabs from an AI tool? Our ElevenLabs MCP server guide shows where the key goes in that setup.

Checklist

  • User key for testing, service account key for production.
  • Credit limit set on every key.
  • Scopes limited to the endpoints you use.
  • IP allowlist on server keys.
  • Expiry on personal keys.
  • Key in an environment variable, not in code.
  • Single-use tokens for browser and app clients.
  • Rotation when people leave.

More voice AI guides live in the AI tools hub.

Questions people ask

How do I get an ElevenLabs API key?

Sign in to ElevenLabs, open your personal API keys settings in the dashboard, and create a new key, optionally with an expiry, scopes, a credit limit and an IP allowlist. Copy it straight into your environment or password manager. ElevenLabs' docs say creating personal API keys requires a Full Seat in the workspace.

Is the ElevenLabs API free?

There is a free API plan. ElevenLabs' API pricing page lists 10,000 characters a month on Eleven v4, v3 and Multilingual v2, or 20,000 on Turbo-class models, with 4 concurrent Speech Engine and Realtime calls. Voice Library voices cannot be used through the API on Free. Paid API plans start at $6 a month.

Where do I put the ElevenLabs API key in my code?

Send it in the xi-api-key HTTP header, or pass it to the Python or JavaScript SDK client. The docs' examples use an ELEVENLABS_API_KEY environment variable, which keeps the key out of your source code. Never paste it into code that runs in a browser or mobile app. ElevenLabs says to use single-use tokens there.

What happens if my ElevenLabs API key leaks on GitHub?

ElevenLabs is part of GitHub's secret scanning partner program, so a key pushed to a public repository is automatically disabled with the reason exposed_publicly, and the workspace owner and key owner get an email. Create a new key, update your apps, delete the old one, and check your usage for anything you did not run.

What is the difference between a user key and a service account key?

A user API key belongs to one person and inherits their access, so it breaks if that person leaves or loses access. A service account key belongs to the workspace, does not expire, and keeps working through staff changes. ElevenLabs recommends service account keys for backends, automation and production workloads.

Sources

Every fact above comes from these pages. Prices change, so each one carries the date we read it.

  1. ElevenLabs docs: Authentication, checked 4 Dec 2026
  2. ElevenLabs docs: API keys (workspaces administration), checked 4 Dec 2026
  3. ElevenLabs API pricing, checked 4 Dec 2026