v4

OpenAPI 3.1.02026-07-313621,3961.8 MB
pvc-voices

Retrieve Voice Sample Audio

Retrieve the first 30 seconds of voice sample audio with or without noise removal.

get/v1/voices/pvc/{voice_id}/samples/{sample_id}/audio

Path parameters

voice_idstring required

Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.

Example:21m00Tcm4TlvDq8ikWAM

Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.

sample_idstring required

Sample ID to be used

Example:VW7YKqPnjY4h39yTbx2L

Sample ID to be used

Query parameters

remove_background_noiseboolean

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.

Example:true

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.

Headers

xi-api-keystring nullable

Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.

Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.

Response

Successful Response

audio_base_64string required

The base64 encoded audio.

voice_idstring required

The ID of the voice.

sample_idstring required

The ID of the sample.

media_typestring required

The media type of the audio.

duration_secsnumber nullable

The duration of the audio in seconds.

Example response

{
  "audio_base_64": "audio_base_64",
  "duration_secs": 5,
  "media_type": "audio/mpeg",
  "sample_id": "DCwhRBWXzGAHq8TQ4Fs18",
  "voice_id": "DCwhRBWXzGAHq8TQ4Fs18"
}