ElevenLabs

ElevenLabs API

Generate and stream lifelike speech, transcribe audio with Scribe, create sound effects, re-voice recordings and track usage.

AI & machine learningGuided#text-to-speech#speech-to-text#voice#audio#sound-effects#streaming

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

The ElevenLabs API turns text into natural speech in thousands of voices, transcribes audio and video, generates sound effects from a description and re-voices recordings (Voice Changer). This guided collection covers the requests you need first: picking a model and a voice, generating and streaming speech, transcribing, and managing your usage and history.

Get an API key

  1. Create an account or sign in at elevenlabs.io.
  2. Open Settings > API keys and create a key. You can restrict it to certain endpoints, give it a credit quota, an expiry and an IP allowlist; for this collection allow at least Text to Speech, Speech to Text, Sound Effects, Voices, Models, User and History.
  3. Copy the key (it is shown once) into the apiKey variable, which is marked secret.

Workspaces can also create service account keys under Workspace settings > Service Accounts, which are better for servers than a personal key.

Authentication and base URL

Every request sends the key in the xi-api-key header; this collection sets it at collection level. Base URL: https://api.elevenlabs.io, with endpoints under /v1 (voice listing uses /v2/voices). Text-to-speech and Voice Changer responses are raw audio bytes; the timestamp variants return JSON with base64 audio.

Models (checked 2026-11-17)

  • eleven_v4: highest quality and expressiveness, 90+ languages (the modelId variable).
  • eleven_flash_v2_5: low latency and lower price per character, for real-time use (the fastModelId variable).
  • eleven_multilingual_v2: stable long-form narration; still the API default when you omit model_id.
  • Speech to text: scribe_v3 (current); scribe_v1 is deprecated.
  • Sound effects: eleven_text_to_sound_v3; v2 is deprecated and removed on 1 March 2027.
  • Voice Changer: eleven_multilingual_sts_v2.

eleven_turbo_v2_5 and eleven_turbo_v2 are deprecated in favour of the Flash models. Always set model_id explicitly. The full list with limits is on the models page, or call List models.

Using this collection

  1. Fill apiKey, then run folder 1 to confirm the key and see your quota.
  2. Run List voices in folder 2: it saves the first voice to voiceId (or paste your own voice ID).
  3. Run folder 3 for speech, folder 4 to transcribe (attach a file, or use the URL variant), folder 5 for sound effects and Voice Changer.
  4. Folder 6 lists what you generated and downloads it again; List history fills historyItemId.

Limits and pricing

Usage is measured in credits (characters for speech, time for transcription) against your plan's monthly allowance, and each plan caps concurrent requests. Some output formats (192 kbps MP3, 44.1 kHz PCM/WAV) need higher plans. See pricing and check your remaining quota with Get subscription.

Common errors

Errors come back as JSON with a detail object (type, code, message, request_id).

StatusMeaningWhat to do
400Bad input, e.g. text too long for the modelShorten the text or pick a model with a larger limit.
401Missing or invalid xi-api-key, or quota used upCheck the key; check credits with Get subscription.
403Key not allowed (endpoint scope, IP allowlist) or feature not on your planEdit the key's permissions or upgrade.
404Unknown voice, model or history itemRe-list voices or history to get a valid ID.
422Validation errorFix the field named in detail.
429Too many concurrent requests or system busyQueue requests and retry with backoff.

Docs: API reference, authentication, streaming, changelog.

Endpoints 17

1. Start here: account and models

  • GETList models/v1/modelsLists every model your key can use, with what each one can do. When: first, to check the key, and whenever you choose a model_id. What comes back: an array of…
  • GETGet subscription and usage/v1/user/subscriptionShows your plan and how much of this period's quota is used. When: before a large job, or when calls start failing with quota errors. What comes back: tier,…
  • GETGet user/v1/userReturns the account that owns the key, with its subscription embedded. What comes back: user_id, first_name, workspace_id, created_at, seat_type,…

2. Voices

  • GETList voices/v2/voicesSearches and pages through the voices available to you: premade voices, your clones and designed voices, and voices you saved from the library. What comes…
  • GETGet a voice/v1/voices/{{voiceId}}Returns one voice's full metadata by ID. When: to show a voice's details, check its default settings, or confirm a stored ID still exists. What comes back:…

3. Text to speech

  • POSTCreate speech/v1/text-to-speech/{{voiceId}}Generates the whole audio file for a piece of text and returns it in one response. When: pre-rendered audio such as narration, notifications or voice-overs.…
  • POSTStream speech/v1/text-to-speech/{{voiceId}}/streamSame as Create speech, but the audio arrives in chunks (HTTP chunked transfer) while it is being generated, so playback can start almost immediately. When:…
  • POSTCreate speech with timestamps/v1/text-to-speech/{{voiceId}}/with-timestampsGenerates speech and also returns when each character is spoken. When: subtitles, word highlighting, lip-sync. Body: the same fields as Create speech. What…
  • POSTStream speech with timestamps/v1/text-to-speech/{{voiceId}}/stream/with-timestampsStreams a sequence of JSON objects as the audio is generated, each with an audio_base64 chunk and the alignment for the characters it covers. When: real-time…

4. Speech to text

  • POSTTranscribe a file/v1/speech-to-textUploads an audio or video file and returns the transcript. Before sending: in the body, pick a file for the file field (most audio and video formats work; at…
  • POSTTranscribe from a URL/v1/speech-to-textSame as Transcribe a file, but ElevenLabs fetches the media from source_url (a hosted audio or video file, or a supported video page URL). No upload needed.…

5. Sound effects and Voice Changer

  • POSTGenerate a sound effect/v1/sound-generationCreates a sound effect from a text description. What comes back: audio bytes; the character-cost response header shows what it cost. The response body is…
  • POSTVoice Changer (speech to speech)/v1/voice-changer/{{voiceId}}Takes a recording and re-speaks it in {{voiceId}}, keeping the original timing, emotion and delivery. This endpoint replaced /v1/speech-to-speech/{voice_id}…

6. History

  • GETList history/v1/historyLists your generated items, newest first. What comes back: history (each with history_item_id, voice_id, voice_name, model_id, text, date_unix,…
  • GETGet a history item/v1/history/{{historyItemId}}Returns the metadata of one generation ({{historyItemId}}), including the text, voice, model and settings used. Common errors: 404 when the item was deleted…
  • GETDownload a history item's audio/v1/history/{{historyItemId}}/audioDownloads the audio of one history item again, at no extra cost. What comes back: the audio file. The response body is binary audio, so the app shows it as a…
  • POSTDownload several history items/v1/history/downloadDownloads one or more history items in one call. What comes back: the audio file for a single ID, or a zip of files when you pass several.

API details

Base URL
https://api.elevenlabs.io
Authentication
An API key in the xi-api-key header
Operations
17 operations on 17 pathsPOST 9GET 8
Main resources
1. Start here: account and models 32. Voices 23. Text to speech 44. Speech to text 25. Sound effects and Voice Changer 26. History 4
Description format
Swastik Codes guided collection, API version checked against the docs on 2026-11-17

How to test the ElevenLabs API in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the ElevenLabs API collection, without the publisher's secrets.
  3. Add your credentialsThis API uses an API key in the xi-api-key header. Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “List models” (GET /v1/models), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the ElevenLabs API?

Generate and stream lifelike speech, transcribe audio with Scribe, create sound effects, re-voice recordings and track usage. It is listed under AI & machine learning and has 17 endpoints.

Who publishes the ElevenLabs API?

It is listed from ElevenLabs's public API description (an OpenAPI document), not published by ElevenLabs on Swastik Codes. Anyone who controls elevenlabs.io can claim the profile by adding a DNS TXT record.

What is the base URL of the ElevenLabs API?

Requests go to https://api.elevenlabs.io. Endpoint paths are added to this base URL.

How do I authenticate with the ElevenLabs API?

With an API key in the xi-api-key header.

How many endpoints does the ElevenLabs API have?

17 operations on 17 paths (9 POST, 8 GET). The largest groups are 1. Start here: account and models, 2. Voices, 3. Text to speech, 4. Speech to text.

Is forking the ElevenLabs API free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.