Skip to main content
POST
cURL

About Request Data Structure of Webhook

When using ‘text_to_speech’ API, if the ‘webhook_url’ is passed in the parameters, we will initiate a POST request to the webhook_url when the task succeeds or fails, with the following content:
Arguments:
  • id (string): The unique identifier of the job
  • status (string): The status of the job. Possible values are pending, in_queue, running, failed, done
  • failed_reason (string): The reason of the failure if the job failed
  • video_output (string): The URL of the video if the job is done
Note: We might send multiple requests for status changes.

Authorizations

X-API-ID
string
header
required

API ID, from your settings page.

X-API-KEY
string
header
required

API Key, from your settings page.

Body

script
string
required

Text to be converted to speech

Maximum string length: 8000
accent
string<uuid> | null

Accent to be used for the speech

webhook_url
string<uri> | null

Webhook URL for status updates. Default is null.

Maximum string length: 200

Response

201 - application/json
id
string<uuid>
required
read-only
script
string
required

Text to be converted to speech

Maximum string length: 8000
output
string
required
read-only

Output audio url

media_job
string | null
required
read-only
credits_used
number
required
read-only

Credits used in this API call

duration
integer
required
read-only

Duration of the video in seconds

is_hidden
boolean
required
read-only

Whether the job is hidden or not

status
string
required
read-only
failed_reason
string
required
read-only

Failed reason

created_at
string<date-time>
required
read-only
updated_at
string<date-time>
required
read-only
accent
string<uuid> | null

Accent to be used for the speech

webhook_url
string<uri> | null

Webhook URL for status updates. Default is null.

Maximum string length: 200