The WellSaid clips endpoint allows you to generate clips Asynchronously and then retrieve those clips after they are finished being processed by our text-to-speech models.
How do you use the endpoint?
Make a POST request to this URL, including your API key in the header:
https://api.wellsaidlabs.com/v1/tts/clips
An example curl
command:
curl --location 'https://api.wellsaidlabs.com/v1/tts/clips' \
--header 'X-API-KEY: <api-key-here>'
--header 'accept: */*' \
--header 'content-type: application/json' \
--data '
{
"speaker_id": 7,
"text": "Hello, world"
}
'
Response
Below is an example of a successful response showing one avatar with the following structure:
{
"clip_id": "YOUR_CLIP_ID"
}
Make a POST request to this URL, including your API key in the header:
https://api.wellsaidlabs.com/v1/tts/clips
An example curl
command that has an array of clips to create:
curl --location 'https://api.wellsaidlabs.com/v1/tts/clips' \
--header 'X-API-KEY: <api-key-here>'
--header 'accept: */*' \
--header 'content-type: application/json' \
--data '
[
{
"speaker_id": 8,
"text": "Make me my first clip"
},
{
"speaker_id": 7,
"text": "Now make me a second clip"
}
]
'
Response
Below is an example of a successful response showing one avatar with the following structure:
{
"clip_ids": [
"your_clip_id_1",
"your_clip_id_2"
]
}
Make a POST request to this URL, including your API key in the header:
https://api.wellsaidlabs.com/v1/tts/clips
An example curl
command:
curl --location 'https://api.wellsaidlabs.com/v1/tts/clips' \
--header 'X-API-KEY: <api-key-here>'
--header 'accept: */*' \
--header 'content-type: application/json' \
--data '
{
"speaker_id": 7,
"text": "Hello, world"
}
'
Response
Below is an example of a successful response showing one avatar with the following structure:
{
"clip_id": "YOUR_CLIP_ID"
}
Make a GET request to this URL, including your API key in the header:
https://docs.wellsaidlabs.com/reference/get_clips
An example curl
command:
curl --request GET \
--url https://api.wellsaidlabs.com/v1/tts/clips \
--header 'X-API-KEY: YOUR_API_KEY' \
Response
Below is an example of a successful response showing one avatar with the following structure:{
[
{
"id": "YOUR_CLIP_ID",
"status": "COMPLETE",
"url": "URL_TO_DOWNLOAD_CLIP"
},
{
"id": "YOUR_CLIP_ID",
"status": "COMPLETE",
"url": "URL_TO_DOWNLOAD_CLIP"
}
]
Details of response
Field | type | notes |
---|---|---|
text | string | The text you want synthesized into speech by Wellsaid |
clip_id | string | The ID of the clip being generated by the text-to-speech models |
speaker_id | integer | The Avatar you want to use for this request. See list here |
status | string | Indicates the status of the clip and could read "PROCESSING", "FAILED", "COMPLETE" |
url | string | The url where you can go to hear and download your clip once it has completed processing. The clip will remain available for one week. |