Elevenlabs

Learn how to use Elevenlabs with Composio

Overview

SLUG: ELEVENLABS

Description

Create natural AI voices instantly in any language - perfect for video creators, developers, and businesses.

Authentication Details

generic_api_key
stringRequired

Connecting to Elevenlabs

Create an auth config

Use the dashboard to create an auth config for the Elevenlabs toolkit. This allows you to connect multiple Elevenlabs accounts to Composio for agents to use.

1

Select App

Navigate to the Elevenlabs toolkit page and click “Setup Integration”.

2

Configure Auth Config Settings

Select among the supported auth schemes of and configure them here.

3

Create and Get auth config ID

Click “Create Integration”. After creation, copy the displayed ID starting with ac_. This is your auth config ID. This is not a sensitive ID — you can save it in environment variables or a database. This ID will be used to create connections to the toolkit for a given user.

Connect Your Account

Using API Key

1from composio import Composio
2
3# Replace these with your actual values
4elevenlabs_auth_config_id = "ac_YOUR_ELEVENLABS_CONFIG_ID" # Auth config ID created above
5user_id = "0000-0000-0000" # UUID from database/app
6
7composio = Composio()
8
9def authenticate_toolkit(user_id: str, auth_config_id: str):
10 # Replace this with a method to retrieve an API key from the user.
11 # Or supply your own.
12 user_api_key = input("[!] Enter API key")
13
14 connection_request = composio.connected_accounts.initiate(
15 user_id=user_id,
16 auth_config_id=auth_config_id,
17 config={"auth_scheme": "API_KEY", "val": user_api_key}
18 )
19
20 # API Key authentication is immediate - no redirect needed
21 print(f"Successfully connected Elevenlabs for user {user_id}")
22 print(f"Connection status: {connection_request.status}")
23
24 return connection_request.id
25
26
27connection_id = authenticate_toolkit(user_id, elevenlabs_auth_config_id)
28
29# You can verify the connection using:
30connected_account = composio.connected_accounts.get(connection_id)
31print(f"Connected account: {connected_account}")

Tools

Executing tools

To prototype you can execute some tools to see the responses and working on the Elevenlabs toolkit’s playground

Python
1from composio import Composio
2from openai import OpenAI
3import json
4
5openai = OpenAI()
6composio = Composio()
7
8# User ID must be a valid UUID format
9user_id = "0000-0000-0000" # Replace with actual user UUID from your database
10
11tools = composio.tools.get(user_id=user_id, toolkits=["ELEVENLABS"])
12
13print("[!] Tools:")
14print(json.dumps(tools))
15
16def invoke_llm(task = "What can you do?"):
17 completion = openai.chat.completions.create(
18 model="gpt-4o",
19 messages=[
20 {
21 "role": "user",
22 "content": task, # Your task here!
23 },
24 ],
25 tools=tools,
26 )
27
28 # Handle Result from tool call
29 result = composio.provider.handle_tool_calls(user_id=user_id, response=completion)
30 print(f"[!] Completion: {completion}")
31 print(f"[!] Tool call result: {result}")
32
33invoke_llm()

Tool List

Tool Name: Add new project with attributes

Description

Use to create a new elevenlabs project for text-to-speech synthesis (e.g., audiobooks); a project `name` is required by the api for creation, and content can be initialized using `from url` or `from document`.

Action Parameters

acx_volume_normalization
boolean
author
string
callback_url
string
default_model_id
string
default_paragraph_voice_id
string
default_title_voice_id
string
from_document
object
from_url
string
isbn_number
string
name
string
pronunciation_dictionary_locators
array
quality_preset
stringDefaults to standard
title
string
volume_normalization
boolean

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete project by id

Description

Use to irreversibly delete a specific project by its `project id`; the project must exist and be accessible, and this action cannot be undone.

Action Parameters

project_id
stringRequired

Action Response

data
Required
error
string
successful
booleanRequired

Tool Name: Get projects

Description

Fetches a list of all projects and their details associated with the user's elevenlabs account; this is a read-only operation.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get project by ID

Description

Use to retrieve all details for a specific project, including its chapters and their conversion statuses, by providing the project's unique id.

Action Parameters

project_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Add a pronunciation dictionary from file

Description

Adds a new pronunciation dictionary from a lexicon file to improve speech synthesis accuracy.

Action Parameters

description
string
file
object
name
string
workspace_access
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Add rules to the pronunciation dictionary

Description

Adds one or more custom pronunciation rules (alias or phoneme) to an existing pronunciation dictionary.

Action Parameters

pronunciation_dictionary_id
stringRequired
rules
arrayRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Add sharing voice

Description

Adds an existing, shareable voice to a specified user's elevenlabs account library under a new custom name, requiring the user's public id and the voice id.

Action Parameters

new_name
stringRequired
public_user_id
stringRequired
voice_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Add a voice

Description

Adds a custom voice, requiring a `name` and a `files` list with at least one audio sample, to initiate cloning; returns `voice id` but voice is not immediately usable for synthesis.

Action Parameters

description
string
files
array
labels
string
name
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Convert chapter to audio

Description

Converts the textual content of a chapter, identified by `chapter id` within a `project id`, into audio format.

Action Parameters

chapter_id
stringRequired
project_id
stringRequired

Action Response

data
Required
error
string
successful
booleanRequired

Tool Name: Convert a project

Description

Converts an existing elevenlabs studio project, including all its chapters and using its configured settings and voices, into speech.

Action Parameters

project_id
stringRequired

Action Response

data
Required
error
string
successful
booleanRequired

Tool Name: Create an AudioNative enabled project

Description

Creates an elevenlabs audionative project, generating an embeddable audio player from a provided content file using text-to-speech, allowing customization of player appearance, audio settings, and conversion options.

Action Parameters

author
string
auto_convert
boolean
background_color
string
file
object
image
string
model_id
string
name
string
sessionization
integer
small
boolean
text_color
string
title
string
voice_id
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create a previously generated voice

Description

Finalizes the creation of a voice using its `generated voice id` from a previous generation step by assigning a name, description, and optional labels.

Action Parameters

generated_voice_id
stringRequired
labels
object
voice_description
stringRequired
voice_name
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete chapter from project

Description

Irreversibly deletes a specific, existing chapter from an existing project, typically to remove unwanted or obsolete content.

Action Parameters

chapter_id
stringRequired
project_id
stringRequired

Action Response

data
Required
error
string
successful
booleanRequired

Tool Name: Delete a dubbing project

Description

Permanently deletes a dubbing project by its id; this action is irreversible and the project cannot be recovered.

Action Parameters

dubbing_id
stringRequired

Action Response

data
Required
error
string
successful
booleanRequired

Tool Name: Delete history item

Description

Permanently deletes a specific history item (including its audio file and metadata) using its `history item id`; this operation is irreversible and should be used with caution.

Action Parameters

history_item_id
stringRequired

Action Response

data
Required
error
string
successful
booleanRequired

Tool Name: Delete voice sample

Description

Permanently deletes a specific voice sample for a given voice id; this action is irreversible.

Action Parameters

sample_id
stringRequired
voice_id
stringRequired

Action Response

data
Required
error
string
successful
booleanRequired

Tool Name: Delete voice by id

Description

Permanently and irreversibly deletes a specific custom voice using its `voice id`; the voice must exist and the authenticated user must have permission to delete it.

Action Parameters

voice_id
stringRequired

Action Response

data
Required
error
string
successful
booleanRequired

Tool Name: Download history items

Description

Downloads audio clips from history by id(s), returning a single file or a zip archive, with an optional output format (e.g., 'wav'); provides only audio content, no metadata.

Action Parameters

history_item_ids
arrayRequired
output_format
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Dub a video or an audio file

Description

Deprecated: use `dub a video or an audio file` instead; dubs a video/audio file, requiring 'file' or 'source url', 'target lang', and 'csv file' if 'mode' is 'manual'.

Action Parameters

background_audio_file
object
csv_file
object
dubbing_studio
boolean
end_time
integer
file
object
foreground_audio_file
object
highest_resolution
boolean
mode
string
name
string
num_speakers
integer
source_lang
stringDefaults to auto
source_url
string
start_time
integer
target_lang
string
watermark
boolean

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Dub a video or an audio file

Description

Dub a video or audio file into a specified target language, requiring 'file' or 'source url', 'target lang', and 'csv file' if 'mode' is 'manual'.

Action Parameters

background_audio_file
object
csv_file
object
dubbing_studio
boolean
end_time
integer
file
object
foreground_audio_file
object
highest_resolution
boolean
mode
string
name
string
num_speakers
integer
source_lang
stringDefaults to auto
source_url
string
start_time
integer
target_lang
string
watermark
boolean

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Edit voice

Description

Updates the name, audio files, description, or labels for an existing voice model specified by `voice id`.

Action Parameters

description
string
files
array
labels
string
name
string
voice_id
stringRequired

Action Response

data
Required
error
string
successful
booleanRequired

Tool Name: Edit voice settings

Description

Edits key voice settings (e.g., stability, similarity enhancement, style exaggeration, speaker boost) for an existing voice, affecting all future audio generated with that voice id.

Action Parameters

voice_id
stringRequired

Action Response

data
Required
error
string
successful
booleanRequired

Tool Name: Generate a random voice

Description

Generates a unique, random elevenlabs text-to-speech voice based on input text and specified voice characteristics.

Action Parameters

accent
stringRequired
accent_strength
numberRequired
age
stringRequired
gender
stringRequired
text
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get audio from history item

Description

Retrieves the audio content for a specific history item from elevenlabs, using a `history item id` that must correspond to a previously generated audio.

Action Parameters

history_item_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get sample audio

Description

Retrieves the audio for a given `sample id` that must belong to the specified `voice id`.

Action Parameters

sample_id
stringRequired
voice_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get user profile by handle

Description

Retrieves the public profile information for an existing elevenlabs user based on their unique handle.

Action Parameters

handle
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get chapters by project id

Description

Retrieves a list of all chapters, their details, and conversion status for a project, useful for managing content or tracking progress.

Action Parameters

project_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get chapter by ID

Description

Fetches comprehensive details for a specific chapter within a given project, including its metadata (name, id), conversion status, progress, download availability, and content statistics.

Action Parameters

chapter_id
stringRequired
project_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get chapter snapshots

Description

Retrieves all saved version snapshots for a specific chapter within a given project, enabling review of its history or reversion to prior states.

Action Parameters

chapter_id
stringRequired
project_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get default voice settings

Description

Retrieves the elevenlabs text-to-speech service's default voice settings (stability, similarity boost, style, speaker boost) that are applied when no voice-specific or request-specific settings are provided.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get dubbed audio for a language

Description

Retrieves an existing dubbed audio file for a specific `dubbing id` and `language code`.

Action Parameters

dubbing_id
stringRequired
language_code
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get dubbing project metadata

Description

Retrieves metadata and status for a specific dubbing project by its id.

Action Parameters

dubbing_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get generated items

Description

Retrieves metadata for a list of generated audio items from history, supporting pagination and optional filtering by voice id.

Action Parameters

page_size
integerDefaults to 100
start_after_history_item_id
string
voice_id
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get history item by id

Description

Retrieves detailed information (excluding the audio file) for a specific audio generation history item from elevenlabs, using its unique id.

Action Parameters

history_item_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get pronunciation dictionary metadata

Description

Retrieves metadata for a specific, existing pronunciation dictionary from elevenlabs using its id.

Action Parameters

pronunciation_dictionary_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get models

Description

Retrieves a detailed list of all available elevenlabs text-to-speech (tts) models and their capabilities.

Action Parameters

Action Response

data
arrayRequired
error
string
successful
booleanRequired

Tool Name: Get models

Description

Deprecated: use the 'get models' action instead; formerly retrieved available elevenlabs text-to-speech (tts) models.

Action Parameters

Action Response

data
arrayRequired
error
string
successful
booleanRequired

Tool Name: Get project snapshots

Description

Retrieves all available snapshots (saved states or versions) for an existing project, enabling history tracking, version comparison, or accessing specific states for playback/processing, particularly in text-to-speech workflows.

Action Parameters

project_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get pronunciation dictionaries

Description

Retrieves a paginated list of pronunciation dictionaries, used to customize how specific words or phrases are pronounced by the text-to-speech (tts) engine.

Action Parameters

cursor
string
page_size
integerDefaults to 30

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get pronunciation dictionary version

Description

Downloads the pronunciation lexicon specification (pls) file for an existing version of a pronunciation dictionary from elevenlabs, used to customize tts pronunciation.

Action Parameters

dictionary_id
stringRequired
version_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get shared voices

Description

Retrieves a paginated and filterable list of shared voices from the elevenlabs voice library.

Action Parameters

accent
string
age
string
category
string
descriptives
array
featured
boolean
gender
string
language
string
owner_id
string
page
integer
page_size
integerDefaults to 30
reader_app_enabled
boolean
search
string
sort
string
use_cases
array

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get sso provider admin

Description

Retrieves the sso provider configuration for a specified workspace, typically for review purposes, and will indicate if no configuration exists.

Action Parameters

workspace_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get dubbing transcript by language

Description

Retrieves the textual transcript for a specified dubbing project and language, if one exists for that language in the project.

Action Parameters

dubbing_id
stringRequired
language_code
stringRequired

Action Response

data
Required
error
string
successful
booleanRequired

Tool Name: Get user info

Description

Retrieves detailed information about the authenticated elevenlabs user's account, including subscription, usage, api key, and status.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get user info

Description

Deprecated: retrieves authenticated user's account details; use 'get user info' instead.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get user subscription info

Description

Retrieves detailed subscription information for the currently authenticated elevenlabs user.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get voice

Description

Retrieves comprehensive details for a specific, existing voice by its `voice id`, optionally including its settings.

Action Parameters

voice_id
stringRequired
with_settings
boolean

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get voices list

Description

Retrieves a list of all available voices along with their detailed attributes and settings.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get voices list

Description

Deprecated: use 'get voices' to retrieve a list of all available voices with their details.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get voice settings

Description

Retrieves the stability, similarity, style, and speaker boost settings for a specific, existing elevenlabs voice using its `voice id`.

Action Parameters

voice_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get API documentation

Description

Retrieves the content of the official elevenlabs api documentation page hosted on mintlify.

Action Parameters

Action Response

data
Required
error
string
successful
booleanRequired

Tool Name: Remove rules from pronunciation dictionary

Description

Permanently removes exact-match pronunciation rules from a specified elevenlabs pronunciation dictionary using a list of rule strings; non-matching rule strings are ignored and this action cannot add or modify rules.

Action Parameters

pronunciation_dictionary_id
stringRequired
rule_strings
arrayRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Speech to speech

Description

Converts an input audio file to speech using a specified voice; if a `model id` is provided, it must support speech-to-speech conversion.

Action Parameters

audio
object
model_id
stringDefaults to eleven_english_sts_v2
optimize_streaming_latency
integer
output_format
stringDefaults to mp3_44100_128
seed
integer
voice_id
stringRequired
voice_settings
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Speech to speech streaming

Description

Converts an input audio stream to a different voice output stream in real-time, using a specified speech-to-speech model.

Action Parameters

audio
object
model_id
stringDefaults to eleven_english_sts_v2
optimize_streaming_latency
integer
output_format
stringDefaults to mp3_44100_128
seed
integer
voice_id
stringRequired
voice_settings
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Archive project snapshot

Description

Archives an existing project snapshot by its id, creating a permanent, immutable, and typically irreversible copy of its state.

Action Parameters

project_id
stringRequired
project_snapshot_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Stream chapter audio

Description

Streams the audio for a specified chapter snapshot from an elevenlabs project, optionally converting the output to mpeg format.

Action Parameters

chapter_id
stringRequired
chapter_snapshot_id
stringRequired
convert_to_mpeg
boolean
project_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Stream project audio

Description

Streams audio from a specific project snapshot, optionally converting it to mpeg format.

Action Parameters

convert_to_mpeg
boolean
project_id
stringRequired
project_snapshot_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Text to speech

Description

Converts text to speech using a specified elevenlabs voice and model, returning a downloadable audio file.

Action Parameters

model_id
stringDefaults to eleven_monolingual_v1
optimize_streaming_latency
integer
output_format
stringDefaults to mp3_44100_128
pronunciation_dictionary_locators
array
seed
integer
text
stringRequired
voice_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Text to speech stream

Description

Converts text to a spoken audio stream, allowing latency optimization, specific output formats (some tier-dependent), and custom pronunciations; ensure the chosen model supports text-to-speech and text is preferably under 5000 characters.

Action Parameters

model_id
stringDefaults to eleven_monolingual_v1
optimize_streaming_latency
integer
output_format
stringDefaults to mp3_44100_128
pronunciation_dictionary_locators
array
seed
integer
text
stringRequired
voice_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Update project pronunciation dictionaries

Description

Updates a project's pronunciation dictionaries on elevenlabs to improve text-to-speech accuracy for specialized terms; note that while multiple dictionaries can be applied, the ui only displays the first.

Action Parameters

project_id
stringRequired
pronunciation_dictionary_locators
arrayRequired

Action Response

data
Required
error
string
successful
booleanRequired

Tool Name: Voice generation parameters retrieval

Description

Fetches configurable parameters for elevenlabs voice generation, used to determine available settings (e.g., accents, character limits) prior to audio synthesis; returns metadata only, not audio.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired