Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.tavus.io/llms.txt

Use this file to discover all available pages before exploring further.

This guide is for training a replica through the API with train_image_url and voice_name. If you prefer a guided flow with instant feedback on whether your image passes checks, use the Tavus Developer Portal.

Outcome

You will POST /v2/replicas with train_image_url and voice_name, then poll GET /v2/replicas/{replica_id} until training finishes.

Prerequisites

  • A headshot and composition rules in Training from an image.
  • A valid voice_name slug (stock voice). See example voice_name values on that page.
  • A publicly downloadable URL for the image (for example a presigned S3 GET URL). Keep it valid for at least 24 hours after submission.

1. Create the replica

Default model is phoenix-4. Do not send train_video_url and train_image_url in the same request.
curl --request POST \
  --url https://tavusapi.com/v2/replicas \
  --header 'Content-Type: application/json' \
  --header "x-api-key: $TAVUS_API_KEY" \
  --data '{
    "callback_url": "",
    "replica_name": "my_image_replica",
    "train_image_url": "https://example.com/headshot.png",
    "voice_name": "anna"
  }'

2. Poll replica status

Use Get Replica:
curl --request GET \
  --url "https://tavusapi.com/v2/replicas/$REPLICA_ID" \
  --header "x-api-key: $TAVUS_API_KEY"
Training usually takes 3–4 hours. Optional: set callback_url to receive status webhooks.

3. Start a conversation

Generate a conversation with your replica using Create Conversation
curl --request POST \
  --url https://tavusapi.com/v2/conversations \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: $TAVUS_API_KEY" \
  --data '
{
  "replica_id": $REPLICA_ID" 
}
'