diff --git "a/data/reference.md" "b/data/reference.md" new file mode 100644--- /dev/null +++ "b/data/reference.md" @@ -0,0 +1,41559 @@ +# Reference +## History +
client.history.list(...) -> GetSpeechHistoryResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of your generated audio (e.g. text to speech, speech to speech, Studio, dubbing). Music and SFX generations are not included and cannot currently be retrieved via the API. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.history.list( + page_size=1, + start_after_history_item_id="start_after_history_item_id", + voice_id="voice_id", + model_id="model_id", + date_before_unix=1, + date_after_unix=1, + sort_direction="asc", + search="search", + source="TTS", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many history items to return at maximum. Can not exceed 1000, defaults to 100. + +
+
+ +
+
+ +**start_after_history_item_id:** `typing.Optional[str]` — After which ID to start fetching, use this parameter to paginate across a large collection of history items. In case this parameter is not provided history items will be fetched starting from the most recently created one ordered descending by their creation date. + +
+
+ +
+
+ +**voice_id:** `typing.Optional[str]` — ID of the voice to be filtered for. You can use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices. + +
+
+ +
+
+ +**model_id:** `typing.Optional[str]` — Search term used for filtering history items. If provided, source becomes required. + +
+
+ +
+
+ +**date_before_unix:** `typing.Optional[int]` — Unix timestamp to filter history items before this date (exclusive). + +
+
+ +
+
+ +**date_after_unix:** `typing.Optional[int]` — Unix timestamp to filter history items after this date (inclusive). + +
+
+ +
+
+ +**sort_direction:** `typing.Optional[HistoryListRequestSortDirection]` — Sort direction for the results. + +
+
+ +
+
+ +**search:** `typing.Optional[str]` — search term used for filtering + +
+
+ +
+
+ +**source:** `typing.Optional[HistoryListRequestSource]` — Source of the generated history item + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.history.get(...) -> SpeechHistoryItemResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieves a history item. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.history.get( + history_item_id="VW7YKqPnjY4h39yTbx2L", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**history_item_id:** `str` — ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/list) endpoint to retrieve a list of history items. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.history.delete(...) -> DeleteHistoryItemResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete a history item by its ID +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.history.delete( + history_item_id="VW7YKqPnjY4h39yTbx2L", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**history_item_id:** `str` — ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/list) endpoint to retrieve a list of history items. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.history.get_audio(...) -> typing.Iterator[bytes] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns the audio of an history item. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.history.get_audio( + history_item_id="history_item_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**history_item_id:** `str` — ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/list) endpoint to retrieve a list of history items. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.history.download(...) -> typing.Iterator[bytes] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Download one or more history items. If one history item ID is provided, we will return a single audio file. If more than one history item IDs are provided, we will provide the history items packed into a .zip file. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.history.download( + history_item_ids=[ + "history_item_ids", + "history_item_ids" + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**history_item_ids:** `typing.List[str]` — A list of history items to download, you can get IDs of history items and other metadata using the GET https://api.elevenlabs.io/v1/history endpoint. + +
+
+ +
+
+ +**output_format:** `typing.Optional[str]` — Output format to transcode the audio file, can be wav or default. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## TextToSoundEffects +
client.text_to_sound_effects.convert(...) -> typing.Iterator[bytes] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Turn text into sound effects for your videos, voice-overs or video games using the most advanced sound effects models in the world. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.text_to_sound_effects.convert( + text="Spacious braam suitable for high-impact movie trailer moments", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**text:** `str` — The text that will get converted into a sound effect. + +
+
+ +
+
+ +**output_format:** `typing.Optional[TextToSoundEffectsConvertRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM and WAV formats with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + +
+
+ +
+
+ +**enable_logging:** `typing.Optional[bool]` — When enable_logging is set to false zero retention mode will be used for the request. Zero retention mode may only be used by enterprise customers. + +
+
+ +
+
+ +**loop:** `typing.Optional[bool]` — Whether to create a sound effect that loops smoothly. Only available for the 'eleven_text_to_sound_v2 model'. + +
+
+ +
+
+ +**duration_seconds:** `typing.Optional[float]` — The duration of the sound which will be generated in seconds. Must be at least 0.5 and at most 30. If set to None we will guess the optimal duration using the prompt. Defaults to None. + +
+
+ +
+
+ +**prompt_influence:** `typing.Optional[float]` — A higher prompt influence makes your generation follow the prompt more closely while also making generations less variable. Must be a value between 0 and 1. Defaults to 0.3. + +
+
+ +
+
+ +**model_id:** `typing.Optional[SfxModelId]` — The model ID to use for the sound generation. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## AudioIsolation +
client.audio_isolation.convert(...) -> typing.Iterator[bytes] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Removes background noise from audio. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +client.audio_isolation.convert(...) +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**audio:** `core.File` — The audio file from which vocals/speech will be isolated from. + +
+
+ +
+
+ +**file_format:** `typing.Optional[AudioIsolationRequestFileFormat]` — The format of input audio. Options are 'pcm_s16le_16' or 'other' For `pcm_s16le_16`, the input audio must be 16-bit PCM at a 16kHz sample rate, single channel (mono), and little-endian byte order. Latency will be lower than with passing an encoded waveform. + +
+
+ +
+
+ +**preview_b_64:** `typing.Optional[str]` — Optional preview image base64 for tracking this generation. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.audio_isolation.list(...) -> GetAudioIsolationHistoryResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of all your audio isolation generations. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.audio_isolation.list( + page_size=1, + page=1, + search="search", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many history items to return at maximum. Defaults to 100. + +
+
+ +
+
+ +**page:** `typing.Optional[int]` — Page number for search pagination (1-based). Only used when search is provided. + +
+
+ +
+
+ +**search:** `typing.Optional[str]` — Optional search term used for filtering audio isolation history (title/text). + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.audio_isolation.delete(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Deletes a specific audio isolation history item and the associated media files. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.audio_isolation.delete( + history_item_id="history_item_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**history_item_id:** `str` — Identifier of the audio isolation history item. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.audio_isolation.stream(...) -> typing.Iterator[bytes] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Removes background noise from audio. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +client.audio_isolation.stream(...) +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**audio:** `core.File` — The audio file from which vocals/speech will be isolated from. + +
+
+ +
+
+ +**file_format:** `typing.Optional[AudioIsolationStreamRequestFileFormat]` — The format of input audio. Options are 'pcm_s16le_16' or 'other' For `pcm_s16le_16`, the input audio must be 16-bit PCM at a 16kHz sample rate, single channel (mono), and little-endian byte order. Latency will be lower than with passing an encoded waveform. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## AudioEffects +
client.audio_effects.get_catalog() -> AudioEffectsCatalogResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Lists the filter presets, reverb environments, and background noises that `audio_effects` can reference in Text to Speech, Text to Dialogue, and agent configurations. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.audio_effects.get_catalog() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Samples +
client.samples.delete(...) -> DeleteSampleResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Removes a sample by its ID. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.samples.delete( + voice_id="21m00Tcm4TlvDq8ikWAM", + sample_id="VW7YKqPnjY4h39yTbx2L", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voice_id:** `str` — ID of the voice to be used. You can use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices. + +
+
+ +
+
+ +**sample_id:** `str` — ID of the sample to be used. You can use the [Get voices](/docs/api-reference/voices/get) endpoint list all the available samples for a voice. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## TextToSpeech +
client.text_to_speech.convert(...) -> typing.Iterator[bytes] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Converts text into speech using a voice of your choice and returns audio. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.text_to_speech.convert( + voice_id="JBFqnCBsd6RMkjVDRZzb", + output_format="mp3_44100_128", + text="The first move is what sets everything in motion.", + model_id="eleven_multilingual_v2", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voice_id:** `str` — ID of the voice to be used. Use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices. + +
+
+ +
+
+ +**text:** `str` — The text that will get converted into speech. + +
+
+ +
+
+ +**enable_logging:** `typing.Optional[bool]` — When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers. + +
+
+ +
+
+ +**optimize_streaming_latency:** `typing.Optional[int]` + +You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. Possible values: +0 - default mode (no latency optimizations) +1 - normal latency optimizations (about 50% of possible latency improvement of option 3) +2 - strong latency optimizations (about 75% of possible latency improvement of option 3) +3 - max latency optimizations +4 - max latency optimizations, but also with text normalizer turned off for even more latency savings (best latency, but can mispronounce eg numbers and dates). + +Defaults to None. + +
+
+ +
+
+ +**output_format:** `typing.Optional[TextToSpeechConvertRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM and WAV formats with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + +
+
+ +
+
+ +**model_id:** `typing.Optional[str]` — Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. + +
+
+ +
+
+ +**language_code:** `typing.Optional[str]` — Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support the provided language code, it will be ignored. This parameter is not supported for multilingual_v2 models. + +
+
+ +
+
+ +**voice_settings:** `typing.Optional[VoiceSettings]` — Voice settings overriding stored settings for the given voice. They are applied only on the given request. + +
+
+ +
+
+ +**pronunciation_dictionary_locators:** `typing.Optional[typing.List[PronunciationDictionaryVersionLocator]]` — A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request + +
+
+ +
+
+ +**seed:** `typing.Optional[int]` — If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + +
+
+ +
+
+ +**previous_text:** `typing.Optional[str]` — The text that came before the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. + +
+
+ +
+
+ +**next_text:** `typing.Optional[str]` — The text that comes after the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. + +
+
+ +
+
+ +**previous_request_ids:** `typing.Optional[typing.List[str]]` — A list of request_id of the samples that were generated before this generation. Can be used to improve the speech's continuity when splitting up a large task into multiple requests. The results will be best when the same model is used across the generations. In case both previous_text and previous_request_ids is send, previous_text will be ignored. A maximum of 3 request_ids can be send. + +
+
+ +
+
+ +**next_request_ids:** `typing.Optional[typing.List[str]]` — A list of request_id of the samples that come after this generation. next_request_ids is especially useful for maintaining the speech's continuity when regenerating a sample that has had some audio quality issues. For example, if you have generated 3 speech clips, and you want to improve clip 2, passing the request id of clip 3 as a next_request_id (and that of clip 1 as a previous_request_id) will help maintain natural flow in the combined speech. The results will be best when the same model is used across the generations. In case both next_text and next_request_ids is send, next_text will be ignored. A maximum of 3 request_ids can be send. + +
+
+ +
+
+ +**use_pvc_as_ivc:** `typing.Optional[bool]` — Whether to use the IVC version of a professional voice. This may improve expressiveness and reduce latency. + +
+
+ +
+
+ +**apply_text_normalization:** `typing.Optional[BodyTextToSpeechFullApplyTextNormalization]` — This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. + +
+
+ +
+
+ +**apply_language_text_normalization:** `typing.Optional[bool]` — This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. + +
+
+ +
+
+ +**audio_effects:** `typing.Optional[EffectsSpecInput]` — Audio effects applied to the generated audio. Unknown IDs return 404 with `param` naming the field. Reverb (`environment_id` with `send_level` above 0) and a non-zero `pan` produce stereo audio and are rejected with 400 for `ulaw_*`, `alaw_*`, and `pcm_*` output formats. Effects don't change the cost of the request. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.text_to_speech.convert_with_timestamps(...) -> AudioWithTimestampsResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Generate speech from text with precise character-level timing information for audio-text synchronization. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.text_to_speech.convert_with_timestamps( + voice_id="21m00Tcm4TlvDq8ikWAM", + enable_logging=True, + optimize_streaming_latency=1, + output_format="alaw_8000", + text="This is a test for the API of ElevenLabs.", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voice_id:** `str` — Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices. + +
+
+ +
+
+ +**text:** `str` — The text that will get converted into speech. + +
+
+ +
+
+ +**enable_logging:** `typing.Optional[bool]` — When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers. + +
+
+ +
+
+ +**optimize_streaming_latency:** `typing.Optional[int]` + +You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. Possible values: +0 - default mode (no latency optimizations) +1 - normal latency optimizations (about 50% of possible latency improvement of option 3) +2 - strong latency optimizations (about 75% of possible latency improvement of option 3) +3 - max latency optimizations +4 - max latency optimizations, but also with text normalizer turned off for even more latency savings (best latency, but can mispronounce eg numbers and dates). + +Defaults to None. + +
+
+ +
+
+ +**output_format:** `typing.Optional[TextToSpeechConvertWithTimestampsRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM and WAV formats with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + +
+
+ +
+
+ +**model_id:** `typing.Optional[str]` — Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. + +
+
+ +
+
+ +**language_code:** `typing.Optional[str]` — Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support the provided language code, it will be ignored. This parameter is not supported for multilingual_v2 models. + +
+
+ +
+
+ +**voice_settings:** `typing.Optional[VoiceSettings]` — Voice settings overriding stored settings for the given voice. They are applied only on the given request. + +
+
+ +
+
+ +**pronunciation_dictionary_locators:** `typing.Optional[typing.List[PronunciationDictionaryVersionLocator]]` — A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request + +
+
+ +
+
+ +**seed:** `typing.Optional[int]` — If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + +
+
+ +
+
+ +**previous_text:** `typing.Optional[str]` — The text that came before the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. + +
+
+ +
+
+ +**next_text:** `typing.Optional[str]` — The text that comes after the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. + +
+
+ +
+
+ +**previous_request_ids:** `typing.Optional[typing.List[str]]` — A list of request_id of the samples that were generated before this generation. Can be used to improve the speech's continuity when splitting up a large task into multiple requests. The results will be best when the same model is used across the generations. In case both previous_text and previous_request_ids is send, previous_text will be ignored. A maximum of 3 request_ids can be send. + +
+
+ +
+
+ +**next_request_ids:** `typing.Optional[typing.List[str]]` — A list of request_id of the samples that come after this generation. next_request_ids is especially useful for maintaining the speech's continuity when regenerating a sample that has had some audio quality issues. For example, if you have generated 3 speech clips, and you want to improve clip 2, passing the request id of clip 3 as a next_request_id (and that of clip 1 as a previous_request_id) will help maintain natural flow in the combined speech. The results will be best when the same model is used across the generations. In case both next_text and next_request_ids is send, next_text will be ignored. A maximum of 3 request_ids can be send. + +
+
+ +
+
+ +**use_pvc_as_ivc:** `typing.Optional[bool]` — Whether to use the IVC version of a professional voice. This may improve expressiveness and reduce latency. + +
+
+ +
+
+ +**apply_text_normalization:** `typing.Optional[BodyTextToSpeechFullWithTimestampsApplyTextNormalization]` — This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. + +
+
+ +
+
+ +**apply_language_text_normalization:** `typing.Optional[bool]` — This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. + +
+
+ +
+
+ +**audio_effects:** `typing.Optional[EffectsSpecInput]` — Audio effects applied to the generated audio. Unknown IDs return 404 with `param` naming the field. Reverb (`environment_id` with `send_level` above 0) and a non-zero `pan` produce stereo audio and are rejected with 400 for `ulaw_*`, `alaw_*`, and `pcm_*` output formats. Effects don't change the cost of the request. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.text_to_speech.stream(...) -> typing.Iterator[bytes] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Converts text into speech using a voice of your choice and returns audio as an audio stream. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.text_to_speech.stream( + voice_id="JBFqnCBsd6RMkjVDRZzb", + output_format="mp3_44100_128", + text="The first move is what sets everything in motion.", + model_id="eleven_multilingual_v2", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voice_id:** `str` — ID of the voice to be used. Use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices. + +
+
+ +
+
+ +**text:** `str` — The text that will get converted into speech. + +
+
+ +
+
+ +**enable_logging:** `typing.Optional[bool]` — When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers. + +
+
+ +
+
+ +**optimize_streaming_latency:** `typing.Optional[int]` + +You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. Possible values: +0 - default mode (no latency optimizations) +1 - normal latency optimizations (about 50% of possible latency improvement of option 3) +2 - strong latency optimizations (about 75% of possible latency improvement of option 3) +3 - max latency optimizations +4 - max latency optimizations, but also with text normalizer turned off for even more latency savings (best latency, but can mispronounce eg numbers and dates). + +Defaults to None. + +
+
+ +
+
+ +**output_format:** `typing.Optional[TextToSpeechStreamRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + +
+
+ +
+
+ +**model_id:** `typing.Optional[str]` — Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. + +
+
+ +
+
+ +**language_code:** `typing.Optional[str]` — Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support the provided language code, it will be ignored. This parameter is not supported for multilingual_v2 models. + +
+
+ +
+
+ +**voice_settings:** `typing.Optional[VoiceSettings]` — Voice settings overriding stored settings for the given voice. They are applied only on the given request. + +
+
+ +
+
+ +**pronunciation_dictionary_locators:** `typing.Optional[typing.List[PronunciationDictionaryVersionLocator]]` — A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request + +
+
+ +
+
+ +**seed:** `typing.Optional[int]` — If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + +
+
+ +
+
+ +**previous_text:** `typing.Optional[str]` — The text that came before the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. + +
+
+ +
+
+ +**next_text:** `typing.Optional[str]` — The text that comes after the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. + +
+
+ +
+
+ +**previous_request_ids:** `typing.Optional[typing.List[str]]` — A list of request_id of the samples that were generated before this generation. Can be used to improve the speech's continuity when splitting up a large task into multiple requests. The results will be best when the same model is used across the generations. In case both previous_text and previous_request_ids is send, previous_text will be ignored. A maximum of 3 request_ids can be send. + +
+
+ +
+
+ +**next_request_ids:** `typing.Optional[typing.List[str]]` — A list of request_id of the samples that come after this generation. next_request_ids is especially useful for maintaining the speech's continuity when regenerating a sample that has had some audio quality issues. For example, if you have generated 3 speech clips, and you want to improve clip 2, passing the request id of clip 3 as a next_request_id (and that of clip 1 as a previous_request_id) will help maintain natural flow in the combined speech. The results will be best when the same model is used across the generations. In case both next_text and next_request_ids is send, next_text will be ignored. A maximum of 3 request_ids can be send. + +
+
+ +
+
+ +**use_pvc_as_ivc:** `typing.Optional[bool]` — Whether to use the IVC version of a professional voice. This may improve expressiveness and reduce latency. + +
+
+ +
+
+ +**apply_text_normalization:** `typing.Optional[BodyTextToSpeechStreamApplyTextNormalization]` — This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. + +
+
+ +
+
+ +**apply_language_text_normalization:** `typing.Optional[bool]` — This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. + +
+
+ +
+
+ +**audio_effects:** `typing.Optional[EffectsSpecInput]` — Audio effects applied to the generated audio. Unknown IDs return 404 with `param` naming the field. Reverb (`environment_id` with `send_level` above 0) and a non-zero `pan` produce stereo audio and are rejected with 400 for `ulaw_*`, `alaw_*`, and `pcm_*` output formats. Effects don't change the cost of the request. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.text_to_speech.stream_with_timestamps(...) -> typing.Iterator[bytes] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Converts text into speech using a voice of your choice and returns a stream of JSONs containing audio as a base64 encoded string together with information on when which character was spoken. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.text_to_speech.stream_with_timestamps( + voice_id="JBFqnCBsd6RMkjVDRZzb", + output_format="mp3_44100_128", + text="The first move is what sets everything in motion.", + model_id="eleven_multilingual_v2", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voice_id:** `str` — ID of the voice to be used. Use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices. + +
+
+ +
+
+ +**text:** `str` — The text that will get converted into speech. + +
+
+ +
+
+ +**enable_logging:** `typing.Optional[bool]` — When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers. + +
+
+ +
+
+ +**optimize_streaming_latency:** `typing.Optional[int]` + +You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. Possible values: +0 - default mode (no latency optimizations) +1 - normal latency optimizations (about 50% of possible latency improvement of option 3) +2 - strong latency optimizations (about 75% of possible latency improvement of option 3) +3 - max latency optimizations +4 - max latency optimizations, but also with text normalizer turned off for even more latency savings (best latency, but can mispronounce eg numbers and dates). + +Defaults to None. + +
+
+ +
+
+ +**output_format:** `typing.Optional[TextToSpeechStreamWithTimestampsRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + +
+
+ +
+
+ +**model_id:** `typing.Optional[str]` — Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. + +
+
+ +
+
+ +**language_code:** `typing.Optional[str]` — Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support the provided language code, it will be ignored. This parameter is not supported for multilingual_v2 models. + +
+
+ +
+
+ +**voice_settings:** `typing.Optional[VoiceSettings]` — Voice settings overriding stored settings for the given voice. They are applied only on the given request. + +
+
+ +
+
+ +**pronunciation_dictionary_locators:** `typing.Optional[typing.List[PronunciationDictionaryVersionLocator]]` — A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request + +
+
+ +
+
+ +**seed:** `typing.Optional[int]` — If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + +
+
+ +
+
+ +**previous_text:** `typing.Optional[str]` — The text that came before the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. + +
+
+ +
+
+ +**next_text:** `typing.Optional[str]` — The text that comes after the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. + +
+
+ +
+
+ +**previous_request_ids:** `typing.Optional[typing.List[str]]` — A list of request_id of the samples that were generated before this generation. Can be used to improve the speech's continuity when splitting up a large task into multiple requests. The results will be best when the same model is used across the generations. In case both previous_text and previous_request_ids is send, previous_text will be ignored. A maximum of 3 request_ids can be send. + +
+
+ +
+
+ +**next_request_ids:** `typing.Optional[typing.List[str]]` — A list of request_id of the samples that come after this generation. next_request_ids is especially useful for maintaining the speech's continuity when regenerating a sample that has had some audio quality issues. For example, if you have generated 3 speech clips, and you want to improve clip 2, passing the request id of clip 3 as a next_request_id (and that of clip 1 as a previous_request_id) will help maintain natural flow in the combined speech. The results will be best when the same model is used across the generations. In case both next_text and next_request_ids is send, next_text will be ignored. A maximum of 3 request_ids can be send. + +
+
+ +
+
+ +**use_pvc_as_ivc:** `typing.Optional[bool]` — Whether to use the IVC version of a professional voice. This may improve expressiveness and reduce latency. + +
+
+ +
+
+ +**apply_text_normalization:** `typing.Optional[BodyTextToSpeechStreamWithTimestampsApplyTextNormalization]` — This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. + +
+
+ +
+
+ +**apply_language_text_normalization:** `typing.Optional[bool]` — This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. + +
+
+ +
+
+ +**audio_effects:** `typing.Optional[EffectsSpecInput]` — Audio effects applied to the generated audio. Unknown IDs return 404 with `param` naming the field. Reverb (`environment_id` with `send_level` above 0) and a non-zero `pan` produce stereo audio and are rejected with 400 for `ulaw_*`, `alaw_*`, and `pcm_*` output formats. Effects don't change the cost of the request. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## TextToDialogue +
client.text_to_dialogue.convert(...) -> typing.Iterator[bytes] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Converts a list of text and voice ID pairs into speech (dialogue) and returns audio. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs, DialogueInput +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.text_to_dialogue.convert( + inputs=[ + DialogueInput( + text="[giggling] Knock knock", + voice_id="JBFqnCBsd6RMkjVDRZzb", + ), + DialogueInput( + text="[curious] Who is there?", + voice_id="Aw4FAjKCGjjNkVhN1Xmq", + ) + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**inputs:** `typing.List[DialogueInput]` — A list of dialogue inputs, each containing text and a voice ID which will be converted into speech. The maximum number of unique voice IDs is 10. For reliable generation, keep the total character count across all `inputs[].text` values at or below 2,000 characters per request. Longer requests can terminate early in streaming responses or return a validation error. + +
+
+ +
+
+ +**output_format:** `typing.Optional[TextToDialogueConvertRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM and WAV formats with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + +
+
+ +
+
+ +**enable_logging:** `typing.Optional[bool]` — When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers. + +
+
+ +
+
+ +**model_id:** `typing.Optional[str]` — Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. + +
+
+ +
+
+ +**language_code:** `typing.Optional[str]` — Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support the provided language code, it will be ignored. This parameter is not supported for multilingual_v2 models. + +
+
+ +
+
+ +**settings:** `typing.Optional[ToDialogueSettingsResponseModel]` — Settings controlling the dialogue generation. + +
+
+ +
+
+ +**previous_text:** `typing.Optional[str]` — The text that comes immediately before this generation, used to condition the model for prosodic continuity. A maximum of 100 characters can be sent. Not supported by every model. + +
+
+ +
+
+ +**future_text:** `typing.Optional[str]` — The text that comes immediately after this generation, used to condition the model for prosodic continuity. A maximum of 100 characters can be sent. Not supported by every model. + +
+
+ +
+
+ +**pronunciation_dictionary_locators:** `typing.Optional[typing.List[PronunciationDictionaryVersionLocator]]` — A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request + +
+
+ +
+
+ +**seed:** `typing.Optional[int]` — If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + +
+
+ +
+
+ +**apply_text_normalization:** `typing.Optional[BodyTextToDialogueMultiVoiceV1TextToDialoguePostApplyTextNormalization]` — This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. + +
+
+ +
+
+ +**use_pvc_as_ivc:** `typing.Optional[bool]` — Whether to use the IVC version of a professional voice. This may improve expressiveness and reduce latency. + +
+
+ +
+
+ +**previous_request_ids:** `typing.Optional[typing.List[str]]` — A list of request_ids of dialogue generations that came before this one. Used to condition the model for continuity when splitting a large task into multiple requests. A maximum of 3 request_ids can be sent. The last request_id is the audio which is closest to the current request. Not supported by every model. + +
+
+ +
+
+ +**next_request_ids:** `typing.Optional[typing.List[str]]` — A list of request_ids of dialogue generations that come after this one. Useful for maintaining continuity when regenerating a clip in the middle of a sequence. A maximum of 3 request_ids can be sent. The first request_id is the audio which is closest to the current request. Not supported by every model. + +
+
+ +
+
+ +**audio_effects:** `typing.Optional[EffectsSpecInput]` — Audio effects applied to the generated audio. Unknown IDs return 404 with `param` naming the field. Reverb (`environment_id` with `send_level` above 0) and a non-zero `pan` produce stereo audio and are rejected with 400 for `ulaw_*`, `alaw_*`, and `pcm_*` output formats. Effects don't change the cost of the request. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.text_to_dialogue.stream(...) -> typing.Iterator[bytes] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Converts a list of text and voice ID pairs into speech (dialogue) and returns an audio stream. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs, DialogueInput +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.text_to_dialogue.stream( + inputs=[ + DialogueInput( + text="[giggling] Knock knock", + voice_id="JBFqnCBsd6RMkjVDRZzb", + ), + DialogueInput( + text="[curious] Who is there?", + voice_id="Aw4FAjKCGjjNkVhN1Xmq", + ) + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**inputs:** `typing.List[DialogueInput]` — A list of dialogue inputs, each containing text and a voice ID which will be converted into speech. The maximum number of unique voice IDs is 10. For reliable generation, keep the total character count across all `inputs[].text` values at or below 2,000 characters per request. Longer requests can terminate early in streaming responses or return a validation error. + +
+
+ +
+
+ +**output_format:** `typing.Optional[AllowedOutputFormats]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + +
+
+ +
+
+ +**enable_logging:** `typing.Optional[bool]` — When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers. + +
+
+ +
+
+ +**model_id:** `typing.Optional[str]` — Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. + +
+
+ +
+
+ +**language_code:** `typing.Optional[str]` — Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support the provided language code, it will be ignored. This parameter is not supported for multilingual_v2 models. + +
+
+ +
+
+ +**settings:** `typing.Optional[ToDialogueSettingsResponseModel]` — Settings controlling the dialogue generation. + +
+
+ +
+
+ +**previous_text:** `typing.Optional[str]` — The text that comes immediately before this generation, used to condition the model for prosodic continuity. A maximum of 100 characters can be sent. Not supported by every model. + +
+
+ +
+
+ +**future_text:** `typing.Optional[str]` — The text that comes immediately after this generation, used to condition the model for prosodic continuity. A maximum of 100 characters can be sent. Not supported by every model. + +
+
+ +
+
+ +**pronunciation_dictionary_locators:** `typing.Optional[typing.List[PronunciationDictionaryVersionLocator]]` — A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request + +
+
+ +
+
+ +**seed:** `typing.Optional[int]` — If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + +
+
+ +
+
+ +**apply_text_normalization:** `typing.Optional[BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPostApplyTextNormalization]` — This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. + +
+
+ +
+
+ +**use_pvc_as_ivc:** `typing.Optional[bool]` — Whether to use the IVC version of a professional voice. This may improve expressiveness and reduce latency. + +
+
+ +
+
+ +**previous_request_ids:** `typing.Optional[typing.List[str]]` — A list of request_ids of dialogue generations that came before this one. Used to condition the model for continuity when splitting a large task into multiple requests. A maximum of 3 request_ids can be sent. The last request_id is the audio which is closest to the current request. Not supported by every model. + +
+
+ +
+
+ +**next_request_ids:** `typing.Optional[typing.List[str]]` — A list of request_ids of dialogue generations that come after this one. Useful for maintaining continuity when regenerating a clip in the middle of a sequence. A maximum of 3 request_ids can be sent. The first request_id is the audio which is closest to the current request. Not supported by every model. + +
+
+ +
+
+ +**audio_effects:** `typing.Optional[EffectsSpecInput]` — Audio effects applied to the generated audio. Unknown IDs return 404 with `param` naming the field. Reverb (`environment_id` with `send_level` above 0) and a non-zero `pan` produce stereo audio and are rejected with 400 for `ulaw_*`, `alaw_*`, and `pcm_*` output formats. Effects don't change the cost of the request. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.text_to_dialogue.stream_with_timestamps(...) -> typing.Iterator[bytes] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Converts a list of text and voice ID pairs into speech (dialogue) and returns a stream of JSON blobs containing audio as a base64 encoded string and timestamps +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs, DialogueInput +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.text_to_dialogue.stream_with_timestamps( + output_format="mp3_22050_32", + enable_logging=True, + inputs=[ + DialogueInput( + text="Hello, how are you?", + voice_id="bYTqZQo3Jz7LQtmGTgwi", + ), + DialogueInput( + text="I\'m doing well, thank you!", + voice_id="6lCwbsX1yVjD49QmpkTR", + ) + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**inputs:** `typing.List[DialogueInput]` — A list of dialogue inputs, each containing text and a voice ID which will be converted into speech. The maximum number of unique voice IDs is 10. For reliable generation, keep the total character count across all `inputs[].text` values at or below 2,000 characters per request. Longer requests can terminate early in streaming responses or return a validation error. + +
+
+ +
+
+ +**output_format:** `typing.Optional[AllowedOutputFormats]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + +
+
+ +
+
+ +**enable_logging:** `typing.Optional[bool]` — When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers. + +
+
+ +
+
+ +**model_id:** `typing.Optional[str]` — Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. + +
+
+ +
+
+ +**language_code:** `typing.Optional[str]` — Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support the provided language code, it will be ignored. This parameter is not supported for multilingual_v2 models. + +
+
+ +
+
+ +**settings:** `typing.Optional[ToDialogueSettingsResponseModel]` — Settings controlling the dialogue generation. + +
+
+ +
+
+ +**pronunciation_dictionary_locators:** `typing.Optional[typing.List[PronunciationDictionaryVersionLocator]]` — A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request + +
+
+ +
+
+ +**seed:** `typing.Optional[int]` — If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + +
+
+ +
+
+ +**apply_text_normalization:** `typing.Optional[BodyTextToDialogueStreamWithTimestampsApplyTextNormalization]` — This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. + +
+
+ +
+
+ +**use_pvc_as_ivc:** `typing.Optional[bool]` — Whether to use the IVC version of a professional voice. This may improve expressiveness and reduce latency. + +
+
+ +
+
+ +**previous_request_ids:** `typing.Optional[typing.List[str]]` — A list of request_ids of dialogue generations that came before this one. Used to condition the model for continuity when splitting a large task into multiple requests. A maximum of 3 request_ids can be sent. The last request_id is the audio which is closest to the current request. Not supported by every model. + +
+
+ +
+
+ +**next_request_ids:** `typing.Optional[typing.List[str]]` — A list of request_ids of dialogue generations that come after this one. Useful for maintaining continuity when regenerating a clip in the middle of a sequence. A maximum of 3 request_ids can be sent. The first request_id is the audio which is closest to the current request. Not supported by every model. + +
+
+ +
+
+ +**previous_text:** `typing.Optional[str]` — The text that comes immediately before this generation, used to condition the model for prosodic continuity. A maximum of 100 characters can be sent. Not supported by every model. + +
+
+ +
+
+ +**future_text:** `typing.Optional[str]` — The text that comes immediately after this generation, used to condition the model for prosodic continuity. A maximum of 100 characters can be sent. Not supported by every model. + +
+
+ +
+
+ +**audio_effects:** `typing.Optional[EffectsSpecInput]` — Audio effects applied to the generated audio. Unknown IDs return 404 with `param` naming the field. Reverb (`environment_id` with `send_level` above 0) and a non-zero `pan` produce stereo audio and are rejected with 400 for `ulaw_*`, `alaw_*`, and `pcm_*` output formats. Effects don't change the cost of the request. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.text_to_dialogue.convert_with_timestamps(...) -> AudioWithTimestampsAndVoiceSegmentsResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Generate dialogue from text with precise character-level timing information for audio-text synchronization. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs, DialogueInput +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.text_to_dialogue.convert_with_timestamps( + output_format="alaw_8000", + enable_logging=True, + inputs=[ + DialogueInput( + text="Hello, how are you?", + voice_id="bYTqZQo3Jz7LQtmGTgwi", + ), + DialogueInput( + text="I\'m doing well, thank you!", + voice_id="6lCwbsX1yVjD49QmpkTR", + ) + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**inputs:** `typing.List[DialogueInput]` — A list of dialogue inputs, each containing text and a voice ID which will be converted into speech. The maximum number of unique voice IDs is 10. For reliable generation, keep the total character count across all `inputs[].text` values at or below 2,000 characters per request. Longer requests can terminate early in streaming responses or return a validation error. + +
+
+ +
+
+ +**output_format:** `typing.Optional[TextToDialogueConvertWithTimestampsRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM and WAV formats with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + +
+
+ +
+
+ +**enable_logging:** `typing.Optional[bool]` — When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers. + +
+
+ +
+
+ +**model_id:** `typing.Optional[str]` — Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. + +
+
+ +
+
+ +**language_code:** `typing.Optional[str]` — Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support the provided language code, it will be ignored. This parameter is not supported for multilingual_v2 models. + +
+
+ +
+
+ +**settings:** `typing.Optional[ToDialogueSettingsResponseModel]` — Settings controlling the dialogue generation. + +
+
+ +
+
+ +**pronunciation_dictionary_locators:** `typing.Optional[typing.List[PronunciationDictionaryVersionLocator]]` — A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request + +
+
+ +
+
+ +**seed:** `typing.Optional[int]` — If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + +
+
+ +
+
+ +**apply_text_normalization:** `typing.Optional[BodyTextToDialogueFullWithTimestampsApplyTextNormalization]` — This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. + +
+
+ +
+
+ +**use_pvc_as_ivc:** `typing.Optional[bool]` — Whether to use the IVC version of a professional voice. This may improve expressiveness and reduce latency. + +
+
+ +
+
+ +**previous_request_ids:** `typing.Optional[typing.List[str]]` — A list of request_ids of dialogue generations that came before this one. Used to condition the model for continuity when splitting a large task into multiple requests. A maximum of 3 request_ids can be sent. The last request_id is the audio which is closest to the current request. Not supported by every model. + +
+
+ +
+
+ +**next_request_ids:** `typing.Optional[typing.List[str]]` — A list of request_ids of dialogue generations that come after this one. Useful for maintaining continuity when regenerating a clip in the middle of a sequence. A maximum of 3 request_ids can be sent. The first request_id is the audio which is closest to the current request. Not supported by every model. + +
+
+ +
+
+ +**previous_text:** `typing.Optional[str]` — The text that comes immediately before this generation, used to condition the model for prosodic continuity. A maximum of 100 characters can be sent. Not supported by every model. + +
+
+ +
+
+ +**future_text:** `typing.Optional[str]` — The text that comes immediately after this generation, used to condition the model for prosodic continuity. A maximum of 100 characters can be sent. Not supported by every model. + +
+
+ +
+
+ +**audio_effects:** `typing.Optional[EffectsSpecInput]` — Audio effects applied to the generated audio. Unknown IDs return 404 with `param` naming the field. Reverb (`environment_id` with `send_level` above 0) and a non-zero `pan` produce stereo audio and are rejected with 400 for `ulaw_*`, `alaw_*`, and `pcm_*` output formats. Effects don't change the cost of the request. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## SpeechToSpeech +
client.speech_to_speech.convert(...) -> typing.Iterator[bytes] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Transform audio from one voice to another. Maintain full control over emotion, timing and delivery. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.speech_to_speech.convert( + voice_id="JBFqnCBsd6RMkjVDRZzb", + output_format="mp3_44100_128", + audio="example_audio", + model_id="eleven_multilingual_sts_v2", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voice_id:** `str` — ID of the voice to be used. Use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices. + +
+
+ +
+
+ +**audio:** `core.File` — The audio file which holds the content and emotion that will control the generated speech. + +
+
+ +
+
+ +**enable_logging:** `typing.Optional[bool]` — When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers. + +
+
+ +
+
+ +**optimize_streaming_latency:** `typing.Optional[int]` + +You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. Possible values: +0 - default mode (no latency optimizations) +1 - normal latency optimizations (about 50% of possible latency improvement of option 3) +2 - strong latency optimizations (about 75% of possible latency improvement of option 3) +3 - max latency optimizations +4 - max latency optimizations, but also with text normalizer turned off for even more latency savings (best latency, but can mispronounce eg numbers and dates). + +Defaults to None. + +
+
+ +
+
+ +**output_format:** `typing.Optional[SpeechToSpeechConvertRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM and WAV formats with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + +
+
+ +
+
+ +**model_id:** `typing.Optional[str]` — Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for speech to speech, you can check this using the can_do_voice_conversion property. + +
+
+ +
+
+ +**voice_settings:** `typing.Optional[str]` — Voice settings overriding stored settings for the given voice. They are applied only on the given request. Needs to be send as a JSON encoded string. + +
+
+ +
+
+ +**seed:** `typing.Optional[int]` — If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + +
+
+ +
+
+ +**remove_background_noise:** `typing.Optional[bool]` — If set, will remove the background noise from your audio input using our audio isolation model. Only applies to Voice Changer. + +
+
+ +
+
+ +**file_format:** `typing.Optional[SpeechToSpeechRequestFileFormat]` — The format of input audio. Options are 'pcm_s16le_16' or 'other' For `pcm_s16le_16`, the input audio must be 16-bit PCM at a 16kHz sample rate, single channel (mono), and little-endian byte order. Latency will be lower than with passing an encoded waveform. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.speech_to_speech.stream(...) -> typing.Iterator[bytes] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Stream audio from one voice to another. Maintain full control over emotion, timing and delivery. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.speech_to_speech.stream( + voice_id="JBFqnCBsd6RMkjVDRZzb", + output_format="mp3_44100_128", + audio="example_audio", + model_id="eleven_multilingual_sts_v2", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voice_id:** `str` — ID of the voice to be used. Use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices. + +
+
+ +
+
+ +**audio:** `core.File` — The audio file which holds the content and emotion that will control the generated speech. + +
+
+ +
+
+ +**enable_logging:** `typing.Optional[bool]` — When enable_logging is set to false zero retention mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Zero retention mode may only be used by enterprise customers. + +
+
+ +
+
+ +**optimize_streaming_latency:** `typing.Optional[int]` + +You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. Possible values: +0 - default mode (no latency optimizations) +1 - normal latency optimizations (about 50% of possible latency improvement of option 3) +2 - strong latency optimizations (about 75% of possible latency improvement of option 3) +3 - max latency optimizations +4 - max latency optimizations, but also with text normalizer turned off for even more latency savings (best latency, but can mispronounce eg numbers and dates). + +Defaults to None. + +
+
+ +
+
+ +**output_format:** `typing.Optional[SpeechToSpeechStreamRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + +
+
+ +
+
+ +**model_id:** `typing.Optional[str]` — Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for speech to speech, you can check this using the can_do_voice_conversion property. + +
+
+ +
+
+ +**voice_settings:** `typing.Optional[str]` — Voice settings overriding stored settings for the given voice. They are applied only on the given request. Needs to be send as a JSON encoded string. + +
+
+ +
+
+ +**seed:** `typing.Optional[int]` — If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + +
+
+ +
+
+ +**remove_background_noise:** `typing.Optional[bool]` — If set, will remove the background noise from your audio input using our audio isolation model. Only applies to Voice Changer. + +
+
+ +
+
+ +**file_format:** `typing.Optional[SpeechToSpeechStreamRequestFileFormat]` — The format of input audio. Options are 'pcm_s16le_16' or 'other' For `pcm_s16le_16`, the input audio must be 16-bit PCM at a 16kHz sample rate, single channel (mono), and little-endian byte order. Latency will be lower than with passing an encoded waveform. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## TextToVoice +
client.text_to_voice.create_previews(...) -> VoiceDesignPreviewResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a voice from a text prompt. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.text_to_voice.create_previews( + output_format="mp3_22050_32", + voice_description="A sassy squeaky mouse", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voice_description:** `str` — Description to use for the created voice. + +
+
+ +
+
+ +**output_format:** `typing.Optional[AllowedOutputFormats]` — The output format of the generated audio. + +
+
+ +
+
+ +**text:** `typing.Optional[str]` — Text to generate, text length has to be between 100 and 1000. + +
+
+ +
+
+ +**auto_generate_text:** `typing.Optional[bool]` — Whether to automatically generate a text suitable for the voice description. + +
+
+ +
+
+ +**loudness:** `typing.Optional[float]` — Controls the volume level of the generated voice. -1 is quietest, 1 is loudest, 0 corresponds to roughly -24 LUFS. + +
+
+ +
+
+ +**quality:** `typing.Optional[float]` — Higher quality results in better voice output but less variety. + +
+
+ +
+
+ +**seed:** `typing.Optional[int]` — Random number that controls the voice generation. Same seed with same inputs produces same voice. + +
+
+ +
+
+ +**guidance_scale:** `typing.Optional[float]` — Controls how closely the AI follows the prompt. Lower numbers give the AI more freedom to be creative, while higher numbers force it to stick more to the prompt. High numbers can cause voice to sound artificial or robotic. We recommend to use longer, more detailed prompts at lower Guidance Scale. + +
+
+ +
+
+ +**should_enhance:** `typing.Optional[bool]` — Whether to enhance the voice description using AI to add more detail and improve voice generation quality. When enabled, the system will automatically expand simple prompts into more detailed voice descriptions. Defaults to False + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.text_to_voice.create(...) -> Voice +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a voice from previously generated voice preview. This endpoint should be called after you fetched a generated_voice_id using POST /v1/text-to-voice/design or POST /v1/text-to-voice/:voice_id/remix. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.text_to_voice.create( + voice_name="Sassy squeaky mouse", + voice_description="A sassy squeaky mouse", + generated_voice_id="37HceQefKmEi3bGovXjL", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voice_name:** `str` — Name to use for the created voice. + +
+
+ +
+
+ +**voice_description:** `str` — Description to use for the created voice. + +
+
+ +
+
+ +**generated_voice_id:** `str` — The generated_voice_id to create; obtain it from POST /v1/text-to-voice/design, POST /v1/text-to-voice/:voice_id/remix, or the response headers when generating previews. + +
+
+ +
+
+ +**labels:** `typing.Optional[typing.Dict[str, typing.Optional[str]]]` — Optional, metadata to add to the created voice. Defaults to None. + +
+
+ +
+
+ +**played_not_selected_voice_ids:** `typing.Optional[typing.List[str]]` — List of voice ids that the user has played but not selected. Used for RLHF. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.text_to_voice.design(...) -> VoiceDesignPreviewResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Design a voice via a prompt. This method returns a list of voice previews. Each preview has a generated_voice_id and a sample of the voice as base64 encoded mp3 audio. To create a voice use the generated_voice_id of the preferred preview with the /v1/text-to-voice endpoint. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.text_to_voice.design( + output_format="mp3_22050_32", + voice_description="A sassy squeaky mouse", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voice_description:** `str` — Description to use for the created voice. + +
+
+ +
+
+ +**output_format:** `typing.Optional[AllowedOutputFormats]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + +
+
+ +
+
+ +**model_id:** `typing.Optional[VoiceDesignRequestModelModelId]` — Model to use for the voice generation. Possible values: eleven_multilingual_ttv_v2, eleven_ttv_v3. + +
+
+ +
+
+ +**text:** `typing.Optional[str]` — Text to generate, text length has to be between 100 and 1000. + +
+
+ +
+
+ +**auto_generate_text:** `typing.Optional[bool]` — Whether to automatically generate a text suitable for the voice description. + +
+
+ +
+
+ +**loudness:** `typing.Optional[float]` — Controls the volume level of the generated voice. -1 is quietest, 1 is loudest, 0 corresponds to roughly -24 LUFS. + +
+
+ +
+
+ +**seed:** `typing.Optional[int]` — Random number that controls the voice generation. Same seed with same inputs produces same voice. + +
+
+ +
+
+ +**guidance_scale:** `typing.Optional[float]` — Controls how closely the AI follows the prompt. Lower numbers give the AI more freedom to be creative, while higher numbers force it to stick more to the prompt. High numbers can cause voice to sound artificial or robotic. We recommend to use longer, more detailed prompts at lower Guidance Scale. + +
+
+ +
+
+ +**stream_previews:** `typing.Optional[bool]` — Determines whether the Text to Voice previews should be included in the response. If true, only the generated IDs will be returned which can then be streamed via the /v1/text-to-voice/:generated_voice_id/stream endpoint. + +
+
+ +
+
+ +**should_enhance:** `typing.Optional[bool]` — Whether to enhance the voice description using AI to add more detail and improve voice generation quality. When enabled, the system will automatically expand simple prompts into more detailed voice descriptions. Defaults to False + +
+
+ +
+
+ +**remixing_session_id:** `typing.Optional[str]` — The remixing session id. + +
+
+ +
+
+ +**remixing_session_iteration_id:** `typing.Optional[str]` — The id of the remixing session iteration where these generations should be attached to. If not provided, a new iteration will be created. + +
+
+ +
+
+ +**quality:** `typing.Optional[float]` — Higher quality results in better voice output but less variety. + +
+
+ +
+
+ +**reference_audio_base_64:** `typing.Optional[str]` — Reference audio to use for the voice generation. The audio should be base64 encoded. Only supported when using the eleven_ttv_v3 model. + +
+
+ +
+
+ +**prompt_strength:** `typing.Optional[float]` — Controls the balance of prompt versus reference audio when generating voice samples. 0 means almost no prompt influence, 1 means almost no reference audio influence. Only supported when using the eleven_ttv_v3 model. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.text_to_voice.remix(...) -> VoiceDesignPreviewResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Remix an existing voice via a prompt. This method returns a list of voice previews. Each preview has a generated_voice_id and a sample of the voice as base64 encoded mp3 audio. To create a voice use the generated_voice_id of the preferred preview with the /v1/text-to-voice endpoint. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.text_to_voice.remix( + voice_id="21m00Tcm4TlvDq8ikWAM", + output_format="mp3_22050_32", + voice_description="Make the voice have a higher pitch.", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voice_id:** `str` — Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices. + +
+
+ +
+
+ +**voice_description:** `str` ��� Description of the changes to make to the voice. + +
+
+ +
+
+ +**output_format:** `typing.Optional[AllowedOutputFormats]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + +
+
+ +
+
+ +**text:** `typing.Optional[str]` — Text to generate, text length has to be between 100 and 1000. + +
+
+ +
+
+ +**auto_generate_text:** `typing.Optional[bool]` — Whether to automatically generate a text suitable for the voice description. + +
+
+ +
+
+ +**loudness:** `typing.Optional[float]` — Controls the volume level of the generated voice. -1 is quietest, 1 is loudest, 0 corresponds to roughly -24 LUFS. + +
+
+ +
+
+ +**seed:** `typing.Optional[int]` — Random number that controls the voice generation. Same seed with same inputs produces same voice. + +
+
+ +
+
+ +**guidance_scale:** `typing.Optional[float]` — Controls how closely the AI follows the prompt. Lower numbers give the AI more freedom to be creative, while higher numbers force it to stick more to the prompt. High numbers can cause voice to sound artificial or robotic. We recommend to use longer, more detailed prompts at lower Guidance Scale. + +
+
+ +
+
+ +**stream_previews:** `typing.Optional[bool]` — Determines whether the Text to Voice previews should be included in the response. If true, only the generated IDs will be returned which can then be streamed via the /v1/text-to-voice/:generated_voice_id/stream endpoint. + +
+
+ +
+
+ +**remixing_session_id:** `typing.Optional[str]` — The remixing session id. + +
+
+ +
+
+ +**remixing_session_iteration_id:** `typing.Optional[str]` — The id of the remixing session iteration where these generations should be attached to. If not provided, a new iteration will be created. + +
+
+ +
+
+ +**prompt_strength:** `typing.Optional[float]` — Controls the balance of prompt versus reference audio when generating voice samples. 0 means almost no prompt influence, 1 means almost no reference audio influence. Only supported when using the eleven_ttv_v3 model. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## User +
client.user.get() -> User +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets information about the user +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.user.get() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Voices +
client.voices.get_all(...) -> GetVoicesResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of all available voices for a user. Stops working once the user's workspace exceeds 500 voices. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.voices.get_all( + show_legacy=True, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**show_legacy:** `typing.Optional[bool]` — If set to true, legacy premade voices will be included in responses from /v1/voices + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.voices.get(...) -> Voice +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata about a specific voice. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.voices.get( + voice_id="21m00Tcm4TlvDq8ikWAM", + with_settings=True, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voice_id:** `str` — ID of the voice to be used. You can use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices. + +
+
+ +
+
+ +**with_settings:** `typing.Optional[bool]` — This parameter is now deprecated. It is ignored and will be removed in a future version. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.voices.delete(...) -> DeleteVoiceResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Deletes a voice by its ID. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.voices.delete( + voice_id="21m00Tcm4TlvDq8ikWAM", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voice_id:** `str` — ID of the voice to be used. You can use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.voices.update(...) -> EditVoiceResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Edit a voice created by you. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.voices.update( + voice_id="21m00Tcm4TlvDq8ikWAM", + files=["example_files"], + name="name", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voice_id:** `str` — ID of the voice to be used. You can use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices. + +
+
+ +
+
+ +**name:** `str` — The name that identifies this voice. This will be displayed in the dropdown of the website. + +
+
+ +
+
+ +**files:** `typing.Optional[typing.List[core.File]]` — Audio files to add to the voice + +
+
+ +
+
+ +**remove_background_noise:** `typing.Optional[bool]` — If set will remove background noise for voice samples using our audio isolation model. If the samples do not include background noise, it can make the quality worse. + +
+
+ +
+
+ +**description:** `typing.Optional[str]` — A description of the voice. + +
+
+ +
+
+ +**labels:** `typing.Optional[EditVoiceRequestLabels]` — Labels for the voice. Keys can be language, accent, gender, or age. + +
+
+ +
+
+ +**moderate_metadata:** `typing.Optional[bool]` — Run synchronous LLM moderation over the voice name and description when they change. Has no effect unless the voice_library_metadata_moderation feature flag is enabled for the user. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.voices.search(...) -> GetVoicesV2Response +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets a list of all available voices for a user with search, filtering and pagination. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.voices.search( + next_page_token="next_page_token", + page_size=1, + search="search", + sort="sort", + sort_direction="sort_direction", + voice_type="voice_type", + category="category", + fine_tuning_state="fine_tuning_state", + collection_id="collection_id", + gender="gender", + age="age", + language=[ + "language" + ], + accent="accent", + use_cases=[ + "use_cases" + ], + min_notice_period_days=1, + include_custom_rates=True, + include_live_moderated=True, + high_quality=True, + include_total_count=True, + voice_ids=[ + "voice_ids" + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**next_page_token:** `typing.Optional[str]` — The next page token to use for pagination. Returned from the previous request. Use this in combination with the has_more flag for reliable pagination. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many voices to return at maximum. Can not exceed 100, defaults to 10. Page 0 may include more voices due to default voices being included. + +
+
+ +
+
+ +**search:** `typing.Optional[str]` — Search term to filter voices by. Searches in name, description, labels, category. + +
+
+ +
+
+ +**sort:** `typing.Optional[str]` — Which field to sort by, one of 'created_at_unix' or 'name'. 'created_at_unix' may not be available for older voices. + +
+
+ +
+
+ +**sort_direction:** `typing.Optional[str]` — Which direction to sort the voices in. 'asc' or 'desc'. + +
+
+ +
+
+ +**voice_type:** `typing.Optional[str]` — Type of the voice to filter by. One of 'personal', 'community', 'default', 'workspace', 'non-default', 'non-community', 'saved'. 'non-default' is equal to all but 'default'. 'non-community' is equal to 'personal' and 'workspace' combined (excludes library copies). 'saved' is equal to non-default, but includes default voices if they have been added to a collection. + +
+
+ +
+
+ +**category:** `typing.Optional[str]` — Category of the voice to filter by. One of 'premade', 'cloned', 'generated', 'professional' + +
+
+ +
+
+ +**fine_tuning_state:** `typing.Optional[str]` — State of the voice's fine tuning to filter by. Applicable only to professional voices clones. One of 'draft', 'not_verified', 'not_started', 'queued', 'fine_tuning', 'fine_tuned', 'failed', 'delayed' + +
+
+ +
+
+ +**collection_id:** `typing.Optional[str]` — Collection ID to filter voices by. + +
+
+ +
+
+ +**gender:** `typing.Optional[str]` — Gender used for filtering, based on the voice's 'gender' label. + +
+
+ +
+
+ +**age:** `typing.Optional[str]` — Age used for filtering, based on the voice's 'age' label. + +
+
+ +
+
+ +**language:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Languages used for filtering, based on the voice's 'language' label. Voices matching any of the given languages are returned. + +
+
+ +
+
+ +**accent:** `typing.Optional[str]` — Accent used for filtering, based on the voice's 'accent' label. + +
+
+ +
+
+ +**use_cases:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Use cases used for filtering, based on the voice's 'use_case' label. Voices matching any of the given use cases are returned. + +
+
+ +
+
+ +**min_notice_period_days:** `typing.Optional[int]` — Filter to voices whose sharing notice period is at least the given number of days. + +
+
+ +
+
+ +**include_custom_rates:** `typing.Optional[bool]` — Whether to include voices that have a custom sharing rate. Defaults to including them. + +
+
+ +
+
+ +**include_live_moderated:** `typing.Optional[bool]` — Whether to include voices that have live moderation enabled. Defaults to including them. + +
+
+ +
+
+ +**high_quality:** `typing.Optional[bool]` — When true, only return studio-quality voices (those whose category is 'high_quality'). + +
+
+ +
+
+ +**include_total_count:** `typing.Optional[bool]` — Whether to include the total count of voices found in the response. NOTE: The total_count value is a live snapshot and may change between requests as users create, modify, or delete voices. For pagination, rely on the has_more flag instead. Only enable this when you actually need the total count (e.g., for display purposes), as it incurs a performance cost. + +
+
+ +
+
+ +**voice_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Voice IDs to lookup by. Maximum 100 voice IDs. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.voices.replicate_to_isolated_environment(...) -> ReplicateVoiceToIsolatedEnvironmentResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Replicates an Instant Voice Clone or Voice Design voice to a workspace in a different data residency. The target workspace must belong to the same consolidated billing group. The user must have VOICES_WRITE in the source workspace, and be an admin on the source voice. Human users (i.e. not service accounts) must also have VOICES_WRITE in the target workspace. This endpoint is available on the central environment only. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.voices.replicate_to_isolated_environment( + voice_id="21m00Tcm4TlvDq8ikWAM", + target_workspace_id="target_workspace_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voice_id:** `str` — Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices. + +
+
+ +
+
+ +**target_workspace_id:** `str` — ID of the workspace to replicate the voice into. It must belong to the same consolidated billing group as the calling workspace; the target's data residency is derived from that link. + +
+
+ +
+
+ +**preserve_voice_id:** `typing.Optional[bool]` — When true (default) the replicated voice keeps the same voice ID in the target residency; set to false to assign a new voice ID. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.voices.share(...) -> AddVoiceResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Add a shared voice to your collection of Voices +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.voices.share( + public_user_id="63e06b7e7cafdc46be4d2e0b3f045940231ae058d508589653d74d1265a574ca", + voice_id="21m00Tcm4TlvDq8ikWAM", + new_name="John Smith", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**public_user_id:** `str` — Public user ID used to publicly identify ElevenLabs users. + +
+
+ +
+
+ +**voice_id:** `str` — ID of the voice to be used. You can use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices. + +
+
+ +
+
+ +**new_name:** `str` — The name that identifies this voice. This will be displayed in the dropdown of the website. + +
+
+ +
+
+ +**bookmarked:** `typing.Optional[bool]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.voices.find_similar_voices(...) -> GetLibraryVoicesResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of shared voices similar to the provided audio sample. If neither similarity_threshold nor top_k is provided, we will apply default values. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.voices.find_similar_voices( + audio_file="example_audio_file", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**audio_file:** `typing.Optional[core.File]` + +
+
+ +
+
+ +**similarity_threshold:** `typing.Optional[float]` — Threshold for voice similarity between provided sample and library voices. Values range from 0 to 2. The smaller the value the more similar voices will be returned. + +
+
+ +
+
+ +**top_k:** `typing.Optional[int]` — Number of most similar voices to return. If similarity_threshold is provided, less than this number of voices may be returned. Values range from 1 to 100. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.voices.get_shared(...) -> GetLibraryVoicesResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieves a list of shared voices. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.voices.get_shared( + page_size=1, + category="professional", + gender="gender", + age="age", + accent="accent", + language="language", + locale="locale", + search="search", + use_cases=[ + "use_cases" + ], + descriptives=[ + "descriptives" + ], + featured=True, + min_notice_period_days=1, + include_custom_rates=True, + include_live_moderated=True, + reader_app_enabled=True, + owner_id="owner_id", + sort="created_date", + page=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many shared voices to return at maximum. Can not exceed 100, defaults to 30. + +
+
+ +
+
+ +**category:** `typing.Optional[VoicesGetSharedRequestCategory]` — Voice category used for filtering + +
+
+ +
+
+ +**gender:** `typing.Optional[str]` — Gender used for filtering + +
+
+ +
+
+ +**age:** `typing.Optional[str]` — Age used for filtering + +
+
+ +
+
+ +**accent:** `typing.Optional[str]` — Accent used for filtering + +
+
+ +
+
+ +**language:** `typing.Optional[str]` — Language used for filtering + +
+
+ +
+
+ +**locale:** `typing.Optional[str]` — Locale used for filtering + +
+
+ +
+
+ +**search:** `typing.Optional[str]` — Search term used for filtering + +
+
+ +
+
+ +**use_cases:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Use-case used for filtering + +
+
+ +
+
+ +**descriptives:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Search term used for filtering + +
+
+ +
+
+ +**featured:** `typing.Optional[bool]` — Filter featured voices + +
+
+ +
+
+ +**min_notice_period_days:** `typing.Optional[int]` — Filter voices with a minimum notice period of the given number of days. + +
+
+ +
+
+ +**include_custom_rates:** `typing.Optional[bool]` — Include/exclude voices with custom rates + +
+
+ +
+
+ +**include_live_moderated:** `typing.Optional[bool]` — Include/exclude voices that are live moderated + +
+
+ +
+
+ +**reader_app_enabled:** `typing.Optional[bool]` — Filter voices that are enabled for the reader app + +
+
+ +
+
+ +**owner_id:** `typing.Optional[str]` — Filter voices by public owner ID + +
+
+ +
+
+ +**sort:** `typing.Optional[VoicesGetSharedRequestSort]` — Sort criteria. Must be one of: created_date, usage_character_count_1y, trending, cloned_by_count. + +
+
+ +
+
+ +**page:** `typing.Optional[int]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Studio +
client.studio.create_podcast(...) -> PodcastProjectResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create and auto-convert a podcast project. Currently, the LLM cost is covered by us but you will still be charged for the audio generation. In the future, you will be charged for both the LLM and audio generation costs. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs, PodcastConversationModeData, PodcastTextSource +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.studio.create_podcast( + model_id="eleven_multilingual_v2", + mode={ + "type": "conversation", + "conversation": PodcastConversationModeData( + host_voice_id="aw1NgEzBg83R7vgmiJt6", + guest_voice_id="aw1NgEzBg83R7vgmiJt7", + ) + }, + source=PodcastTextSource( + type="text", + text="This is a test podcast.", + ), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**model_id:** `str` — The ID of the model to be used for this Studio project, you can query GET /v1/models to list all available models. + +
+
+ +
+
+ +**mode:** `BodyCreatePodcastV1StudioPodcastsPostMode` — The type of podcast to generate. Can be 'conversation', an interaction between two voices, or 'bulletin', a monologue. + +
+
+ +
+
+ +**source:** `BodyCreatePodcastV1StudioPodcastsPostSource` — The source content for the Podcast. + +
+
+ +
+
+ +**safety_identifier:** `typing.Optional[str]` — Used for moderation. Your workspace must be allowlisted to use this feature. + +
+
+ +
+
+ +**quality_preset:** `typing.Optional[QualityPresetType]` + +Output quality of the generated audio. Must be one of: +'standard' - standard output format, 128kbps with 44.1kHz sample rate. +'high' - high quality output format, 192kbps with 44.1kHz sample rate and major improvements on our side. +'ultra' - ultra quality output format, 192kbps with 44.1kHz sample rate and highest improvements on our side. +'ultra_lossless' - ultra quality output format, 705.6kbps with 44.1kHz sample rate and highest improvements on our side in a fully lossless format. +If not provided, defaults to the highest quality preset available on your subscription tier. + +
+
+ +
+
+ +**duration_scale:** `typing.Optional[BodyCreatePodcastV1StudioPodcastsPostDurationScale]` + +Duration of the generated podcast. Must be one of: +short - produces podcasts shorter than 3 minutes. +default - produces podcasts roughly between 3-7 minutes. +long - produces podcasts longer than 7 minutes. + +
+
+ +
+
+ +**language:** `typing.Optional[str]` — An optional language of the Studio project. Two-letter language code (ISO 639-1). + +
+
+ +
+
+ +**intro:** `typing.Optional[str]` — The intro text that will always be added to the beginning of the podcast. + +
+
+ +
+
+ +**outro:** `typing.Optional[str]` — The outro text that will always be added to the end of the podcast. + +
+
+ +
+
+ +**instructions_prompt:** `typing.Optional[str]` — Additional instructions prompt for the podcast generation used to adjust the podcast's style and tone. + +
+
+ +
+
+ +**highlights:** `typing.Optional[typing.List[str]]` — A brief summary or highlights of the Studio project's content, providing key points or themes. This should be between 10 and 70 characters. + +
+
+ +
+
+ +**callback_url:** `typing.Optional[str]` + + + A url that will be called by our service when the Studio project is converted. Request will contain a json blob containing the status of the conversion + Messages: + 1. When project was converted successfully: + { + type: "project_conversion_status", + event_timestamp: 1234567890, + data: { + request_id: "1234567890", + project_id: "21m00Tcm4TlvDq8ikWAM", + conversion_status: "success", + project_snapshot_id: "22m00Tcm4TlvDq8ikMAT", + error_details: None, + } + } + 2. When project conversion failed: + { + type: "project_conversion_status", + event_timestamp: 1234567890, + data: { + request_id: "1234567890", + project_id: "21m00Tcm4TlvDq8ikWAM", + conversion_status: "error", + project_snapshot_id: None, + error_details: "Error details if conversion failed" + } + } + + 3. When chapter was converted successfully: + { + type: "chapter_conversion_status", + event_timestamp: 1234567890, + data: { + request_id: "1234567890", + project_id: "21m00Tcm4TlvDq8ikWAM", + chapter_id: "22m00Tcm4TlvDq8ikMAT", + conversion_status: "success", + chapter_snapshot_id: "23m00Tcm4TlvDq8ikMAV", + error_details: None, + } + } + 4. When chapter conversion failed: + { + type: "chapter_conversion_status", + event_timestamp: 1234567890, + data: { + request_id: "1234567890", + project_id: "21m00Tcm4TlvDq8ikWAM", + chapter_id: "22m00Tcm4TlvDq8ikMAT", + conversion_status: "error", + chapter_snapshot_id: None, + error_details: "Error details if conversion failed" + } + } + + +
+
+ +
+
+ +**apply_text_normalization:** `typing.Optional[BodyCreatePodcastV1StudioPodcastsPostApplyTextNormalization]` + + + This parameter controls text normalization with four modes: 'auto', 'on', 'apply_english' and 'off'. + When set to 'auto', the system will automatically decide whether to apply text normalization + (e.g., spelling out numbers). With 'on', text normalization will always be applied, while + with 'off', it will be skipped. 'apply_english' is the same as 'on' but will assume that text is in English. + + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## dubbing +
client.dubbing.list(...) -> DubbingMetadataPageResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List the dubs you have access to. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.dubbing.list( + cursor="cursor", + page_size=1, + dubbing_status="dubbing", + dubbing_statuses=[ + "queued" + ], + dubbing_models=[ + "dubbing_v1" + ], + target_language_codes=[ + "target_language_codes" + ], + creation_sources=[ + "flow_node" + ], + filter_by_creator="personal", + order_by="created_at", + order_direction="DESCENDING", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many dubs to return at maximum. Can not exceed 200, defaults to 100. + +
+
+ +
+
+ +**dubbing_status:** `typing.Optional[DubbingListRequestDubbingStatus]` — What state the dub is currently in. + +
+
+ +
+
+ +**dubbing_statuses:** `typing.Optional[typing.Union[DubbingListRequestDubbingStatusesItem, typing.Sequence[DubbingListRequestDubbingStatusesItem]]]` — Filter by dubbing status. + +
+
+ +
+
+ +**dubbing_models:** `typing.Optional[typing.Union[DubbingListRequestDubbingModelsItem, typing.Sequence[DubbingListRequestDubbingModelsItem]]]` — Filter by dubbing model generation. + +
+
+ +
+
+ +**target_language_codes:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter by target language code. + +
+
+ +
+
+ +**creation_sources:** `typing.Optional[typing.Union[DubbingListRequestCreationSourcesItem, typing.Sequence[DubbingListRequestCreationSourcesItem]]]` — Filter by dubbing creation source. + +
+
+ +
+
+ +**filter_by_creator:** `typing.Optional[DubbingListRequestFilterByCreator]` — Filters who created the resources being listed, whether it was the user running the request or someone else that shared the resource with them. + +
+
+ +
+
+ +**order_by:** `typing.Optional[DubbingListRequestOrderBy]` — The field to use for ordering results from this query. + +
+
+ +
+
+ +**order_direction:** `typing.Optional[DubbingListRequestOrderDirection]` — The order direction to use for results from this query. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.dubbing.create(...) -> DoDubbingResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Dubs a provided audio or video file into given language. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.dubbing.create( + file="example_file", + csv_file="example_csv_file", + foreground_audio_file="example_foreground_audio_file", + background_audio_file="example_background_audio_file", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**file:** `typing.Optional[core.File]` — A list of file paths to audio recordings intended for voice cloning + +
+
+ +
+
+ +**csv_file:** `typing.Optional[core.File]` — CSV file containing transcription/translation metadata + +
+
+ +
+
+ +**foreground_audio_file:** `typing.Optional[core.File]` — For use only with csv input + +
+
+ +
+
+ +**background_audio_file:** `typing.Optional[core.File]` — For use only with csv input + +
+
+ +
+
+ +**name:** `typing.Optional[str]` — Name of the dubbing project. + +
+
+ +
+
+ +**source_url:** `typing.Optional[str]` — URL of the source video/audio file. + +
+
+ +
+
+ +**source_lang:** `typing.Optional[str]` — Source language. Expects a valid iso639-1 or iso639-3 language code. + +
+
+ +
+
+ +**target_lang:** `typing.Optional[str]` — The Target language to dub the content into. Expects a valid iso639-1 or iso639-3 language code. + +
+
+ +
+
+ +**target_accent:** `typing.Optional[str]` — [Experimental] An accent to apply when selecting voices from the library and to use to inform translation of the dialect to prefer. + +
+
+ +
+
+ +**num_speakers:** `typing.Optional[int]` — Number of speakers to use for the dubbing. Set to 0 to automatically detect the number of speakers + +
+
+ +
+
+ +**watermark:** `typing.Optional[bool]` — Whether to apply watermark to the output video. + +
+
+ +
+
+ +**start_time:** `typing.Optional[int]` — Start time of the source video/audio file. + +
+
+ +
+
+ +**end_time:** `typing.Optional[int]` — End time of the source video/audio file. + +
+
+ +
+
+ +**highest_resolution:** `typing.Optional[bool]` — Whether to use the highest resolution available. + +
+
+ +
+
+ +**drop_background_audio:** `typing.Optional[bool]` — An advanced setting. Whether to drop background audio from the final dub. This can improve dub quality where it's known that audio shouldn't have a background track such as for speeches or monologues. + +
+
+ +
+
+ +**use_profanity_filter:** `typing.Optional[bool]` — [BETA] Whether transcripts should have profanities censored with the words '[censored]' + +
+
+ +
+
+ +**dubbing_studio:** `typing.Optional[bool]` — Whether to prepare dub for edits in dubbing studio or edits as a dubbing resource. + +
+
+ +
+
+ +**disable_voice_cloning:** `typing.Optional[bool]` — Instead of using a voice clone in dubbing, use a similar voice from the ElevenLabs Voice Library. Voices used from the library will contribute towards a workspace's custom voices limit, and if there aren't enough available slots the dub will fail. Using this feature requires the caller to have the 'add_voice_from_voice_library' permission on their workspace to access new voices. + +
+
+ +
+
+ +**mode:** `typing.Optional[DubRequestMode]` — The mode in which to run this Dubbing job. Defaults to automatic, use manual if specifically providing a CSV transcript to use. Note that manual mode is experimental and production use is strongly discouraged. + +
+
+ +
+
+ +**csv_fps:** `typing.Optional[float]` — Frames per second to use when parsing a CSV file for dubbing. If not provided, FPS will be inferred from timecodes. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.dubbing.get(...) -> DubbingMetadataResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata about a dubbing project, including whether it's still in progress or not +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.dubbing.get( + dubbing_id="dubbing_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**dubbing_id:** `str` — ID of the dubbing project. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.dubbing.delete(...) -> DeleteDubbingResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Deletes a dubbing project. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.dubbing.delete( + dubbing_id="dubbing_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**dubbing_id:** `str` — ID of the dubbing project. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Models +
client.models.list() -> typing.List[Model] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets a list of available models. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.models.list() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## AudioNative +
client.audio_native.create(...) -> AudioNativeCreateProjectResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates Audio Native enabled project, optionally starts conversion and returns project ID and embeddable HTML snippet. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.audio_native.create( + file="example_file", + name="name", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**name:** `str` — Project name. + +
+
+ +
+
+ +**image:** `typing.Optional[str]` — (Deprecated) Image URL used in the player. If not provided, default image set in the Player settings is used. + +
+
+ +
+
+ +**author:** `typing.Optional[str]` — Author used in the player and inserted at the start of the uploaded article. If not provided, the default author set in the Player settings is used. + +
+
+ +
+
+ +**title:** `typing.Optional[str]` — Title used in the player and inserted at the top of the uploaded article. If not provided, the default title set in the Player settings is used. + +
+
+ +
+
+ +**small:** `typing.Optional[bool]` — (Deprecated) Whether to use small player or not. If not provided, default value set in the Player settings is used. + +
+
+ +
+
+ +**text_color:** `typing.Optional[str]` — Text color used in the player. If not provided, default text color set in the Player settings is used. + +
+
+ +
+
+ +**background_color:** `typing.Optional[str]` — Background color used in the player. If not provided, default background color set in the Player settings is used. + +
+
+ +
+
+ +**sessionization:** `typing.Optional[int]` — (Deprecated) Specifies for how many minutes to persist the session across page reloads. If not provided, default sessionization set in the Player settings is used. + +
+
+ +
+
+ +**voice_id:** `typing.Optional[str]` — Voice ID used to voice the content. If not provided, default voice ID set in the Player settings is used. + +
+
+ +
+
+ +**model_id:** `typing.Optional[str]` — TTS Model ID used in the player. If not provided, default model ID set in the Player settings is used. + +
+
+ +
+
+ +**file:** `typing.Optional[core.File]` — Either txt or HTML input file containing the article content. HTML should be formatted as follows '<html><body><div><p>Your content</p><h3>More of your content</h3><p>Some more of your content</p></div></body></html>' + +
+
+ +
+
+ +**auto_convert:** `typing.Optional[bool]` — Whether to auto convert the project to audio or not. + +
+
+ +
+
+ +**apply_text_normalization:** `typing.Optional[AudioNativeCreateRequestApplyTextNormalization]` + + + This parameter controls text normalization with four modes: 'auto', 'on', 'apply_english' and 'off'. + When set to 'auto', the system will automatically decide whether to apply text normalization + (e.g., spelling out numbers). With 'on', text normalization will always be applied, while + with 'off', it will be skipped. 'apply_english' is the same as 'on' but will assume that text is in English. + + +
+
+ +
+
+ +**pronunciation_dictionary_locators:** `typing.Optional[typing.List[str]]` — A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"Vmd4Zor6fplcA7WrINey\",\"version_id\":\"hRPaxjlTdR7wFMhV4w0b\"}"' --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"JzWtcGQMJ6bnlWwyMo7e\",\"version_id\":\"lbmwxiLu4q6txYxgdZqn\"}"'. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.audio_native.get_settings(...) -> GetAudioNativeProjectSettingsResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get player settings for the specific project. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.audio_native.get_settings( + project_id="21m00Tcm4TlvDq8ikWAM", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — The ID of the Studio project. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.audio_native.update(...) -> AudioNativeEditContentResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Updates content for the specific AudioNative Project. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.audio_native.update( + project_id="21m00Tcm4TlvDq8ikWAM", + file="example_file", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. + +
+
+ +
+
+ +**file:** `typing.Optional[core.File]` — Either txt or HTML input file containing the article content. HTML should be formatted as follows '<html><body><div><p>Your content</p><h5>More of your content</h5><p>Some more of your content</p></div></body></html>' + +
+
+ +
+
+ +**auto_convert:** `typing.Optional[bool]` — Whether to auto convert the project to audio or not. + +
+
+ +
+
+ +**auto_publish:** `typing.Optional[bool]` — Whether to auto publish the new project snapshot after it's converted. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.audio_native.update_content_from_url(...) -> AudioNativeEditContentResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Finds an AudioNative project matching the provided URL, extracts content from the URL, updates the project content, and queues it for conversion and auto-publishing. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.audio_native.update_content_from_url( + url="https://elevenlabs.io/blog/the_first_ai_that_can_laugh/", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**url:** `str` — URL of the page to extract content from. + +
+
+ +
+
+ +**author:** `typing.Optional[str]` — Author used in the player and inserted at the start of the uploaded article. If not provided, the default author set in the Player settings is used. + +
+
+ +
+
+ +**title:** `typing.Optional[str]` — Title used in the player and inserted at the top of the uploaded article. If not provided, the default title set in the Player settings is used. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Usage +
client.usage.get(...) -> UsageCharactersResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +(Deprecated) This endpoint is deprecated. Use /v1/workspace/analytics/query/usage-by-product-over-time instead, which exposes the bucket size as `interval_seconds` (an integer in seconds) rather than `aggregation_interval`. Returns the usage metrics for the current user or the entire workspace they are part of. The response provides a time axis based on the specified aggregation interval (default: day), with usage values for each interval along that axis. Usage is broken down by the selected breakdown type. For example, breakdown type "voice" will return the usage of each voice for each interval along the time axis. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.usage.get( + start_unix=1, + end_unix=1, + include_workspace_metrics=True, + breakdown_type="none", + aggregation_interval="hour", + aggregation_bucket_size=1, + metric="credits", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**start_unix:** `int` — UTC Unix timestamp for the start of the usage window, in milliseconds. To include the first day of the window, the timestamp should be at 00:00:00 of that day. + +
+
+ +
+
+ +**end_unix:** `int` — UTC Unix timestamp for the end of the usage window, in milliseconds. To include the last day of the window, the timestamp should be at 23:59:59 of that day. + +
+
+ +
+
+ +**include_workspace_metrics:** `typing.Optional[bool]` — Whether or not to include the statistics of the entire workspace. + +
+
+ +
+
+ +**breakdown_type:** `typing.Optional[BreakdownTypes]` — How to break down the information. Cannot be "user" if include_workspace_metrics is False. + +
+
+ +
+
+ +**aggregation_interval:** `typing.Optional[UsageAggregationInterval]` — How to aggregate usage data over time. Can be "hour", "day", "week", "month", or "cumulative". + +
+
+ +
+
+ +**aggregation_bucket_size:** `typing.Optional[int]` — Aggregation bucket size in seconds. Overrides the aggregation interval. + +
+
+ +
+
+ +**metric:** `typing.Optional[MetricType]` — Which metric to aggregate. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## PronunciationDictionaries +
client.pronunciation_dictionaries.create_from_file(...) -> AddPronunciationDictionaryResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a new pronunciation dictionary from a lexicon .PLS file +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.pronunciation_dictionaries.create_from_file( + file="example_file", + name="name", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**name:** `str` — The name of the pronunciation dictionary, used for identification only. + +
+
+ +
+
+ +**file:** `typing.Optional[core.File]` — A lexicon .pls file which we will use to initialize the project with. + +
+
+ +
+
+ +**description:** `typing.Optional[str]` — A description of the pronunciation dictionary, used for identification only. + +
+
+ +
+
+ +**workspace_access:** `typing.Optional[AddPronunciationDictionaryRequestWorkspaceAccess]` — Should be one of 'admin', 'editor' or 'viewer'. If not provided, defaults to no access. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.pronunciation_dictionaries.create_from_rules(...) -> AddPronunciationDictionaryResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a new pronunciation dictionary from provided rules. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.pronunciation_dictionaries.create_from_rules( + rules=[ + { + "type": "alias", + "string_to_replace": "Thailand", + "case_sensitive": True, + "word_boundaries": True, + "alias": "tie-land" + } + ], + name="My Dictionary", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**rules:** `typing.List[BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem]` + +List of pronunciation rules. Rule can be either: + an alias rule: {'string_to_replace': 'a', 'type': 'alias', 'alias': 'b', } + or a phoneme rule: {'string_to_replace': 'a', 'type': 'phoneme', 'phoneme': 'b', 'alphabet': 'ipa' } + +
+
+ +
+
+ +**name:** `str` — The name of the pronunciation dictionary, used for identification only. + +
+
+ +
+
+ +**description:** `typing.Optional[str]` — A description of the pronunciation dictionary, used for identification only. + +
+
+ +
+
+ +**workspace_access:** `typing.Optional[BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostWorkspaceAccess]` — Should be one of 'admin', 'editor' or 'viewer'. If not provided, defaults to no access. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.pronunciation_dictionaries.get(...) -> GetPronunciationDictionaryWithRulesResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get metadata for a pronunciation dictionary +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.pronunciation_dictionaries.get( + pronunciation_dictionary_id="21m00Tcm4TlvDq8ikWAM", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**pronunciation_dictionary_id:** `str` — The id of the pronunciation dictionary + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.pronunciation_dictionaries.update(...) -> GetPronunciationDictionaryMetadataResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Partially update the pronunciation dictionary without changing the version +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.pronunciation_dictionaries.update( + pronunciation_dictionary_id="21m00Tcm4TlvDq8ikWAM", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**pronunciation_dictionary_id:** `str` — The id of the pronunciation dictionary + +
+
+ +
+
+ +**archived:** `typing.Optional[bool]` — Whether to archive the pronunciation dictionary. + +
+
+ +
+
+ +**name:** `typing.Optional[str]` — The name of the pronunciation dictionary, used for identification only. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.pronunciation_dictionaries.download(...) -> typing.Iterator[bytes] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get a PLS file with a pronunciation dictionary version rules +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.pronunciation_dictionaries.download( + dictionary_id="dictionary_id", + version_id="version_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**dictionary_id:** `str` — The id of the pronunciation dictionary + +
+
+ +
+
+ +**version_id:** `str` — The id of the pronunciation dictionary version + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.pronunciation_dictionaries.list(...) -> GetPronunciationDictionariesMetadataResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get a list of the pronunciation dictionaries you have access to and their metadata +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.pronunciation_dictionaries.list( + cursor="cursor", + page_size=1, + sort="creation_time_unix", + sort_direction="sort_direction", + include_archived=False, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many pronunciation dictionaries to return at maximum. Can not exceed 100, defaults to 30. + +
+
+ +
+
+ +**sort:** `typing.Optional[PronunciationDictionariesListRequestSort]` — Which field to sort by, one of 'created_at_unix' or 'name'. + +
+
+ +
+
+ +**sort_direction:** `typing.Optional[str]` — Which direction to sort the voices in. 'ascending' or 'descending'. + +
+
+ +
+
+ +**include_archived:** `typing.Optional[bool]` — Whether to include archived pronunciation dictionaries in the response. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Workspace +
client.workspace.set_third_party_disabling_policy(...) -> typing.Any +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Set the workspace-wide Third-Party Disabling policy. When set, it forces, for every API key in the workspace, whether the holder of a key (potentially a third party who found it) may disable it via the self-disable endpoint or when it leaks publicly — overriding each key's own setting. Pass `true` to allow it for all keys, `false` to forbid it for all keys, or `null` to clear the override so per-key values and the plan default apply again. Workspace admins only. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.workspace.set_third_party_disabling_policy() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**third_party_disable_allowed:** `typing.Optional[bool]` — `true` forces every key in the workspace to be disable-able by its holder; `false` forbids it for every key; `null` clears the override (per-key values and the plan default apply). + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ServiceAccounts +
client.service_accounts.list() -> WorkspaceServiceAccountListResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List all service accounts in the workspace +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.service_accounts.list() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.service_accounts.create(...) -> WorkspaceCreateServiceAccountResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a new service account in the workspace. By default, a workspace can have up to 20 service accounts. Enterprise customers may request an increase to this limit, up to 100. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.service_accounts.create( + name="name", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**name:** `str` + +
+
+ +
+
+ +**default_sharing_groups:** `typing.Optional[typing.List[DefaultSharingGroupConfig]]` — List of groups with their permission levels to share with by default. Each entry should specify a group_id and a permission_level (admin, editor, or viewer). + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Webhooks +
client.webhooks.list(...) -> WorkspaceWebhookListResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List all webhooks for a workspace +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.webhooks.list( + include_usages=False, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**include_usages:** `typing.Optional[bool]` — Whether to include active usages of the webhook, only usable by admins + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.webhooks.create(...) -> WorkspaceCreateWebhookResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a new webhook for the workspace with the specified authentication type. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs, WebhookHmacSettings +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.webhooks.create( + settings=WebhookHmacSettings( + auth_type="hmac", + name="name", + webhook_url="webhook_url", + ), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**settings:** `WebhookHmacSettings` — Webhook settings object containing auth_type and corresponding configuration + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.webhooks.delete(...) -> DeleteWorkspaceWebhookResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete the specified workspace webhook +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.webhooks.delete( + webhook_id="G007vmtq9uWYl7SUW9zGS8GZZa1K", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**webhook_id:** `str` — The unique ID for the webhook + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.webhooks.update(...) -> PatchWorkspaceWebhookResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update the specified workspace webhook +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.webhooks.update( + webhook_id="G007vmtq9uWYl7SUW9zGS8GZZa1K", + is_disabled=True, + name="My Callback Webhook", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**webhook_id:** `str` — The unique ID for the webhook + +
+
+ +
+
+ +**is_disabled:** `bool` — Whether to disable or enable the webhook + +
+
+ +
+
+ +**name:** `str` — The display name of the webhook (used for display purposes only). + +
+
+ +
+
+ +**retry_enabled:** `typing.Optional[bool]` — Whether to enable automatic retries for transient failures (5xx, 429, timeout) + +
+
+ +
+
+ +**request_headers:** `typing.Optional[typing.Dict[str, typing.Optional[str]]]` — A list of request headers to include with the webhook delivery (optional) + +
+
+ +
+
+ +**events:** `typing.Optional[typing.List[WorkspaceWebhookEventType]]` — The complete set of workspace-level events this webhook should be subscribed to. The webhook is added to the events in the list and removed from any not in the list. Omit to leave the current event subscriptions unchanged. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Music +
client.music.video_to_music(...) -> typing.Iterator[bytes] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Generate background music from one or more video files. Videos are combined in order. Optional description and style tags influence the generated music. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +client.music.video_to_music(...) +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**videos:** `typing.List[core.File]` + + + One or more video files sent via FormData array (multipart/form-data). They will be combined into one codec in order. + A maximum of 10 videos is allowed, where the total size of the combined video is limited to 200MB. + In total, the video can be up to 600 seconds long. Note that combining multiple videos may increase the request duration significantly. If possible, combine the videos beforehand. + + +
+
+ +
+
+ +**output_format:** `typing.Optional[AllowedOutputFormats]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + +
+
+ +
+
+ +**enable_logging:** `typing.Optional[bool]` — When enable_logging is set to false zero retention mode will be used for the request. Zero retention mode may only be used by enterprise customers. + +
+
+ +
+
+ +**description:** `typing.Optional[str]` — Optional text description of the music you want. A maximum of 4100 characters is allowed. + +
+
+ +
+
+ +**tags:** `typing.Optional[typing.List[str]]` — Optional list of style tags (e.g. ['upbeat', 'cinematic']). A maximum of 10 tags is allowed. + +
+
+ +
+
+ +**model_id:** `typing.Optional[MusicModelId]` — The model to use for the generation. + +
+
+ +
+
+ +**add_sfx:** `typing.Optional[bool]` — When true, incorporate SFX cues from the video. + +
+
+ +
+
+ +**separate_tracks:** `typing.Optional[bool]` — When true, return a ZIP with separate music and SFX audio tracks instead of a single mixed file. Use this for more flexibility to layer the tracks. + +
+
+ +
+
+ +**use_audio_as_reference:** `typing.Optional[bool]` — When true, analyze the video's audio track and use its genres, BPM, instrumentation, mood, and arc as reference characteristics for music generation. + +
+
+ +
+
+ +**sign_with_c_2_pa:** `typing.Optional[bool]` — Whether to sign the generated song with C2PA. Applicable only for mp3 files. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.music.compose(...) -> typing.Iterator[bytes] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Compose a song from a prompt or a composition plan. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.music.compose() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**output_format:** `typing.Optional[MusicComposeRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. Use "auto" (the default) to let the API pick the best format for the selected model: mp3_44100_128 for v1 models and mp3_48000_192 for v2 models. + +
+
+ +
+
+ +**enable_logging:** `typing.Optional[bool]` — When enable_logging is set to false zero retention mode will be used for the request. Zero retention mode may only be used by enterprise customers. + +
+
+ +
+
+ +**prompt:** `typing.Optional[str]` — A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. + +
+
+ +
+
+ +**composition_plan:** `typing.Optional[BodyComposeMusicV1MusicPostCompositionPlan]` — A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. + +
+
+ +
+
+ +**music_length_ms:** `typing.Optional[int]` — The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt. + +
+
+ +
+
+ +**model_id:** `typing.Optional[MusicModelId]` — The model to use for the generation. + +
+
+ +
+
+ +**seed:** `typing.Optional[int]` — Random seed to initialize the music generation process. Providing the same seed with the same parameters can help achieve more consistent results, but exact reproducibility is not guaranteed and outputs may change across system updates. Cannot be used in conjunction with prompt. + +
+
+ +
+
+ +**force_instrumental:** `typing.Optional[bool]` — If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. + +
+
+ +
+
+ +**finetune_id:** `typing.Optional[str]` — The ID of the finetune to use for the generation + +
+
+ +
+
+ +**respect_sections_durations:** `typing.Optional[bool]` — Controls how strictly section durations in the `composition_plan` are enforced. Only used with `composition_plan` and only applies to `music_v1`; for `music_v2` and `music_v2_5` section durations are always enforced and this is ignored. When false for `music_v1`, the model may adjust individual section durations for better quality and latency, while preserving the total song duration from the plan. + +
+
+ +
+
+ +**store_for_inpainting:** `typing.Optional[bool]` — Whether to store the generated song for inpainting. + +
+
+ +
+
+ +**sign_with_c_2_pa:** `typing.Optional[bool]` — Whether to sign the generated song with C2PA. Applicable only for mp3 files. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.music.compose_detailed(...) -> typing.Iterator[bytes] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Compose a song from a prompt or a composition plan. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.music.compose_detailed() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**output_format:** `typing.Optional[MusicComposeDetailedRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. Use "auto" (the default) to let the API pick the best format for the selected model: mp3_44100_128 for v1 models and mp3_48000_192 for v2 models. + +
+
+ +
+
+ +**enable_logging:** `typing.Optional[bool]` — When enable_logging is set to false zero retention mode will be used for the request. Zero retention mode may only be used by enterprise customers. + +
+
+ +
+
+ +**prompt:** `typing.Optional[str]` — A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. + +
+
+ +
+
+ +**composition_plan:** `typing.Optional[BodyComposeMusicWithADetailedResponseV1MusicDetailedPostCompositionPlan]` — A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. + +
+
+ +
+
+ +**music_length_ms:** `typing.Optional[int]` — The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt. + +
+
+ +
+
+ +**model_id:** `typing.Optional[MusicModelId]` — The model to use for the generation. + +
+
+ +
+
+ +**seed:** `typing.Optional[int]` — Random seed to initialize the music generation process. Providing the same seed with the same parameters can help achieve more consistent results, but exact reproducibility is not guaranteed and outputs may change across system updates. Cannot be used in conjunction with prompt. + +
+
+ +
+
+ +**force_instrumental:** `typing.Optional[bool]` — If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. + +
+
+ +
+
+ +**finetune_id:** `typing.Optional[str]` — The ID of the finetune to use for the generation + +
+
+ +
+
+ +**respect_sections_durations:** `typing.Optional[bool]` — Controls how strictly section durations in the `composition_plan` are enforced. Only used with `composition_plan` and only applies to `music_v1`; for `music_v2` and `music_v2_5` section durations are always enforced and this is ignored. When false for `music_v1`, the model may adjust individual section durations for better quality and latency, while preserving the total song duration from the plan. + +
+
+ +
+
+ +**store_for_inpainting:** `typing.Optional[bool]` — Whether to store the generated song for inpainting. + +
+
+ +
+
+ +**with_timestamps:** `typing.Optional[bool]` — Whether to return the timestamps of the words in the generated song. + +
+
+ +
+
+ +**with_waveform_visual:** `typing.Optional[bool]` — Whether to return the visual waveform of the generated song. + +
+
+ +
+
+ +**sign_with_c_2_pa:** `typing.Optional[bool]` — Whether to sign the generated song with C2PA. Applicable only for mp3 files. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.music.compose_detailed_stream(...) -> typing.Iterator[bytes] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Stream a song and its detailed metadata using Server-Sent Events (SSE). +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.music.compose_detailed_stream( + output_format="auto", + enable_logging=True, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**output_format:** `typing.Optional[MusicComposeDetailedStreamRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. Use "auto" (the default) to let the API pick the best format for the selected model: mp3_44100_128 for v1 models and mp3_48000_192 for v2 models. + +
+
+ +
+
+ +**enable_logging:** `typing.Optional[bool]` — When enable_logging is set to false zero retention mode will be used for the request. Zero retention mode may only be used by enterprise customers. + +
+
+ +
+
+ +**prompt:** `typing.Optional[str]` — A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. + +
+
+ +
+
+ +**composition_plan:** `typing.Optional[BodyStreamComposedMusicWithADetailedResponseV1MusicDetailedStreamPostCompositionPlan]` — A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. + +
+
+ +
+
+ +**music_length_ms:** `typing.Optional[int]` — The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt. + +
+
+ +
+
+ +**model_id:** `typing.Optional[MusicModelId]` — The model to use for the generation. + +
+
+ +
+
+ +**seed:** `typing.Optional[int]` — Random seed to initialize the music generation process. Providing the same seed with the same parameters can help achieve more consistent results, but exact reproducibility is not guaranteed and outputs may change across system updates. Cannot be used in conjunction with prompt. + +
+
+ +
+
+ +**force_instrumental:** `typing.Optional[bool]` — If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. + +
+
+ +
+
+ +**finetune_id:** `typing.Optional[str]` — The ID of the finetune to use for the generation + +
+
+ +
+
+ +**store_for_inpainting:** `typing.Optional[bool]` — Whether to store the generated song for inpainting. + +
+
+ +
+
+ +**with_timestamps:** `typing.Optional[bool]` — Whether to return the timestamps of the words in the generated song. + +
+
+ +
+
+ +**with_waveform_visual:** `typing.Optional[bool]` — Whether to return the visual waveform of the generated song. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.music.stream(...) -> typing.Iterator[bytes] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Stream a composed song from a prompt or a composition plan. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.music.stream() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**output_format:** `typing.Optional[MusicStreamRequestOutputFormat]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. Use "auto" (the default) to let the API pick the best format for the selected model: mp3_44100_128 for v1 models and mp3_48000_192 for v2 models. + +
+
+ +
+
+ +**enable_logging:** `typing.Optional[bool]` — When enable_logging is set to false zero retention mode will be used for the request. Zero retention mode may only be used by enterprise customers. + +
+
+ +
+
+ +**prompt:** `typing.Optional[str]` — A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. + +
+
+ +
+
+ +**composition_plan:** `typing.Optional[BodyStreamComposedMusicV1MusicStreamPostCompositionPlan]` — A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. + +
+
+ +
+
+ +**music_length_ms:** `typing.Optional[int]` — The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt. + +
+
+ +
+
+ +**model_id:** `typing.Optional[MusicModelId]` — The model to use for the generation. + +
+
+ +
+
+ +**seed:** `typing.Optional[int]` — Random seed to initialize the music generation process. Providing the same seed with the same parameters can help achieve more consistent results, but exact reproducibility is not guaranteed and outputs may change across system updates. Cannot be used in conjunction with prompt. + +
+
+ +
+
+ +**force_instrumental:** `typing.Optional[bool]` — If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. + +
+
+ +
+
+ +**finetune_id:** `typing.Optional[str]` — The ID of the finetune to use for the generation + +
+
+ +
+
+ +**store_for_inpainting:** `typing.Optional[bool]` — Whether to store the generated song for inpainting. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.music.upload(...) -> MusicUploadResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Upload a music file to be later used for inpainting. Price for uploading is the same as the one for song generation. All uploaded content gets inspected for copyright infringement. If copyrighted content is detected, half of the request cost is still charged. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.music.upload( + file="example_file", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**file:** `core.File` — The audio file to upload. + +
+
+ +
+
+ +**extract_composition_plan:** `typing.Optional[MusicUploadRequestExtractCompositionPlan]` — Whether to generate and return the composition plan for the uploaded song. Pass a model id (`music_v1`, `music_v2` or `music_v2_5`) to control which composition plan format is returned. Passing `true`/`false` is deprecated; `true` defaults to the `music_v1` plan format. Enabling this will increase the latency. + +
+
+ +
+
+ +**with_timestamps:** `typing.Optional[bool]` — Whether to transcribe the uploaded song and return word-level timestamps. If True, the response will include words_timestamps but will increase the latency. + +
+
+ +
+
+ +**with_waveform_visual:** `typing.Optional[bool]` — Whether to return the visual waveform of the uploaded song. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.music.separate_stems(...) -> typing.Iterator[bytes] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Separate an audio file into individual stems. This endpoint might have high latency, depending on the length of the audio file. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +client.music.separate_stems(...) +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**file:** `core.File` — The audio file to separate into stems. + +
+
+ +
+
+ +**output_format:** `typing.Optional[AllowedOutputFormats]` — Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + +
+
+ +
+
+ +**enable_logging:** `typing.Optional[bool]` — When enable_logging is set to false zero retention mode will be used for the request. Zero retention mode may only be used by enterprise customers. + +
+
+ +
+
+ +**stem_variation_id:** `typing.Optional[MusicSeparateStemsRequestStemVariationId]` — The id of the stem variation to use. + +
+
+ +
+
+ +**sign_with_c_2_pa:** `typing.Optional[bool]` — Whether to sign the generated song with C2PA. Applicable only for mp3 files. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## SpeechToText +
client.speech_to_text.convert(...) -> SpeechToTextConvertResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Transcribe an audio or video file. If webhook is set to true, the request will be processed asynchronously and results sent to configured webhooks. When use_multi_channel is true and the provided audio has multiple channels, a 'transcripts' object with separate transcripts for each channel is returned; set multichannel_output_style='combined' to instead receive a single transcript with all channels merged and sorted by time. Otherwise, returns a single transcript. The optional webhook_metadata parameter allows you to attach custom data that will be included in webhook responses for request correlation and tracking. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.speech_to_text.convert( + token="token", + enable_logging=True, + file="example_file", + model_id="scribe_v2", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**model_id:** `str` — The ID of the model to use for transcription. + +
+
+ +
+
+ +**token:** `typing.Optional[str]` — A single-use authentication token created via POST /v1/single-use-token/batch_scribe. This token can only be used once and expires after 15 minutes. Alternative to API key or bearer token authentication for frontend clients. + +
+
+ +
+
+ +**enable_logging:** `typing.Optional[bool]` — When enable_logging is set to false zero retention mode will be used for the request. This will mean log and transcript storage features are unavailable for this request. Zero retention mode may only be used by enterprise customers. + +
+
+ +
+
+ +**file:** `typing.Optional[core.File]` — The file to transcribe (100ms minimum audio length). All major audio and video formats are supported. Exactly one of the file or cloud_storage_url parameters must be provided. The file size must be less than 5.0GB. + +
+
+ +
+
+ +**language_code:** `typing.Optional[str]` — An ISO-639-1 or ISO-639-3 language_code corresponding to the language of the audio file. Can sometimes improve transcription performance if known beforehand. Defaults to null, in this case the language is predicted automatically. + +
+
+ +
+
+ +**transcript_edit:** `typing.Optional[str]` — Natural-language instruction applied to the final transcript (max 2000 characters). The edited text is returned in 'edited_transcript' alongside the original transcript. Cannot be combined with entity_detection, entity_redaction or use_multi_channel. Usage of this parameter will incur an additional 30% surcharge on the base transcription cost, billed for at least 10 seconds of audio. + +
+
+ +
+
+ +**tag_audio_events:** `typing.Optional[bool]` — Whether to tag audio events like (laughter), (footsteps), etc. in the transcription. + +
+
+ +
+
+ +**num_speakers:** `typing.Optional[int]` — The maximum amount of speakers talking in the uploaded file. Can help with predicting who speaks when. The maximum amount of speakers that can be predicted is 32. Defaults to null, in this case the amount of speakers is set to the maximum value the model supports. + +
+
+ +
+
+ +**timestamps_granularity:** `typing.Optional[SpeechToTextConvertRequestTimestampsGranularity]` — The granularity of the timestamps in the transcription. 'word' provides word-level timestamps and 'character' provides character-level timestamps per word. + +
+
+ +
+
+ +**diarize:** `typing.Optional[bool]` — Whether to annotate which speaker is currently talking in the uploaded file. + +
+
+ +
+
+ +**diarization_threshold:** `typing.Optional[float]` — Diarization threshold to apply during speaker diarization. A higher value means there will be a lower chance of one speaker being diarized as two different speakers but also a higher chance of two different speakers being diarized as one speaker (less total speakers predicted). A low value means there will be a higher chance of one speaker being diarized as two different speakers but also a lower chance of two different speakers being diarized as one speaker (more total speakers predicted). Can only be set when diarize=True and num_speakers=None. Defaults to None, in which case we will choose a threshold based on the model_id (0.22 usually). + +
+
+ +
+
+ +**additional_formats:** `typing.Optional[AdditionalFormats]` — A list of additional formats to export the transcript to. + +
+
+ +
+
+ +**file_format:** `typing.Optional[SpeechToTextConvertRequestFileFormat]` — The format of input audio. Options are 'pcm_s16le_16' or 'other' For `pcm_s16le_16`, the input audio must be 16-bit PCM at a 16kHz sample rate, single channel (mono), and little-endian byte order. Latency will be lower than with passing an encoded waveform. + +
+
+ +
+
+ +**cloud_storage_url:** `typing.Optional[str]` — [Deprecated] This parameter is deprecated and will be removed in the future. Use 'source_url' instead.The HTTPS URL of the file to transcribe. Exactly one of the file or cloud_storage_url parameters must be provided. The file must be accessible via HTTPS and the file size must be less than 2GB. Any valid HTTPS URL is accepted, including URLs from cloud storage providers (AWS S3, Google Cloud Storage, Cloudflare R2, etc.), CDNs, or any other HTTPS source. URLs can be pre-signed or include authentication tokens in query parameters. + +
+
+ +
+
+ +**source_url:** `typing.Optional[str]` — The URL of an audio or video file to transcribe. Supports hosted video or audio files, YouTube video URLs, TikTok video URLs, and other video hosting services. + +
+
+ +
+
+ +**webhook:** `typing.Optional[bool]` — Whether to send the transcription result to configured speech-to-text webhooks. If set the request will return early without the transcription, which will be delivered later via webhook. + +
+
+ +
+
+ +**webhook_id:** `typing.Optional[str]` — Optional specific webhook ID to send the transcription result to. Only valid when webhook is set to true. If not provided, transcription will be sent to all configured speech-to-text webhooks. + +
+
+ +
+
+ +**temperature:** `typing.Optional[float]` — Controls the randomness of the transcription output. Accepts values between 0.0 and 2.0, where higher values result in more diverse and less deterministic results. If omitted, we will use a temperature based on the model you selected which is usually 0. + +
+
+ +
+
+ +**seed:** `typing.Optional[int]` — If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be an integer between 0 and 2147483647. + +
+
+ +
+
+ +**use_multi_channel:** `typing.Optional[bool]` — Whether the audio file contains multiple channels where each channel contains a single speaker. When enabled, each channel is transcribed independently. By default a separate transcript is returned per channel; set multichannel_output_style='combined' to instead receive a single transcript with all channels merged and sorted by time. Each word in the response includes a 'channel_index' field indicating which channel it was spoken on. A maximum of 5 channels is supported. Each channel is billed independently at the full audio duration, so cost scales linearly with the number of channels. + +
+
+ +
+
+ +**multichannel_output_style:** `typing.Optional[SpeechToTextConvertRequestMultichannelOutputStyle]` — Controls the response shape when use_multi_channel is enabled. 'separate' (default) returns one transcript per channel under 'transcripts'. 'combined' merges all channels into a single transcript whose words are sorted by start time, each carrying a 'channel_index' - matching the single-channel response shape. 'combined' requires timestamps (timestamps_granularity must not be 'none') and does not support entity detection or redaction. + +
+
+ +
+
+ +**webhook_metadata:** `typing.Optional[SpeechToTextConvertRequestWebhookMetadata]` — Optional metadata to be included in the webhook response. This should be a JSON string representing an object with a maximum depth of 2 levels and maximum size of 16KB. Useful for tracking internal IDs, job references, or other contextual information. + +
+
+ +
+
+ +**entity_detection:** `typing.Optional[SpeechToTextConvertRequestEntityDetection]` — Detect entities in the transcript. Can be 'all' to detect all entities, a single entity type or category string, or a list of entity types/categories. Categories include 'pii', 'phi', 'pci', 'other', 'offensive_language'. When enabled, detected entities will be returned in the 'entities' field with their text, type, and character positions. + +
+
+ +
+
+ +**no_verbatim:** `typing.Optional[bool]` — If true, the transcription will not have any filler words, false starts and non-speech sounds. Only supported with scribe_v2 model. + +
+
+ +
+
+ +**use_speaker_library:** `typing.Optional[bool]` — Whether to use the speaker library for identifying known speakers during diarization. When enabled and diarize is true, detected speakers will be matched against registered speakers in the workspace's speaker library. + +
+
+ +
+
+ +**detect_speaker_roles:** `typing.Optional[bool]` — Whether to detect speaker roles (agent vs customer). Requires diarize=true. Cannot be used with use_multi_channel=true. When enabled, speaker_id values will be 'agent' and 'customer' instead of 'speaker_0', 'speaker_1', etc. Usage incurs an additional 10% surcharge on base transcription cost. + +
+
+ +
+
+ +**entity_redaction:** `typing.Optional[SpeechToTextConvertRequestEntityRedaction]` — Redact entities from the transcript text. Accepts the same format as entity_detection: 'all', a category ('pii', 'phi'), or specific entity types. Must be a subset of entity_detection. When redaction is enabled, the entities field will not be returned. + +
+
+ +
+
+ +**entity_redaction_mode:** `typing.Optional[str]` — How to format redacted entities. 'redacted' replaces with {REDACTED}, 'entity_type' replaces with {ENTITY_TYPE}, 'enumerated_entity_type' replaces with {ENTITY_TYPE_N} where N enumerates each occurrence. Only used when entity_redaction is set. + +
+
+ +
+
+ +**keyterms:** `typing.Optional[typing.List[str]]` — A list of keyterms to bias the transcription towards. The keyterms are words or phrases you want the model to recognise more accurately. The number of keyterms cannot exceed 1000. The length of each keyterm must be less than 50 characters. Keyterms can contain at most 5 words (after normalisation). For example ["hello", "world", "technical term"]. The following characters are not supported: `<`, `>`, `{`, `}`, `[`, `]`, `\`. Usage of this parameter will incur an additional 20% surcharge on the base transcription cost. When more than 100 keyterms are provided, a minimum billable duration of 20 seconds applies per request. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ForcedAlignment +
client.forced_alignment.create(...) -> ForcedAlignmentResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Force align an audio file to text. Use this endpoint to get the timing information for each character and word in an audio file based on a provided text transcript. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.forced_alignment.create( + file="example_file", + text="text", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**file:** `core.File` — The file to align. All major audio formats are supported. The file size must be less than 1GB. + +
+
+ +
+
+ +**text:** `str` — The text to align with the audio. The input text can be in any format, however diarization is not supported at this time. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi +
client.conversational_ai.add_to_knowledge_base(...) -> AddKnowledgeBaseResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Upload a file or webpage URL to create a knowledge base document.
After creating the document, update the agent's knowledge base by calling [Update agent](/docs/api-reference/agents/update). +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.add_to_knowledge_base( + agent_id="agent_id", + file="example_file", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**name:** `typing.Optional[str]` — A custom, human-readable name for the document. + +
+
+ +
+
+ +**url:** `typing.Optional[str]` — URL to a page of documentation that the agent will have access to in order to interact with users. + +
+
+ +
+
+ +**file:** `typing.Optional[core.File]` — Documentation that the agent will have access to in order to interact with users. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.rag_index_overview() -> RagIndexOverviewResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Provides total size and other information of RAG indexes used by knowledgebase documents +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.rag_index_overview() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.get_document_rag_indexes(...) -> RagDocumentIndexesResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Provides information about all RAG indexes of the specified knowledgebase document. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.get_document_rag_indexes( + documentation_id="21m00Tcm4TlvDq8ikWAM", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentation_id:** `str` — The id of a document from the knowledge base. This is returned on document addition. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.delete_document_rag_index(...) -> RagDocumentIndexResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete RAG index for the knowledgebase document. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.delete_document_rag_index( + documentation_id="21m00Tcm4TlvDq8ikWAM", + rag_index_id="21m00Tcm4TlvDq8ikWAM", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentation_id:** `str` — The id of a document from the knowledge base. This is returned on document addition. + +
+
+ +
+
+ +**rag_index_id:** `str` — The id of RAG index of document from the knowledge base. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Speech Engine +
client.speech_engine.list(...) -> ListSpeechEnginesResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a paginated list of Speech Engine resources. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.speech_engine.list( + page_size=1, + search="search", + sort_direction="asc", + sort_by="name", + cursor="cursor", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many Speech Engines to return at maximum. Can not exceed 100, defaults to 30. + +
+
+ +
+
+ +**search:** `typing.Optional[str]` — Search term to filter Speech Engines by name + +
+
+ +
+
+ +**sort_direction:** `typing.Optional[SortDirection]` — The direction to sort the results + +
+
+ +
+
+ +**sort_by:** `typing.Optional[AgentSortBy]` — The field to sort the results by + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.speech_engine.create(...) -> SpeechEngineResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a new Speech Engine resource +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs, SpeechEngineConfig +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.speech_engine.create( + speech_engine=SpeechEngineConfig( + ws_url="ws_url", + ), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**speech_engine:** `SpeechEngineConfig` — Speech engine WebSocket configuration + +
+
+ +
+
+ +**name:** `typing.Optional[str]` — Name of the speech engine + +
+
+ +
+
+ +**asr:** `typing.Optional[AsrConversationalConfig]` — ASR configuration + +
+
+ +
+
+ +**tts:** `typing.Optional[TtsConversationalConfigInput]` — TTS configuration + +
+
+ +
+
+ +**turn:** `typing.Optional[BaseTurnConfig]` — Turn detection configuration + +
+
+ +
+
+ +**vad:** `typing.Optional[VadConfig]` — Configuration for voice activity detection + +
+
+ +
+
+ +**conversation:** `typing.Optional[ConversationConfigInput]` — Conversation configuration (client events, etc.) + +
+
+ +
+
+ +**privacy:** `typing.Optional[PrivacyConfigInput]` — Privacy settings (recording, retention, zero retention mode) + +
+
+ +
+
+ +**call_limits:** `typing.Optional[AgentCallLimits]` — Concurrency and daily conversation limits for this speech engine + +
+
+ +
+
+ +**language:** `typing.Optional[str]` — Language for the speech engine + +
+
+ +
+
+ +**cascade_timeout_seconds:** `typing.Optional[float]` — Time in seconds to wait for the upstream speech engine endpoint to respond before the attempt is abandoned and retried. Must be between 2 and 15 seconds. + +
+
+ +
+
+ +**tags:** `typing.Optional[typing.List[str]]` — Tags for categorization + +
+
+ +
+
+ +**overrides:** `typing.Optional[SpeechEngineConversationInitiationClientDataConfig]` — Override settings the client may set during conversation initiation + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.speech_engine.get(...) -> SpeechEngineResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve a Speech Engine resource +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.speech_engine.get( + speech_engine_id="seng_3701k3ttaq12ewp8b7qv5rfyszkz", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**speech_engine_id:** `str` — The speech engine ID (accepts seng_ or agent_ prefix) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.speech_engine.delete(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete a Speech Engine resource +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.speech_engine.delete( + speech_engine_id="seng_3701k3ttaq12ewp8b7qv5rfyszkz", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**speech_engine_id:** `str` — The speech engine ID (accepts seng_ or agent_ prefix) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.speech_engine.update(...) -> SpeechEngineResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update a Speech Engine resource (partial update) +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.speech_engine.update( + speech_engine_id="seng_3701k3ttaq12ewp8b7qv5rfyszkz", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**speech_engine_id:** `str` — The speech engine ID (accepts seng_ or agent_ prefix) + +
+
+ +
+
+ +**name:** `typing.Optional[str]` + +
+
+ +
+
+ +**speech_engine:** `typing.Optional[SpeechEngineConfig]` + +
+
+ +
+
+ +**asr:** `typing.Optional[AsrConversationalConfig]` + +
+
+ +
+
+ +**tts:** `typing.Optional[TtsConversationalConfigInput]` + +
+
+ +
+
+ +**turn:** `typing.Optional[BaseTurnConfig]` + +
+
+ +
+
+ +**vad:** `typing.Optional[VadConfig]` + +
+
+ +
+
+ +**conversation:** `typing.Optional[ConversationConfigInput]` + +
+
+ +
+
+ +**privacy:** `typing.Optional[PrivacyConfigInput]` + +
+
+ +
+
+ +**call_limits:** `typing.Optional[AgentCallLimits]` + +
+
+ +
+
+ +**language:** `typing.Optional[str]` + +
+
+ +
+
+ +**cascade_timeout_seconds:** `typing.Optional[float]` — Time in seconds to wait for the upstream speech engine endpoint to respond before the attempt is abandoned and retried. Must be between 2 and 15 seconds. + +
+
+ +
+
+ +**tags:** `typing.Optional[typing.List[str]]` + +
+
+ +
+
+ +**overrides:** `typing.Optional[SpeechEngineConversationInitiationClientDataConfig]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.speech_engine.duplicate(...) -> SpeechEngineResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a new Speech Engine resource by duplicating an existing one +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs, DuplicateSpeechEngineRequest +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.speech_engine.duplicate( + speech_engine_id="seng_3701k3ttaq12ewp8b7qv5rfyszkz", + request=DuplicateSpeechEngineRequest(), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**speech_engine_id:** `str` — The speech engine ID (accepts seng_ or agent_ prefix) + +
+
+ +
+
+ +**request:** `typing.Optional[DuplicateSpeechEngineRequest]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## EnvironmentVariables +
client.environment_variables.list(...) -> EnvironmentVariablesListResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List all environment variables for the workspace with optional filtering +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.environment_variables.list( + cursor="cursor", + page_size=1, + label="label", + environment="environment", + type="string", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Pagination cursor from previous response + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — Number of items to return (1-100) + +
+
+ +
+
+ +**label:** `typing.Optional[str]` — Filter by exact label match + +
+
+ +
+
+ +**environment:** `typing.Optional[str]` — Filter to only return variables that have this environment. When specified, the values dict in the response will only contain this environment. + +
+
+ +
+
+ +**type:** `typing.Optional[EnvironmentVariablesListRequestType]` — Filter by variable type + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.environment_variables.create(...) -> EnvironmentVariableResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a new environment variable for the workspace +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.environment_variables.create( + request={ + "type": "string", + "label": "label", + "values": { + "key": "value" + } + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `EnvironmentVariablesCreateRequestBody` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.environment_variables.get(...) -> EnvironmentVariableResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get a specific environment variable by ID +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.environment_variables.get( + env_var_id="env_var_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**env_var_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.environment_variables.update(...) -> EnvironmentVariableResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Replace an environment variable's values. Use null to remove its value for an environment (except production); delete an environment with DELETE /v1/convai/environments/{environment}. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.environment_variables.update( + env_var_id="env_var_id", + values={}, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**env_var_id:** `str` + +
+
+ +
+
+ +**values:** `typing.Dict[str, typing.Optional[UpdateEnvironmentVariableRequestValuesValue]]` — Values to replace. Set to null to remove the value for an environment (except 'production'). + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Environments +
client.environments.list() -> EnvironmentsListResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List the workspace environments, including 'production'. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.environments.list() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.environments.create(...) -> EnvironmentResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a workspace environment. Variables without a value for it fall back to their production value. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.environments.create( + name="name", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**name:** `str` — Unique name of the environment, e.g. 'staging'. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.environments.delete(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete a workspace environment and remove its values from all environment variables. 'production' cannot be deleted. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.environments.delete( + environment="environment", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**environment:** `str` — Name of the environment to delete, e.g. 'staging'. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Assets +
client.assets.list(...) -> AssetListResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List assets in the workspace, most recently created first. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.assets.list( + page_size=1, + cursor="cursor", + search="search", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — Number of assets to return. + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Token from a previous response's `next_cursor`. Omit to fetch the first page. + +
+
+ +
+
+ +**search:** `typing.Optional[str]` — Optional free-text search filter over asset names. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.assets.create(...) -> AssetResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Upload a new asset. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.assets.create( + asset="example_asset", + name="name", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**asset:** `core.File` — The file to upload. + +
+
+ +
+
+ +**name:** `str` — Display name for the asset. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.assets.get(...) -> AssetResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve a single asset by ID. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.assets.get( + asset_id="5xM2KqOnZyce22SPZ9d4", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**asset_id:** `str` — ID of the asset. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.assets.delete(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete an asset by ID. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.assets.delete( + asset_id="5xM2KqOnZyce22SPZ9d4", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**asset_id:** `str` — ID of the asset. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Conversations +
client.conversational_ai.conversations.get_signed_url(...) -> ConversationSignedUrlResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get a signed url to start a conversation with an agent with an agent that requires authorization +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.conversations.get_signed_url( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + include_conversation_id=True, + branch_id="branch_id", + version_id="version_id", + environment="environment", + debug_events_request=True, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — Agent id (agent_…) or speech engine external id (seng_), resolved to the same underlying resource. + +
+
+ +
+
+ +**include_conversation_id:** `typing.Optional[bool]` — Whether to include a conversation_id with the response. If included, the conversation_signature cannot be used again. + +
+
+ +
+
+ +**branch_id:** `typing.Optional[str]` — The ID of the branch to use + +
+
+ +
+
+ +**version_id:** `typing.Optional[str]` — The ID of the version to use + +
+
+ +
+
+ +**environment:** `typing.Optional[str]` — The environment to use for resolving environment variables (e.g. 'production', 'staging'). Defaults to 'production'. + +
+
+ +
+
+ +**debug_events_request:** `typing.Optional[bool]` — Whether to enable debug events. Only available for users with editor access to the agent. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.conversations.get_webrtc_token(...) -> TokenResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get a WebRTC session token for real-time communication. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.conversations.get_webrtc_token( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + participant_name="participant_name", + branch_id="branch_id", + version_id="version_id", + environment="environment", + debug_events_request=True, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — Agent id (agent_…) or speech engine external id (seng_), resolved to the same underlying resource. + +
+
+ +
+
+ +**participant_name:** `typing.Optional[str]` — Optional custom participant name. If not provided, user ID will be used + +
+
+ +
+
+ +**branch_id:** `typing.Optional[str]` — The ID of the branch to use + +
+
+ +
+
+ +**version_id:** `typing.Optional[str]` — The ID of the version to use + +
+
+ +
+
+ +**environment:** `typing.Optional[str]` — The environment to use for resolving environment variables (e.g. 'production', 'staging'). Defaults to 'production'. + +
+
+ +
+
+ +**debug_events_request:** `typing.Optional[bool]` — Whether to enable debug events. Only available for users with editor access to the agent. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.conversations.list(...) -> GetConversationsPageResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all conversations of agents that user owns. With option to restrict to a specific agent. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.conversations.list( + cursor="cursor", + agent_id="agent_id", + visited_agent_ids=[ + "visited_agent_ids" + ], + visited_agent_branch_ids=[ + "visited_agent_branch_ids" + ], + triggered_procedure_ids=[ + "triggered_procedure_ids" + ], + call_successful="success", + call_start_before_unix=1, + call_start_after_unix=1, + call_duration_min_secs=1, + call_duration_max_secs=1, + rating_max=1, + rating_min=1, + has_feedback_comment=True, + user_id="user_id", + evaluation_params=[ + "evaluation_params" + ], + data_collection_params=[ + "data_collection_params" + ], + dynamic_variable_params=[ + "dynamic_variable_params" + ], + data_collection_ids=[ + "data_collection_ids" + ], + evaluation_criteria_ids=[ + "evaluation_criteria_ids" + ], + tool_names=[ + "tool_names" + ], + tool_names_successful=[ + "tool_names_successful" + ], + tool_names_errored=[ + "tool_names_errored" + ], + include_invalid_tool_calls=True, + main_languages=[ + "main_languages" + ], + page_size=1, + summary_mode="exclude", + search="search", + conversation_initiation_source="unknown", + text_only=True, + conversation_product_type="agents", + branch_id="branch_id", + version_id="version_id", + parent_conversation_id="parent_conversation_id", + topic_ids=[ + "topic_ids" + ], + exclude_statuses=[ + "initiated" + ], + tag_ids=[ + "tag_ids" + ], + workflow_node_entered_id="workflow_node_entered_id", + termination_reasons=[ + "termination_reasons" + ], + guardrail_types=[ + "custom" + ], + custom_guardrail_names=[ + "custom_guardrail_names" + ], + sort_direction="asc", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. + +
+
+ +
+
+ +**agent_id:** `typing.Optional[str]` — Agent id (agent_…) or speech engine external id (seng_), resolved to the same underlying resource. + +
+
+ +
+
+ +**visited_agent_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter conversations where any of these agents participated. Can not exceed 50 values. + +
+
+ +
+
+ +**visited_agent_branch_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter conversations where any of these agent branches participated. Can not exceed 50 values. + +
+
+ +
+
+ +**triggered_procedure_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter conversations where any of these procedures were triggered. Can not exceed 50 values. + +
+
+ +
+
+ +**call_successful:** `typing.Optional[EvaluationResultFilter]` — The result of the success evaluation + +
+
+ +
+
+ +**call_start_before_unix:** `typing.Optional[int]` — Unix timestamp (in seconds) to filter conversations up to this start date. + +
+
+ +
+
+ +**call_start_after_unix:** `typing.Optional[int]` — Unix timestamp (in seconds) to filter conversations after to this start date. + +
+
+ +
+
+ +**call_duration_min_secs:** `typing.Optional[int]` — Minimum call duration in seconds. + +
+
+ +
+
+ +**call_duration_max_secs:** `typing.Optional[int]` — Maximum call duration in seconds. + +
+
+ +
+
+ +**rating_max:** `typing.Optional[int]` — Maximum overall rating (1-5). + +
+
+ +
+
+ +**rating_min:** `typing.Optional[int]` — Minimum overall rating (1-5). + +
+
+ +
+
+ +**has_feedback_comment:** `typing.Optional[bool]` — Filter conversations with user feedback comments. + +
+
+ +
+
+ +**user_id:** `typing.Optional[str]` — Filter conversations by the user ID who initiated them. + +
+
+ +
+
+ +**evaluation_params:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Evaluation filters. Repeat param. Format: criteria_id:result where result is one of success|failure|unknown. Example: eval=value_framing:success + +
+
+ +
+
+ +**data_collection_params:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Data collection filters. Repeat param. Format: id:op:value where op is one of eq|neq|gt|gte|lt|lte|in. For in, pipe-delimit values. An empty value matches conversations where the field was not collected (id:eq:), and neq with an empty value matches where it was (id:neq:). eq is exact equality. gt|gte|lt|lte require a numeric value. + +
+
+ +
+
+ +**dynamic_variable_params:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Dynamic variable filters. Repeat param. Format: name:op:value where op is one of eq|neq|gt|gte|lt|lte|in. For in, pipe-delimit values. An empty value matches conversations where the variable was not set (name:eq:), and neq with an empty value matches where it was (name:neq:). eq is exact equality. gt|gte|lt|lte require a numeric value. Names containing ':' cannot be expressed. + +
+
+ +
+
+ +**data_collection_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Data collection field IDs to include in each conversation summary. Repeat param. When omitted, data_collection_results is not returned. + +
+
+ +
+
+ +**evaluation_criteria_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Evaluation criteria IDs to include in each conversation summary. Repeat param. When omitted, evaluation_criteria_results is not returned. + +
+
+ +
+
+ +**tool_names:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter conversations by tool names used during the call. + +
+
+ +
+
+ +**tool_names_successful:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter conversations by tool names that had successful calls. + +
+
+ +
+
+ +**tool_names_errored:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter conversations by tool names that had errored calls. + +
+
+ +
+
+ +**include_invalid_tool_calls:** `typing.Optional[bool]` — Also match tool calls that never ran. + +
+
+ +
+
+ +**main_languages:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter conversations by detected main language (language code). + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many conversations to return at maximum. Can not exceed 100, defaults to 30. + +
+
+ +
+
+ +**summary_mode:** `typing.Optional[ConversationsListRequestSummaryMode]` — Whether to include transcript summaries in the response. + +
+
+ +
+
+ +**search:** `typing.Optional[str]` — Full-text or fuzzy search over transcript messages + +
+
+ +
+
+ +**conversation_initiation_source:** `typing.Optional[ConversationInitiationSource]` + +
+
+ +
+
+ +**text_only:** `typing.Optional[bool]` + +
+
+ +
+
+ +**conversation_product_type:** `typing.Optional[ConversationProduct]` — Restrict results to a single conversation product surface. + +
+
+ +
+
+ +**branch_id:** `typing.Optional[str]` — Filter conversations by branch ID. + +
+
+ +
+
+ +**version_id:** `typing.Optional[str]` — Filter conversations by version ID. + +
+
+ +
+
+ +**parent_conversation_id:** `typing.Optional[str]` — Filter conversations by parent conversation ID for subagent conversations. + +
+
+ +
+
+ +**topic_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter conversations by topic IDs assigned during topic discovery. + +
+
+ +
+
+ +**exclude_statuses:** `typing.Optional[typing.Union[ConversationsListRequestExcludeStatusesItem, typing.Sequence[ConversationsListRequestExcludeStatusesItem]]]` — Exclude conversations with the given statuses. Useful for hiding in-progress / processing conversations from list views. + +
+
+ +
+
+ +**tag_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter conversations by conversation tag IDs assigned via the conversation-tags endpoints. + +
+
+ +
+
+ +**workflow_node_entered_id:** `typing.Optional[str]` — Filter conversations to only those that entered the given node. + +
+
+ +
+
+ +**termination_reasons:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter conversations by their stored termination_reason (metadata.termination_reason). Repeat param to match any of several. + +
+
+ +
+
+ +**guardrail_types:** `typing.Optional[typing.Union[GuardrailType, typing.Sequence[GuardrailType]]]` — Filter to conversations where a guardrail of any of these types triggered (metadata.triggered_guardrails.guardrail_type). Repeat param to match any of several. + +
+
+ +
+
+ +**custom_guardrail_names:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter to conversations where a custom guardrail with any of these names triggered (metadata.triggered_guardrails.guardrail_name). Only custom guardrails carry a name. Repeat param to match any of several. + +
+
+ +
+
+ +**sort_direction:** `typing.Optional[SortDirection]` — The direction to sort conversations by call start time. Defaults to descending (newest first). + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.conversations.resolve(...) -> GetConversationResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Resolve a conversation URL (a Slack message URL or a Zendesk ticket URL) to the deterministic conversation ID for the given agent, then confirm the conversation exists. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.conversations.resolve( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + reference="https://your-domain.zendesk.com/agent/tickets/12345", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — Agent id (agent_…) or speech engine external id (seng_), resolved to the same underlying resource. + +
+
+ +
+
+ +**reference:** `str` — A Slack message URL or a Zendesk ticket URL. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.conversations.get(...) -> GetConversationResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get the details of a particular conversation +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.conversations.get( + conversation_id="21m00Tcm4TlvDq8ikWAM", + format="json", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**conversation_id:** `str` — The id of the conversation you're taking the action on. + +
+
+ +
+
+ +**format:** `typing.Optional[ConversationsGetRequestFormat]` — Response format. Defaults to 'json'. Set to 'opentelemetry' for an OTLP-compatible trace payload using the same structure as the post-call webhook. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.conversations.delete(...) -> typing.Any +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete a particular conversation +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.conversations.delete( + conversation_id="21m00Tcm4TlvDq8ikWAM", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**conversation_id:** `str` — The id of the conversation you're taking the action on. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.conversations.get_summary(...) -> GetConversationSummaryResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get a lightweight summary of a conversation: its title, the generated transcript summary, whether the call was successful, and — only when the conversation is short — the plain chat messages. Tool calls, tool results, and contextual updates are omitted so the response stays small. Use this instead of the full conversation endpoint when you only need the gist (e.g. an agent reading many conversations); use GET /v1/convai/conversations/{conversation_id} when you need the full transcript with tool calls and contextual updates. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.conversations.get_summary( + conversation_id="21m00Tcm4TlvDq8ikWAM", + max_messages=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**conversation_id:** `str` — The id of the conversation you're taking the action on. + +
+
+ +
+
+ +**max_messages:** `typing.Optional[int]` — Maximum number of chat message turns to include inline. When the conversation has more than this, the messages are omitted and messages_omitted is set. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.conversations.get_sip_messages(...) -> GetSipLogMessagesResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get SIP messages associated with a conversation's phone call +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.conversations.get_sip_messages( + conversation_id="21m00Tcm4TlvDq8ikWAM", + page_size=1, + cursor="cursor", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**conversation_id:** `str` — The id of the conversation you're taking the action on. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Twilio +
client.conversational_ai.twilio.outbound_call(...) -> TwilioOutboundCallResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Handle an outbound call via Twilio +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.twilio.outbound_call( + agent_id="agent_id", + agent_phone_number_id="agent_phone_number_id", + to_number="to_number", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` + +
+
+ +
+
+ +**agent_phone_number_id:** `str` + +
+
+ +
+
+ +**to_number:** `str` + +
+
+ +
+
+ +**conversation_initiation_client_data:** `typing.Optional[ConversationInitiationClientDataRequestInput]` + +
+
+ +
+
+ +**call_recording_enabled:** `typing.Optional[bool]` — Whether let Twilio record the call. + +
+
+ +
+
+ +**telephony_call_config:** `typing.Optional[TelephonyCallConfigInput]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.twilio.register_call(...) -> str +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Register a Twilio call and return TwiML to connect the call +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.twilio.register_call( + agent_id="agent_id", + from_number="from_number", + to_number="to_number", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` + +
+
+ +
+
+ +**from_number:** `str` + +
+
+ +
+
+ +**to_number:** `str` + +
+
+ +
+
+ +**direction:** `typing.Optional[TelephonyDirection]` + +
+
+ +
+
+ +**conversation_initiation_client_data:** `typing.Optional[ConversationInitiationClientDataRequestInput]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Exotel +
client.conversational_ai.exotel.outbound_call(...) -> ExotelOutboundCallResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Handle an outbound call via Exotel Connect API +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.exotel.outbound_call( + agent_id="agent_id", + agent_phone_number_id="agent_phone_number_id", + to_number="to_number", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` + +
+
+ +
+
+ +**agent_phone_number_id:** `str` + +
+
+ +
+
+ +**to_number:** `str` + +
+
+ +
+
+ +**conversation_initiation_client_data:** `typing.Optional[ConversationInitiationClientDataRequestInput]` + +
+
+ +
+
+ +**telephony_call_config:** `typing.Optional[TelephonyCallConfigInput]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Whatsapp +
client.conversational_ai.whatsapp.outbound_call(...) -> WhatsAppOutboundCallResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Make an outbound call via WhatsApp +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.whatsapp.outbound_call( + whatsapp_phone_number_id="whatsapp_phone_number_id", + whatsapp_user_id="whatsapp_user_id", + whatsapp_call_permission_request_template_name="whatsapp_call_permission_request_template_name", + whatsapp_call_permission_request_template_language_code="whatsapp_call_permission_request_template_language_code", + agent_id="agent_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**whatsapp_phone_number_id:** `str` + +
+
+ +
+
+ +**whatsapp_user_id:** `str` + +
+
+ +
+
+ +**whatsapp_call_permission_request_template_name:** `str` + +
+
+ +
+
+ +**whatsapp_call_permission_request_template_language_code:** `str` + +
+
+ +
+
+ +**agent_id:** `str` + +
+
+ +
+
+ +**conversation_initiation_client_data:** `typing.Optional[ConversationInitiationClientDataRequestInput]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.whatsapp.outbound_message(...) -> WhatsAppOutboundMessageResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Send an outbound message via WhatsApp +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs, WhatsAppTemplateTextParam +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.whatsapp.outbound_message( + whatsapp_phone_number_id="whatsapp_phone_number_id", + whatsapp_user_id="whatsapp_user_id", + template_name="template_name", + template_language_code="template_language_code", + template_params=[ + { + "type": "body", + "parameters": [ + WhatsAppTemplateTextParam( + text="text", + ) + ] + } + ], + agent_id="agent_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**whatsapp_phone_number_id:** `str` + +
+
+ +
+
+ +**whatsapp_user_id:** `str` + +
+
+ +
+
+ +**template_name:** `str` + +
+
+ +
+
+ +**template_language_code:** `str` + +
+
+ +
+
+ +**template_params:** `typing.List[BodySendAnOutboundMessageViaWhatsAppV1ConvaiWhatsappOutboundMessagePostTemplateParamsItem]` + +
+
+ +
+
+ +**agent_id:** `str` + +
+
+ +
+
+ +**conversation_initiation_client_data:** `typing.Optional[ConversationInitiationClientDataRequestInput]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Agents +
client.conversational_ai.agents.create(...) -> CreateAgentResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create an agent from a config object +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs, ConversationalConfig +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.create( + enable_versioning=True, + conversation_config=ConversationalConfig(), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**conversation_config:** `ConversationalConfig` — Conversation configuration for an agent + +
+
+ +
+
+ +**enable_versioning:** `typing.Optional[bool]` — Deprecated: all agents are versioned. This parameter is ignored. + +
+
+ +
+
+ +**platform_settings:** `typing.Optional[AgentPlatformSettingsRequestModel]` — Platform settings for the agent are all settings that aren't related to the conversation orchestration and content. + +
+
+ +
+
+ +**workflow:** `typing.Optional[AgentWorkflowRequestModel]` — Workflow for the agent. This is used to define the flow of the conversation and how the agent interacts with tools. + +
+
+ +
+
+ +**name:** `typing.Optional[str]` — A name to make the agent easier to find + +
+
+ +
+
+ +**tags:** `typing.Optional[typing.List[str]]` — Tags to help classify and filter the agent + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.agents.get(...) -> GetAgentResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve config for an agent +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.get( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + version_id="version_id", + branch_id="branch_id", + include_procedure_generated_workflow_elements=True, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — The id of an agent. This is returned on agent creation. + +
+
+ +
+
+ +**version_id:** `typing.Optional[str]` — The ID of the agent version to use + +
+
+ +
+
+ +**branch_id:** `typing.Optional[str]` — The ID of the branch to use + +
+
+ +
+
+ +**include_procedure_generated_workflow_elements:** `typing.Optional[bool]` — Whether to include the workflow nodes and edges generated from structured procedures. When false, the workflow contains only authored elements. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.agents.delete(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete an agent +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.delete( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + force=True, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — The id of an agent. This is returned on agent creation. + +
+
+ +
+
+ +**force:** `typing.Optional[bool]` — If set to true, the agent is deleted even if other agents use it as a subagent, and it is removed from those agents and their branches. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.agents.update(...) -> GetAgentResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Patches an Agent settings +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.update( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + enable_versioning_if_not_enabled=True, + branch_id="branch_id", + include_procedure_generated_workflow_elements=True, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — The id of an agent. This is returned on agent creation. + +
+
+ +
+
+ +**enable_versioning_if_not_enabled:** `typing.Optional[bool]` — Deprecated: all agents are versioned. This parameter is ignored. + +
+
+ +
+
+ +**branch_id:** `typing.Optional[str]` — The ID of the branch to use + +
+
+ +
+
+ +**include_procedure_generated_workflow_elements:** `typing.Optional[bool]` — Whether to include the workflow nodes and edges generated from structured procedures. When false, the workflow contains only authored elements. + +
+
+ +
+
+ +**conversation_config:** `typing.Optional[ConversationalConfig]` — Conversation configuration for an agent + +
+
+ +
+
+ +**platform_settings:** `typing.Optional[AgentPlatformSettingsRequestModel]` — Platform settings for the agent are all settings that aren't related to the conversation orchestration and content. + +
+
+ +
+
+ +**workflow:** `typing.Optional[AgentWorkflowRequestModel]` — Workflow for the agent. This is used to define the flow of the conversation and how the agent interacts with tools. + +
+
+ +
+
+ +**name:** `typing.Optional[str]` — A name to make the agent easier to find + +
+
+ +
+
+ +**tags:** `typing.Optional[typing.List[str]]` — Tags to help classify and filter the agent + +
+
+ +
+
+ +**version_description:** `typing.Optional[str]` — Description for this version when publishing changes (only applicable for versioned agents) + +
+
+ +
+
+ +**procedures:** `typing.Optional[typing.Dict[str, typing.Optional[ProcedureVersionRef]]]` — Procedure versions to publish, keyed by procedure_id. When provided, this map replaces the procedures from the current draft or branch tip. When omitted or null, unpublished procedure edits are used if present; otherwise, the branch tip's procedures are retained. Pass an empty object to remove all procedures. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.agents.list(...) -> GetAgentsPageResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of your agents and their metadata. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.list( + page_size=1, + search="search", + archived=True, + show_only_owned_agents=True, + created_by_user_id="created_by_user_id", + tags=[ + "tags" + ], + sort_direction="asc", + sort_by="name", + cursor="cursor", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many Agents to return at maximum. Can not exceed 100, defaults to 30. + +
+
+ +
+
+ +**search:** `typing.Optional[str]` — Search by agents name. + +
+
+ +
+
+ +**archived:** `typing.Optional[bool]` — Filter agents by archived status + +
+
+ +
+
+ +**show_only_owned_agents:** `typing.Optional[bool]` — If set to true, the endpoint will omit any agents that were shared with you by someone else and include only the ones you own. Deprecated: use created_by_user_id instead. + +
+
+ +
+
+ +**created_by_user_id:** `typing.Optional[str]` — Filter agents by creator user ID. When set, only agents created by this user are returned. Takes precedence over show_only_owned_agents. Use '@me' to refer to the authenticated user. + +
+
+ +
+
+ +**tags:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter agents by tag. Repeat the parameter to match any of several tags. + +
+
+ +
+
+ +**sort_direction:** `typing.Optional[SortDirection]` — The direction to sort the results + +
+
+ +
+
+ +**sort_by:** `typing.Optional[AgentSortBy]` — The field to sort the results by + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.agents.duplicate(...) -> CreateAgentResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a new agent by duplicating an existing one. The new agent gets a copy of every unarchived branch of the source agent, each with the same name and description and starting from the latest version on that branch. Version history, drafts, archived branches and traffic deployments are not copied, so the new agent routes all traffic to its main branch. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.duplicate( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — The id of an agent. This is returned on agent creation. + +
+
+ +
+
+ +**name:** `typing.Optional[str]` — A name to make the agent easier to find + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.agents.simulate_conversation(...) -> AgentSimulatedChatTestResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Deprecated. This endpoint will be removed on 31 Oct 2026. Use the `/v1/convai/agent-testing/create` and `/v1/convai/agents/:agent_id/run-tests` endpoints to create and run simulations. Run a conversation between the agent and a simulated user. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs, ConversationSimulationSpecification, AgentConfig +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.simulate_conversation( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + simulation_specification=ConversationSimulationSpecification( + simulated_user_config=AgentConfig( + first_message="Hello, how can I help you today?", + language="en", + disable_first_message_interruptions=False, + ), + ), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — The id of an agent. This is returned on agent creation. + +
+
+ +
+
+ +**simulation_specification:** `ConversationSimulationSpecification` — A specification detailing how the conversation should be simulated + +
+
+ +
+
+ +**extra_evaluation_criteria:** `typing.Optional[typing.List[PromptEvaluationCriteria]]` — A list of evaluation criteria to test + +
+
+ +
+
+ +**new_turns_limit:** `typing.Optional[int]` — Maximum number of new turns to generate in the conversation simulation + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.agents.simulate_conversation_stream(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Deprecated. This endpoint will be removed on 31 Oct 2026. Use the `/v1/convai/agent-testing/create` and `/v1/convai/agents/:agent_id/run-tests` endpoints to create and run simulations. Run a conversation between the agent and a simulated user and stream back the response. Response is streamed back as partial lists of messages that should be concatenated and once the conversation has complete a single final message with the conversation analysis will be sent. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs, ConversationSimulationSpecification, AgentConfig +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.simulate_conversation_stream( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + simulation_specification=ConversationSimulationSpecification( + simulated_user_config=AgentConfig( + first_message="Hello, how can I help you today?", + language="en", + disable_first_message_interruptions=False, + ), + ), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — The id of an agent. This is returned on agent creation. + +
+
+ +
+
+ +**simulation_specification:** `ConversationSimulationSpecification` — A specification detailing how the conversation should be simulated + +
+
+ +
+
+ +**extra_evaluation_criteria:** `typing.Optional[typing.List[PromptEvaluationCriteria]]` — A list of evaluation criteria to test + +
+
+ +
+
+ +**new_turns_limit:** `typing.Optional[int]` — Maximum number of new turns to generate in the conversation simulation + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.agents.run_tests(...) -> GetTestSuiteInvocationResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Run selected tests on the agent with provided configuration. If the agent configuration is provided, it will be used to override default agent configuration. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs, SingleTestRunRequestModel +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.run_tests( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + tests=[ + SingleTestRunRequestModel( + test_id="test_id", + ) + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — The id of an agent. This is returned on agent creation. + +
+
+ +
+
+ +**tests:** `typing.List[SingleTestRunRequestModel]` — List of tests to run on the agent + +
+
+ +
+
+ +**agent_config_override:** `typing.Optional[AdhocAgentConfigOverrideForTestRequestModel]` — Configuration overrides to use for testing. If not provided, the agent's default configuration will be used. + +
+
+ +
+
+ +**branch_id:** `typing.Optional[str]` — ID of the branch to run the tests on. If not provided, the tests will be run on the agent's main branch. + +
+
+ +
+
+ +**repeat_count:** `typing.Optional[int]` — Number of times to run each test. When greater than 1, results are grouped and summarized. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Tests +
client.conversational_ai.tests.create(...) -> CreateAgentTestResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a new agent response test. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.tests.create( + request={ + "type": "llm", + "name": "name" + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `TestsCreateRequestBody` — Create Chat Response Test Request Information + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.tests.move(...) -> typing.Any +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Moves multiple tests or folders from one folder to another. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.tests.move( + entity_ids=[ + "entity_ids" + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**entity_ids:** `typing.List[str]` — The IDs of tests or folders to move. + +
+
+ +
+
+ +**move_to:** `typing.Optional[str]` — The folder to move the entities to. If not set, the entities will be moved to the root folder. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.tests.get(...) -> TestsGetResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets an agent response test by ID. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.tests.get( + test_id="TeaqRRdTcIfIu2i7BYfT", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**test_id:** `str` — The id of a chat response test. This is returned on test creation. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.tests.update(...) -> TestsUpdateResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Updates an agent response test by ID. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.tests.update( + test_id="TeaqRRdTcIfIu2i7BYfT", + request={ + "type": "llm", + "name": "name" + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**test_id:** `str` — The id of a chat response test. This is returned on test creation. + +
+
+ +
+
+ +**request:** `TestsUpdateRequestBody` — Agent test to update + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.tests.delete(...) -> typing.Any +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Deletes an agent response test by ID. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.tests.delete( + test_id="TeaqRRdTcIfIu2i7BYfT", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**test_id:** `str` — The id of a chat response test. This is returned on test creation. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.tests.summaries(...) -> GetTestsSummariesByIdsResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets agent response test summaries for the requested test IDs. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.tests.summaries( + test_ids=[ + "test_id_1", + "test_id_2" + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**test_ids:** `typing.List[str]` — List of test IDs to fetch. No duplicates allowed. Prefer at most 1000 IDs per request. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.tests.list(...) -> GetTestsPageResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Lists all agent response tests with pagination support and optional search filtering. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.tests.list( + cursor="cursor", + page_size=1, + search="search", + parent_folder_id="parent_folder_id", + types=[ + "llm" + ], + include_folders=True, + sort_mode="default", + sharing_mode="all", + created_by_user_id="created_by_user_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many Tests to return at maximum. Can not exceed 100, defaults to 30. + +
+
+ +
+
+ +**search:** `typing.Optional[str]` — Search query to filter tests and folders by name. + +
+
+ +
+
+ +**parent_folder_id:** `typing.Optional[str]` — Filter by parent folder ID. Use 'root' to get items in the root folder. + +
+
+ +
+
+ +**types:** `typing.Optional[typing.Union[TestType, typing.Sequence[TestType]]]` — If present, the endpoint will return only tests/folders of the given types. + +
+
+ +
+
+ +**include_folders:** `typing.Optional[bool]` — Deprecated. Use the `types` query param and include `folder` instead. + +
+
+ +
+
+ +**sort_mode:** `typing.Optional[TestsListRequestSortMode]` — Sort mode for listing tests. Use 'folders_first' to place folders before tests. + +
+
+ +
+
+ +**sharing_mode:** `typing.Optional[TestSharingMode]` — Filter test visibility. Use `shared_with_me` to return only tests/folders shared with the current user that they did not create. + +
+
+ +
+
+ +**created_by_user_id:** `typing.Optional[str]` — Filter tests and folders by creator user ID. Use '@me' to refer to the authenticated user. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Users +
client.conversational_ai.users.list(...) -> GetConversationUsersPageResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get distinct users from conversations with pagination. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.users.list( + agent_id="agent_id", + branch_id="branch_id", + call_start_before_unix=1, + call_start_after_unix=1, + search="search", + page_size=1, + sort_by="last_contact_unix_secs", + sort_direction="asc", + cursor="cursor", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `typing.Optional[str]` — Agent id (agent_…) or speech engine external id (seng_), resolved to the same underlying resource. + +
+
+ +
+
+ +**branch_id:** `typing.Optional[str]` — Filter conversations by branch ID. + +
+
+ +
+
+ +**call_start_before_unix:** `typing.Optional[int]` — Unix timestamp (in seconds) to filter conversations up to this start date. + +
+
+ +
+
+ +**call_start_after_unix:** `typing.Optional[int]` — Unix timestamp (in seconds) to filter conversations after to this start date. + +
+
+ +
+
+ +**search:** `typing.Optional[str]` — Search/filter by user ID (exact match). + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many users to return at maximum. Defaults to 30. + +
+
+ +
+
+ +**sort_by:** `typing.Optional[UsersSortBy]` — The field to sort the results by. Defaults to last_contact_unix_secs. + +
+
+ +
+
+ +**sort_direction:** `typing.Optional[SortDirection]` — The direction to sort the results + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi TriageTickets +
client.conversational_ai.triage_tickets.list(...) -> GetAgentConversationTicketsPageResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List an agent's conversation triage tickets, ordered by most recently created first unless sorted by priority. These are tickets about the agent's own performance on a conversation (for triage with Architect), not tickets an agent opens for end users. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.triage_tickets.list( + agent_id="agent_id", + page_size=1, + conversation_id="conversation_id", + status="open", + sources=[ + "qa" + ], + priorities=[ + "low" + ], + sort_by="created_at", + owner_user_id="owner_user_id", + assignee_user_id="assignee_user_id", + issue_type="knowledge_gap", + label="label", + merged_into_ticket_id="merged_into_ticket_id", + search="search", + cursor="cursor", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many agent conversation tickets to return. Can not exceed 100. + +
+
+ +
+
+ +**conversation_id:** `typing.Optional[str]` — Filter tickets by conversation id. + +
+
+ +
+
+ +**status:** `typing.Optional[AgentConversationTicketStatus]` — Filter tickets by status. + +
+
+ +
+
+ +**sources:** `typing.Optional[typing.Union[AgentConversationTicketSource, typing.Sequence[AgentConversationTicketSource]]]` — Filter tickets by how they were raised (qa, agent, manual). Repeat the parameter to filter by multiple sources. + +
+
+ +
+
+ +**priorities:** `typing.Optional[typing.Union[AgentConversationTicketPriority, typing.Sequence[AgentConversationTicketPriority]]]` — Filter tickets by priority. Repeat the parameter to filter by multiple priorities. + +
+
+ +
+
+ +**sort_by:** `typing.Optional[AgentConversationTicketSortBy]` — Order by most recently created, or by priority (most urgent first, then most recently created). + +
+
+ +
+
+ +**owner_user_id:** `typing.Optional[str]` — Filter tickets by creator. Use 'agent' for agent-raised tickets. + +
+
+ +
+
+ +**assignee_user_id:** `typing.Optional[str]` — Filter tickets by assignee. Use 'unassigned' for tickets with no assignee. + +
+
+ +
+
+ +**issue_type:** `typing.Optional[AgentConversationTicketIssueType]` — Filter clusters by issue type. + +
+
+ +
+
+ +**label:** `typing.Optional[str]` — Filter tickets by an exact label. + +
+
+ +
+
+ +**merged_into_ticket_id:** `typing.Optional[str]` — Filter tickets merged into this ticket. + +
+
+ +
+
+ +**search:** `typing.Optional[str]` — Case-insensitive free-text search across the ticket's title, description, comments, and turn comments. + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.triage_tickets.create_manual(...) -> AgentConversationTicketResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Manually raise a follow-up ticket against an agent, not tied to any conversation (for example a task like 'add the KB about X'). Without a title, one is derived from the comment. Requires viewer access to the agent. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.triage_tickets.create_manual( + agent_id="agent_id", + qa_comment="qa_comment", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` + +
+
+ +
+
+ +**qa_comment:** `str` — What the ticket is about, e.g. a follow-up task for the agent. + +
+
+ +
+
+ +**title:** `typing.Optional[str]` — One-line headline shown in the triage list. Defaults to one derived from qa_comment. + +
+
+ +
+
+ +**priority:** `typing.Optional[AgentConversationTicketPriority]` — How urgently the ticket needs attention. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.triage_tickets.list_for_workspace(...) -> GetAgentConversationTicketsPageResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List conversation triage tickets across every agent in the workspace, ordered by most recently created first. Use this to build a workspace-wide view (for example, tickets assigned to the caller). Supports the same filters, sorting and search as the per-agent endpoint. Tickets for agents the caller cannot access are omitted. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.triage_tickets.list_for_workspace( + page_size=1, + agent_id="agent_id", + status="open", + sources=[ + "qa" + ], + priorities=[ + "low" + ], + sort_by="created_at", + owner_user_id="owner_user_id", + assignee_user_id="assignee_user_id", + issue_type="knowledge_gap", + label="label", + merged_into_ticket_id="merged_into_ticket_id", + search="search", + cursor="cursor", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many agent conversation tickets to return. Can not exceed 100. + +
+
+ +
+
+ +**agent_id:** `typing.Optional[str]` — Only tickets for this agent. + +
+
+ +
+
+ +**status:** `typing.Optional[AgentConversationTicketStatus]` — Filter tickets by status. + +
+
+ +
+
+ +**sources:** `typing.Optional[typing.Union[AgentConversationTicketSource, typing.Sequence[AgentConversationTicketSource]]]` — Filter tickets by how they were raised (qa, agent, manual). Repeat the parameter to filter by multiple sources. + +
+
+ +
+
+ +**priorities:** `typing.Optional[typing.Union[AgentConversationTicketPriority, typing.Sequence[AgentConversationTicketPriority]]]` — Filter tickets by priority. Repeat the parameter to filter by multiple priorities. + +
+
+ +
+
+ +**sort_by:** `typing.Optional[AgentConversationTicketSortBy]` — Order by most recently created, or by priority (most urgent first, then most recently created). + +
+
+ +
+
+ +**owner_user_id:** `typing.Optional[str]` — Filter tickets by creator. Use 'agent' for agent-raised tickets. + +
+
+ +
+
+ +**assignee_user_id:** `typing.Optional[str]` — Filter tickets by assignee. Use 'unassigned' for tickets with no assignee. + +
+
+ +
+
+ +**issue_type:** `typing.Optional[AgentConversationTicketIssueType]` — Filter clusters by issue type. + +
+
+ +
+
+ +**label:** `typing.Optional[str]` — Filter tickets by an exact label. + +
+
+ +
+
+ +**merged_into_ticket_id:** `typing.Optional[str]` — Filter tickets merged into this ticket. + +
+
+ +
+
+ +**search:** `typing.Optional[str]` — Case-insensitive free-text search across the ticket's title, description, comments, and turn comments. + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.triage_tickets.create(...) -> AgentConversationTicketResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Raise a ticket about an agent's performance on a conversation, for triage with Architect. Provide an overall comment and/or turn-level comments describing what went wrong. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.triage_tickets.create( + conversation_id="conversation_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**conversation_id:** `str` — Conversation this ticket is about. + +
+
+ +
+
+ +**title:** `typing.Optional[str]` — One-line headline shown in the triage list. Defaults to one derived from the comments, falling back to the conversation's summary title. Ignored when the comment is added to the conversation's open ticket. + +
+
+ +
+
+ +**qa_comment:** `typing.Optional[str]` — The issue this ticket is about, covering the whole conversation rather than a single turn. + +
+
+ +
+
+ +**turn_comments:** `typing.Optional[typing.List[TurnCommentRequestModel]]` — Optional turn-level comments on what went wrong. + +
+
+ +
+
+ +**priority:** `typing.Optional[AgentConversationTicketPriority]` — How urgently the ticket needs attention. If the conversation already has an open ticket, it is raised to this priority when lower. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.triage_tickets.list_assignable_users(...) -> typing.List[AssignableUserResponseModel] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +All non-service-account workspace members, each flagged with whether they currently have at least viewer access to the agent. Members without access are included (not filtered out) so the UI can offer them as an assignee and prompt to grant access first. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.triage_tickets.list_assignable_users( + agent_id="agent_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.triage_tickets.get(...) -> AgentConversationTicketResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get an agent conversation ticket by ID. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.triage_tickets.get( + agentqa_ticket_id="agentqa_ticket_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agentqa_ticket_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.triage_tickets.delete(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete an agent conversation ticket. Restricted to the ticket creator or a workspace admin. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.triage_tickets.delete( + agentqa_ticket_id="agentqa_ticket_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agentqa_ticket_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.triage_tickets.update(...) -> AgentConversationTicketResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update a ticket's title, comment, status, priority, and/or assignee. Requires editor access to the ticket's agent. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.triage_tickets.update( + agentqa_ticket_id="agentqa_ticket_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agentqa_ticket_id:** `str` + +
+
+ +
+
+ +**title:** `typing.Optional[str]` — If provided, updates the ticket title. Omit to leave unchanged. + +
+
+ +
+
+ +**status:** `typing.Optional[AgentConversationTicketStatus]` — If provided, updates the ticket status. Omit to leave unchanged. + +
+
+ +
+
+ +**assignee_user_id:** `typing.Optional[str]` — If provided, updates who is responsible for resolving this ticket. Must be a workspace member with at least viewer access to the agent. Pass null to unassign. Omit to leave unchanged. + +
+
+ +
+
+ +**priority:** `typing.Optional[AgentConversationTicketPriority]` — If provided, updates how urgently the ticket needs attention. Pass null to clear it. Omit to leave unchanged. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.triage_tickets.add_comment(...) -> AgentConversationTicketResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Append a comment discussing how to resolve the ticket. Requires viewer access to the ticket's agent. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.triage_tickets.add_comment( + agentqa_ticket_id="agentqa_ticket_id", + comment="comment", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agentqa_ticket_id:** `str` + +
+
+ +
+
+ +**comment:** `str` — A comment discussing how to resolve the ticket. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.triage_tickets.merge(...) -> AgentConversationTicketResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Merge other open tickets of the same agent into this pending, in-progress, or resolved one. Their conversations move onto this ticket, its priority is raised to the highest among them, and they are kept with status 'merged'. Requires viewer access to the ticket's agent. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.triage_tickets.merge( + agentqa_ticket_id="agentqa_ticket_id", + source_ticket_ids=[ + "source_ticket_ids" + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agentqa_ticket_id:** `str` + +
+
+ +
+
+ +**source_ticket_ids:** `typing.List[str]` — Open tickets of the same agent to fold into this one. They are kept with status 'merged', pointing at this ticket. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.triage_tickets.add_turn_comment(...) -> AgentConversationTicketResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Append a turn-level comment to a ticket. Requires viewer access to the ticket's agent. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.triage_tickets.add_turn_comment( + agentqa_ticket_id="agentqa_ticket_id", + turn_index=1, + comment="comment", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agentqa_ticket_id:** `str` + +
+
+ +
+
+ +**turn_index:** `int` — Zero-based index of the transcript turn this comment refers to. + +
+
+ +
+
+ +**comment:** `str` — What went wrong at this turn. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi PhoneNumbers +
client.conversational_ai.phone_numbers.list(...) -> typing.List[PhoneNumbersListResponseItem] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve all Phone Numbers +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.phone_numbers.list( + provider="twilio", + agent_id="agent_id", + branch_id="branch_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**provider:** `typing.Optional[TelephonyProvider]` — Filter by telephony provider + +
+
+ +
+
+ +**agent_id:** `typing.Optional[str]` — Filter by assigned agent ID + +
+
+ +
+
+ +**branch_id:** `typing.Optional[str]` — Filter by assigned branch ID + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.phone_numbers.create(...) -> CreatePhoneNumberResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Import Phone Number from provider configuration (Twilio, Exotel, or SIP trunk) +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.phone_numbers.create( + request={ + "provider": "twilio", + "phone_number": "phone_number", + "label": "label", + "sid": "sid", + "token": "token" + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `PhoneNumbersCreateRequestBody` — Create Phone Request Information + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.phone_numbers.get(...) -> PhoneNumbersGetResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve Phone Number details by ID +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.phone_numbers.get( + phone_number_id="TeaqRRdTcIfIu2i7BYfT", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**phone_number_id:** `str` — The phone number ID. This is returned when a phone number is imported. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.phone_numbers.delete(...) -> typing.Any +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete Phone Number by ID +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.phone_numbers.delete( + phone_number_id="TeaqRRdTcIfIu2i7BYfT", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**phone_number_id:** `str` — The phone number ID. This is returned when a phone number is imported. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.phone_numbers.update(...) -> PhoneNumbersUpdateResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update assigned agent of a phone number +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.phone_numbers.update( + phone_number_id="TeaqRRdTcIfIu2i7BYfT", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**phone_number_id:** `str` — The phone number ID. This is returned when a phone number is imported. + +
+
+ +
+
+ +**agent_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**label:** `typing.Optional[str]` + +
+
+ +
+
+ +**inbound_trunk_config:** `typing.Optional[InboundSipTrunkConfigRequestModel]` + +
+
+ +
+
+ +**outbound_trunk_config:** `typing.Optional[OutboundSipTrunkConfigRequestModel]` + +
+
+ +
+
+ +**livekit_stack:** `typing.Optional[LivekitStackType]` + +
+
+ +
+
+ +**store_sip_messages:** `typing.Optional[bool]` + +
+
+ +
+
+ +**environment:** `typing.Optional[str]` — Environment to use for resolving environment variables on calls to this number. + +
+
+ +
+
+ +**branch_id:** `typing.Optional[str]` — Agent branch to use for calls to this number. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.phone_numbers.list_v_2(...) -> GetPhoneNumbersPageResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve a page of Phone Numbers +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.phone_numbers.list_v_2( + page_size=1, + search="search", + label="label", + phone_number="phone_number", + provider="twilio", + supports_outbound=True, + agent_id="agent_id", + branch_id="branch_id", + sort_by="label", + sort_direction="asc", + cursor="cursor", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — Number of phone numbers per page + +
+
+ +
+
+ +**search:** `typing.Optional[str]` — Filter by phone number ID, label, or phone number. A phone number ID must match exactly; label and phone number matching is a case-insensitive substring. + +
+
+ +
+
+ +**label:** `typing.Optional[str]` — Filter by label. Matching is a case-insensitive substring. + +
+
+ +
+
+ +**phone_number:** `typing.Optional[str]` — Filter by phone number + +
+
+ +
+
+ +**provider:** `typing.Optional[TelephonyProvider]` — Filter by telephony provider + +
+
+ +
+
+ +**supports_outbound:** `typing.Optional[bool]` — Filter by whether the phone number can place outbound calls + +
+
+ +
+
+ +**agent_id:** `typing.Optional[str]` — Filter by assigned agent ID + +
+
+ +
+
+ +**branch_id:** `typing.Optional[str]` — Filter by assigned branch ID + +
+
+ +
+
+ +**sort_by:** `typing.Optional[PhoneNumberSortBy]` — The field to sort the results by + +
+
+ +
+
+ +**sort_direction:** `typing.Optional[SortDirection]` — The direction to sort the results + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.phone_numbers.get_sip_messages(...) -> GetSipLogMessagesResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get SIP messages for a phone number +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.phone_numbers.get_sip_messages( + phone_number_id="TeaqRRdTcIfIu2i7BYfT", + page_size=1, + cursor="cursor", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**phone_number_id:** `str` — The phone number ID. This is returned when a phone number is imported. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi LlmUsage +
client.conversational_ai.llm_usage.calculate(...) -> LlmUsageCalculatorResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of LLM models and the expected cost for using them based on the provided values. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.llm_usage.calculate( + prompt_length=1, + number_of_pages=1, + rag_enabled=True, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**prompt_length:** `int` — Length of the prompt in characters. + +
+
+ +
+
+ +**number_of_pages:** `int` — Pages of content in PDF documents or URLs in the agent's knowledge base. + +
+
+ +
+
+ +**rag_enabled:** `bool` — Whether RAG is enabled. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Llm +
client.conversational_ai.llm.list() -> LlmListResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of available LLM models that can be used with agents, including their capabilities and any deprecation status. The response is filtered based on the data residency of the deployment and any compliance requirements (e.g. HIPAA) of the workspace subscription. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.llm.list() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi KnowledgeBase +
client.conversational_ai.knowledge_base.list(...) -> GetKnowledgeBaseListResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get a list of available knowledge base documents +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.knowledge_base.list( + page_size=1, + search="search", + show_only_owned_documents=True, + created_by_user_id="created_by_user_id", + types=[ + "file" + ], + parent_folder_id="parent_folder_id", + ancestor_folder_id="ancestor_folder_id", + folders_first=True, + sort_direction="asc", + sort_by="name", + cursor="cursor", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many documents to return at maximum. Can not exceed 100, defaults to 30. + +
+
+ +
+
+ +**search:** `typing.Optional[str]` — If specified, the endpoint returns only such knowledge base documents whose names start with this string. + +
+
+ +
+
+ +**show_only_owned_documents:** `typing.Optional[bool]` — If set to true, the endpoint will return only documents owned by you (and not shared from somebody else). Deprecated: use created_by_user_id instead. + +
+
+ +
+
+ +**created_by_user_id:** `typing.Optional[str]` — Filter documents by creator user ID. When set, only documents created by this user are returned. Takes precedence over show_only_owned_documents. Use '@me' to refer to the authenticated user. + +
+
+ +
+
+ +**types:** `typing.Optional[typing.Union[KnowledgeBaseDocumentType, typing.Sequence[KnowledgeBaseDocumentType]]]` — If present, the endpoint will return only documents of the given types. + +
+
+ +
+
+ +**parent_folder_id:** `typing.Optional[str]` — If set, the endpoint will return only documents that are direct children of the given folder. + +
+
+ +
+
+ +**ancestor_folder_id:** `typing.Optional[str]` — If set, the endpoint will return only documents that are descendants of the given folder. + +
+
+ +
+
+ +**folders_first:** `typing.Optional[bool]` — Whether folders should be returned first in the list of documents. + +
+
+ +
+
+ +**sort_direction:** `typing.Optional[SortDirection]` — The direction to sort the results + +
+
+ +
+
+ +**sort_by:** `typing.Optional[KnowledgeBaseSortBy]` — The field to sort the results by + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.knowledge_base.get_or_create_rag_indexes(...) -> typing.Dict[str, KnowledgeBaseGetOrCreateRagIndexesResponseValue] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieves and/or creates RAG indexes for multiple knowledge base documents in a single request. Maximum 100 items per request. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs, GetOrCreateRagIndexRequestModel +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.knowledge_base.get_or_create_rag_indexes( + items=[ + GetOrCreateRagIndexRequestModel( + document_id="document_id", + create_if_missing=True, + model="e5_mistral_7b_instruct", + ) + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**items:** `typing.List[GetOrCreateRagIndexRequestModel]` — List of requested RAG indexes. Minimum 1, maximum 100 items. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.knowledge_base.search(...) -> KnowledgeBaseContentSearchResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Fuzzy text search over knowledge base document content +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.knowledge_base.search( + query="query", + page_size=1, + types=[ + "file" + ], + cursor="cursor", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**query:** `str` — The search query text + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many documents to return at maximum. Can not exceed 100, defaults to 30. + +
+
+ +
+
+ +**types:** `typing.Optional[typing.Union[KnowledgeBaseDocumentType, typing.Sequence[KnowledgeBaseDocumentType]]]` — If present, the endpoint will return only documents of the given types. + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Tools +
client.conversational_ai.tools.list(...) -> ToolsResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all available tools in the workspace. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.tools.list( + search="search", + page_size=1, + show_only_owned_documents=True, + created_by_user_id="created_by_user_id", + types=[ + "webhook" + ], + sort_direction="asc", + sort_by="name", + used_by_agent_id="used_by_agent_id", + cursor="cursor", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**search:** `typing.Optional[str]` — If specified, the endpoint returns only tools whose names start with this string. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many documents to return at maximum. Can not exceed 100, defaults to 30. + +
+
+ +
+
+ +**show_only_owned_documents:** `typing.Optional[bool]` — If set to true, the endpoint will return only tools owned by you (and not shared from somebody else). Deprecated: use created_by_user_id instead. + +
+
+ +
+
+ +**created_by_user_id:** `typing.Optional[str]` — Filter tools by creator user ID. When set, only tools created by this user are returned. Takes precedence over show_only_owned_documents. Use '@me' to refer to the authenticated user. + +
+
+ +
+
+ +**types:** `typing.Optional[typing.Union[ToolTypeFilter, typing.Sequence[ToolTypeFilter]]]` — If present, the endpoint will return only tools of the given types. + +
+
+ +
+
+ +**sort_direction:** `typing.Optional[SortDirection]` — The direction to sort the results + +
+
+ +
+
+ +**sort_by:** `typing.Optional[ToolSortBy]` — The field to sort the results by + +
+
+ +
+
+ +**used_by_agent_id:** `typing.Optional[str]` — Filter to tools referenced by this agent's main branch: tools attached to the agent, tools on authored workflow nodes, and tools referenced by procedures. + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.tools.create(...) -> ToolResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Add a new tool to the available tools in the workspace. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs, ToolRequestModel +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.tools.create( + request=ToolRequestModel( + tool_config={ + "type": "client", + "name": "name", + "description": "description", + "expects_response": False + }, + ), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `ToolRequestModel` — A tool that an agent can provide to LLM. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.tools.get(...) -> ToolResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get tool that is available in the workspace. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.tools.get( + tool_id="tool_id", + environment="environment", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**tool_id:** `str` — ID of the requested tool. + +
+
+ +
+
+ +**environment:** `typing.Optional[str]` — Environment whose values are used when the MCP server URL, headers, or auth connection reference environment variables. Mirrors the environment a conversation would run in; defaults to production. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.tools.delete(...) -> typing.Any +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete tool from the workspace. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.tools.delete( + tool_id="tool_id", + force=True, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**tool_id:** `str` — ID of the requested tool. + +
+
+ +
+
+ +**force:** `typing.Optional[bool]` — If set to true, the tool will be deleted regardless of whether it is used by any agents and it will be removed from the dependent agents and branches. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.tools.update(...) -> ToolResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update tool that is available in the workspace. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs, ToolRequestModel +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.tools.update( + tool_id="tool_id", + request=ToolRequestModel( + tool_config={ + "type": "client", + "name": "name", + "description": "description", + "expects_response": False + }, + ), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**tool_id:** `str` — ID of the requested tool. + +
+
+ +
+
+ +**request:** `ToolRequestModel` — A tool that an agent can provide to LLM. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.tools.get_dependent_agents(...) -> GetToolDependentAgentsResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get a list of agents depending on this tool +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.tools.get_dependent_agents( + tool_id="tool_id", + cursor="cursor", + page_size=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**tool_id:** `str` — ID of the requested tool. + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many documents to return at maximum. Can not exceed 100, defaults to 30. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Settings +
client.conversational_ai.settings.get() -> GetConvAiSettingsResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve Convai settings for the workspace +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.settings.get() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.settings.update(...) -> GetConvAiSettingsResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update Convai settings for the workspace +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.settings.update() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**conversation_initiation_client_data_webhook:** `typing.Optional[ConversationInitiationClientDataWebhook]` + +
+
+ +
+
+ +**webhooks:** `typing.Optional[ConvAiWebhooks]` + +
+
+ +
+
+ +**can_use_mcp_servers:** `typing.Optional[bool]` — Whether the workspace can use MCP servers + +
+
+ +
+
+ +**rag_retention_period_days:** `typing.Optional[int]` + +
+
+ +
+
+ +**conversation_embedding_retention_days:** `typing.Optional[int]` — Days to retain conversation embeddings. None means use the system default (30 days). + +
+
+ +
+
+ +**default_livekit_stack:** `typing.Optional[LivekitStackType]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Secrets +
client.conversational_ai.secrets.list(...) -> GetWorkspaceSecretsResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all workspace secrets for the user +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.secrets.list( + page_size=1, + dependency_limit=1, + search="search", + cursor="cursor", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many documents to return at maximum. Can not exceed 100. If not provided, returns all secrets. + +
+
+ +
+
+ +**dependency_limit:** `typing.Optional[int]` — Maximum number of dependent resources (tools, agents, phone numbers) to return per secret. Can not exceed 100. + +
+
+ +
+
+ +**search:** `typing.Optional[str]` — If specified, returns only secrets whose names start with this string. + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.secrets.create(...) -> PostWorkspaceSecretResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a new secret for the workspace +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.secrets.create( + name="name", + value="value", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**type:** `typing.Literal` + +
+
+ +
+
+ +**name:** `str` + +
+
+ +
+
+ +**value:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.secrets.get(...) -> ConvAiWorkspaceStoredSecretConfig +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get a workspace secret by ID +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.secrets.get( + secret_id="secret_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**secret_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.secrets.delete(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete a workspace secret if it's not in use +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.secrets.delete( + secret_id="secret_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**secret_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.secrets.update(...) -> PostWorkspaceSecretResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update an existing secret for the workspace +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.secrets.update( + secret_id="secret_id", + name="name", + value="value", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**secret_id:** `str` + +
+
+ +
+
+ +**type:** `typing.Literal` + +
+
+ +
+
+ +**name:** `str` + +
+
+ +
+
+ +**value:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.secrets.get_dependencies(...) -> GetSecretDependenciesResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get paginated list of resources that depend on a specific secret, filtered by resource type. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.secrets.get_dependencies( + secret_id="secret_id", + resource_type="tools", + page_size=1, + cursor="cursor", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**secret_id:** `str` + +
+
+ +
+
+ +**resource_type:** `SecretDependencyResourceType` + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many dependency items to return per page. + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi BatchCalls +
client.conversational_ai.batch_calls.create(...) -> BatchCallResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Submit a batch call request to schedule calls for multiple recipients. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs, OutboundCallRecipient +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.batch_calls.create( + call_name="call_name", + agent_id="agent_id", + recipients=[ + OutboundCallRecipient() + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**call_name:** `str` + +
+
+ +
+
+ +**agent_id:** `str` + +
+
+ +
+
+ +**recipients:** `typing.List[OutboundCallRecipient]` + +
+
+ +
+
+ +**scheduled_time_unix:** `typing.Optional[int]` + +
+
+ +
+
+ +**agent_phone_number_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**whatsapp_params:** `typing.Optional[BatchCallWhatsAppParams]` + +
+
+ +
+
+ +**timezone:** `typing.Optional[str]` + +
+
+ +
+
+ +**branch_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**environment:** `typing.Optional[str]` + +
+
+ +
+
+ +**telephony_call_config:** `typing.Optional[TelephonyCallConfigInput]` + +
+
+ +
+
+ +**target_concurrency_limit:** `typing.Optional[int]` — Maximum number of simultaneous calls for this batch. When set, dispatch is governed by this limit rather than workspace/agent capacity percentages. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.batch_calls.list(...) -> WorkspaceBatchCallsResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all batch calls for the current workspace. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.batch_calls.list( + limit=1, + last_doc="last_doc", + agent_id="agent_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` + +
+
+ +
+
+ +**last_doc:** `typing.Optional[str]` + +
+
+ +
+
+ +**agent_id:** `typing.Optional[str]` — Filter batch calls to a single agent. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.batch_calls.get(...) -> BatchCallDetailedResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get detailed information about a batch call including all recipients. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.batch_calls.get( + batch_id="batch_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**batch_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.batch_calls.delete(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Permanently delete a batch call and all recipient records. Conversations remain in history. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.batch_calls.delete( + batch_id="batch_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**batch_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.batch_calls.cancel(...) -> BatchCallResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Cancel a running batch call and set all recipients to cancelled status. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.batch_calls.cancel( + batch_id="batch_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**batch_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.batch_calls.retry(...) -> BatchCallResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retry a batch call, calling failed and no-response recipients again. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.batch_calls.retry( + batch_id="batch_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**batch_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.batch_calls.export(...) -> typing.Iterator[bytes] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Download all recipients and conversation results for a terminal batch call as CSV. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.batch_calls.export( + batch_id="batch_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**batch_id:** `str` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Only export the first N recipients; used to preview the columns. Omit to export every recipient. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi SipTrunk +
client.conversational_ai.sip_trunk.outbound_call(...) -> SipTrunkOutboundCallResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Handle an outbound call via SIP trunk +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.sip_trunk.outbound_call( + agent_id="agent_id", + agent_phone_number_id="agent_phone_number_id", + to_number="to_number", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` + +
+
+ +
+
+ +**agent_phone_number_id:** `str` + +
+
+ +
+
+ +**to_number:** `str` + +
+
+ +
+
+ +**conversation_initiation_client_data:** `typing.Optional[ConversationInitiationClientDataRequestInput]` + +
+
+ +
+
+ +**telephony_call_config:** `typing.Optional[TelephonyCallConfigInput]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi McpServers +
client.conversational_ai.mcp_servers.list() -> McpServersResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve all MCP server configurations available in the workspace. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.mcp_servers.list() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.mcp_servers.create(...) -> McpServerResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a new MCP server configuration in the workspace. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs, McpServerConfigInput +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.mcp_servers.create( + config=McpServerConfigInput( + url="url", + name="name", + ), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**config:** `McpServerConfigInput` — Configuration details for the MCP Server. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.mcp_servers.get(...) -> McpServerResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve a specific MCP server configuration from the workspace. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.mcp_servers.get( + mcp_server_id="mcp_server_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**mcp_server_id:** `str` — ID of the MCP Server. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.mcp_servers.delete(...) -> typing.Any +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete a specific MCP server configuration from the workspace. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.mcp_servers.delete( + mcp_server_id="mcp_server_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**mcp_server_id:** `str` — ID of the MCP Server. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.mcp_servers.update(...) -> McpServerResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update the configuration settings for an MCP server. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.mcp_servers.update( + mcp_server_id="mcp_server_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**mcp_server_id:** `str` — ID of the MCP Server. + +
+
+ +
+
+ +**approval_policy:** `typing.Optional[McpApprovalPolicy]` — The approval mode to set for the MCP server + +
+
+ +
+
+ +**force_pre_tool_speech:** `typing.Optional[bool]` — DEPRECATED: use `pre_tool_speech` instead. If set, overrides the server's force_pre_tool_speech setting for this tool. + +
+
+ +
+
+ +**pre_tool_speech:** `typing.Optional[PreToolSpeechMode]` — If set, overrides the server's pre_tool_speech setting for this tool. + +
+
+ +
+
+ +**disable_interruptions:** `typing.Optional[bool]` — DEPRECATED: use `interruption_mode` instead. If set, overrides the server's disable_interruptions setting for this tool. + +
+
+ +
+
+ +**interruption_mode:** `typing.Optional[ToolInterruptionMode]` — If set, overrides the server's interruption_mode setting for this tool. + +
+
+ +
+
+ +**tool_call_sound:** `typing.Optional[ToolCallSoundType]` — Predefined tool call sound type to play during tool execution for all tools from this MCP server + +
+
+ +
+
+ +**tool_call_sound_behavior:** `typing.Optional[ToolCallSoundBehavior]` — Determines when the tool call sound should play for all tools from this MCP server + +
+
+ +
+
+ +**execution_mode:** `typing.Optional[ToolExecutionMode]` — If set, overrides the server's execution_mode setting for this tool + +
+
+ +
+
+ +**response_timeout_secs:** `typing.Optional[int]` — The maximum time in seconds to wait for each MCP tool call to complete. + +
+
+ +
+
+ +**request_headers:** `typing.Optional[typing.Dict[str, typing.Optional[McpServerConfigUpdateRequestModelRequestHeadersValue]]]` — The headers to include in requests to the MCP server + +
+
+ +
+
+ +**request_meta:** `typing.Optional[typing.Dict[str, typing.Optional[McpServerConfigUpdateRequestModelRequestMetaValue]]]` — Entries sent in the MCP `_meta` field of tools/call requests. Values may be JSON scalars, or references to a workspace secret, dynamic variable, or environment variable resolved per call. + +
+
+ +
+
+ +**disable_compression:** `typing.Optional[bool]` — Whether to disable HTTP compression for this MCP server + +
+
+ +
+
+ +**secret_token:** `typing.Optional[ConvAiSecretLocator]` — Optional secret token for authentication with this MCP server + +
+
+ +
+
+ +**auth_connection:** `typing.Optional[McpServerConfigUpdateRequestModelAuthConnection]` — Optional auth connection to use for authentication with this MCP server + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi WhatsappAccounts +
client.conversational_ai.whatsapp_accounts.get(...) -> GetWhatsAppAccountResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get a WhatsApp account +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.whatsapp_accounts.get( + phone_number_id="phone_number_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**phone_number_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.whatsapp_accounts.delete(...) -> typing.Any +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete a WhatsApp account +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.whatsapp_accounts.delete( + phone_number_id="phone_number_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**phone_number_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.whatsapp_accounts.update(...) -> typing.Any +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update a WhatsApp account +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.whatsapp_accounts.update( + phone_number_id="phone_number_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**phone_number_id:** `str` + +
+
+ +
+
+ +**assigned_agent_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**enable_messaging:** `typing.Optional[bool]` + +
+
+ +
+
+ +**enable_audio_message_response:** `typing.Optional[bool]` + +
+
+ +
+
+ +**enable_typing_indicator:** `typing.Optional[bool]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.whatsapp_accounts.list(...) -> ListWhatsAppAccountsResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List all WhatsApp accounts +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.whatsapp_accounts.list( + agent_id="agent_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `typing.Optional[str]` — Filter by assigned agent ID + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Realtime +
client.conversational_ai.realtime.create_client_secret(...) -> ClientSecretResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create an ephemeral client secret for authenticating browser-based Realtime API sessions. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs, CreateClientSecretRequest +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.realtime.create_client_secret( + request=CreateClientSecretRequest(), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `typing.Optional[CreateClientSecretRequest]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Agents Summaries +
client.conversational_ai.agents.summaries.get(...) -> typing.Dict[str, SummariesGetResponseValue] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns summaries for the specified agents. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.summaries.get( + agent_ids=[ + "agent_ids" + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — List of agent IDs to fetch summaries for + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Agents Widget +
client.conversational_ai.agents.widget.get(...) -> GetAgentEmbedResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve the widget configuration for an agent +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.widget.get( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + conversation_signature="conversation_signature", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — The id of an agent. This is returned on agent creation. + +
+
+ +
+
+ +**conversation_signature:** `typing.Optional[str]` — An expiring token that enables a websocket conversation to start. These can be generated for an agent using the /v1/convai/conversation/get_signed_url endpoint + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Agents Link +
client.conversational_ai.agents.link.get(...) -> GetAgentLinkResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get the current link used to share the agent with others +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.link.get( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — The id of an agent. This is returned on agent creation. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Agents HoldAudio +
client.conversational_ai.agents.hold_audio.create(...) -> PostAgentHoldAudioResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Sets the custom hold audio played on loop to callers waiting in the agent's concurrency wait queue. Replaces any previously uploaded clip. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.hold_audio.create( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + hold_audio_file="example_hold_audio_file", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — The id of an agent. This is returned on agent creation. + +
+
+ +
+
+ +**hold_audio_file:** `core.File` — An MP3 or WAV file played on loop to callers waiting in the agent's concurrency wait queue. Maximum size 40 MB, maximum duration 180 seconds. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.agents.hold_audio.delete(...) -> DeleteAgentHoldAudioResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Removes the agent's custom hold audio; queued callers hear the default hold tone again. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.hold_audio.delete( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — The id of an agent. This is returned on agent creation. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Agents KnowledgeBase +
client.conversational_ai.agents.knowledge_base.size(...) -> GetAgentKnowledgebaseSizeResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns the number of pages in the agent's knowledge base. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.knowledge_base.size( + agent_id="agent_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Agents LlmUsage +
client.conversational_ai.agents.llm_usage.calculate(...) -> LlmUsageCalculatorResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Calculates expected number of LLM tokens needed for the specified agent. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.llm_usage.calculate( + agent_id="agent_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` + +
+
+ +
+
+ +**prompt_length:** `typing.Optional[int]` — Length of the prompt in characters. + +
+
+ +
+
+ +**number_of_pages:** `typing.Optional[int]` — Pages of content in pdf documents OR urls in agent's Knowledge Base. + +
+
+ +
+
+ +**rag_enabled:** `typing.Optional[bool]` — Whether RAG is enabled. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Agents Branches +
client.conversational_ai.agents.branches.list(...) -> ListResponseAgentBranchSummary +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of branches an agent has +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.branches.list( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + include_archived=True, + limit=1, + include_commit_status=True, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — The id of an agent. This is returned on agent creation. + +
+
+ +
+
+ +**include_archived:** `typing.Optional[bool]` — Whether archived branches should be included + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — How many results at most should be returned + +
+
+ +
+
+ +**include_commit_status:** `typing.Optional[bool]` — Whether to compute how far each branch has diverged from main (commits_ahead/commits_behind). This walks the version DAG of every branch, so it is slow on agents with long histories and is off by default, leaving those fields null. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.agents.branches.create(...) -> CreateAgentBranchResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a new branch from a given version of any branch +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.branches.create( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + parent_version_id="parent_version_id", + name="name", + description="description", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — The id of an agent. This is returned on agent creation. + +
+
+ +
+
+ +**parent_version_id:** `str` — ID of the version to branch from + +
+
+ +
+
+ +**name:** `str` — Name of the branch. It is unique within the agent. + +
+
+ +
+
+ +**description:** `str` — Description for the branch + +
+
+ +
+
+ +**conversation_config:** `typing.Optional[typing.Dict[str, typing.Any]]` — Changes to apply to conversation config + +
+
+ +
+
+ +**platform_settings:** `typing.Optional[typing.Dict[str, typing.Any]]` — Changes to apply to platform settings + +
+
+ +
+
+ +**workflow:** `typing.Optional[AgentWorkflowRequestModel]` — Updated workflow definition + +
+
+ +
+
+ +**include_draft:** `typing.Optional[bool]` — When true, the new branch uses the caller's draft procedure set instead of the branch tip. Requires parent_version_id to be the branch tip. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.agents.branches.get(...) -> AgentBranchResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get information about a single agent branch +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.branches.get( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + branch_id="agtbranch_0901k4aafjxxfxt93gd841r7tv5t", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — The id of an agent. This is returned on agent creation. + +
+
+ +
+
+ +**branch_id:** `str` — Unique identifier for the branch. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.agents.branches.update(...) -> AgentBranchResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update agent branch properties such as name, description, archiving status, protection level, and auto-rebase onto main +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.branches.update( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + branch_id="agtbranch_0901k4aafjxxfxt93gd841r7tv5t", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — The id of an agent. This is returned on agent creation. + +
+
+ +
+
+ +**branch_id:** `str` — Unique identifier for the branch. + +
+
+ +
+
+ +**name:** `typing.Optional[str]` — New name for the branch. Must be unique within the agent. + +
+
+ +
+
+ +**description:** `typing.Optional[str]` — New description for the branch. Pass an empty string to clear it. + +
+
+ +
+
+ +**is_archived:** `typing.Optional[bool]` — Whether the branch should be archived + +
+
+ +
+
+ +**protection_status:** `typing.Optional[BranchProtectionStatus]` — The protection level for the branch + +
+
+ +
+
+ +**auto_rebase:** `typing.Optional[bool]` — When true, rebase this branch onto main automatically after each new main version. Cannot be enabled on the main branch. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.agents.branches.preview_merge(...) -> MergePreviewResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns the result of merging the source branch into the target branch without performing the merge. Useful for showing an accurate diff before confirming. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.branches.preview_merge( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + source_branch_id="agtbrch_8901k4t9z5defmb8vh3e9361y7nj", + target_branch_id="agtbrch_8901k4t9z5defmb8vh3e9361y7nj", + force=True, + include_procedure_generated_workflow_elements=True, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — The id of an agent. This is returned on agent creation. + +
+
+ +
+
+ +**source_branch_id:** `str` — Unique identifier for the source branch to merge from. + +
+
+ +
+
+ +**target_branch_id:** `str` — The ID of the target branch to merge into. + +
+
+ +
+
+ +**force:** `typing.Optional[bool]` — When true, source branch changes always win conflicts regardless of timestamps + +
+
+ +
+
+ +**include_procedure_generated_workflow_elements:** `typing.Optional[bool]` — Whether to include the workflow nodes and edges generated from structured procedures. When false, the workflow contains only authored elements. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.agents.branches.merge(...) -> typing.Any +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Merge a branch into a target branch +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.branches.merge( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + source_branch_id="agtbrch_8901k4t9z5defmb8vh3e9361y7nj", + target_branch_id="agtbrch_8901k4t9z5defmb8vh3e9361y7nj", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — The id of an agent. This is returned on agent creation. + +
+
+ +
+
+ +**source_branch_id:** `str` — Unique identifier for the source branch to merge from. + +
+
+ +
+
+ +**target_branch_id:** `str` — The ID of the target branch to merge into. + +
+
+ +
+
+ +**archive_source_branch:** `typing.Optional[bool]` — Whether to archive the source branch after merging + +
+
+ +
+
+ +**force:** `typing.Optional[bool]` — Force source branch changes onto the target, overriding timestamp-based conflict resolution + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.agents.branches.preview_rebase(...) -> MergePreviewResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns the result of pulling changes from a source branch (defaults to main) into the given branch without performing it, preserving the given branch's own changes. Useful for showing an accurate diff before confirming. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.branches.preview_rebase( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + branch_id="agtbrch_8901k4t9z5defmb8vh3e9361y7nj", + source_branch_id="source_branch_id", + include_procedure_generated_workflow_elements=True, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — The id of an agent. This is returned on agent creation. + +
+
+ +
+
+ +**branch_id:** `str` — Unique identifier for the source branch to merge from. + +
+
+ +
+
+ +**source_branch_id:** `typing.Optional[str]` — The ID of the branch to pull changes from. Defaults to the agent's main branch. + +
+
+ +
+
+ +**include_procedure_generated_workflow_elements:** `typing.Optional[bool]` — Whether to include the workflow nodes and edges generated from structured procedures. When false, the workflow contains only authored elements. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.agents.branches.rebase(...) -> typing.Any +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Pull changes from a source branch (defaults to main) into this branch as a new version, preserving this branch's own changes on conflicts. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.branches.rebase( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + branch_id="agtbrch_8901k4t9z5defmb8vh3e9361y7nj", + source_branch_id="source_branch_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — The id of an agent. This is returned on agent creation. + +
+
+ +
+
+ +**branch_id:** `str` — Unique identifier for the source branch to merge from. + +
+
+ +
+
+ +**source_branch_id:** `typing.Optional[str]` — The ID of the branch to pull changes from. Defaults to the agent's main branch. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Agents Versions +
client.conversational_ai.agents.versions.get(...) -> AgentVersionMetadata +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get metadata for a specific agent version +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.versions.get( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + version_id="agtvrsn_0901k4aafjxxfxt93gd841r7tv5t", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — The id of an agent. This is returned on agent creation. + +
+
+ +
+
+ +**version_id:** `str` — Unique identifier for the version. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Agents Deployments +
client.conversational_ai.agents.deployments.list(...) -> ListResponseAgentDeploymentHistoryItem +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List the traffic split history of an agent, newest first +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.deployments.list( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + page=1, + page_size=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — The id of an agent. This is returned on agent creation. + +
+
+ +
+
+ +**page:** `typing.Optional[int]` — Page number, starting at 1 + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many results at most should be returned + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.agents.deployments.create(...) -> AgentDeploymentResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a new deployment for an agent +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs, AgentDeploymentRequest, AgentDeploymentRequestItem, AgentDeploymentPercentageStrategy +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.deployments.create( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + deployment_request=AgentDeploymentRequest( + requests=[ + AgentDeploymentRequestItem( + branch_id="agtbrch_8901k4t9z5defmb8vh3e9361y7nj", + deployment_strategy=AgentDeploymentPercentageStrategy( + type="percentage", + traffic_percentage=0.5, + ), + ) + ], + ), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — The id of an agent. This is returned on agent creation. + +
+
+ +
+
+ +**deployment_request:** `AgentDeploymentRequest` — Request to create a new deployment + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Agents Drafts +
client.conversational_ai.agents.drafts.create(...) -> typing.Any +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a new draft for an agent +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs, AgentWorkflowRequestModel, WorkflowEdgeModelInput +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.drafts.create( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + branch_id="agtbrch_8901k4t9z5defmb8vh3e9361y7nj", + conversation_config={ + "key": "value" + }, + platform_settings={ + "key": "value" + }, + workflow=AgentWorkflowRequestModel( + edges={ + "entry_to_tool_a": WorkflowEdgeModelInput( + source="entry_node", + target="tool_node_a", + forward_condition={ + "type": "expression", + "expression": { + "type": "and_operator", + "children": [] + } + }, + ), + "start_to_entry": WorkflowEdgeModelInput( + source="start_node", + target="entry_node", + forward_condition={ + "type": "expression", + "expression": { + "type": "and_operator", + "children": [] + } + }, + ), + "tool_a_to_failure": WorkflowEdgeModelInput( + source="tool_node_a", + target="failure_node", + forward_condition={ + "type": "expression", + "expression": { + "type": "and_operator", + "children": [] + } + }, + ), + "tool_a_to_tool_b": WorkflowEdgeModelInput( + source="tool_node_a", + target="tool_node_b", + forward_condition={ + "type": "expression", + "expression": { + "type": "and_operator", + "children": [] + } + }, + ), + "tool_b_to_agent_transfer": WorkflowEdgeModelInput( + source="tool_node_b", + target="success_transfer", + forward_condition={ + "type": "expression", + "expression": { + "type": "and_operator", + "children": [] + } + }, + ), + "tool_b_to_conversation": WorkflowEdgeModelInput( + source="tool_node_b", + target="success_conversation", + forward_condition={ + "type": "expression", + "expression": { + "type": "and_operator", + "children": [] + } + }, + ), + "tool_b_to_end": WorkflowEdgeModelInput( + source="tool_node_b", + target="success_end", + forward_condition={ + "type": "expression", + "expression": { + "type": "and_operator", + "children": [] + } + }, + ), + "tool_b_to_phone": WorkflowEdgeModelInput( + source="tool_node_b", + target="success_phone", + forward_condition={ + "type": "expression", + "expression": { + "type": "and_operator", + "children": [] + } + }, + ) + }, + nodes={ + "entry_node": { + "type": "end" + }, + "failure_node": { + "type": "end" + }, + "start_node": { + "type": "end" + }, + "success_conversation": { + "type": "end" + }, + "success_end": { + "type": "end" + }, + "success_phone": { + "type": "end" + }, + "success_transfer": { + "type": "end" + }, + "tool_node_a": { + "type": "end" + }, + "tool_node_b": { + "type": "end" + } + }, + ), + name="name", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — The id of an agent. This is returned on agent creation. + +
+
+ +
+
+ +**branch_id:** `str` — The ID of the agent branch to use + +
+
+ +
+
+ +**conversation_config:** `typing.Dict[str, typing.Any]` — Conversation config for the draft + +
+
+ +
+
+ +**platform_settings:** `typing.Dict[str, typing.Any]` — Platform settings for the draft + +
+
+ +
+
+ +**workflow:** `AgentWorkflowRequestModel` — Workflow for the draft + +
+
+ +
+
+ +**name:** `str` — Name for the draft + +
+
+ +
+
+ +**tags:** `typing.Optional[typing.List[str]]` — Tags to help classify and filter the agent + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.agents.drafts.delete(...) -> typing.Any +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete a draft for an agent +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.drafts.delete( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + branch_id="agtbrch_8901k4t9z5defmb8vh3e9361y7nj", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — The id of an agent. This is returned on agent creation. + +
+
+ +
+
+ +**branch_id:** `str` — The ID of the agent branch to use + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Agents MergeProposals +
client.conversational_ai.agents.merge_proposals.list(...) -> PaginatedResultAgentMergeProposalResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List the proposals for an agent, newest first. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.merge_proposals.list( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + status="open", + source_branch_id="source_branch_id", + target_branch_id="target_branch_id", + search="search", + page_size=1, + cursor="cursor", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — The id of an agent. This is returned on agent creation. + +
+
+ +
+
+ +**status:** `typing.Optional[MergeProposalStatus]` — Only return proposals with this status. + +
+
+ +
+
+ +**source_branch_id:** `typing.Optional[str]` — Only return proposals with this source branch. + +
+
+ +
+
+ +**target_branch_id:** `typing.Optional[str]` — Only return proposals with this target branch. + +
+
+ +
+
+ +**search:** `typing.Optional[str]` — Case-insensitive substring match over title and description. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many results at most should be returned + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.agents.merge_proposals.create(...) -> CreateAgentMergeProposalResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Record a request to merge a source branch into a target branch. Anyone with edit access can open one; merging it later is gated on write access to the target branch, so this is how a change reaches a protected branch the author cannot merge into themselves. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.merge_proposals.create( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + source_branch_id="source_branch_id", + target_branch_id="target_branch_id", + title="title", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — The id of an agent. This is returned on agent creation. + +
+
+ +
+
+ +**source_branch_id:** `str` — Branch whose changes should be merged. + +
+
+ +
+
+ +**target_branch_id:** `str` — Branch that should receive the changes. + +
+
+ +
+
+ +**title:** `str` — Short title for the merge_proposal. + +
+
+ +
+
+ +**description:** `typing.Optional[str]` — Optional longer description for reviewers. + +
+
+ +
+
+ +**requested_reviewer_user_ids:** `typing.Optional[typing.List[str]]` — User IDs to request a review from. + +
+
+ +
+
+ +**triage_ticket_id:** `typing.Optional[str]` — Triage ticket of this agent that the merge_proposal resolves. Merging it resolves the ticket if still open. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.agents.merge_proposals.get(...) -> AgentMergeProposalResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get a single merge_proposal. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.merge_proposals.get( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + merge_proposal_id="agtmprop_8901k4t9z5defmb8vh3e9361y7nj", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — The id of an agent. This is returned on agent creation. + +
+
+ +
+
+ +**merge_proposal_id:** `str` — Unique identifier for the merge_proposal. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.agents.merge_proposals.update(...) -> AgentMergeProposalResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Edit an open merge_proposal's title or description, or close it. The author closing it is recorded as withdrawn; anyone else as rejected. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.merge_proposals.update( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + merge_proposal_id="agtmprop_8901k4t9z5defmb8vh3e9361y7nj", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — The id of an agent. This is returned on agent creation. + +
+
+ +
+
+ +**merge_proposal_id:** `str` — Unique identifier for the merge_proposal. + +
+
+ +
+
+ +**title:** `typing.Optional[str]` — New title for the merge_proposal. + +
+
+ +
+
+ +**description:** `typing.Optional[str]` — New description for the merge_proposal. + +
+
+ +
+
+ +**requested_reviewer_user_ids:** `typing.Optional[typing.List[str]]` — Replacement list of user IDs to request a review from. + +
+
+ +
+
+ +**close:** `typing.Optional[bool]` — When true, close the merge_proposal without merging. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.agents.merge_proposals.submit_review(...) -> AgentMergeProposalResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Approve a merge_proposal or request changes on it. A user's latest review replaces their previous one. Non-admins need an approval from another user before the merge is allowed. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.merge_proposals.submit_review( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + merge_proposal_id="agtmprop_8901k4t9z5defmb8vh3e9361y7nj", + state="approved", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — The id of an agent. This is returned on agent creation. + +
+
+ +
+
+ +**merge_proposal_id:** `str` — Unique identifier for the merge_proposal. + +
+
+ +
+
+ +**state:** `MergeProposalReviewState` — The review verdict. + +
+
+ +
+
+ +**comment:** `typing.Optional[str]` — Optional comment to leave with the review. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.agents.merge_proposals.add_comment(...) -> AgentMergeProposalResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Leave a comment on a merge_proposal without recording a review verdict. Unlike reviews, comments accumulate and can still be added once the merge_proposal is merged or closed. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.merge_proposals.add_comment( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + merge_proposal_id="agtmprop_8901k4t9z5defmb8vh3e9361y7nj", + body="body", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — The id of an agent. This is returned on agent creation. + +
+
+ +
+
+ +**merge_proposal_id:** `str` — Unique identifier for the merge_proposal. + +
+
+ +
+
+ +**body:** `str` — The comment text. Markdown is supported. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.agents.merge_proposals.merge(...) -> AgentMergeProposalResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Execute the merge. The caller must have write access to the target branch (admins only, for a protected branch), so this is where a reviewer approves and merges a request opened by someone who could not. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.merge_proposals.merge( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + merge_proposal_id="agtmprop_8901k4t9z5defmb8vh3e9361y7nj", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — The id of an agent. This is returned on agent creation. + +
+
+ +
+
+ +**merge_proposal_id:** `str` — Unique identifier for the merge_proposal. + +
+
+ +
+
+ +**archive_source_branch:** `typing.Optional[bool]` — Whether to archive the source branch after merging. + +
+
+ +
+
+ +**force:** `typing.Optional[bool]` — Force source branch changes onto the target, overriding timestamp-based conflict resolution. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Agents Procedures +
client.conversational_ai.agents.procedures.list(...) -> ListProceduresResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List the procedures attached to this agent branch. By default, unpublished drafts take precedence over the latest committed version. Pass agent_version_id to list a published snapshot instead. has_draft is true when a procedure has unpublished draft changes on this branch. Procedure content is not included; use Get Procedure to read a procedure's body. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.procedures.list( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + branch_id="agtbranch_0901k4aafjxxfxt93gd841r7tv5t", + agent_version_id="agent_version_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — Agent ID to get the procedure draft from + +
+
+ +
+
+ +**branch_id:** `str` — Branch ID to get the procedure draft from + +
+
+ +
+
+ +**agent_version_id:** `typing.Optional[str]` — The agent version ID to retrieve the procedure for. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.agents.procedures.create(...) -> CreateProcedureResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a new procedure for the agent on a branch. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs, CreateProcedureRequestModel +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.procedures.create( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + branch_id="agtbranch_0901k4aafjxxfxt93gd841r7tv5t", + request=CreateProcedureRequestModel(), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — Agent ID to get the procedure draft from + +
+
+ +
+
+ +**branch_id:** `str` — Branch ID to get the procedure draft from + +
+
+ +
+
+ +**request:** `typing.Optional[CreateProcedureRequestModel]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.agents.procedures.compile(...) -> CompileProceduresResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Legacy. Do not use. Saving an agent draft (`POST /v1/convai/agents/{agent_id}/drafts`) and publishing an agent (`PATCH /v1/convai/agents/{agent_id}`) compile structured procedures into workflow nodes and edges, save the compiled workflow with the draft or version, and return validation errors, so a separate compile call is no longer needed. This endpoint remains available for the time being so existing callers do not break, as a dry-run that compiles the current procedure drafts into a workflow without persisting anything. It will eventually be deprecated. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.procedures.compile( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + branch_id="agtbranch_0901k4aafjxxfxt93gd841r7tv5t", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — Agent ID to get the procedure draft from + +
+
+ +
+
+ +**branch_id:** `str` — Branch ID to get the procedure draft from + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.agents.procedures.get(...) -> ProcedureAtVersionResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve a procedure at a specific version or the current branch HEAD. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.procedures.get( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + branch_id="agtbranch_0901k4aafjxxfxt93gd841r7tv5t", + procedure_id="agtprc_6qbpwdq8n01bxhk44bgjy6f10ck3", + version_id="version_id", + agent_version_id="agent_version_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — Agent ID to get the procedure draft from + +
+
+ +
+
+ +**branch_id:** `str` — Branch ID to get the procedure draft from + +
+
+ +
+
+ +**procedure_id:** `str` — The procedure ID + +
+
+ +
+
+ +**version_id:** `typing.Optional[str]` — The version ID to retrieve. If omitted, returns the version at branch HEAD. + +
+
+ +
+
+ +**agent_version_id:** `typing.Optional[str]` — The agent version ID to retrieve the procedure for. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.agents.procedures.remove(...) -> typing.Any +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Remove a procedure from the agent's draft working set. Removing a folder cascades to its entire subtree, rejected if any procedure outside the subtree hands off into it. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.procedures.remove( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + branch_id="agtbranch_0901k4aafjxxfxt93gd841r7tv5t", + procedure_id="agtprc_6qbpwdq8n01bxhk44bgjy6f10ck3", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — Agent ID to get the procedure draft from + +
+
+ +
+
+ +**branch_id:** `str` — Branch ID to get the procedure draft from + +
+
+ +
+
+ +**procedure_id:** `str` — The procedure ID + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Agents Procedures Drafts +
client.conversational_ai.agents.procedures.drafts.get(...) -> ProcedureDraftResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get user's draft for a procedure +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.procedures.drafts.get( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + branch_id="agtbranch_0901k4aafjxxfxt93gd841r7tv5t", + procedure_id="agtprc_6qbpwdq8n01bxhk44bgjy6f10ck3", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — Agent ID to get the procedure draft from + +
+
+ +
+
+ +**branch_id:** `str` — Branch ID to get the procedure draft from + +
+
+ +
+
+ +**procedure_id:** `str` — The procedure ID + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.agents.procedures.drafts.delete(...) -> typing.Any +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete user's draft for a procedure, resetting to the committed version +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.procedures.drafts.delete( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + branch_id="agtbranch_0901k4aafjxxfxt93gd841r7tv5t", + procedure_id="agtprc_6qbpwdq8n01bxhk44bgjy6f10ck3", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — Agent ID to get the procedure draft from + +
+
+ +
+
+ +**branch_id:** `str` — Branch ID to get the procedure draft from + +
+
+ +
+
+ +**procedure_id:** `str` — The procedure ID + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.agents.procedures.drafts.update(...) -> ProcedureDraftResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create or update user's draft for a procedure +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.procedures.drafts.update( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + branch_id="agtbranch_0901k4aafjxxfxt93gd841r7tv5t", + procedure_id="agtprc_6qbpwdq8n01bxhk44bgjy6f10ck3", + name="name", + content="content", + type="free_form", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — Agent ID to get the procedure draft from + +
+
+ +
+
+ +**branch_id:** `str` — Branch ID to get the procedure draft from + +
+
+ +
+
+ +**procedure_id:** `str` — The procedure ID + +
+
+ +
+
+ +**name:** `str` — Procedure name + +
+
+ +
+
+ +**content:** `str` — Procedure content + +
+
+ +
+
+ +**type:** `ProcedureType` — Procedure type + +
+
+ +
+
+ +**trigger:** `typing.Optional[str]` — When the agent should use this procedure. Empty string means this is a sub-procedure that should only start when another procedure references it. Omit this field (or send null) to keep the stored trigger, which is empty on create. Send `""` to clear it. `description` is accepted as an alias. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Agents Widget Avatar +
client.conversational_ai.agents.widget.avatar.create(...) -> PostAgentAvatarResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Sets the avatar for an agent displayed in the widget +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.agents.widget.avatar.create( + agent_id="agent_3701k3ttaq12ewp8b7qv5rfyszkz", + avatar_file="example_avatar_file", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — The id of an agent. This is returned on agent creation. + +
+
+ +
+
+ +**avatar_file:** `core.File` — An image file to be used as the agent's avatar. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Analytics LiveCount +
client.conversational_ai.analytics.live_count.get(...) -> GetLiveCountResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get the live count of the ongoing conversations. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.analytics.live_count.get( + agent_id="agent_id", + agent_ids=[ + "agent_ids" + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `typing.Optional[str]` — The id of an agent to restrict the analytics to. + +
+
+ +
+
+ +**agent_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Restrict analytics to the union of the given agents. Takes precedence over `agent_id` when both are supplied. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Conversations Audio +
client.conversational_ai.conversations.audio.get(...) -> typing.Iterator[bytes] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get the audio recording of a particular conversation +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.conversations.audio.get( + conversation_id="conversation_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**conversation_id:** `str` — The id of the conversation you're taking the action on. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Conversations Feedback +
client.conversational_ai.conversations.feedback.create(...) -> typing.Any +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Send the feedback for the given conversation +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.conversations.feedback.create( + conversation_id="21m00Tcm4TlvDq8ikWAM", + feedback="like", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**conversation_id:** `str` — The id of the conversation you're taking the action on. + +
+
+ +
+
+ +**feedback:** `typing.Optional[UserFeedbackScore]` — Either 'like' or 'dislike' to indicate the feedback for the conversation. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Conversations Messages +
client.conversational_ai.conversations.messages.text_search(...) -> MessagesSearchResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Search through conversation transcript messages by full-text and fuzzy search +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.conversations.messages.text_search( + text_query="refund policy", + agent_id="agent_id", + visited_agent_ids=[ + "visited_agent_ids" + ], + visited_agent_branch_ids=[ + "visited_agent_branch_ids" + ], + triggered_procedure_ids=[ + "triggered_procedure_ids" + ], + call_successful="success", + call_start_before_unix=1, + call_start_after_unix=1, + call_duration_min_secs=1, + call_duration_max_secs=1, + rating_max=1, + rating_min=1, + has_feedback_comment=True, + user_id="user_id", + evaluation_params=[ + "evaluation_params" + ], + data_collection_params=[ + "data_collection_params" + ], + dynamic_variable_params=[ + "dynamic_variable_params" + ], + tool_names=[ + "tool_names" + ], + tool_names_successful=[ + "tool_names_successful" + ], + tool_names_errored=[ + "tool_names_errored" + ], + include_invalid_tool_calls=True, + main_languages=[ + "main_languages" + ], + exclude_statuses=[ + "initiated" + ], + termination_reasons=[ + "termination_reasons" + ], + page_size=1, + summary_mode="exclude", + conversation_initiation_source="unknown", + text_only=True, + conversation_product_type="agents", + branch_id="branch_id", + version_id="version_id", + topic_ids=[ + "topic_ids" + ], + sort_by="search_score", + cursor="cursor", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**text_query:** `str` — The search query text for full-text and fuzzy matching + +
+
+ +
+
+ +**agent_id:** `typing.Optional[str]` — Agent id (agent_…) or speech engine external id (seng_), resolved to the same underlying resource. + +
+
+ +
+
+ +**visited_agent_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter conversations where any of these agents participated. Can not exceed 50 values. + +
+
+ +
+
+ +**visited_agent_branch_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter conversations where any of these agent branches participated. Can not exceed 50 values. + +
+
+ +
+
+ +**triggered_procedure_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter conversations where any of these procedures were triggered. Can not exceed 50 values. + +
+
+ +
+
+ +**call_successful:** `typing.Optional[EvaluationResultFilter]` — The result of the success evaluation + +
+
+ +
+
+ +**call_start_before_unix:** `typing.Optional[int]` — Unix timestamp (in seconds) to filter conversations up to this start date. + +
+
+ +
+
+ +**call_start_after_unix:** `typing.Optional[int]` — Unix timestamp (in seconds) to filter conversations after to this start date. + +
+
+ +
+
+ +**call_duration_min_secs:** `typing.Optional[int]` — Minimum call duration in seconds. + +
+
+ +
+
+ +**call_duration_max_secs:** `typing.Optional[int]` — Maximum call duration in seconds. + +
+
+ +
+
+ +**rating_max:** `typing.Optional[int]` — Maximum overall rating (1-5). + +
+
+ +
+
+ +**rating_min:** `typing.Optional[int]` — Minimum overall rating (1-5). + +
+
+ +
+
+ +**has_feedback_comment:** `typing.Optional[bool]` — Filter conversations with user feedback comments. + +
+
+ +
+
+ +**user_id:** `typing.Optional[str]` — Filter conversations by the user ID who initiated them. + +
+
+ +
+
+ +**evaluation_params:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Evaluation filters. Repeat param. Format: criteria_id:result where result is one of success|failure|unknown. Example: eval=value_framing:success + +
+
+ +
+
+ +**data_collection_params:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Data collection filters. Repeat param. Format: id:op:value where op is one of eq|neq|gt|gte|lt|lte|in. For in, pipe-delimit values. An empty value matches conversations where the field was not collected (id:eq:), and neq with an empty value matches where it was (id:neq:). eq is exact equality. gt|gte|lt|lte require a numeric value. + +
+
+ +
+
+ +**dynamic_variable_params:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Dynamic variable filters. Repeat param. Format: name:op:value where op is one of eq|neq|gt|gte|lt|lte|in. For in, pipe-delimit values. An empty value matches conversations where the variable was not set (name:eq:), and neq with an empty value matches where it was (name:neq:). eq is exact equality. gt|gte|lt|lte require a numeric value. Names containing ':' cannot be expressed. + +
+
+ +
+
+ +**tool_names:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter conversations by tool names used during the call. + +
+
+ +
+
+ +**tool_names_successful:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter conversations by tool names that had successful calls. + +
+
+ +
+
+ +**tool_names_errored:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter conversations by tool names that had errored calls. + +
+
+ +
+
+ +**include_invalid_tool_calls:** `typing.Optional[bool]` — Also match tool calls that never ran. + +
+
+ +
+
+ +**main_languages:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter conversations by detected main language (language code). + +
+
+ +
+
+ +**exclude_statuses:** `typing.Optional[typing.Union[MessagesTextSearchRequestExcludeStatusesItem, typing.Sequence[MessagesTextSearchRequestExcludeStatusesItem]]]` — Exclude conversations with the given statuses. Useful for hiding in-progress / processing conversations from list views. + +
+
+ +
+
+ +**termination_reasons:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter conversations by their stored termination_reason (metadata.termination_reason). Repeat param to match any of several. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — Number of results per page. Max 50. + +
+
+ +
+
+ +**summary_mode:** `typing.Optional[MessagesTextSearchRequestSummaryMode]` — Whether to include transcript summaries in the response. + +
+
+ +
+
+ +**conversation_initiation_source:** `typing.Optional[ConversationInitiationSource]` + +
+
+ +
+
+ +**text_only:** `typing.Optional[bool]` + +
+
+ +
+
+ +**conversation_product_type:** `typing.Optional[ConversationProduct]` — Restrict results to a single conversation product surface. + +
+
+ +
+
+ +**branch_id:** `typing.Optional[str]` — Filter conversations by branch ID. + +
+
+ +
+
+ +**version_id:** `typing.Optional[str]` — Filter conversations by version ID. + +
+
+ +
+
+ +**topic_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter conversations by topic IDs assigned during topic discovery. + +
+
+ +
+
+ +**sort_by:** `typing.Optional[MessageSearchSortBy]` — Sort order for search results. 'search_score' sorts by search score, 'created_at' sorts by conversation start time. + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.conversations.messages.search(...) -> MessagesSearchResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Search conversation transcripts by semantic similarity to surface relevant messages based on meaning and intent, rather than exact keyword matches +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.conversations.messages.search( + text_query="Customer asking to cancel and get money back", + agent_id="agent_id", + branch_id="branch_id", + page_size=1, + cursor="cursor", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**text_query:** `str` — The search query text for semantic similarity matching + +
+
+ +
+
+ +**agent_id:** `typing.Optional[str]` — Agent id (agent_…) or speech engine external id (seng_), resolved to the same underlying resource. + +
+
+ +
+
+ +**branch_id:** `typing.Optional[str]` — Filter conversations by branch ID. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — Number of results per page. Max 50. + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Conversations Tags +
client.conversational_ai.conversations.tags.assign(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Assign one or more conversation tags to a conversation. Tags that are already assigned are ignored. Tags must belong to the same workspace. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.conversations.tags.assign( + conversation_id="conversation_id", + tag_ids=[ + "tag_ids" + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**conversation_id:** `str` + +
+
+ +
+
+ +**tag_ids:** `typing.List[str]` — Tag IDs to add to the conversation. Re-assigning an existing tag is a no-op. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.conversations.tags.unassign(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Remove a single conversation tag from a conversation. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.conversations.tags.unassign( + conversation_id="conversation_id", + tag_id="tag_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**conversation_id:** `str` + +
+
+ +
+
+ +**tag_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.conversations.tags.list(...) -> GetConversationTagsPageResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List conversation tags for the workspace, ordered by most recently created first. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.conversations.tags.list( + page_size=1, + cursor="cursor", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many conversation tags to return. Can not exceed 100. + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.conversations.tags.create(...) -> ConversationTagResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a new conversation tag for the workspace. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.conversations.tags.create( + title="title", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**title:** `str` — Display title of the tag. + +
+
+ +
+
+ +**description:** `typing.Optional[str]` — Optional free-text description. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.conversations.tags.get(...) -> ConversationTagResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get a conversation tag by ID. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.conversations.tags.get( + tag_id="tag_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**tag_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.conversations.tags.delete(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete a conversation tag. Restricted to the tag owner or a workspace admin. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.conversations.tags.delete( + tag_id="tag_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**tag_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.conversations.tags.update(...) -> ConversationTagResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update a conversation tag's title and/or description. Restricted to the tag owner or a workspace admin. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.conversations.tags.update( + tag_id="tag_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**tag_id:** `str` + +
+
+ +
+
+ +**title:** `typing.Optional[str]` — If provided, replaces the tag title. Omit to leave unchanged. + +
+
+ +
+
+ +**description:** `typing.Optional[str]` — If provided, replaces the tag description. Omit to leave unchanged. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Conversations Files +
client.conversational_ai.conversations.files.create(...) -> ConvAiFileUploadResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Upload an image, PDF, or text file for a conversation. Returns a unique file ID that can be used to reference the file in the conversation. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.conversations.files.create( + conversation_id="conversation_id", + file="example_file", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**conversation_id:** `str` + +
+
+ +
+
+ +**file:** `core.File` — Image, PDF, or text file to upload + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.conversations.files.delete(...) -> ConvAiFileUploadResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Remove a file upload from a conversation. Only possible if the file hasn't already been used in the conversation. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.conversations.files.delete( + conversation_id="conversation_id", + file_id="file_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**conversation_id:** `str` + +
+
+ +
+
+ +**file_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Conversations Topics +
client.conversational_ai.conversations.topics.get(...) -> GetAgentTopicsResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns the latest topic discovery run results for a given agent. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.conversations.topics.get( + agent_id="agent_id", + page_size=1, + sort_by="conversations", + sort_direction="asc", + from_unix_secs=1, + to_unix_secs=1, + include_evaluation_criteria=True, + cursor="cursor", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `str` — ID of the agent + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — Number of top-level topic groups to return. + +
+
+ +
+
+ +**sort_by:** `typing.Optional[TopicSortBy]` — Column to rank topics by. Use conversations for volume, sentiment with sort_direction=asc for the most negative topics, and frustration with sort_direction=desc for the most frustrated ones. Topics with no score are always ranked last. + +
+
+ +
+
+ +**sort_direction:** `typing.Optional[SortDirection]` — Direction to sort topics. + +
+
+ +
+
+ +**from_unix_secs:** `typing.Optional[int]` — Start of the window to view topics for. When set with to_unix_secs, the completed daily topic-discovery runs in the range are aggregated together, so the window scopes the metrics as well as the topic set. Floored to the start of its UTC day because runs cover whole UTC days; aggregated_run_count reports how many runs were summed. Omit both bounds to get the single latest run. + +
+
+ +
+
+ +**to_unix_secs:** `typing.Optional[int]` — End of the window to view topics for. + +
+
+ +
+
+ +**include_evaluation_criteria:** `typing.Optional[bool]` — Include the per-criteria evaluation breakdown on each topic's metrics. Pass false to drop it: it dominates the payload and the weighted success_rate is returned either way. + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Conversations Analysis +
client.conversational_ai.conversations.analysis.run(...) -> GetConversationResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Run the analysis for a conversation using the agent's current evaluation criteria and data collection settings. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.conversations.analysis.run( + conversation_id="conversation_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**conversation_id:** `str` — ID of the conversation + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.conversations.analysis.run_evaluation(...) -> GetConversationResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Rerun a specific evaluation for a conversation. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.conversations.analysis.run_evaluation( + conversation_id="conversation_id", + evaluation_id="evaluation_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**conversation_id:** `str` — ID of the conversation + +
+
+ +
+
+ +**evaluation_id:** `str` — ID of the single evaluation criterion to rerun. + +
+
+ +
+
+ +**scope:** `typing.Optional[AnalysisScope]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Dashboard Settings +
client.conversational_ai.dashboard.settings.get() -> GetConvAiDashboardSettingsResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve Convai dashboard settings for the workspace +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.dashboard.settings.get() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.dashboard.settings.update(...) -> GetConvAiDashboardSettingsResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update Convai dashboard settings for the workspace +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.dashboard.settings.update() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**charts:** `typing.Optional[typing.List[PatchConvAiDashboardSettingsRequestChartsItem]]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi KnowledgeBase Documents +
client.conversational_ai.knowledge_base.documents.create_from_url(...) -> AddKnowledgeBaseResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a knowledge base document generated by scraping the given webpage. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.knowledge_base.documents.create_from_url( + url="url", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**url:** `str` — URL to a page of documentation that the agent will have access to in order to interact with users. + +
+
+ +
+
+ +**name:** `typing.Optional[str]` — A custom, human-readable name for the document. + +
+
+ +
+
+ +**parent_folder_id:** `typing.Optional[str]` — If set, the created document or folder will be placed inside the given folder. + +
+
+ +
+
+ +**enable_auto_sync:** `typing.Optional[bool]` — Whether to enable auto-sync for this URL document. + +
+
+ +
+
+ +**auto_remove:** `typing.Optional[bool]` — Whether to automatically remove the document if the URL becomes unavailable. Only applicable when auto-sync is enabled. + +
+
+ +
+
+ +**minimum_frequency_days:** `typing.Optional[int]` — Minimum frequency (in days) at which the document is refreshed. The actual interval may be shorter, never longer. Defaults to 7, tightened to the parent folder's frequency if that is stricter. Only applicable when auto-sync is enabled. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.knowledge_base.documents.create_from_file(...) -> AddKnowledgeBaseResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a knowledge base document generated form the uploaded file. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.knowledge_base.documents.create_from_file( + file="example_file", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**file:** `core.File` — Documentation that the agent will have access to in order to interact with users. + +
+
+ +
+
+ +**name:** `typing.Optional[str]` — A custom, human-readable name for the document. + +
+
+ +
+
+ +**parent_folder_id:** `typing.Optional[str]` — If set, the created document or folder will be placed inside the given folder. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.knowledge_base.documents.create_from_text(...) -> AddKnowledgeBaseResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a knowledge base document containing the provided text. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.knowledge_base.documents.create_from_text( + text="text", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**text:** `str` — Text content to be added to the knowledge base. + +
+
+ +
+
+ +**name:** `typing.Optional[str]` — A custom, human-readable name for the document. + +
+
+ +
+
+ +**parent_folder_id:** `typing.Optional[str]` — If set, the created document or folder will be placed inside the given folder. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.knowledge_base.documents.create_folder(...) -> AddKnowledgeBaseResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a folder used for grouping documents together. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.knowledge_base.documents.create_folder( + name="name", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**name:** `str` — A custom, human-readable name for the document. + +
+
+ +
+
+ +**parent_folder_id:** `typing.Optional[str]` — If set, the created document or folder will be placed inside the given folder. + +
+
+ +
+
+ +**enable_auto_sync:** `typing.Optional[bool]` — Whether to enable auto-sync for this URL document. + +
+
+ +
+
+ +**auto_remove:** `typing.Optional[bool]` — Whether to automatically remove the document if the URL becomes unavailable. Only applicable when auto-sync is enabled. + +
+
+ +
+
+ +**minimum_frequency_days:** `typing.Optional[int]` — Minimum frequency (in days) at which the underlying eligible documents are refreshed. The actual interval may be shorter, never longer. Defaults to 7, tightened to the parent folder's frequency if that is stricter. Only applicable when auto-sync is enabled. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.knowledge_base.documents.get(...) -> DocumentsGetResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get details about a specific documentation making up the agent's knowledge base +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.knowledge_base.documents.get( + documentation_id="21m00Tcm4TlvDq8ikWAM", + agent_id="agent_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentation_id:** `str` — The id of a document from the knowledge base. This is returned on document addition. + +
+
+ +
+
+ +**agent_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.knowledge_base.documents.delete(...) -> typing.Any +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete a document or folder from the knowledge base. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.knowledge_base.documents.delete( + documentation_id="21m00Tcm4TlvDq8ikWAM", + force=True, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentation_id:** `str` — The id of a document from the knowledge base. This is returned on document addition. + +
+
+ +
+
+ +**force:** `typing.Optional[bool]` — If set to true, the document or folder will be deleted regardless of whether it is used by any agents and it will be removed from the dependent agents. For non-empty folders, this will also delete all child documents and folders. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.knowledge_base.documents.update(...) -> DocumentsUpdateResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update the name and/or content of a document. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.knowledge_base.documents.update( + documentation_id="21m00Tcm4TlvDq8ikWAM", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentation_id:** `str` — The id of a document from the knowledge base. This is returned on document addition. + +
+
+ +
+
+ +**name:** `typing.Optional[str]` — A custom, human-readable name for the document. + +
+
+ +
+
+ +**content:** `typing.Optional[str]` — Updated content for the document. Only supported for text documents, URL documents with auto-sync disabled, and file documents that are not synced from an external source. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.knowledge_base.documents.get_agents(...) -> GetKnowledgeBaseDependentAgentsResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get a list of agents depending on this knowledge base document +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.knowledge_base.documents.get_agents( + documentation_id="21m00Tcm4TlvDq8ikWAM", + dependent_type="direct", + page_size=1, + cursor="cursor", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentation_id:** `str` — The id of a document from the knowledge base. This is returned on document addition. + +
+
+ +
+
+ +**dependent_type:** `typing.Optional[KnowledgeBaseDependentType]` — Type of dependent agents to return. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many documents to return at maximum. Can not exceed 100, defaults to 30. + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.knowledge_base.documents.get_bulk_agents(...) -> GetKnowledgeBaseDependentAgentsResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get a list of agents depending on any of the given knowledge base documents. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.knowledge_base.documents.get_bulk_agents( + dependent_type="direct", + page_size=1, + cursor="cursor", + document_ids=[ + "21m00Tcm4TlvDq8ikWAM", + "31m00Tcm4TlvDq8ikWBM" + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**document_ids:** `typing.List[str]` — The ids of documents or folders from the knowledge base. + +
+
+ +
+
+ +**dependent_type:** `typing.Optional[KnowledgeBaseDependentType]` — Type of dependent agents to return. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many documents to return at maximum. Can not exceed 100, defaults to 30. + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.knowledge_base.documents.get_content(...) -> str +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get the entire content of a document from the knowledge base +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.knowledge_base.documents.get_content( + documentation_id="documentation_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentation_id:** `str` — The id of a document from the knowledge base. This is returned on document addition. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.knowledge_base.documents.get_source_file_url(...) -> KnowledgeBaseSourceFileUrlResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get a signed URL to download the original source file of a file-type document from the knowledge base +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.knowledge_base.documents.get_source_file_url( + documentation_id="21m00Tcm4TlvDq8ikWAM", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentation_id:** `str` — The id of a document from the knowledge base. This is returned on document addition. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.knowledge_base.documents.move(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Moves the entity from one folder to another. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.knowledge_base.documents.move( + document_id="21m00Tcm4TlvDq8ikWAM", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**document_id:** `str` — The id of a document from the knowledge base. This is returned on document addition. + +
+
+ +
+
+ +**move_to:** `typing.Optional[str]` — The folder to move the entities to. If not set, the entities will be moved to the root folder. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.knowledge_base.documents.bulk_move(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Moves multiple entities from one folder to another. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.knowledge_base.documents.bulk_move( + document_ids=[ + "21m00Tcm4TlvDq8ikWAM", + "31m00Tcm4TlvDq8ikWBM" + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**document_ids:** `typing.List[str]` — The ids of documents or folders from the knowledge base. + +
+
+ +
+
+ +**move_to:** `typing.Optional[str]` — The folder to move the entities to. If not set, the entities will be moved to the root folder. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.knowledge_base.documents.bulk_delete(...) -> typing.Dict[str, DocumentsBulkDeleteResponseValue] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete multiple documents or folders from the knowledge base. Each id succeeds or fails independently. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.knowledge_base.documents.bulk_delete( + document_ids=[ + "21m00Tcm4TlvDq8ikWAM", + "31m00Tcm4TlvDq8ikWBM" + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**document_ids:** `typing.List[str]` — The ids of documents or folders from the knowledge base. + +
+
+ +
+
+ +**force:** `typing.Optional[bool]` — If set to true, documents or folders will be deleted regardless of whether they are used by any agents and will be removed from the dependent agents. For non-empty folders, this will also delete all child documents and folders. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi KnowledgeBase CrawlJobs +
client.conversational_ai.knowledge_base.crawl_jobs.list(...) -> ListCrawlJobsResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get a list of ongoing and recent crawl jobs for the user. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.knowledge_base.crawl_jobs.list( + include_job_ids=[ + "include_job_ids" + ], + page_size=1, + cursor="cursor", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**include_job_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Ids of additional crawl jobs to retrieve + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many documents to return at maximum. Can not exceed 100, defaults to 30. + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.knowledge_base.crawl_jobs.create(...) -> CreateCrawlJobResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a crawl job to crawl the given URL with specified depth and page limits. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.knowledge_base.crawl_jobs.create( + url="url", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**url:** `str` — URL to a page of documentation that the agent will have access to in order to interact with users. + +
+
+ +
+
+ +**max_depth:** `typing.Optional[int]` — Deprecated - this field is a no-op and will be removed in a future version. + +
+
+ +
+
+ +**max_pages:** `typing.Optional[int]` — Maximum number of pages to crawl (1-10,000), defaults to 1000. + +
+
+ +
+
+ +**pattern:** `typing.Optional[str]` — If set, only URLs that match this pattern are included. + +
+
+ +
+
+ +**sitemap_urls:** `typing.Optional[typing.List[str]]` — List of URLs to crawl from sitemap (optional, overrides automatic URL discovery). + +
+
+ +
+
+ +**parent_folder_id:** `typing.Optional[str]` — If set, the created document or folder will be placed inside the given folder. + +
+
+ +
+
+ +**enable_auto_sync:** `typing.Optional[bool]` — Whether to enable auto-sync for this URL document. + +
+
+ +
+
+ +**auto_remove:** `typing.Optional[bool]` — Whether to automatically remove the document if the URL becomes unavailable. Only applicable when auto-sync is enabled. + +
+
+ +
+
+ +**auto_discover:** `typing.Optional[bool]` — Automatically discover and add new pages linked from already-crawled pages during auto-sync. Requires enable_auto_sync=true. + +
+
+ +
+
+ +**minimum_frequency_days:** `typing.Optional[int]` — Minimum frequency (in days) at which the underlying eligible documents are refreshed. The actual interval may be shorter, never longer. Defaults to 7, tightened to the parent folder's frequency if that is stricter. Only applicable when auto-sync is enabled. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.knowledge_base.crawl_jobs.get(...) -> GetCrawlJobResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get details about a specific crawl job including status and progress. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.knowledge_base.crawl_jobs.get( + crawl_job_id="crawl_job_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**crawl_job_id:** `str` — The id of the crawl job to retrieve + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.knowledge_base.crawl_jobs.cancel(...) -> typing.Any +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Cancel a crawl job and delete all associated documents and folders. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.knowledge_base.crawl_jobs.cancel( + crawl_job_id="crawl_job_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**crawl_job_id:** `str` — The id of the crawl job to retrieve + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi KnowledgeBase Document +
client.conversational_ai.knowledge_base.document.update_file(...) -> DocumentUpdateFileResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update the source file of a file document. The document name, content, and metadata are updated to reflect the new file. Any manual content edits will be overwritten. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.knowledge_base.document.update_file( + documentation_id="21m00Tcm4TlvDq8ikWAM", + file="example_file", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentation_id:** `str` — The id of a document from the knowledge base. This is returned on document addition. + +
+
+ +
+
+ +**file:** `core.File` — Documentation that the agent will have access to in order to interact with users. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.knowledge_base.document.refresh(...) -> DocumentRefreshResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Manually refresh a URL document by re-fetching its content from the source URL. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.knowledge_base.document.refresh( + documentation_id="21m00Tcm4TlvDq8ikWAM", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentation_id:** `str` — The id of a document from the knowledge base. This is returned on document addition. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.knowledge_base.document.compute_rag_index(...) -> RagDocumentIndexResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +In case the document is not RAG indexed, it triggers rag indexing task, otherwise it just returns the current status. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.knowledge_base.document.compute_rag_index( + documentation_id="21m00Tcm4TlvDq8ikWAM", + model="e5_mistral_7b_instruct", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentation_id:** `str` — The id of a document from the knowledge base. This is returned on document addition. + +
+
+ +
+
+ +**model:** `EmbeddingModelEnum` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi KnowledgeBase Documents Summaries +
client.conversational_ai.knowledge_base.documents.summaries.get(...) -> typing.Dict[str, SummariesGetResponseValue] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets multiple knowledge base document summaries by their IDs. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.knowledge_base.documents.summaries.get( + document_ids=[ + "21m00Tcm4TlvDq8ikWAM", + "31n11Udm5UmwEr9jkXBN" + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**document_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — The ids of knowledge base documents. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi KnowledgeBase Documents Chunk +
client.conversational_ai.knowledge_base.documents.chunk.get(...) -> KnowledgeBaseDocumentChunkResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get details about a specific documentation part used by RAG. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.knowledge_base.documents.chunk.get( + documentation_id="21m00Tcm4TlvDq8ikWAM", + chunk_id="chunk_id", + embedding_model="e5_mistral_7b_instruct", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentation_id:** `str` — The id of a document from the knowledge base. This is returned on document addition. + +
+
+ +
+
+ +**chunk_id:** `str` — The id of a document RAG chunk from the knowledge base. + +
+
+ +
+
+ +**embedding_model:** `typing.Optional[EmbeddingModelEnum]` — The embedding model used to retrieve the chunk. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi KnowledgeBase Documents Chunks +
client.conversational_ai.knowledge_base.documents.chunks.list(...) -> KnowledgeBaseDocumentChunksResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all RAG chunks for a specific knowledge base document. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.knowledge_base.documents.chunks.list( + documentation_id="21m00Tcm4TlvDq8ikWAM", + embedding_model="e5_mistral_7b_instruct", + page_size=1, + cursor="cursor", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentation_id:** `str` — The id of a document from the knowledge base. This is returned on document addition. + +
+
+ +
+
+ +**embedding_model:** `EmbeddingModelEnum` — The embedding model used to retrieve the chunk. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many documents to return at maximum. Can not exceed 100, defaults to 30. + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi McpServers Tools +
client.conversational_ai.mcp_servers.tools.list(...) -> ListMcpToolsResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve all tools available for a specific MCP server configuration. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.mcp_servers.tools.list( + mcp_server_id="mcp_server_id", + environment="environment", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**mcp_server_id:** `str` — ID of the MCP Server. + +
+
+ +
+
+ +**environment:** `typing.Optional[str]` �� Environment whose values are used when the MCP server URL, headers, or auth connection reference environment variables. Mirrors the environment a conversation would run in; defaults to production. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi McpServers ApprovalPolicy +
client.conversational_ai.mcp_servers.approval_policy.update(...) -> McpServerResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update the approval policy configuration for an MCP server. DEPRECATED: Use PATCH /mcp-servers/{id} endpoint instead. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.mcp_servers.approval_policy.update( + mcp_server_id="mcp_server_id", + approval_policy="auto_approve_all", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**mcp_server_id:** `str` — ID of the MCP Server. + +
+
+ +
+
+ +**approval_policy:** `McpApprovalPolicy` — The approval mode to set for the MCP server + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi McpServers ToolApprovals +
client.conversational_ai.mcp_servers.tool_approvals.create(...) -> McpServerResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Add approval for a specific MCP tool when using per-tool approval mode. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.mcp_servers.tool_approvals.create( + mcp_server_id="mcp_server_id", + tool_name="tool_name", + tool_description="tool_description", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**mcp_server_id:** `str` — ID of the MCP Server. + +
+
+ +
+
+ +**tool_name:** `str` — The name of the MCP tool + +
+
+ +
+
+ +**tool_description:** `str` — The description of the MCP tool + +
+
+ +
+
+ +**input_schema:** `typing.Optional[typing.Dict[str, typing.Any]]` — The input schema of the MCP tool (the schema defined on the MCP server before ElevenLabs does any extra processing) + +
+
+ +
+
+ +**approval_policy:** `typing.Optional[McpToolApprovalPolicy]` — The tool-level approval policy + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.mcp_servers.tool_approvals.delete(...) -> McpServerResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Remove approval for a specific MCP tool when using per-tool approval mode. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.mcp_servers.tool_approvals.delete( + mcp_server_id="mcp_server_id", + tool_name="tool_name", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**mcp_server_id:** `str` — ID of the MCP Server. + +
+
+ +
+
+ +**tool_name:** `str` — Name of the MCP tool to remove approval for. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi McpServers ToolConfigs +
client.conversational_ai.mcp_servers.tool_configs.create(...) -> McpServerResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create configuration overrides for a specific MCP tool. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.mcp_servers.tool_configs.create( + mcp_server_id="mcp_server_id", + environment="environment", + tool_name="tool_name", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**mcp_server_id:** `str` — ID of the MCP Server. + +
+
+ +
+
+ +**tool_name:** `str` — The name of the MCP tool + +
+
+ +
+
+ +**environment:** `typing.Optional[str]` — Environment whose values are used when the MCP server URL, headers, or auth connection reference environment variables. Mirrors the environment a conversation would run in; defaults to production. + +
+
+ +
+
+ +**force_pre_tool_speech:** `typing.Optional[bool]` — DEPRECATED: use `pre_tool_speech` instead. If set, overrides the server's force_pre_tool_speech setting for this tool. + +
+
+ +
+
+ +**pre_tool_speech:** `typing.Optional[PreToolSpeechMode]` — If set, overrides the server's pre_tool_speech setting for this tool. + +
+
+ +
+
+ +**disable_interruptions:** `typing.Optional[bool]` — DEPRECATED: use `interruption_mode` instead. If set, overrides the server's disable_interruptions setting for this tool. + +
+
+ +
+
+ +**interruption_mode:** `typing.Optional[ToolInterruptionMode]` — If set, overrides the server's interruption_mode setting for this tool. + +
+
+ +
+
+ +**tool_call_sound:** `typing.Optional[McpToolConfigOverrideCreateRequestModelToolCallSound]` — Overrides the server's tool_call_sound setting for this tool. A sound name plays that sound; 'off' overrides to no sound (silence); null means do not override (inherit the server default). + +
+
+ +
+
+ +**tool_call_sound_behavior:** `typing.Optional[ToolCallSoundBehavior]` — If set, overrides the server's tool_call_sound_behavior setting for this tool + +
+
+ +
+
+ +**execution_mode:** `typing.Optional[ToolExecutionMode]` — If set, overrides the server's execution_mode setting for this tool + +
+
+ +
+
+ +**response_timeout_secs:** `typing.Optional[int]` — If set, overrides the server's response timeout for this MCP tool. + +
+
+ +
+
+ +**assignments:** `typing.Optional[typing.List[DynamicVariableAssignment]]` — Dynamic variable assignments for this MCP tool + +
+
+ +
+
+ +**input_overrides:** `typing.Optional[typing.Dict[str, typing.Optional[McpToolConfigOverrideCreateRequestModelInputOverridesValue]]]` — Mapping of json path to input override configuration + +
+
+ +
+
+ +**response_mocks:** `typing.Optional[typing.List[ToolResponseMockConfigInput]]` — Mock responses with optional parameter conditions. Evaluated top-to-bottom; first match wins. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.mcp_servers.tool_configs.get(...) -> McpToolConfigOverrideOutput +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve configuration overrides for a specific MCP tool. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.mcp_servers.tool_configs.get( + mcp_server_id="mcp_server_id", + tool_name="tool_name", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**mcp_server_id:** `str` — ID of the MCP Server. + +
+
+ +
+
+ +**tool_name:** `str` — Name of the MCP tool to retrieve config overrides for. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.mcp_servers.tool_configs.delete(...) -> McpServerResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Remove configuration overrides for a specific MCP tool. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.mcp_servers.tool_configs.delete( + mcp_server_id="mcp_server_id", + tool_name="tool_name", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**mcp_server_id:** `str` — ID of the MCP Server. + +
+
+ +
+
+ +**tool_name:** `str` — Name of the MCP tool to remove config overrides for. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.mcp_servers.tool_configs.update(...) -> McpServerResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update configuration overrides for a specific MCP tool. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.mcp_servers.tool_configs.update( + mcp_server_id="mcp_server_id", + tool_name="tool_name", + environment="environment", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**mcp_server_id:** `str` — ID of the MCP Server. + +
+
+ +
+
+ +**tool_name:** `str` — Name of the MCP tool to update config overrides for. + +
+
+ +
+
+ +**environment:** `typing.Optional[str]` — Environment whose values are used when the MCP server URL, headers, or auth connection reference environment variables. Mirrors the environment a conversation would run in; defaults to production. + +
+
+ +
+
+ +**force_pre_tool_speech:** `typing.Optional[bool]` — DEPRECATED: use `pre_tool_speech` instead. If set, overrides the server's force_pre_tool_speech setting for this tool. + +
+
+ +
+
+ +**pre_tool_speech:** `typing.Optional[PreToolSpeechMode]` — If set, overrides the server's pre_tool_speech setting for this tool. + +
+
+ +
+
+ +**disable_interruptions:** `typing.Optional[bool]` — DEPRECATED: use `interruption_mode` instead. If set, overrides the server's disable_interruptions setting for this tool. + +
+
+ +
+
+ +**interruption_mode:** `typing.Optional[ToolInterruptionMode]` — If set, overrides the server's interruption_mode setting for this tool. + +
+
+ +
+
+ +**tool_call_sound:** `typing.Optional[McpToolConfigOverrideUpdateRequestModelToolCallSound]` — Overrides the server's tool_call_sound setting for this tool. A sound name plays that sound; 'off' overrides to no sound (silence); null means do not override (inherit the server default). + +
+
+ +
+
+ +**tool_call_sound_behavior:** `typing.Optional[ToolCallSoundBehavior]` — If set, overrides the server's tool_call_sound_behavior setting for this tool + +
+
+ +
+
+ +**execution_mode:** `typing.Optional[ToolExecutionMode]` — If set, overrides the server's execution_mode setting for this tool + +
+
+ +
+
+ +**response_timeout_secs:** `typing.Optional[int]` — If set, overrides the server's response timeout for this MCP tool. + +
+
+ +
+
+ +**assignments:** `typing.Optional[typing.List[DynamicVariableAssignment]]` — Dynamic variable assignments for this MCP tool + +
+
+ +
+
+ +**input_overrides:** `typing.Optional[typing.Dict[str, typing.Optional[McpToolConfigOverrideUpdateRequestModelInputOverridesValue]]]` — Mapping of json path to input override configuration + +
+
+ +
+
+ +**response_mocks:** `typing.Optional[typing.List[ToolResponseMockConfigInput]]` — Mock responses with optional parameter conditions. Evaluated top-to-bottom; first match wins. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Tests Folders +
client.conversational_ai.tests.folders.create(...) -> CreateAgentTestFolderResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a folder for organizing agent tests. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.tests.folders.create( + name="name", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**name:** `str` — The name of the folder to create + +
+
+ +
+
+ +**parent_folder_id:** `typing.Optional[str]` — The ID of the parent folder. If not provided, the folder will be created at the root level. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.tests.folders.get(...) -> GetAgentTestFolderResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets an agent test folder by ID, including its folder path. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.tests.folders.get( + folder_id="tfld_7301khxdkycse5f88fzjdtrterzm", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**folder_id:** `str` — The folder ID. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.tests.folders.delete(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Deletes an agent test folder by ID. Use force=true to delete a non-empty folder and all its contents. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.tests.folders.delete( + folder_id="tfld_7301khxdkycse5f88fzjdtrterzm", + force=True, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**folder_id:** `str` — The folder ID. + +
+
+ +
+
+ +**force:** `typing.Optional[bool]` — Force delete. Required for deleting non-empty folders. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.tests.folders.update(...) -> GetAgentTestFolderResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Updates an agent test folder. Currently only supports updating the folder name. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.tests.folders.update( + folder_id="tfld_7301khxdkycse5f88fzjdtrterzm", + name="name", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**folder_id:** `str` — The folder ID. + +
+
+ +
+
+ +**name:** `str` — The new name for the folder + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Tests Invocations +
client.conversational_ai.tests.invocations.list(...) -> GetTestInvocationsPageResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Lists all test invocations with pagination support and optional search filtering. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.tests.invocations.list( + agent_id="agent_id", + branch_id="branch_id", + test_id="test_id", + start_time=1, + end_time=1, + version_id="version_id", + page_size=1, + search="search", + cursor="cursor", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agent_id:** `typing.Optional[str]` — Filter by agent ID + +
+
+ +
+
+ +**branch_id:** `typing.Optional[str]` — Filter by branch ID + +
+
+ +
+
+ +**test_id:** `typing.Optional[str]` — Filter to invocations that include a run of this test id + +
+
+ +
+
+ +**start_time:** `typing.Optional[int]` — Inclusive lower bound on created_at, in unix seconds + +
+
+ +
+
+ +**end_time:** `typing.Optional[int]` — Inclusive upper bound on created_at, in unix seconds + +
+
+ +
+
+ +**version_id:** `typing.Optional[str]` — Filter by the agent version the tests ran against + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many Tests to return at maximum. Can not exceed 100, defaults to 30. + +
+
+ +
+
+ +**search:** `typing.Optional[str]` — Search query to filter tests and folders by name. + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.tests.invocations.get(...) -> GetTestSuiteInvocationResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets a test invocation by ID. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.tests.invocations.get( + test_invocation_id="test_invocation_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**test_invocation_id:** `str` — The id of a test invocation. This is returned when tests are run. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.tests.invocations.cancel(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Cancels all pending runs in a test invocation. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.tests.invocations.cancel( + test_invocation_id="test_invocation_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**test_invocation_id:** `str` — The id of a test invocation. This is returned when tests are run. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.conversational_ai.tests.invocations.resubmit(...) -> typing.Any +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Resubmits specific test runs from a test invocation. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.tests.invocations.resubmit( + test_invocation_id="test_invocation_id", + test_run_ids=[ + "test_run_ids" + ], + agent_id="agent_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**test_invocation_id:** `str` — The id of a test invocation. This is returned when tests are run. + +
+
+ +
+
+ +**test_run_ids:** `typing.List[str]` — List of test run IDs to resubmit + +
+
+ +
+
+ +**agent_id:** `str` — Agent ID to resubmit tests for + +
+
+ +
+
+ +**agent_config_override:** `typing.Optional[AdhocAgentConfigOverrideForTestRequestModel]` — Configuration overrides to use for testing. If not provided, the agent's default configuration will be used. + +
+
+ +
+
+ +**branch_id:** `typing.Optional[str]` — ID of the branch to run the tests on. If not provided, the tests will be run on the agent's main branch. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ConversationalAi Tools Executions +
client.conversational_ai.tools.executions.get(...) -> GetToolExecutionsPageResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get paginated list of tool executions for a specific tool. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.conversational_ai.tools.executions.get( + tool_id="tool_id", + cursor="cursor", + page_size=1, + is_error=True, + agent_id="agent_id", + branch_id="branch_id", + start_time=1.1, + end_time=1.1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**tool_id:** `str` — ID of the requested tool. + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many documents to return at maximum. Can not exceed 100, defaults to 30. + +
+
+ +
+
+ +**is_error:** `typing.Optional[bool]` — Filter by error status. If not provided, returns all executions. + +
+
+ +
+
+ +**agent_id:** `typing.Optional[str]` — Filter by agent ID. + +
+
+ +
+
+ +**branch_id:** `typing.Optional[str]` — Filter by agent branch ID. + +
+
+ +
+
+ +**start_time:** `typing.Optional[float]` — Filter executions from this Unix timestamp (inclusive). + +
+
+ +
+
+ +**end_time:** `typing.Optional[float]` — Filter executions until this Unix timestamp (inclusive). + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Dubbing Project +
client.dubbing.project.list(...) -> DubbingProjectListResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List the dubbing projects in your workspace that you can access, newest first, cursor-paginated. Listed projects carry no `language_ids`; fetch a project, or list its language targets, to see them. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.dubbing.project.list( + page_size=20, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Pass the `next_cursor` from a previous response to fetch the page after it. Omit for the first page. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — Number of projects per page. Clamped to between 1 and 100 rather than rejected, so a larger value returns a full page. + +
+
+ +
+
+ +**status:** `typing.Optional[str]` — Filter to projects in this status: `queued`, `preparing`, `ready`, or `failed`. Omit to return every status. + +
+
+ +
+
+ +**sort_direction:** `typing.Optional[ProjectListRequestSortDirection]` — Sort by creation time; newest first by default. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.dubbing.project.create(...) -> DubbingProjectResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a dubbing project from an uploaded file (`file`) or a source URL (`source_url`). + +Returns as soon as the project record exists, before the source has been fetched: the project starts `queued` and reaches `ready` once its source has been transcribed. Add a language target to it for each language you want, or pass `target_language` to queue the first one here. + +Creating a project incurs a minimum charge of one language: you are charged for at least one language's dubbing when the project is created, before any output exists. This charge prepays the first language target — the first target you add, or the one queued via `target_language`, consumes it — and each additional language is charged separately. + +Preparation can take minutes on a long source, so we recommend passing `webhook_ids` to be notified when the project turns `ready` or `failed`, rather than polling for it. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.dubbing.project.create( + file="example_file", + transcript="example_transcript", + source_url="https://example.com/promo.mp4", + reference="Q3 marketing video", + source_language="en", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**file:** `typing.Optional[core.File]` — The source media file to dub: an audio or video file of at most 3 GiB. Provide this or `source_url`, not both. + +
+
+ +
+
+ +**source_url:** `typing.Optional[str]` — Public HTTP(S) URL the source media is fetched from server-side, subject to the same size and format limits as an upload. Provide this or `file`, not both. + +
+
+ +
+
+ +**reference:** `typing.Optional[str]` — Optional free-form string (at most 500 characters) to identify the project on your end. Stored and echoed back verbatim; it does not affect the dub. + +
+
+ +
+
+ +**source_language:** `typing.Optional[str]` — BCP-47 language tag of the source media; must be a language the transcription model supports. Any region or script subtag is ignored, since transcription is per-language. Omit to auto-detect. + +
+
+ +
+
+ +**model_id:** `typing.Optional[ProjectCreateRequestModelId]` — Dubbing model (`dubbing_v1` or `dubbing_v2`) every language target of this project is dubbed with. Defaults to `dubbing_v2`. Fixed at create time — the source is prepared for this model, so neither the project nor an individual target can change it later. + +
+
+ +
+
+ +**keyterms:** `typing.Optional[typing.List[str]]` — Key terms to bias transcription and translation toward (for example, product or brand names). At most 1,000 terms; each term at most 50 characters and 5 words; the characters `<>{}[]\` are not allowed. Terms are trimmed and deduplicated. Repeat the field once per term, or pass a single JSON array. + +
+
+ +
+
+ +**webhook_ids:** `typing.Optional[typing.List[str]]` — IDs of workspace webhooks to notify as this project progresses — the alternative to polling, and what we recommend. Each receives a `dubbing_project_ready` or `dubbing_project_failed` event for the project, and a `dubbing_language_completed` or `dubbing_language_failed` event for every language under it; `dubbing_language_completed` carries the output download URLs. At most 3 IDs, each already configured in your workspace — see [Webhooks](https://elevenlabs.io/docs/eleven-api/resources/webhooks) for how to create one and verify its signature. Repeat the field once per ID, or pass a single JSON array or comma-separated string. Delivery is best-effort and can repeat, so we recommend handling events idempotently. + +
+
+ +
+
+ +**target_language:** `typing.Optional[str]` — Optional shortcut: also create a language target in this BCP-47 language, queued to start once the project is ready — equivalent to creating the project and then creating one language target. Must be one of the [languages the dubbing model supports](https://elevenlabs.io/docs/help-center/product/dubbing/which-languages-are-supported-in-dubbing), and a region-qualified tag must be one of the supported dialects. This is the first language target, so it consumes the project's minimum charge rather than adding to it. Its ID is returned in `language_ids`. + +
+
+ +
+
+ +**transcript:** `typing.Optional[core.File]` — Enterprise only. Optional JSON transcript to use instead of transcribing the source: a `{"segments": [...]}` document, at most 20,000 segments and 4 MiB. See [Bring your own transcript](https://elevenlabs.io/docs/eleven-api/guides/how-to/dubbing/bring-your-own-transcript) for the segment fields and their constraints. `source_language` is required whenever a transcript is provided. If any segment carries a `translation`, `target_language` is required and every segment must carry one; those translations seed the target created via `target_language`, which then skips machine translation. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.dubbing.project.get(...) -> DubbingProjectResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Full project detail, including the IDs of every language target under it. To follow a project to `ready`, we recommend a `webhook_ids` subscription rather than polling this endpoint. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.dubbing.project.get( + project_id="proj_1601kwkyxp0hfzvtmyxwqxx6mcy3", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — Identifier of the dubbing project to fetch. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.dubbing.project.delete(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete a project, every language target under it, and their stored media and outputs. This cannot be undone, and a dub already running is still billed. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.dubbing.project.delete( + project_id="proj_1601kwkyxp0hfzvtmyxwqxx6mcy3", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — Identifier of the dubbing project to delete. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Dubbing Resource +
client.dubbing.resource.get(...) -> DubbingResource +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Given a dubbing ID generated from the '/v1/dubbing' endpoint with studio enabled, returns the dubbing resource. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.dubbing.resource.get( + dubbing_id="dubbing_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**dubbing_id:** `str` — ID of the dubbing project. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.dubbing.resource.migrate_segments(...) -> SegmentMigrationResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Change the attribution of one or more segments to a different speaker. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.dubbing.resource.migrate_segments( + dubbing_id="dubbing_id", + segment_ids=[ + "segment_ids" + ], + speaker_id="speaker_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**dubbing_id:** `str` — ID of the dubbing project. + +
+
+ +
+
+ +**segment_ids:** `typing.List[str]` + +
+
+ +
+
+ +**speaker_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.dubbing.resource.transcribe(...) -> SegmentTranscriptionResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Regenerate the transcriptions for the specified segments. Does not automatically regenerate translations or dubs. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.dubbing.resource.transcribe( + dubbing_id="dubbing_id", + segments=[ + "segments" + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**dubbing_id:** `str` — ID of the dubbing project. + +
+
+ +
+
+ +**segments:** `typing.List[str]` — Transcribe this specific list of segments. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.dubbing.resource.translate(...) -> SegmentTranslationResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Regenerate the translations for either the entire resource or the specified segments/languages. Will automatically transcribe missing transcriptions. Will not automatically regenerate the dubs. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.dubbing.resource.translate( + dubbing_id="dubbing_id", + segments=[ + "segments" + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**dubbing_id:** `str` — ID of the dubbing project. + +
+
+ +
+
+ +**segments:** `typing.List[str]` — Translate only this list of segments. + +
+
+ +
+
+ +**languages:** `typing.Optional[typing.List[str]]` — Translate only these languages for each segment. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.dubbing.resource.dub(...) -> SegmentDubResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Regenerate the dubs for either the entire resource or the specified segments/languages. Will automatically transcribe and translate any missing transcriptions and translations. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.dubbing.resource.dub( + dubbing_id="dubbing_id", + segments=[ + "segments" + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**dubbing_id:** `str` — ID of the dubbing project. + +
+
+ +
+
+ +**segments:** `typing.List[str]` — Dub only this list of segments. + +
+
+ +
+
+ +**languages:** `typing.Optional[typing.List[str]]` — Dub only these languages for each segment. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.dubbing.resource.render(...) -> DubbingRenderResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Regenerate the output media for a language using the latest Studio state. Please ensure all segments have been dubbed before rendering, otherwise they will be omitted. Renders are generated asynchronously, and to check the status of all renders please use the 'Get Dubbing Resource' endpoint. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.dubbing.resource.render( + dubbing_id="dubbing_id", + language="language", + render_type="mp4", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**dubbing_id:** `str` — ID of the dubbing project. + +
+
+ +
+
+ +**language:** `str` — The target language code to render, eg. 'es'. To render the source track use 'original'. + +
+
+ +
+
+ +**render_type:** `RenderType` — The type of the render. One of ['mp4', 'aac', 'mp3', 'wav', 'aaf', 'tracks_zip', 'clips_zip'] + +
+
+ +
+
+ +**normalize_volume:** `typing.Optional[bool]` — Whether to normalize the volume of the rendered audio. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Dubbing Audio +
client.dubbing.audio.get(...) -> typing.Iterator[bytes] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns dub as a streamed MP3 or MP4 file. If this dub has been edited using Dubbing Studio you need to use the resource render endpoint as this endpoint only returns the original automatic dub result. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.dubbing.audio.get( + dubbing_id="dubbing_id", + language_code="language_code", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**dubbing_id:** `str` — ID of the dubbing project. + +
+
+ +
+
+ +**language_code:** `str` — ID of the language. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Dubbing Transcript +
client.dubbing.transcript.get_transcript_for_dub(...) -> TranscriptGetTranscriptForDubResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns transcript for the dub as an SRT or WEBVTT file. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.dubbing.transcript.get_transcript_for_dub( + dubbing_id="dubbing_id", + language_code="source", + format_type="srt", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**dubbing_id:** `str` — ID of the dubbing project. + +
+
+ +
+
+ +**language_code:** `str` — ISO-693 language code to retrieve the transcript for. Use 'source' to fetch the transcript of the original media. + +
+
+ +
+
+ +**format_type:** `typing.Optional[TranscriptGetTranscriptForDubRequestFormatType]` — Format to return transcript in. For subtitles use either 'srt' or 'webvtt', and for a full transcript use 'json'. The 'json' format is not yet supported for Dubbing Studio. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Dubbing Transcripts +
client.dubbing.transcripts.get(...) -> DubbingTranscriptsResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Fetch the transcript for one of the languages in a dub. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.dubbing.transcripts.get( + dubbing_id="dubbing_id", + language_code="source", + format_type="srt", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**dubbing_id:** `str` — ID of the dubbing project. + +
+
+ +
+
+ +**language_code:** `str` — ISO-693 language code to retrieve the transcript for. Use 'source' to fetch the transcript of the original media. + +
+
+ +
+
+ +**format_type:** `TranscriptsGetRequestFormatType` — Format to return transcript in. For subtitles use either 'srt' or 'webvtt', and for a full transcript use 'json'. The 'json' format is not yet supported for Dubbing Studio. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Dubbing Project Language +
client.dubbing.project.language.list(...) -> DubbingLanguageListResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List a project's language targets, cursor-paginated, each with signed output URLs once it has produced an output. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.dubbing.project.language.list( + project_id="proj_1601kwkyxp0hfzvtmyxwqxx6mcy3", + page_size=20, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — Identifier of the parent dubbing project. + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Pass the `next_cursor` from a previous response to fetch the page after it. Omit for the first page. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — Number of language targets per page. Clamped to between 1 and 100 rather than rejected, so a larger value returns a full page. + +
+
+ +
+
+ +**status:** `typing.Optional[str]` — Filter to targets in this status: `queued`, `processing`, `completed`, `stale`, or `failed`. Omit to return every status. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.dubbing.project.language.create(...) -> DubbingLanguageResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Add a language to dub a project into, and queue the dub. + +This is the call that produces dubbed audio, and it is billed per generation. The target is created `queued` and starts as soon as the project is `ready`, so it can be added at any point after the project is created. It inherits the project's dubbing model and cannot pick another. + +A project created with `webhook_ids` sends a `dubbing_language_completed` event carrying the output download URLs, so we recommend subscribing rather than polling this target to completion. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.dubbing.project.language.create( + project_id="proj_1601kwkyxp0hfzvtmyxwqxx6mcy3", + target_language="es", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — Identifier of the parent dubbing project. + +
+
+ +
+
+ +**target_language:** `str` — BCP-47 language tag to dub the project into (for example, `fr` or `es-MX`). Must be one of the [languages the project's dubbing model supports](https://elevenlabs.io/docs/help-center/product/dubbing/which-languages-are-supported-in-dubbing), and a region-qualified tag must be one of the supported dialects. + +
+
+ +
+
+ +**voice_settings:** `typing.Optional[VoiceSettings]` — Voice settings applied to every speaker in this language. Omit to use the defaults. + +
+
+ +
+
+ +**translations:** `typing.Optional[typing.Dict[str, typing.Optional[str]]]` — Enterprise only. Optional translations to use instead of machine translation. A map from each source segment's `external_id` (or its `id`, if you supplied none) to the translated text; every source segment must be covered exactly once. At most 20,000 entries, totaling at most 4 MiB of text. See [Bring your own transcript](https://elevenlabs.io/docs/eleven-api/guides/how-to/dubbing/bring-your-own-transcript). + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.dubbing.project.language.get(...) -> DubbingLanguageResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Full language-target detail. Once the target reports `completed`, `outputs` carries the signed download URLs. To learn when that happens, we recommend the project's `webhook_ids` subscription rather than polling this endpoint; fetch here when a delivered URL has expired, or to reconcile after an edit. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.dubbing.project.language.get( + project_id="proj_1601kwkyxp0hfzvtmyxwqxx6mcy3", + language_id="lang_1001kwkyxp0je6ktn4knsfrasx5s", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — Identifier of the parent dubbing project. + +
+
+ +
+
+ +**language_id:** `str` — Identifier of the language target to fetch. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.dubbing.project.language.delete(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete a language target and its outputs, leaving the project and its other languages intact. This cannot be undone, and a dub already running is still billed. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.dubbing.project.language.delete( + project_id="proj_1601kwkyxp0hfzvtmyxwqxx6mcy3", + language_id="lang_1001kwkyxp0je6ktn4knsfrasx5s", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — Identifier of the parent dubbing project. + +
+
+ +
+
+ +**language_id:** `str` — Identifier of the language target to delete. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Dubbing Project Transcript +
client.dubbing.project.transcript.get(...) -> DubbingSourceTranscriptResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +The project's source transcript, as editable segments. Available once the project is `ready`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.dubbing.project.transcript.get( + project_id="proj_1601kwkyxp0hfzvtmyxwqxx6mcy3", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — Identifier of the dubbing project. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.dubbing.project.transcript.delete_segment(...) -> DubbingTranscriptRevisionResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Enterprise only. Remove a source segment from the transcript so it is no longer dubbed. Bumps the project's `revision`, discards the affected translations in every language target, and marks any target that had already completed `stale`. No audio changes until you regenerate a target. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.dubbing.project.transcript.delete_segment( + project_id="proj_1601kwkyxp0hfzvtmyxwqxx6mcy3", + segment_id="0199a3f0-1c2d-7abc-8def-0123456789ab", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — Identifier of the dubbing project. + +
+
+ +
+
+ +**segment_id:** `str` — Identifier of the segment to remove. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.dubbing.project.transcript.update_segment(...) -> DubbingSourceSegmentUpdateResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Enterprise only. Edit a source segment's text, speaker, or timing. Omitted fields are left unchanged. Bumps the project's `revision`, discards the affected translations in every language target, and marks any target that had already completed `stale`. No audio changes until you regenerate a target. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs, DubbingSegmentUpdateRequest +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.dubbing.project.transcript.update_segment( + project_id="proj_1601kwkyxp0hfzvtmyxwqxx6mcy3", + segment_id="0199a3f0-1c2d-7abc-8def-0123456789ab", + request=DubbingSegmentUpdateRequest( + text="Welcome to our latest product demo.", + ), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — Identifier of the dubbing project. + +
+
+ +
+
+ +**segment_id:** `str` — Identifier of the segment to edit. + +
+
+ +
+
+ +**request:** `DubbingSegmentUpdateRequest` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.dubbing.project.transcript.update_segments(...) -> DubbingBulkSourceSegmentUpdateResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Enterprise only. Edit several source segments' text, speaker, or timing in one atomic request: every edit applies or none does. Bumps the project's `revision`, discards the affected translations in every language target, and marks any target that had already completed `stale`. No audio changes until you regenerate a target. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs, DubbingSegmentUpdateRequest +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.dubbing.project.transcript.update_segments( + project_id="proj_1601kwkyxp0hfzvtmyxwqxx6mcy3", + segments={ + "0199a3f0-1c2d-7abc-8def-0123456789ab": DubbingSegmentUpdateRequest( + text="Welcome to our latest product demo.", + ), + "0199a3f0-3e4f-7abc-8def-0123456789cd": DubbingSegmentUpdateRequest( + speaker_id="narrator", + ) + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — Identifier of the dubbing project. + +
+
+ +
+
+ +**segments:** `typing.Dict[str, DubbingSegmentUpdateRequest]` — Map of segment ID to the partial update to apply to that segment. At least one entry and at most 500. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.dubbing.project.transcript.create_segment(...) -> DubbingSourceSegmentUpdateResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Enterprise only. Add a new source segment to the transcript. Its span must lie within the source media, last between 0.1 and 25 seconds, and not overlap another segment by the same speaker. Bumps the project's `revision`, discards the affected translations in every language target, and marks any target that had already completed `stale`. No audio changes until you regenerate a target. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.dubbing.project.transcript.create_segment( + project_id="proj_1601kwkyxp0hfzvtmyxwqxx6mcy3", + text="Thanks for watching.", + speaker_id="default_speaker", + start_s=42, + end_s=44, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — Identifier of the dubbing project. + +
+
+ +
+
+ +**text:** `str` — The text of the new segment. + +
+
+ +
+
+ +**speaker_id:** `str` — Identifier of the segment's speaker. + +
+
+ +
+
+ +**start_s:** `float` — Start time of the segment, in seconds. + +
+
+ +
+
+ +**end_s:** `float` — End time of the segment, in seconds. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Dubbing Project Language Transcript +
client.dubbing.project.language.transcript.get(...) -> DubbingTargetTranscriptResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +A language target's transcript: source segments with their translations. Available once the target has produced an output. Returns a conflict while the target is still on its first dub, since it has no translations to return yet. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.dubbing.project.language.transcript.get( + project_id="proj_1601kwkyxp0hfzvtmyxwqxx6mcy3", + language_id="lang_1001kwkyxp0je6ktn4knsfrasx5s", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — Identifier of the dubbing project. + +
+
+ +
+
+ +**language_id:** `str` — Identifier of the language target. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.dubbing.project.language.transcript.update_segment(...) -> DubbingTargetSegmentUpdateResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Enterprise only. Edit a segment's translation for a language target. Omitted fields are left unchanged; an explicit null clears the field. Bumps the target's `revision` and marks it `stale` if it had already completed. The source transcript and the project's other languages are untouched, and no audio changes until you regenerate the target. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs, DubbingTargetSegmentUpdateRequest +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.dubbing.project.language.transcript.update_segment( + project_id="proj_1601kwkyxp0hfzvtmyxwqxx6mcy3", + language_id="lang_1001kwkyxp0je6ktn4knsfrasx5s", + segment_id="0199a3f0-1c2d-7abc-8def-0123456789ab", + request=DubbingTargetSegmentUpdateRequest( + translation="Bienvenido a nuestra última demostración de producto.", + ), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — Identifier of the dubbing project. + +
+
+ +
+
+ +**language_id:** `str` — Identifier of the language target. + +
+
+ +
+
+ +**segment_id:** `str` — Identifier of the segment to edit. + +
+
+ +
+
+ +**request:** `DubbingTargetSegmentUpdateRequest` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.dubbing.project.language.transcript.update_segments(...) -> DubbingBulkTargetSegmentUpdateResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Enterprise only. Edit several segments' translations for a language target in one atomic request: every edit applies or none does. Bumps the target's `revision` and marks it `stale` if it had already completed. The source transcript and the project's other languages are untouched, and no audio changes until you regenerate the target. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs, DubbingTargetSegmentUpdateRequest +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.dubbing.project.language.transcript.update_segments( + project_id="proj_1601kwkyxp0hfzvtmyxwqxx6mcy3", + language_id="lang_1001kwkyxp0je6ktn4knsfrasx5s", + segments={ + "0199a3f0-1c2d-7abc-8def-0123456789ab": DubbingTargetSegmentUpdateRequest( + translation="Bienvenido a nuestra última demostración de producto.", + ), + "0199a3f0-3e4f-7abc-8def-0123456789cd": DubbingTargetSegmentUpdateRequest( + translation="Empecemos.", + ) + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — Identifier of the dubbing project. + +
+
+ +
+
+ +**language_id:** `str` — Identifier of the language target. + +
+
+ +
+
+ +**segments:** `typing.Dict[str, DubbingTargetSegmentUpdateRequest]` — Map of segment ID to the translation edit to apply to that segment. At least one entry and at most 500. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.dubbing.project.language.transcript.regenerate(...) -> DubbingRegenerateResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Enterprise only. Re-dub a target from its edited transcript, re-synthesizing only the edited regions (charged like a generation, less the free-regeneration allowance). Accepted asynchronously: the target returns to `processing` and sends a `dubbing_language_completed` event to the project's `webhook_ids` when the re-dub lands, carrying the new output URLs. Returns a conflict when the target has no edits to apply — nothing is dispatched and nothing is charged. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.dubbing.project.language.transcript.regenerate( + project_id="proj_1601kwkyxp0hfzvtmyxwqxx6mcy3", + language_id="lang_1001kwkyxp0je6ktn4knsfrasx5s", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — Identifier of the dubbing project. + +
+
+ +
+
+ +**language_id:** `str` — Identifier of the language target. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Dubbing Resource Language +
client.dubbing.resource.language.add(...) -> LanguageAddedResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Adds the given ElevenLab Turbo V2/V2.5 language code to the resource. Does not automatically generate transcripts/translations/audio. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.dubbing.resource.language.add( + dubbing_id="dubbing_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**dubbing_id:** `str` — ID of the dubbing project. + +
+
+ +
+
+ +**language:** `typing.Optional[str]` — The Target language. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Dubbing Resource Segment +
client.dubbing.resource.segment.update(...) -> SegmentUpdateResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Modifies a single segment with new text and/or start/end times. Will update the values for only a specific language of a segment. Does not automatically regenerate the dub. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.dubbing.resource.segment.update( + dubbing_id="dubbing_id", + segment_id="segment_id", + language="language", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**dubbing_id:** `str` — ID of the dubbing project. + +
+
+ +
+
+ +**segment_id:** `str` — ID of the segment + +
+
+ +
+
+ +**language:** `str` — ID of the language. + +
+
+ +
+
+ +**start_time:** `typing.Optional[float]` + +
+
+ +
+
+ +**end_time:** `typing.Optional[float]` + +
+
+ +
+
+ +**text:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.dubbing.resource.segment.delete(...) -> SegmentDeleteResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Deletes a single segment from the dubbing. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.dubbing.resource.segment.delete( + dubbing_id="dubbing_id", + segment_id="segment_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**dubbing_id:** `str` — ID of the dubbing project. + +
+
+ +
+
+ +**segment_id:** `str` — ID of the segment + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Dubbing Resource Speaker +
client.dubbing.resource.speaker.update(...) -> SpeakerUpdatedResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Amend the metadata associated with a speaker, such as their voice. Both voice cloning and using voices from the ElevenLabs library are supported. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.dubbing.resource.speaker.update( + dubbing_id="dubbing_id", + speaker_id="speaker_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**dubbing_id:** `str` — ID of the dubbing project. + +
+
+ +
+
+ +**speaker_id:** `str` — ID of the speaker. + +
+
+ +
+
+ +**speaker_name:** `typing.Optional[str]` — Name to attribute to this speaker. + +
+
+ +
+
+ +**voice_id:** `typing.Optional[str]` — Either the identifier of a voice from the ElevenLabs voice library, or one of ['track-clone', 'clip-clone']. + +
+
+ +
+
+ +**voice_stability:** `typing.Optional[float]` — For models that support it, the voice similarity value to use. This will default to 0.65, with a valid range of [0.0, 1.0]. + +
+
+ +
+
+ +**voice_similarity:** `typing.Optional[float]` — For models that support it, the voice similarity value to use. This will default to 1.0, with a valid range of [0.0, 1.0]. + +
+
+ +
+
+ +**voice_style:** `typing.Optional[float]` — For models that support it, the voice style value to use. This will default to 1.0, with a valid range of [0.0, 1.0]. + +
+
+ +
+
+ +**languages:** `typing.Optional[typing.List[str]]` — Languages to apply these changes to. If empty, will apply to all languages. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.dubbing.resource.speaker.create(...) -> SpeakerCreatedResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a new speaker in a dubbing resource. The speaker is added to every available language and can optionally be associated with an ElevenLabs voice and voice settings. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.dubbing.resource.speaker.create( + dubbing_id="dubbing_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**dubbing_id:** `str` — ID of the dubbing project. + +
+
+ +
+
+ +**speaker_name:** `typing.Optional[str]` — Name to attribute to this speaker. + +
+
+ +
+
+ +**voice_id:** `typing.Optional[str]` — Either the identifier of a voice from the ElevenLabs voice library, or one of ['track-clone', 'clip-clone']. + +
+
+ +
+
+ +**voice_stability:** `typing.Optional[float]` — For models that support it, the voice similarity value to use. This will default to 0.65, with a valid range of [0.0, 1.0]. + +
+
+ +
+
+ +**voice_similarity:** `typing.Optional[float]` — For models that support it, the voice similarity value to use. This will default to 1.0, with a valid range of [0.0, 1.0]. + +
+
+ +
+
+ +**voice_style:** `typing.Optional[float]` — For models that support it, the voice style value to use. This will default to 1.0, with a valid range of [0.0, 1.0]. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.dubbing.resource.speaker.find_similar_voices(...) -> SimilarVoicesForSpeakerResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Fetch the top 10 similar voices to a speaker, including the voice IDs, names, descriptions, and, where possible, a sample audio recording. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.dubbing.resource.speaker.find_similar_voices( + dubbing_id="dubbing_id", + speaker_id="speaker_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**dubbing_id:** `str` — ID of the dubbing project. + +
+
+ +
+
+ +**speaker_id:** `str` — ID of the speaker. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Dubbing Resource Speaker Segment +
client.dubbing.resource.speaker.segment.create(...) -> SegmentCreateResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a new segment in dubbing resource with a start and end time for the speaker in every available language. Does not automatically generate transcripts/translations/audio. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.dubbing.resource.speaker.segment.create( + dubbing_id="dubbing_id", + speaker_id="speaker_id", + start_time=1.1, + end_time=1.1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**dubbing_id:** `str` — ID of the dubbing project. + +
+
+ +
+
+ +**speaker_id:** `str` — ID of the speaker. + +
+
+ +
+
+ +**start_time:** `float` + +
+
+ +
+
+ +**end_time:** `float` + +
+
+ +
+
+ +**text:** `typing.Optional[str]` + +
+
+ +
+
+ +**translations:** `typing.Optional[typing.Dict[str, typing.Optional[str]]]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Flows Video +
client.flows.video.list(...) -> MediaGenerationListResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List the video generations created through this API, newest first. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.flows.video.list( + cursor="cursor", + page_size=1, + status="pending", + model_id="model_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Pagination cursor: the `next_cursor` value of the previous page's response. Omit it for the first page. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many generations to return per page. + +
+
+ +
+
+ +**status:** `typing.Optional[VideoListRequestStatus]` — Only return generations with this lifecycle status. + +
+
+ +
+
+ +**model_id:** `typing.Optional[str]` — Only return generations of this model. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.flows.video.create(...) -> MediaGenerationCreateResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Start a video generation with the selected model. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.flows.video.create( + request={ + "model_id": "bytedance-seedance-v2", + "prompt": "A corgi rides a tiny surfboard across a sunlit wave at golden hour, cinematic" + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `VideoGenerationRequest` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.flows.video.get(...) -> MediaGenerationResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve the status of a video generation, and retrieve its output URL once completed. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.flows.video.get( + generation_id="generation_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**generation_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Flows Image +
client.flows.image.list(...) -> MediaGenerationListResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List the image generations created through this API, newest first. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.flows.image.list( + cursor="cursor", + page_size=1, + status="pending", + model_id="model_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Pagination cursor: the `next_cursor` value of the previous page's response. Omit it for the first page. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many generations to return per page. + +
+
+ +
+
+ +**status:** `typing.Optional[ImageListRequestStatus]` — Only return generations with this lifecycle status. + +
+
+ +
+
+ +**model_id:** `typing.Optional[str]` — Only return generations of this model. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.flows.image.create(...) -> MediaGenerationCreateResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Start an image generation with the selected model. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.flows.image.create( + request={ + "model_id": "bytedance-seedream-5-lite", + "prompt": "A corgi in a tiny lifeguard chair on a sunlit beach at golden hour, photorealistic" + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `ImageGenerationRequest` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.flows.image.get(...) -> MediaGenerationResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve the status of an image generation, and retrieve its output URL once completed. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.flows.image.get( + generation_id="generation_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**generation_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Flows TextToSpeech +
client.flows.text_to_speech.list(...) -> MediaGenerationListResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List the speech generations created through this API, newest first. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.flows.text_to_speech.list( + cursor="cursor", + page_size=1, + status="pending", + model_id="model_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Pagination cursor: the `next_cursor` value of the previous page's response. Omit it for the first page. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many generations to return per page. + +
+
+ +
+
+ +**status:** `typing.Optional[TextToSpeechListRequestStatus]` — Only return generations with this lifecycle status. + +
+
+ +
+
+ +**model_id:** `typing.Optional[str]` — Only return generations of this model. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.flows.text_to_speech.create(...) -> MediaGenerationCreateResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Start a speech generation with the selected model. Charged per character via text-to-speech billing. Use this over `/v1/text-to-speech` for the asynchronous generation lifecycle or for models not offered there; for direct, synchronous speech synthesis, prefer `/v1/text-to-speech`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.flows.text_to_speech.create( + request={ + "model_id": "eleven_flash_v2_5", + "text": "The first move is what sets everything in motion.", + "voice": "JBFqnCBsd6RMkjVDRZzb" + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `TextToSpeechGenerationRequest` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.flows.text_to_speech.get(...) -> MediaGenerationResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve the status of a speech generation, and retrieve its output URL once completed. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.flows.text_to_speech.get( + generation_id="generation_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**generation_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Flows Templates +
client.flows.templates.list(...) -> TemplateListResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List the published flows templates in your workspace, together with each runnable version's inputs and outputs. Use the ids here as `template_id` / `version_id` on `POST /v1/flows/templates/{template_id}/runs`. Versions built on models that are not available to you through the API are left out, so `versions` is empty when none of a template's published versions is runnable through this API. Templates shared with you by link, or published to Explore from another workspace, are not listed but can still be fetched and run by `template_id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.flows.templates.list( + cursor="cursor", + page_size=1, + versions_per_template=1, + search="search", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Pagination cursor: the `next_cursor` value of the previous page's response. Omit it for the first page. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many templates to return per page. Lower than the run list's ceiling because each row expands its versions' input and output schemas. + +
+
+ +
+
+ +**versions_per_template:** `typing.Optional[int]` — How many of each template's published versions to return, newest first. `has_more_versions` tells you when a template has more. + +
+
+ +
+
+ +**search:** `typing.Optional[str]` — Only return templates whose name or description contains this text. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.flows.templates.get(...) -> TemplateSummary +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve one flows template, together with each runnable version's inputs and outputs. `versions` is empty when no published version is runnable through this API. Works for any template you can open, including templates shared with you by link or published to Explore from another workspace, which `GET /v1/flows/templates` does not list. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.flows.templates.get( + template_id="template_id", + versions_per_template=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**template_id:** `str` — The ID of the template, as shown in the ElevenLabs app or by `GET /v1/flows/templates`. + +
+
+ +
+
+ +**versions_per_template:** `typing.Optional[int]` — How many of each template's published versions to return, newest first. `has_more_versions` tells you when a template has more. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Flows Templates Runs +
client.flows.templates.runs.list(...) -> TemplateRunListResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List this template's runs created through this API, newest first. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.flows.templates.runs.list( + template_id="template_id", + cursor="cursor", + page_size=1, + version_id="version_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**template_id:** `str` — The ID of the template, as shown in the ElevenLabs app or by `GET /v1/flows/templates`. + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Pagination cursor: the `next_cursor` value of the previous page's response. Omit it for the first page. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many runs to return per page. + +
+
+ +
+
+ +**version_id:** `typing.Optional[str]` — Only return runs of this template version id. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.flows.templates.runs.create(...) -> TemplateRunResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Start a run of a flows template. Pass `version_id` to pin a snapshot, or omit it / pass `latest` to run the latest published version. Set input values under `inputs`, keyed by input port id. The response is the run in its initial state, with every output already listed under its port id in `outputs`. Include `webhook` to receive a `flows_template_run` event carrying the finished run once its `status` is `completed` or `failed`; this is the recommended way to wait. Without one, fetch `GET /v1/flows/templates/{template_id}/runs/{run_id}` at a modest interval until the `status` is terminal. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.flows.templates.runs.create( + template_id="template_id", + inputs={ + "prompt": "a corgi on a surfboard", + "reference": { + "type": "asset", + "asset_id": "5xM2KqOnZyce22SPZ9d4" + } + }, + version_id="latest", + webhook={ + "type": "all" + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**template_id:** `str` — The ID of the template, as shown in the ElevenLabs app or by `GET /v1/flows/templates`. + +
+
+ +
+
+ +**inputs:** `typing.Dict[str, TemplateRunInput]` — Input values keyed by input port id. Every input port of the version being run must be given; a missing or unknown id is rejected. Pass `{}` for a template with no inputs. + +
+
+ +
+
+ +**version_id:** `typing.Optional[str]` — The template snapshot to run. Pass a specific version id to pin that snapshot, or `latest` (the default when omitted) to run the template's most recently published version. Only published versions can be pinned, except by the template's owner, who may also pin an unpublished saved snapshot to try it out before publishing. The live draft is never run through this API. + +
+
+ +
+
+ +**webhook:** `typing.Optional[WebhookTarget]` — Include to send the run's result to the workspace's configured flows webhooks once the run's `status` reaches `completed` or `failed`. One event for the whole run: the `flows_template_run` event's `data` matches the terminal response of `GET /v1/flows/templates/{template_id}/runs/{run_id}`. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.flows.templates.runs.get(...) -> TemplateRunResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve a template run: its `status`, rolled up from its outputs, and each output's own status and download URL once completed. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.flows.templates.runs.get( + template_id="template_id", + run_id="run_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**template_id:** `str` — The ID of the template, as shown in the ElevenLabs app or by `GET /v1/flows/templates`. + +
+
+ +
+
+ +**run_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Music CompositionPlan +
client.music.composition_plan.create(...) -> CompositionPlanCreateResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a composition plan for music generation. Usage of this endpoint does not cost any credits but is subject to rate limiting depending on your tier. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.music.composition_plan.create( + enable_logging=True, + prompt="prompt", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**prompt:** `str` — A simple text prompt to compose a plan from. + +
+
+ +
+
+ +**enable_logging:** `typing.Optional[bool]` — When enable_logging is set to false zero retention mode will be used for the request. Zero retention mode may only be used by enterprise customers. + +
+
+ +
+
+ +**music_length_ms:** `typing.Optional[int]` — The length of the composition plan to generate in milliseconds. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt. + +
+
+ +
+
+ +**source_composition_plan:** `typing.Optional[BodyGenerateCompositionPlanV1MusicPlanPostSourceCompositionPlan]` — An optional composition plan to use as a source for the new composition plan. + +
+
+ +
+
+ +**model_id:** `typing.Optional[MusicModelId]` — The model to use for the generation. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Music Finetunes +
client.music.finetunes.list(...) -> MusicFinetunePageResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List music finetunes accessible to you (your own, workspace-shared, and ElevenLabs-curated), with optional filtering, sorting, and cursor pagination. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.music.finetunes.list( + cursor="cursor", + page_size=1, + visibility="private", + created_by="self", + sort="created_at", + sort_direction="asc", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Used for fetching the next page. Cursor is returned in the response. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — How many finetunes to return. Max 150, default 50. + +
+
+ +
+
+ +**visibility:** `typing.Optional[FinetuneVisibility]` — Filter by visibility. 'private' returns private finetunes; 'workspace' returns workspace-shared finetunes; 'public' returns public finetunes, which are currently ElevenLabs curated finetunes. Omit to return all accessible finetunes. + +
+
+ +
+
+ +**created_by:** `typing.Optional[FinetuneCreatedBy]` — Filter by creator. 'self' returns finetunes you created; 'workspace' returns finetunes created by workspace teammates; 'elevenlabs' returns ElevenLabs curated finetunes. Omit to return finetunes from all creators. + +
+
+ +
+
+ +**sort:** `typing.Optional[FinetunesListRequestSort]` — Sort by field (created_at or name) + +
+
+ +
+
+ +**sort_direction:** `typing.Optional[FinetunesListRequestSortDirection]` — Sort direction (asc or desc) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.music.finetunes.create(...) -> MusicFinetuneResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a new music finetune +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.music.finetunes.create( + files=["example_files"], + name="name", + primary_genre="primary_genre", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**name:** `str` — Name for the finetune (5-200 characters). + +
+
+ +
+
+ +**primary_genre:** `str` — Primary musical genre of the finetune. + +
+
+ +
+
+ +**files:** `typing.Optional[typing.List[core.File]]` — Audio files to train on. + +
+
+ +
+
+ +**tags:** `typing.Optional[typing.List[str]]` — Tags to associate with the finetune. + +
+
+ +
+
+ +**visibility:** `typing.Optional[FinetunesCreateRequestVisibility]` — Finetune visibility. Only 'private' and 'workspace' can be set. + +
+
+ +
+
+ +**model_id:** `typing.Optional[MusicModelId]` — The model to create a finetune for. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.music.finetunes.get(...) -> MusicFinetuneResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get a music finetune. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.music.finetunes.get( + finetune_id="finetune_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**finetune_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.music.finetunes.delete(...) -> MusicFinetuneResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete a music finetune +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.music.finetunes.delete( + finetune_id="finetune_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**finetune_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.music.finetunes.update(...) -> MusicFinetuneResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update a music finetune. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.music.finetunes.update( + finetune_id="finetune_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**finetune_id:** `str` + +
+
+ +
+
+ +**name:** `typing.Optional[str]` — Updated name for the finetune. + +
+
+ +
+
+ +**tags:** `typing.Optional[typing.List[str]]` — Replacement set of tags. + +
+
+ +
+
+ +**primary_genre:** `typing.Optional[str]` — Updated primary musical genre. + +
+
+ +
+
+ +**visibility:** `typing.Optional[UpdateMusicFinetuneRequestModelVisibility]` — Finetune visibility. Only 'private' and 'workspace' can be set. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Productions Orders +
client.productions.orders.list(...) -> ListOrdersResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Lists Productions orders in the workspace. Supports filtering by status and date range, with pagination. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment +import datetime + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.productions.orders.list( + page_size=1, + offset=1, + status=[ + "open" + ], + start_date=datetime.datetime.fromisoformat("2024-01-15T09:30:00+00:00"), + end_date=datetime.datetime.fromisoformat("2024-01-15T09:30:00+00:00"), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — Maximum number of orders to return per page. + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Number of orders to skip for pagination. + +
+
+ +
+
+ +**status:** `typing.Optional[typing.Union[OrderState, typing.Sequence[OrderState]]]` — Filter orders by one or more statuses. + +
+
+ +
+
+ +**start_date:** `typing.Optional[datetime.datetime]` — Filter orders created on or after this date. + +
+
+ +
+
+ +**end_date:** `typing.Optional[datetime.datetime]` — Filter orders created on or before this date. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.productions.orders.create(...) -> CreateOrderResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a new Productions order in the workspace. The order starts in the open state and can be configured with items before submission. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs, CreateOrderRequest +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.productions.orders.create( + request=CreateOrderRequest( + sandbox=False, + ), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `typing.Optional[CreateOrderRequest]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.productions.orders.get(...) -> OrderResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieves full details for a Productions order. + +Quote and pricing information may not be available immediately; if you wish to see the quote before submission, you may need to poll the order details until it is ready. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.productions.orders.get( + order_id="order_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**order_id:** `OrderId` — The ID of the order. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.productions.orders.update(...) -> UpdateOrderResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Updates an open order. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs, UpdateOrderRequest +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.productions.orders.update( + order_id="order_id", + request=UpdateOrderRequest( + name="Spanish Dubs", + ), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**order_id:** `OrderId` — The ID of the order. + +
+
+ +
+
+ +**request:** `UpdateOrderRequest` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.productions.orders.submit(...) -> SubmitOrderResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Submits an open order for processing. The order must have at least one item. Once submitted, items can no longer be modified. + +Upon submission, the workspace will be charged for the order. The quote is based on information extracted from the uploaded media, such as its duration. The quote may not be available immediately; if you wish to see the quote before submission, you may need to poll the order details until the quote is ready. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.productions.orders.submit( + order_id="order_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**order_id:** `OrderId` — The ID of the order. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Productions Orders Media +
client.productions.orders.media.register(...) -> RegisterMediaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Registers a media file with an order, either by uploading it directly or by providing a URL to fetch it from. Exactly one of `media` or `media_url` must be provided. The registered media can then be referenced when adding order items. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.productions.orders.media.register( + order_id="order_id", + media="example_media", + declared_language="declared_language", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**order_id:** `OrderId` — The ID of the order to which this media will be attached. + +
+
+ +
+
+ +**declared_language:** `str` — The language code of the media content (e.g. 'en', 'es-ES'). Must be a supported source language for some order item kind. + +
+
+ +
+
+ +**media:** `typing.Optional[core.File]` — The media file to upload. Mutually exclusive with media_url. + +
+
+ +
+
+ +**media_url:** `typing.Optional[str]` — A URL to fetch the media file from. Mutually exclusive with media. + +
+
+ +
+
+ +**media_url_filename:** `typing.Optional[str]` — The filename for URL-sourced media (e.g. 'example.mp4'). Required when using media_url. + +
+
+ +
+
+ +**media_url_content_type:** `typing.Optional[str]` — The MIME type for URL-sourced media (e.g. 'video/mp4'). Required when using media_url. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.productions.orders.media.get(...) -> OrderMediaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieves metadata and a time-limited download URL for a previously uploaded media file. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.productions.orders.media.get( + order_id="order_id", + media_id="media_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**order_id:** `OrderId` — The ID of the order. + +
+
+ +
+
+ +**media_id:** `MediaId` — The ID of the media file. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Productions Orders Items +
client.productions.orders.items.upsert(...) -> UpsertOrderItemResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Adds or updates an order item on an open order. Returns the item ID and the quoted price. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs, UpsertOrderItemRequest +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.productions.orders.items.upsert( + order_id="order_id", + request=UpsertOrderItemRequest( + item={ + "kind": "dub", + "media_id": "prodmedia_01jgatk6h0fwxrtbjade61yqhx", + "source_language": "en", + "destination_languages": [ + "hi", + "fr-FR", + "de" + ], + "include_captions": True, + "include_source_captions": False, + "instructions": "Voices don\'t need to match the originals, prioritize native-sounding voices", + "captions_sdh": False + }, + ), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**order_id:** `OrderId` — The ID of the order. + +
+
+ +
+
+ +**request:** `UpsertOrderItemRequest` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.productions.orders.items.remove(...) -> RemoveOrderItemResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Removes an order item from an open order. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.productions.orders.items.remove( + order_id="order_id", + item_id="item_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**order_id:** `OrderId` — The ID of the order. + +
+
+ +
+
+ +**item_id:** `ItemId` — The ID of the order item. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Productions Orders Deliverables +
client.productions.orders.deliverables.list(...) -> OrderDeliverablesResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieves the delivered files for a completed order. Returns an empty list if the order is not yet completed. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.productions.orders.deliverables.list( + order_id="order_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**order_id:** `OrderId` — The ID of the order. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Productions Orders Languages +
client.productions.orders.languages.list(...) -> LanguagesResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns the available languages for a given order item kind. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.productions.orders.languages.list( + order_item_kind="dub", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**order_item_kind:** `OrderItemKind` — The kind of order item. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## PronunciationDictionaries Rules +
client.pronunciation_dictionaries.rules.set(...) -> PronunciationDictionaryRulesResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Replaces all existing rules on the pronunciation dictionary with the provided ones. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.pronunciation_dictionaries.rules.set( + pronunciation_dictionary_id="21m00Tcm4TlvDq8ikWAM", + rules=[ + { + "type": "alias", + "string_to_replace": "Thailand", + "case_sensitive": True, + "word_boundaries": True, + "alias": "tie-land" + } + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**pronunciation_dictionary_id:** `str` — The id of the pronunciation dictionary + +
+
+ +
+
+ +**rules:** `typing.List[BodySetRulesOnThePronunciationDictionaryV1PronunciationDictionariesPronunciationDictionaryIdSetRulesPostRulesItem]` + +List of pronunciation rules. Rule can be either: + an alias rule: {'string_to_replace': 'a', 'type': 'alias', 'alias': 'b', } + or a phoneme rule: {'string_to_replace': 'a', 'type': 'phoneme', 'phoneme': 'b', 'alphabet': 'ipa' } + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.pronunciation_dictionaries.rules.add(...) -> PronunciationDictionaryRulesResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Add rules to the pronunciation dictionary. If a rule with the same string_to_replace already exists, it will be replaced. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.pronunciation_dictionaries.rules.add( + pronunciation_dictionary_id="21m00Tcm4TlvDq8ikWAM", + rules=[ + { + "type": "alias", + "string_to_replace": "Thailand", + "case_sensitive": True, + "word_boundaries": True, + "alias": "tie-land" + } + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**pronunciation_dictionary_id:** `str` — The id of the pronunciation dictionary + +
+
+ +
+
+ +**rules:** `typing.List[PronunciationDictionaryRule]` + +List of pronunciation rules. Rule can be either: + an alias rule: {'string_to_replace': 'a', 'type': 'alias', 'alias': 'b', } + or a phoneme rule: {'string_to_replace': 'a', 'type': 'phoneme', 'phoneme': 'b', 'alphabet': 'ipa' } + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.pronunciation_dictionaries.rules.remove(...) -> PronunciationDictionaryRulesResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Remove rules from the pronunciation dictionary +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.pronunciation_dictionaries.rules.remove( + pronunciation_dictionary_id="21m00Tcm4TlvDq8ikWAM", + rule_strings=[ + "rule_strings" + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**pronunciation_dictionary_id:** `str` — The id of the pronunciation dictionary + +
+
+ +
+
+ +**rule_strings:** `typing.List[str]` — List of strings to remove from the pronunciation dictionary. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ServiceAccounts ApiKeys +
client.service_accounts.api_keys.list(...) -> WorkspaceApiKeyListResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all API keys for a service account +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.service_accounts.api_keys.list( + service_account_user_id="service_account_user_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**service_account_user_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.service_accounts.api_keys.create(...) -> WorkspaceCreateApiKeyResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a new API key for a service account +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.service_accounts.api_keys.create( + service_account_user_id="service_account_user_id", + name="name", + permissions="all", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**service_account_user_id:** `str` + +
+
+ +
+
+ +**name:** `str` + +
+
+ +
+
+ +**permissions:** `BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPostPermissions` — The permissions of the XI API. + +
+
+ +
+
+ +**character_limit:** `typing.Optional[int]` — 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:** `typing.Optional[typing.List[str]]` — 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:** `typing.Optional[bool]` — 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. + +
+
+ +
+
+ +**tts_concurrency_limit:** `typing.Optional[int]` — Maximum concurrent text-to-speech/speech-to-speech requests for this API key. Only available for enterprise customers. + +
+
+ +
+
+ +**dubbing_concurrency_limit:** `typing.Optional[int]` — Maximum concurrent dubbing requests for this API key. Only available for enterprise customers. + +
+
+ +
+
+ +**music_concurrency_limit:** `typing.Optional[int]` — Maximum concurrent music generation requests for this API key. Only available for enterprise customers. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.service_accounts.api_keys.delete(...) -> typing.Any +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete an existing API key for a service account +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.service_accounts.api_keys.delete( + service_account_user_id="service_account_user_id", + api_key_id="api_key_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**service_account_user_id:** `str` + +
+
+ +
+
+ +**api_key_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.service_accounts.api_keys.update(...) -> typing.Any +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update an existing API key for a service account +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.service_accounts.api_keys.update( + service_account_user_id="service_account_user_id", + api_key_id="api_key_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**service_account_user_id:** `str` + +
+
+ +
+
+ +**api_key_id:** `str` + +
+
+ +
+
+ +**is_enabled:** `typing.Optional[BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchIsEnabled]` — Whether to enable or disable the API key. + +
+
+ +
+
+ +**name:** `typing.Optional[str]` — The name of the XI API key to use (used for identification purposes only). + +
+
+ +
+
+ +**permissions:** `typing.Optional[BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchPermissions]` — The permissions of the XI API. + +
+
+ +
+
+ +**character_limit:** `typing.Optional[BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchCharacterLimit]` — 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:** `typing.Optional[BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchAllowedIps]` — 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:** `typing.Optional[BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchThirdPartyDisableAllowed]` — 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. + +
+
+ +
+
+ +**tts_concurrency_limit:** `typing.Optional[BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchTtsConcurrencyLimit]` — Maximum concurrent text-to-speech/speech-to-speech requests for this API key. Only available for enterprise customers. + +
+
+ +
+
+ +**dubbing_concurrency_limit:** `typing.Optional[BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchDubbingConcurrencyLimit]` — Maximum concurrent dubbing requests for this API key. Only available for enterprise customers. + +
+
+ +
+
+ +**music_concurrency_limit:** `typing.Optional[BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchMusicConcurrencyLimit]` — Maximum concurrent music generation requests for this API key. Only available for enterprise customers. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.service_accounts.api_keys.disable(...) -> typing.Any +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Disable an existing API key for a service account without changing its other settings. This stays available after a workspace downgrades off a plan that includes service accounts. Turning the key back on still requires that plan. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.service_accounts.api_keys.disable( + service_account_user_id="service_account_user_id", + api_key_id="api_key_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**service_account_user_id:** `str` + +
+
+ +
+
+ +**api_key_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## SpeechToText Transcripts +
client.speech_to_text.transcripts.get(...) -> TranscriptsGetResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve a previously generated transcript by its ID. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.speech_to_text.transcripts.get( + transcription_id="transcription_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**transcription_id:** `str` — The unique ID of the transcript to retrieve + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.speech_to_text.transcripts.delete(...) -> typing.Any +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete a previously generated transcript by its ID. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.speech_to_text.transcripts.delete( + transcription_id="transcription_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**transcription_id:** `str` — The unique ID of the transcript to delete + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Studio Projects +
client.studio.projects.list() -> GetProjectsResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of your Studio projects with metadata. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.studio.projects.list() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.studio.projects.create(...) -> AddProjectResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a new Studio project, it can be either initialized as blank, from a document or from a URL. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.studio.projects.create( + from_document="example_from_document", + name="name", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**name:** `str` — The name of the Studio project, used for identification only. + +
+
+ +
+
+ +**default_title_voice_id:** `typing.Optional[str]` — The voice_id that corresponds to the default voice used for new titles. + +
+
+ +
+
+ +**default_paragraph_voice_id:** `typing.Optional[str]` — The voice_id that corresponds to the default voice used for new paragraphs. + +
+
+ +
+
+ +**default_model_id:** `typing.Optional[str]` — The ID of the model to be used for this Studio project, you can query GET /v1/models to list all available models. + +
+
+ +
+
+ +**from_url:** `typing.Optional[str]` — An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. + +
+
+ +
+
+ +**from_document:** `typing.Optional[core.File]` — An optional .epub, .pdf, .txt or similar file can be provided. If provided, we will initialize the Studio project with its content. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. + +
+
+ +
+
+ +**from_content_json:** `typing.Optional[str]` + + + An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. + + Example: + [{"name": "Chapter A", "blocks": [{"sub_type": "p", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "A", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "B", "type": "tts_node"}]}, {"sub_type": "h1", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "C", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "D", "type": "tts_node"}]}]}, {"name": "Chapter B", "blocks": [{"sub_type": "p", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "E", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "F", "type": "tts_node"}]}, {"sub_type": "h2", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "G", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "H", "type": "tts_node"}]}]}] + + +
+
+ +
+
+ +**quality_preset:** `typing.Optional[QualityPresetType]` + +Output quality of the generated audio. Must be one of: +'standard' - standard output format, 128kbps with 44.1kHz sample rate. +'high' - high quality output format, 192kbps with 44.1kHz sample rate and major improvements on our side. +'ultra' - ultra quality output format, 192kbps with 44.1kHz sample rate and highest improvements on our side. +'ultra_lossless' - ultra quality output format, 705.6kbps with 44.1kHz sample rate and highest improvements on our side in a fully lossless format. +If not provided, defaults to the highest quality preset available on your subscription tier. + +
+
+ +
+
+ +**title:** `typing.Optional[str]` — An optional name of the author of the Studio project, this will be added as metadata to the mp3 file on Studio project or chapter download. + +
+
+ +
+
+ +**author:** `typing.Optional[str]` — An optional name of the author of the Studio project, this will be added as metadata to the mp3 file on Studio project or chapter download. + +
+
+ +
+
+ +**description:** `typing.Optional[str]` — An optional description of the Studio project. + +
+
+ +
+
+ +**genres:** `typing.Optional[typing.List[str]]` — An optional list of genres associated with the Studio project. + +
+
+ +
+
+ +**target_audience:** `typing.Optional[ProjectsCreateRequestTargetAudience]` — An optional target audience of the Studio project. + +
+
+ +
+
+ +**language:** `typing.Optional[str]` — An optional language of the Studio project. Two-letter language code (ISO 639-1). + +
+
+ +
+
+ +**content_type:** `typing.Optional[str]` — An optional content type of the Studio project. + +
+
+ +
+
+ +**original_publication_date:** `typing.Optional[str]` — An optional original publication date of the Studio project, in the format YYYY-MM-DD or YYYY. + +
+
+ +
+
+ +**mature_content:** `typing.Optional[bool]` — An optional specification of whether this Studio project contains mature content. + +
+
+ +
+
+ +**isbn_number:** `typing.Optional[str]` — An optional ISBN number of the Studio project you want to create, this will be added as metadata to the mp3 file on Studio project or chapter download. + +
+
+ +
+
+ +**acx_volume_normalization:** `typing.Optional[bool]` — [Deprecated] When the Studio project is downloaded, should the returned audio have postprocessing in order to make it compliant with audiobook normalized volume requirements + +
+
+ +
+
+ +**volume_normalization:** `typing.Optional[bool]` — When the Studio project is downloaded, should the returned audio have postprocessing in order to make it compliant with audiobook normalized volume requirements + +
+
+ +
+
+ +**pronunciation_dictionary_locators:** `typing.Optional[typing.List[str]]` — A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"Vmd4Zor6fplcA7WrINey\",\"version_id\":\"hRPaxjlTdR7wFMhV4w0b\"}"' --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"JzWtcGQMJ6bnlWwyMo7e\",\"version_id\":\"lbmwxiLu4q6txYxgdZqn\"}"'. + +
+
+ +
+
+ +**callback_url:** `typing.Optional[str]` + + + A url that will be called by our service when the Studio project is converted. Request will contain a json blob containing the status of the conversion + Messages: + 1. When project was converted successfully: + { + type: "project_conversion_status", + event_timestamp: 1234567890, + data: { + request_id: "1234567890", + project_id: "21m00Tcm4TlvDq8ikWAM", + conversion_status: "success", + project_snapshot_id: "22m00Tcm4TlvDq8ikMAT", + error_details: None, + } + } + 2. When project conversion failed: + { + type: "project_conversion_status", + event_timestamp: 1234567890, + data: { + request_id: "1234567890", + project_id: "21m00Tcm4TlvDq8ikWAM", + conversion_status: "error", + project_snapshot_id: None, + error_details: "Error details if conversion failed" + } + } + + 3. When chapter was converted successfully: + { + type: "chapter_conversion_status", + event_timestamp: 1234567890, + data: { + request_id: "1234567890", + project_id: "21m00Tcm4TlvDq8ikWAM", + chapter_id: "22m00Tcm4TlvDq8ikMAT", + conversion_status: "success", + chapter_snapshot_id: "23m00Tcm4TlvDq8ikMAV", + error_details: None, + } + } + 4. When chapter conversion failed: + { + type: "chapter_conversion_status", + event_timestamp: 1234567890, + data: { + request_id: "1234567890", + project_id: "21m00Tcm4TlvDq8ikWAM", + chapter_id: "22m00Tcm4TlvDq8ikMAT", + conversion_status: "error", + chapter_snapshot_id: None, + error_details: "Error details if conversion failed" + } + } + + +
+
+ +
+
+ +**fiction:** `typing.Optional[ProjectsCreateRequestFiction]` — An optional specification of whether the content of this Studio project is fiction. + +
+
+ +
+
+ +**apply_text_normalization:** `typing.Optional[ProjectsCreateRequestApplyTextNormalization]` + + + This parameter controls text normalization with four modes: 'auto', 'on', 'apply_english' and 'off'. + When set to 'auto', the system will automatically decide whether to apply text normalization + (e.g., spelling out numbers). With 'on', text normalization will always be applied, while + with 'off', it will be skipped. 'apply_english' is the same as 'on' but will assume that text is in English. + + +
+
+ +
+
+ +**auto_convert:** `typing.Optional[bool]` — Whether to auto convert the Studio project to audio or not. + +
+
+ +
+
+ +**auto_assign_voices:** `typing.Optional[bool]` — [Alpha Feature] Whether automatically assign voices to phrases in the create Project. + +
+
+ +
+
+ +**source_type:** `typing.Optional[ProjectsCreateRequestSourceType]` — The type of Studio project to create. + +
+
+ +
+
+ +**voice_settings:** `typing.Optional[typing.List[str]]` + + Optional voice settings overrides for the project, encoded as a list of JSON strings. + + Example: + ["{\"voice_id\": \"21m00Tcm4TlvDq8ikWAM\", \"stability\": 0.7, \"similarity_boost\": 0.8, \"style\": 0.5, \"speed\": 1.0, \"use_speaker_boost\": true}"] + + +
+
+ +
+
+ +**create_publishing_read:** `typing.Optional[bool]` — If true, creates a corresponding read for direct publishing in draft state + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.studio.projects.get(...) -> ProjectExtendedResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns information about a specific Studio project. This endpoint returns more detailed information about a project than `GET /v1/studio`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.studio.projects.get( + project_id="21m00Tcm4TlvDq8ikWAM", + share_id="share_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. + +
+
+ +
+
+ +**share_id:** `typing.Optional[str]` — The share ID of the project + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.studio.projects.update(...) -> EditProjectResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Updates the specified Studio project by setting the values of the parameters passed. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.studio.projects.update( + project_id="21m00Tcm4TlvDq8ikWAM", + name="Project 1", + default_title_voice_id="21m00Tcm4TlvDq8ikWAM", + default_paragraph_voice_id="21m00Tcm4TlvDq8ikWAM", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. + +
+
+ +
+
+ +**name:** `str` — The name of the Studio project, used for identification only. + +
+
+ +
+
+ +**default_title_voice_id:** `str` — The voice_id that corresponds to the default voice used for new titles. + +
+
+ +
+
+ +**default_paragraph_voice_id:** `str` — The voice_id that corresponds to the default voice used for new paragraphs. + +
+
+ +
+
+ +**title:** `typing.Optional[str]` — An optional name of the author of the Studio project, this will be added as metadata to the mp3 file on Studio project or chapter download. + +
+
+ +
+
+ +**author:** `typing.Optional[str]` — An optional name of the author of the Studio project, this will be added as metadata to the mp3 file on Studio project or chapter download. + +
+
+ +
+
+ +**isbn_number:** `typing.Optional[str]` — An optional ISBN number of the Studio project you want to create, this will be added as metadata to the mp3 file on Studio project or chapter download. + +
+
+ +
+
+ +**volume_normalization:** `typing.Optional[bool]` — When the Studio project is downloaded, should the returned audio have postprocessing in order to make it compliant with audiobook normalized volume requirements + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.studio.projects.delete(...) -> DeleteProjectResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Deletes a Studio project. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.studio.projects.delete( + project_id="21m00Tcm4TlvDq8ikWAM", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.studio.projects.convert(...) -> ConvertProjectResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Starts conversion of a Studio project and all of its chapters. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.studio.projects.convert( + project_id="21m00Tcm4TlvDq8ikWAM", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.studio.projects.get_muted_tracks(...) -> ProjectMutedTracksResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of chapter IDs that have muted tracks in a project. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.studio.projects.get_muted_tracks( + project_id="21m00Tcm4TlvDq8ikWAM", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — The ID of the Studio project. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Studio Projects PronunciationDictionaries +
client.studio.projects.pronunciation_dictionaries.create(...) -> CreatePronunciationDictionaryResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a set of pronunciation dictionaries acting on a project. This will automatically mark text within this project as requiring reconverting where the new dictionary would apply or the old one no longer does. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs, PronunciationDictionaryVersionLocator +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.studio.projects.pronunciation_dictionaries.create( + project_id="21m00Tcm4TlvDq8ikWAM", + pronunciation_dictionary_locators=[ + PronunciationDictionaryVersionLocator( + pronunciation_dictionary_id="pronunciation_dictionary_id", + version_id=, + ) + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. + +
+
+ +
+
+ +**pronunciation_dictionary_locators:** `typing.List[PronunciationDictionaryVersionLocator]` — A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"Vmd4Zor6fplcA7WrINey\",\"version_id\":\"hRPaxjlTdR7wFMhV4w0b\"}"' --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"JzWtcGQMJ6bnlWwyMo7e\",\"version_id\":\"lbmwxiLu4q6txYxgdZqn\"}"'. + +
+
+ +
+
+ +**invalidate_affected_text:** `typing.Optional[bool]` — This will automatically mark text in this project for reconversion when the new dictionary applies or the old one no longer does. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Studio Projects Content +
client.studio.projects.content.update(...) -> EditProjectResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Updates Studio project content. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.studio.projects.content.update( + project_id="21m00Tcm4TlvDq8ikWAM", + from_document="example_from_document", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. + +
+
+ +
+
+ +**from_url:** `typing.Optional[str]` — An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. + +
+
+ +
+
+ +**from_document:** `typing.Optional[core.File]` — An optional .epub, .pdf, .txt or similar file can be provided. If provided, we will initialize the Studio project with its content. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. + +
+
+ +
+
+ +**from_content_json:** `typing.Optional[str]` + + + An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. + + Example: + [{"name": "Chapter A", "blocks": [{"sub_type": "p", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "A", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "B", "type": "tts_node"}]}, {"sub_type": "h1", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "C", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "D", "type": "tts_node"}]}]}, {"name": "Chapter B", "blocks": [{"sub_type": "p", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "E", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "F", "type": "tts_node"}]}, {"sub_type": "h2", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "G", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "H", "type": "tts_node"}]}]}] + + +
+
+ +
+
+ +**auto_convert:** `typing.Optional[bool]` — Whether to auto convert the Studio project to audio or not. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Studio Projects Snapshots +
client.studio.projects.snapshots.list(...) -> ProjectSnapshotsResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieves a list of snapshots for a Studio project. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.studio.projects.snapshots.list( + project_id="21m00Tcm4TlvDq8ikWAM", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — The ID of the Studio project. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.studio.projects.snapshots.get(...) -> ProjectSnapshotExtendedResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns the project snapshot. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.studio.projects.snapshots.get( + project_id="21m00Tcm4TlvDq8ikWAM", + project_snapshot_id="21m00Tcm4TlvDq8ikWAM", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — The ID of the Studio project. + +
+
+ +
+
+ +**project_snapshot_id:** `str` — The ID of the Studio project snapshot. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.studio.projects.snapshots.stream(...) -> typing.Iterator[bytes] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Stream the audio from a Studio project snapshot. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.studio.projects.snapshots.stream( + project_id="project_id", + project_snapshot_id="project_snapshot_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. + +
+
+ +
+
+ +**project_snapshot_id:** `str` — The ID of the Studio project snapshot. + +
+
+ +
+
+ +**convert_to_mpeg:** `typing.Optional[bool]` — Whether to convert the audio to mpeg format. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.studio.projects.snapshots.stream_archive(...) -> typing.Iterator[bytes] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a compressed archive of the Studio project's audio. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.studio.projects.snapshots.stream_archive( + project_id="project_id", + project_snapshot_id="project_snapshot_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. + +
+
+ +
+
+ +**project_snapshot_id:** `str` — The ID of the Studio project snapshot. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Studio Projects Chapters +
client.studio.projects.chapters.list(...) -> GetChaptersResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of a Studio project's chapters. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.studio.projects.chapters.list( + project_id="21m00Tcm4TlvDq8ikWAM", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — The ID of the Studio project. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.studio.projects.chapters.create(...) -> AddChapterResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a new chapter either as blank or from a URL. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.studio.projects.chapters.create( + project_id="21m00Tcm4TlvDq8ikWAM", + name="Chapter 1", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — The ID of the Studio project. + +
+
+ +
+
+ +**name:** `str` — The name of the chapter, used for identification only. + +
+
+ +
+
+ +**from_url:** `typing.Optional[str]` — An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.studio.projects.chapters.get(...) -> ChapterWithContentResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns information about a specific chapter. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.studio.projects.chapters.get( + project_id="21m00Tcm4TlvDq8ikWAM", + chapter_id="21m00Tcm4TlvDq8ikWAM", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. + +
+
+ +
+
+ +**chapter_id:** `str` — The ID of the chapter to be used. You can use the [List project chapters](/docs/api-reference/studio/get-chapters) endpoint to list all the available chapters. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.studio.projects.chapters.update(...) -> EditChapterResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Updates a chapter. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.studio.projects.chapters.update( + project_id="21m00Tcm4TlvDq8ikWAM", + chapter_id="21m00Tcm4TlvDq8ikWAM", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. + +
+
+ +
+
+ +**chapter_id:** `str` — The ID of the chapter to be used. You can use the [List project chapters](/docs/api-reference/studio/get-chapters) endpoint to list all the available chapters. + +
+
+ +
+
+ +**name:** `typing.Optional[str]` — The name of the chapter, used for identification only. + +
+
+ +
+
+ +**content:** `typing.Optional[ChapterContentInputModel]` — The chapter content to use. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.studio.projects.chapters.delete(...) -> DeleteChapterResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Deletes a chapter. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.studio.projects.chapters.delete( + project_id="21m00Tcm4TlvDq8ikWAM", + chapter_id="21m00Tcm4TlvDq8ikWAM", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. + +
+
+ +
+
+ +**chapter_id:** `str` — The ID of the chapter to be used. You can use the [List project chapters](/docs/api-reference/studio/get-chapters) endpoint to list all the available chapters. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.studio.projects.chapters.convert(...) -> ConvertChapterResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Starts conversion of a specific chapter. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.studio.projects.chapters.convert( + project_id="21m00Tcm4TlvDq8ikWAM", + chapter_id="21m00Tcm4TlvDq8ikWAM", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. + +
+
+ +
+
+ +**chapter_id:** `str` — The ID of the chapter to be used. You can use the [List project chapters](/docs/api-reference/studio/get-chapters) endpoint to list all the available chapters. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Studio Projects Chapters Snapshots +
client.studio.projects.chapters.snapshots.list(...) -> ChapterSnapshotsResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets information about all the snapshots of a chapter. Each snapshot can be downloaded as audio. Whenever a chapter is converted a snapshot will automatically be created. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.studio.projects.chapters.snapshots.list( + project_id="21m00Tcm4TlvDq8ikWAM", + chapter_id="21m00Tcm4TlvDq8ikWAM", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. + +
+
+ +
+
+ +**chapter_id:** `str` — The ID of the chapter to be used. You can use the [List project chapters](/docs/api-reference/studio/get-chapters) endpoint to list all the available chapters. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.studio.projects.chapters.snapshots.get(...) -> ChapterSnapshotExtendedResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns the chapter snapshot. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.studio.projects.chapters.snapshots.get( + project_id="21m00Tcm4TlvDq8ikWAM", + chapter_id="21m00Tcm4TlvDq8ikWAM", + chapter_snapshot_id="21m00Tcm4TlvDq8ikWAM", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — The ID of the Studio project. + +
+
+ +
+
+ +**chapter_id:** `str` — The ID of the chapter. + +
+
+ +
+
+ +**chapter_snapshot_id:** `str` — The ID of the chapter snapshot. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.studio.projects.chapters.snapshots.stream(...) -> typing.Iterator[bytes] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Stream the audio from a chapter snapshot. Use `GET /v1/studio/projects/{project_id}/chapters/{chapter_id}/snapshots` to return the snapshots of a chapter. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.studio.projects.chapters.snapshots.stream( + project_id="project_id", + chapter_id="chapter_id", + chapter_snapshot_id="chapter_snapshot_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**project_id:** `str` — The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects. + +
+
+ +
+
+ +**chapter_id:** `str` — The ID of the chapter to be used. You can use the [List project chapters](/docs/api-reference/studio/get-chapters) endpoint to list all the available chapters. + +
+
+ +
+
+ +**chapter_snapshot_id:** `str` — The ID of the chapter snapshot to be used. You can use the [List project chapter snapshots](/docs/api-reference/studio/get-snapshots) endpoint to list all the available snapshots. + +
+
+ +
+
+ +**convert_to_mpeg:** `typing.Optional[bool]` — Whether to convert the audio to mpeg format. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## TextToVoice Preview +
client.text_to_voice.preview.stream(...) -> typing.Iterator[bytes] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Stream a voice preview that was created via the /v1/text-to-voice/design endpoint. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.text_to_voice.preview.stream( + generated_voice_id="generated_voice_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**generated_voice_id:** `str` — The generated_voice_id to stream. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Tokens SingleUse +
client.tokens.single_use.create(...) -> SingleUseTokenResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Generate a time limited single-use token with embedded authentication for frontend clients. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.tokens.single_use.create( + token_type="realtime_scribe", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**token_type:** `SingleUseTokenType` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## User Subscription +
client.user.subscription.get() -> Subscription +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets extended information about the users subscription +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.user.subscription.get() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Voices Collections +
client.voices.collections.list() -> GetUserVoiceCollectionsResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns all the voice collections the user has access to, sorted by title. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.voices.collections.list() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.voices.collections.create(...) -> UserVoiceCollectionResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a new voice collection. The caller becomes its admin. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.voices.collections.create( + title="title", + icon="icon", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**title:** `str` — Title of the collection to create/update. + +
+
+ +
+
+ +**icon:** `str` — Icon of the collection to create/update. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.voices.collections.get(...) -> UserVoiceCollectionResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a voice collection the user has access to. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.voices.collections.get( + collection_id="collection_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**collection_id:** `str` — Collection ID. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.voices.collections.delete(...) -> DeleteUserVoiceCollectionResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Deletes a voice collection. The voices in it are not deleted. Requires admin access to the collection. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.voices.collections.delete( + collection_id="collection_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**collection_id:** `str` — Collection ID. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.voices.collections.update(...) -> UserVoiceCollectionResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Updates the title and icon of a voice collection. Fields that are omitted are left unchanged. Requires editor access to the collection. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.voices.collections.update( + collection_id="collection_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**collection_id:** `str` — Collection ID. + +
+
+ +
+
+ +**title:** `typing.Optional[str]` — Title of the collection to create/update. + +
+
+ +
+
+ +**icon:** `typing.Optional[str]` — Icon of the collection to create/update. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.voices.collections.add_voice(...) -> AddVoiceToUserVoiceCollectionResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Adds a voice to a voice collection. Adding a voice that is already in the collection succeeds without changes. Requires editor access to the collection. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.voices.collections.add_voice( + collection_id="collection_id", + voice_id="21m00Tcm4TlvDq8ikWAM", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**collection_id:** `str` — Collection ID. + +
+
+ +
+
+ +**voice_id:** `str` — Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.voices.collections.remove_voice(...) -> RemoveVoiceFromUserVoiceCollectionResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Removes a voice from a voice collection. The voice itself is not deleted. Requires editor access to the collection. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.voices.collections.remove_voice( + collection_id="collection_id", + voice_id="21m00Tcm4TlvDq8ikWAM", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**collection_id:** `str` — Collection ID. + +
+
+ +
+
+ +**voice_id:** `str` — Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Voices Settings +
client.voices.settings.get_default() -> VoiceSettings +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets the default settings for voices. "similarity_boost" corresponds to"Clarity + Similarity Enhancement" in the web app and "stability" corresponds to "Stability" slider in the web app. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.voices.settings.get_default() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.voices.settings.get(...) -> VoiceSettings +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns the settings for a specific voice. "similarity_boost" corresponds to"Clarity + Similarity Enhancement" in the web app and "stability" corresponds to "Stability" slider in the web app. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.voices.settings.get( + voice_id="21m00Tcm4TlvDq8ikWAM", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voice_id:** `str` — Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.voices.settings.update(...) -> EditVoiceSettingsResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Edit your settings for a specific voice. "similarity_boost" corresponds to "Clarity + Similarity Enhancement" in the web app and "stability" corresponds to "Stability" slider in the web app. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs, VoiceSettings +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.voices.settings.update( + voice_id="21m00Tcm4TlvDq8ikWAM", + request=VoiceSettings( + stability=1, + use_speaker_boost=True, + similarity_boost=1, + style=0, + speed=1, + ), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voice_id:** `str` — ID of the voice to be used. You can use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices. + +
+
+ +
+
+ +**request:** `VoiceSettings` — The settings for a specific voice. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Voices Accents +
client.voices.accents.get(...) -> GetVoiceAccentsResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets the list of available accents in the shared voice library. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.voices.accents.get( + language="language", + model_id="model_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**language:** `typing.Optional[str]` — If provided, only accents for this language code are returned. + +
+
+ +
+
+ +**model_id:** `typing.Optional[str]` — If provided, returns the accents available for this model. Defaults to the most complete accent list when omitted. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Voices Ivc +
client.voices.ivc.create(...) -> AddVoiceIvcResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a voice clone and add it to your Voices +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.voices.ivc.create( + files=["example_files"], + name="name", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**name:** `str` — The name that identifies this voice. This will be displayed in the dropdown of the website. + +
+
+ +
+
+ +**files:** `typing.List[core.File]` — A list of file paths to audio recordings intended for voice cloning. + +
+
+ +
+
+ +**remove_background_noise:** `typing.Optional[bool]` — If set will remove background noise for voice samples using our audio isolation model. If the samples do not include background noise, it can make the quality worse. + +
+
+ +
+
+ +**description:** `typing.Optional[str]` — A description of the voice. + +
+
+ +
+
+ +**labels:** `typing.Optional[AddVoiceRequestLabels]` — Labels for the voice. Keys can be language, accent, gender, or age. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Voices Pvc +
client.voices.pvc.create(...) -> AddVoiceResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a new PVC voice with metadata but no samples +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.voices.pvc.create( + name="John Smith", + language="en", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**name:** `str` — The name that identifies this voice. This will be displayed in the dropdown of the website. + +
+
+ +
+
+ +**language:** `str` — Language used in the samples. + +
+
+ +
+
+ +**description:** `typing.Optional[str]` — Description to use for the created voice. + +
+
+ +
+
+ +**labels:** `typing.Optional[typing.Dict[str, typing.Optional[str]]]` — Labels for the voice. Keys can be language, accent, gender, or age. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.voices.pvc.update(...) -> AddVoiceResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Edit PVC voice metadata +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.voices.pvc.update( + voice_id="21m00Tcm4TlvDq8ikWAM", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voice_id:** `str` — Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices. + +
+
+ +
+
+ +**name:** `typing.Optional[str]` — The name that identifies this voice. This will be displayed in the dropdown of the website. + +
+
+ +
+
+ +**language:** `typing.Optional[str]` — Language used in the samples. + +
+
+ +
+
+ +**description:** `typing.Optional[str]` — Description to use for the created voice. + +
+
+ +
+
+ +**labels:** `typing.Optional[typing.Dict[str, typing.Optional[str]]]` — Labels for the voice. Keys can be language, accent, gender, or age. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.voices.pvc.train(...) -> StartPvcVoiceTrainingResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Start PVC training process for a voice. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.voices.pvc.train( + voice_id="21m00Tcm4TlvDq8ikWAM", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voice_id:** `str` — Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices. + +
+
+ +
+
+ +**model_id:** `typing.Optional[str]` — The model ID to use for the conversion. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Voices Pvc Samples +
client.voices.pvc.samples.create(...) -> typing.List[VoiceSample] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Add audio samples to a PVC voice +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.voices.pvc.samples.create( + voice_id="21m00Tcm4TlvDq8ikWAM", + files=["example_files"], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voice_id:** `str` — Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices. + +
+
+ +
+
+ +**files:** `typing.List[core.File]` — Audio files used to create the voice. + +
+
+ +
+
+ +**remove_background_noise:** `typing.Optional[bool]` — If set will remove background noise for voice samples using our audio isolation model. If the samples do not include background noise, it can make the quality worse. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.voices.pvc.samples.update(...) -> AddVoiceResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update a PVC voice sample - apply noise removal, select speaker, change trim times or file name. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.voices.pvc.samples.update( + voice_id="21m00Tcm4TlvDq8ikWAM", + sample_id="VW7YKqPnjY4h39yTbx2L", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voice_id:** `str` — Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices. + +
+
+ +
+
+ +**sample_id:** `str` — Sample ID to be used + +
+
+ +
+
+ +**remove_background_noise:** `typing.Optional[bool]` — If set will remove background noise for voice samples using our audio isolation model. If the samples do not include background noise, it can make the quality worse. + +
+
+ +
+
+ +**selected_speaker_ids:** `typing.Optional[typing.List[str]]` — Speaker IDs to be used for PVC training. Make sure you send all the speaker IDs you want to use for PVC training in one request because the last request will override the previous ones. + +
+
+ +
+
+ +**trim_start_time:** `typing.Optional[int]` — The start time of the audio to be used for PVC training. Time should be in milliseconds + +
+
+ +
+
+ +**trim_end_time:** `typing.Optional[int]` — The end time of the audio to be used for PVC training. Time should be in milliseconds + +
+
+ +
+
+ +**file_name:** `typing.Optional[str]` — The name of the audio file to be used for PVC training. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.voices.pvc.samples.delete(...) -> DeleteVoiceSampleResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete a sample from a PVC voice. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.voices.pvc.samples.delete( + voice_id="21m00Tcm4TlvDq8ikWAM", + sample_id="VW7YKqPnjY4h39yTbx2L", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voice_id:** `str` — Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices. + +
+
+ +
+
+ +**sample_id:** `str` — Sample ID to be used + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Voices Pvc Verification +
client.voices.pvc.verification.request(...) -> RequestPvcManualVerificationResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Request manual verification for a PVC voice. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.voices.pvc.verification.request( + voice_id="21m00Tcm4TlvDq8ikWAM", + files=["example_files"], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voice_id:** `str` — Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices. + +
+
+ +
+
+ +**files:** `typing.List[core.File]` — Verification documents + +
+
+ +
+
+ +**extra_text:** `typing.Optional[str]` — Extra text to be used in the manual verification process. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Voices Pvc Samples Audio +
client.voices.pvc.samples.audio.get(...) -> VoiceSamplePreviewResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve the first 30 seconds of voice sample audio with or without noise removal. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.voices.pvc.samples.audio.get( + voice_id="21m00Tcm4TlvDq8ikWAM", + sample_id="VW7YKqPnjY4h39yTbx2L", + remove_background_noise=True, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voice_id:** `str` — Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices. + +
+
+ +
+
+ +**sample_id:** `str` — Sample ID to be used + +
+
+ +
+
+ +**remove_background_noise:** `typing.Optional[bool]` — If set will remove background noise for voice samples using our audio isolation model. If the samples do not include background noise, it can make the quality worse. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Voices Pvc Samples Waveform +
client.voices.pvc.samples.waveform.get(...) -> VoiceSampleVisualWaveformResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve the visual waveform of a voice sample. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.voices.pvc.samples.waveform.get( + voice_id="21m00Tcm4TlvDq8ikWAM", + sample_id="VW7YKqPnjY4h39yTbx2L", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voice_id:** `str` — Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices. + +
+
+ +
+
+ +**sample_id:** `str` — Sample ID to be used + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Voices Pvc Samples Speakers +
client.voices.pvc.samples.speakers.get(...) -> SpeakerSeparationResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve the status of the speaker separation process and the list of detected speakers if complete. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.voices.pvc.samples.speakers.get( + voice_id="21m00Tcm4TlvDq8ikWAM", + sample_id="VW7YKqPnjY4h39yTbx2L", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voice_id:** `str` — Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices. + +
+
+ +
+
+ +**sample_id:** `str` — Sample ID to be used + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.voices.pvc.samples.speakers.separate(...) -> StartSpeakerSeparationResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Start speaker separation process for a sample +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.voices.pvc.samples.speakers.separate( + voice_id="21m00Tcm4TlvDq8ikWAM", + sample_id="VW7YKqPnjY4h39yTbx2L", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voice_id:** `str` — Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices. + +
+
+ +
+
+ +**sample_id:** `str` — Sample ID to be used + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Voices Pvc Samples Speakers Audio +
client.voices.pvc.samples.speakers.audio.get(...) -> SpeakerAudioResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve the separated audio for a specific speaker. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.voices.pvc.samples.speakers.audio.get( + voice_id="21m00Tcm4TlvDq8ikWAM", + sample_id="VW7YKqPnjY4h39yTbx2L", + speaker_id="VW7YKqPnjY4h39yTbx2L", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voice_id:** `str` — Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices. + +
+
+ +
+
+ +**sample_id:** `str` — Sample ID to be used + +
+
+ +
+
+ +**speaker_id:** `str` — Speaker ID to be used, you can use GET https://api.elevenlabs.io/v1/voices/{voice_id}/samples/{sample_id}/speakers to list all the available speakers for a sample. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Voices Pvc Verification Captcha +
client.voices.pvc.verification.captcha.get(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get captcha for PVC voice verification. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.voices.pvc.verification.captcha.get( + voice_id="21m00Tcm4TlvDq8ikWAM", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voice_id:** `str` — Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.voices.pvc.verification.captcha.verify(...) -> VerifyPvcVoiceCaptchaResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Submit captcha verification for PVC voice. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.voices.pvc.verification.captcha.verify( + voice_id="21m00Tcm4TlvDq8ikWAM", + recording="example_recording", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voice_id:** `str` — Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices. + +
+
+ +
+
+ +**recording:** `core.File` — Audio recording of the user + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Voices Samples Audio +
client.voices.samples.audio.get(...) -> typing.Iterator[bytes] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns the audio corresponding to a sample attached to a voice. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.voices.samples.audio.get( + voice_id="voice_id", + sample_id="sample_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voice_id:** `str` — ID of the voice to be used. You can use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices. + +
+
+ +
+
+ +**sample_id:** `str` — ID of the sample to be used. You can use the [Get voices](/docs/api-reference/voices/get) endpoint list all the available samples for a voice. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Workspace AuditLogs +
client.workspace.audit_logs.list(...) -> WorkspaceAuditLogsPageResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns the audit log for the workspace. Requires enterprise tier and the audit_log_read permission. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.workspace.audit_logs.list( + limit=1, + cursor="cursor", + time_from_unix_ms=1, + time_to_unix_ms=1, + actor_uid="actor_uid", + class_name="class_name", + activity_name="activity_name", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Maximum number of entries per page + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Cursor for the next page (from previous response) + +
+
+ +
+
+ +**time_from_unix_ms:** `typing.Optional[int]` — Only include entries at or after this time (ms since epoch) + +
+
+ +
+
+ +**time_to_unix_ms:** `typing.Optional[int]` — Only include entries at or before this time (ms since epoch) + +
+
+ +
+
+ +**actor_uid:** `typing.Optional[str]` — Filter by actor user ID + +
+
+ +
+
+ +**class_name:** `typing.Optional[str]` — Filter by OCSF event class name (e.g. Account Change) + +
+
+ +
+
+ +**activity_name:** `typing.Optional[str]` — Filter by audit activity name (e.g. Subscription Creation) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Workspace AuthConnections +
client.workspace.auth_connections.list() -> ListAuthConnectionsResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all auth connections for the workspace +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.workspace.auth_connections.list() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.workspace.auth_connections.create(...) -> AuthConnectionsCreateResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a new OAuth2 auth connection for the workspace +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.workspace.auth_connections.create( + request={ + "auth_type": "oauth2_client_credentials", + "name": "name", + "provider": "provider", + "client_id": "client_id", + "token_url": "token_url", + "client_secret": "client_secret" + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `AuthConnectionsCreateRequestBody` — Auth connection to create + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.workspace.auth_connections.delete(...) -> typing.Any +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete an auth connection +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.workspace.auth_connections.delete( + auth_connection_id="auth_connection_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**auth_connection_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.workspace.auth_connections.update(...) -> AuthConnectionsUpdateResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update an auth connection +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.workspace.auth_connections.update( + auth_connection_id="auth_connection_id", + request={ + "auth_type": "oauth2_client_credentials" + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**auth_connection_id:** `str` + +
+
+ +
+
+ +**request:** `AuthConnectionsUpdateRequestBody` — Updated auth connection fields + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Workspace Groups +
client.workspace.groups.list() -> typing.Dict[str, WorkspaceGroupResponseModel] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all groups in the workspace +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.workspace.groups.list() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.workspace.groups.search(...) -> typing.List[WorkspaceGroupByNameResponseModel] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Searches for user groups in the workspace. Multiple or no groups may be returned. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.workspace.groups.search( + name="name", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**name:** `str` — Name of the target group. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Workspace Invites +
client.workspace.invites.create(...) -> AddWorkspaceInviteResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Sends an email invitation to join your workspace to the provided email. If the user doesn't have an account they will be prompted to create one. If the user accepts this invite they will be added as a user to your workspace and your subscription using one of your seats. This endpoint may only be called by workspace members with the WORKSPACE_MEMBERS_INVITE permission. If the user is already in the workspace a 400 error will be returned. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.workspace.invites.create( + email="john.doe@testmail.com", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**email:** `str` — The email of the customer + +
+
+ +
+
+ +**workspace_permission:** `typing.Optional[str]` — The workspace permission of the user. This is deprecated, use `seat_type` instead. + +
+
+ +
+
+ +**seat_type:** `typing.Optional[SeatType]` — The seat type of the user + +
+
+ +
+
+ +**group_ids:** `typing.Optional[typing.List[str]]` — The group ids of the user + +
+
+ +
+
+ +**usage_limit:** `typing.Optional[int]` — Monthly credit usage limit for the invitee. Omit or set to null for no custom cap. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.workspace.invites.create_batch(...) -> AddWorkspaceInviteResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Sends email invitations to join your workspace to the provided emails. Requires all email addresses to be part of a verified domain. If the users don't have an account they will be prompted to create one. If the users accept these invites they will be added as users to your workspace and your subscription using one of your seats. This endpoint may only be called by workspace members with the WORKSPACE_MEMBERS_INVITE permission. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.workspace.invites.create_batch( + emails=[ + "emails" + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**emails:** `typing.List[str]` — The email of the customer + +
+
+ +
+
+ +**seat_type:** `typing.Optional[SeatType]` — The seat type of the user + +
+
+ +
+
+ +**group_ids:** `typing.Optional[typing.List[str]]` — The group ids of the user + +
+
+ +
+
+ +**usage_limit:** `typing.Optional[int]` — Monthly credit usage limit for the invitee. Omit or set to null for no custom cap. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.workspace.invites.delete(...) -> DeleteWorkspaceInviteResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Invalidates an existing email invitation. The invitation will still show up in the inbox it has been delivered to, but activating it to join the workspace won't work. This endpoint may only be called by workspace members with the WORKSPACE_MEMBERS_INVITE permission. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.workspace.invites.delete( + email="john.doe@testmail.com", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**email:** `str` — The email of the customer + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Workspace Members +
client.workspace.members.list() -> typing.List[WorkspaceMemberResponseModel] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets a list of all members of the workspace, including locked members. Service accounts are excluded. Requires the workspace_members_read permission. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.workspace.members.list() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.workspace.members.update(...) -> UpdateWorkspaceMemberResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Updates attributes of a workspace member. Apart from the email identifier, all parameters will remain unchanged unless specified. This endpoint may only be called by workspace administrators. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.workspace.members.update( + email="email", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**email:** `str` — Email of the target user. + +
+
+ +
+
+ +**is_locked:** `typing.Optional[bool]` — Whether to lock or unlock the user account. + +
+
+ +
+
+ +**workspace_role:** `typing.Optional[SeatType]` — The workspace role of the user. This is deprecated, use `workspace_seat_type` instead. + +
+
+ +
+
+ +**workspace_seat_type:** `typing.Optional[SeatType]` — The workspace seat type + +
+
+ +
+
+ +**allow_downgrade_to_basic_seat:** `typing.Optional[bool]` — When unlocking a user whose original seat type has no seats available but a basic seat is available, downgrade the user to a basic seat instead of failing. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Workspace Resources +
client.workspace.resources.get(...) -> ResourceMetadataResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets the metadata of a resource by ID. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.workspace.resources.get( + resource_id="resource_id", + resource_type="voice", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**resource_id:** `str` — The ID of the target resource. + +
+
+ +
+
+ +**resource_type:** `WorkspaceResourceType` — Resource type of the target resource. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.workspace.resources.share(...) -> typing.Any +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Grants a role (one of 'admin', 'editor', 'commenter', or 'viewer') on a workspace resource to a user, group, or workspace (service account) API key. This overrides any existing role the target has on the resource. To target a user or service account, pass only the user email; the user must be in your workspace. To target a group, pass only the group id. To target a workspace (service account) API key, pass the api key id; the resource will be shared with the service account associated with that key. You must have admin access to the resource to share it. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.workspace.resources.share( + resource_id="resource_id", + role="admin", + resource_type="voice", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**resource_id:** `str` — The ID of the target resource. + +
+
+ +
+
+ +**role:** `BodyShareWorkspaceResourceV1WorkspaceResourcesResourceIdSharePostRole` — Role to grant to the target: one of 'admin', 'editor', 'commenter', or 'viewer'. + +
+
+ +
+
+ +**resource_type:** `WorkspaceResourceType` — Resource type of the target resource. + +
+
+ +
+
+ +**user_email:** `typing.Optional[str]` — The email of the user or service account. + +
+
+ +
+
+ +**group_id:** `typing.Optional[str]` — The ID of the target group. Use 'default' to set the resource's baseline role — every workspace member receives this role unless they hold a higher one through a direct user grant, group membership, or workspace (service account) API key. + +
+
+ +
+
+ +**workspace_api_key_id:** `typing.Optional[str]` — The ID of the target workspace (service account) API key. This is not the API key string itself that you pass in the header for authentication — it is the key's ID, which workspace admins can find under Developers → Service Accounts. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.workspace.resources.unshare(...) -> typing.Any +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Removes any existing role on a workspace resource from a user, group, or workspace (service account) API key. To target a user or service account, pass only the user email; the user must be in your workspace. To target a group, pass only the group id. To target a workspace (service account) API key, pass the api key id; the resource will be unshared from the service account associated with that key. You must have admin access to the resource to unshare it. You cannot remove permissions from the user who created the resource. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.workspace.resources.unshare( + resource_id="resource_id", + resource_type="voice", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**resource_id:** `str` — The ID of the target resource. + +
+
+ +
+
+ +**resource_type:** `WorkspaceResourceType` — Resource type of the target resource. + +
+
+ +
+
+ +**user_email:** `typing.Optional[str]` — The email of the user or service account. + +
+
+ +
+
+ +**group_id:** `typing.Optional[str]` — The ID of the target group. Use 'default' to set the resource's baseline role — every workspace member receives this role unless they hold a higher one through a direct user grant, group membership, or workspace (service account) API key. + +
+
+ +
+
+ +**workspace_api_key_id:** `typing.Optional[str]` — The ID of the target workspace (service account) API key. This is not the API key string itself that you pass in the header for authentication — it is the key's ID, which workspace admins can find under Developers → Service Accounts. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Workspace Usage +
client.workspace.usage.get_usage_by_product_over_time(...) -> WorkspaceAnalyticsQueryResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns credit usage broken down by product type over time. The response is a tabular structure with columns, column_types, column_units, and rows. Some id columns also get a display-name column, such as user_label or voice_name, appended after the existing columns. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.workspace.usage.get_usage_by_product_over_time( + start_time=1, + end_time=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**start_time:** `int` — Start of the time range as a Unix timestamp in milliseconds. Must be at least 2020-01-01. + +
+
+ +
+
+ +**end_time:** `int` — End of the time range as a Unix timestamp in milliseconds. Must be at least 2020-01-01. + +
+
+ +
+
+ +**interval_seconds:** `typing.Optional[int]` — Bucket size in seconds. Each row in the response covers this many seconds of the selected time range. For example, pass 3600 for hourly buckets, 86400 for daily buckets, or 604800 for weekly buckets. Whether `time_zone` shifts bucket boundaries depends on this value: week multiples (e.g. 604800) are calendar weeks that start Monday at local midnight; whole-day multiples that are not whole weeks (e.g. 86400) align to local midnight; whole-hour multiples up to 24 hours (e.g. 3600, 14400) align to local hour boundaries from midnight; sub-hour values and other sizes remain UTC-anchored regardless of `time_zone`. + +
+
+ +
+
+ +**group_by:** `typing.Optional[typing.List[BodyGetWorkspaceUsageV1WorkspaceAnalyticsQueryUsageByProductOverTimePostGroupByItem]]` + +
+
+ +
+
+ +**filters:** `typing.Optional[typing.List[ColumnFilter]]` + +
+
+ +
+
+ +**time_zone:** `typing.Optional[str]` — IANA time zone identifier (e.g. 'America/New_York', 'Europe/London', 'UTC') used to align bucket boundaries for eligible `interval_seconds` values. Week multiples (e.g. 604800) are calendar weeks that start Monday at local midnight. Whole-day multiples that are not whole weeks start at local midnight; whole-hour multiples up to 24 hours align to local hour boundaries from midnight. Sub-hour intervals and other bucket sizes remain UTC-anchored regardless of this setting. Defaults to UTC. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Workspace Analytics Requests +
client.workspace.analytics.requests.get(...) -> WorkspaceAnalyticsQueryResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of API requests. Supports filtering by time range, column filters, and search terms. At least one of start_time or end_time must be provided. An optional sort parameter controls timestamp ordering. Results are ordered by timestamp. Descending if end_time is used, ascending if start_time is used. The response is a tabular structure with columns, column_types, column_units, and rows. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.workspace.analytics.requests.get() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**start_time:** `typing.Optional[int]` — Start of the time range as a Unix timestamp in milliseconds. + +
+
+ +
+
+ +**end_time:** `typing.Optional[int]` — End of the time range as a Unix timestamp in milliseconds. + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` + +
+
+ +
+
+ +**sort:** `typing.Optional[BodyListApiRequestsV1WorkspaceAnalyticsRequestsPostSort]` — Optional timestamp sort direction. If omitted, defaults to desc when end_time is provided, otherwise asc. + +
+
+ +
+
+ +**filters:** `typing.Optional[typing.List[ColumnFilter]]` + +
+
+ +
+
+ +**search:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Workspace Groups Members +
client.workspace.groups.members.remove(...) -> DeleteWorkspaceGroupMemberResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Removes a member from the specified group. Requires `group_members_manage` permission. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.workspace.groups.members.remove( + group_id="group_id", + email="email", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**group_id:** `str` — The ID of the target group. + +
+
+ +
+
+ +**email:** `str` — The email of the target workspace member. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.workspace.groups.members.add(...) -> AddWorkspaceGroupMemberResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Adds a member of your workspace to the specified group. Requires `group_members_manage` permission. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.workspace.groups.members.add( + group_id="group_id", + email="email", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**group_id:** `str` — The ID of the target group. + +
+
+ +
+
+ +**email:** `str` — The email of the target workspace member. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Workspaces ApiKeys +
client.workspaces.api_keys.disable(...) -> typing.Any +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Disable the API key used to authenticate this request. Requires the query parameter `api_key_name=self` as an explicit confirmation. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs +from elevenlabs.environment import ElevenLabsEnvironment + +client = ElevenLabs( + environment=ElevenLabsEnvironment.PRODUCTION, +) + +client.workspaces.api_keys.disable( + api_key_name="self", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**api_key_name:** `str` — Must be set to `self` to disable the API key used to authenticate this request. Required as an explicit confirmation to avoid accidentally disabling the wrong key. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+