Replacements

Create Replacement

Changed on

This endpoint is no longer supported by Tavus.

This endpoint creates a test word replacement request that will modify specific words or phrases in an existing video.

post/v2/replacements

Request

  • Base URL
    https://tavusapi.com
  • URL
    https://tavusapi.com/v2/replacements
  • Auth
    API key in header x-api-key

Request body

original_video_urlstring required

A direct link to the video that will be modified. This should be a publicly accessible / presigned S3 URL.

transcription_idstring

A unique identifier for the transcription.

new_transcriptstring required

The new text that will replace the old text in the video. This should be an edited version of the text returned from the transcription service (referenced by transcription_id). Both the original transcription and this new text are used to identify which words to replace.

callback_urlstring

A url that will receive a callback on completion of the replacement or on error.

replacement_namestring

An optional name for the replacement.

Example request

{
  "original_video_url": "https://example.com/video.mp4",
  "transcription_id": "t0108f2d24k2a",
  "new_transcript": "Hello John, I'm excited to show you our new product!",
  "callback_url": "https://your-callback-url.com",
  "replacement_name": "My First Replacement"
}

Response

replacement_idstring

A unique identifier for the replacement.

statusstring

The status of the replacement.

created_atstring

The date and time the replacement was created.

Example response

{
  "replacement_id": "w0108f2d24k2a"
}

Changes