POST
/
v2
/
videos
curl --request POST \
  --url https://tavusapi.com/v2/videos \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "background_url": "",
  "replica_id": "",
  "script": "",
  "video_name": ""
}'
{
  "video_id": "",
  "video_name": "<string>",
  "status": "<string>",
  "hosted_url": "<string>",
  "created_at": "<string>"
}

Authorizations

x-api-key
string
header
required

Body

application/json
script
string
required

A text script that will be used to generate the audio in the video.

Example:

"Hello from Tavus! Enjoy your new replica"

replica_id
string
required

A unique identifier for the replica that will be used to generate the video.

Example:

"r783537ef5"

video_name
string

A name for the video.

Example:

"My First Video"

background_url
string

A link to a website. This will be used as the background for the video. The website must be publicly accessible and properly formed.

Example:

""

background_source_url
string

A direct link to a video that is publicly accessible via a storage location such as an S3 bucket. This will be used as the background for the video. The video must be publicly accessible.

Example:

""

callback_url
string

A url that will receive a callback on completion of video generation or on error.

Example:

""

fast
boolean

If set to true, the video will be generated using a barebones fast rendering process. This will result in a faster generation of the video but some features will be disabled. Features such as background generation, thumbnail images, and streaming urls are not supported when using this fast rendering process.

Example:

false

transparent_background
boolean

If set to true, the generated video will be a .webm video with a transparent background.

Please note that this feature only works if the fast parameter is set to true.

Example:

false

properties
object

Response

200
application/json
video_id
string

A unique identifier for the video.

Example:

""

video_name
string

The name of the video.

status
string

The status of the video. Possible values: queued, generating, ready, deleted, error.

hosted_url
string

A direct link to view your video once generation has completed, hosted by Tavus.

created_at
string

The date and time the video was created.