apicheats.dev elevenlabs/llms.txt Raw .md
POST

/v1/service-accounts/{service_account_user_id}/api-keys

ElevenLabs API

Create Service Account Api Key

Base URL
https://api.elevenlabs.io
Auth
xi-api-key: <ELEVENLABS_API_KEY>
Last verified
2026-09-03 · upstream hash matched
Actions
Agents: curl -H "Accept: text/markdown" this URL
→ 207 tokens · Vary: Accept

Critical gotchas

Authentication uses the non-standard xi-api-key header, not Authorization: Bearer. Sending a Bearer token returns HTTP 401.

Text-to-speech responses are raw binary audio, not JSON. Write the body to a file (--output speech.mp3) rather than parsing it.

cURL

curl -X POST 'https://api.elevenlabs.io/v1/service-accounts/service-account-user-id/api-keys' \  -H "xi-api-key: $ELEVENLABS_API_KEY" \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "permissions": [    "text_to_speech"  ],  "character_limit": 0,  "allowed_ips": [    "string"  ],  "third_party_disable_allowed": true}'
Get a free ElevenLabs API key → sponsored

Parameters

Name In Type Required Description
service_account_user_id path string Yes path parameter service_account_user_id.
name body string Yes Request body field name.
permissions body string[] Yes The permissions of the XI API.
character_limit body integer No The character limit of the XI API key. If provided this will limit the usage of this api key to n characters per month where n is the chosen value. Requests that incur charges will fail after reaching this monthly limit.
allowed_ips body string[] No List of IP addresses or CIDR ranges allowed to use this API key. Each entry may be a CIDR range (e.g. '10.0.0.0/24') or a bare IP address (normalized to /32 or /128). On create, omit or pass null to allow all IPs. On update, omit to leave the allowlist unchanged, or pass "clear" to remove it.
third_party_disable_allowed body boolean No Whether the holder of this key may disable it via the self-disable endpoint. On create, omit or pass null to use the workspace's default (enabled for non-Enterprise plans, disabled for Enterprise plans). On update, omit to leave it unchanged, or pass "clear" to reset it to the workspace default. Only honored for workspaces with self-disable access enabled.

Response 200 OK

{
  "xi-api-key": "string",
  "key_id": "string"
}