Enable Captions in Real Time During the Conversation

1

Step 1: Get an API Key

  1. Go to the Tavus platform and select API Key from the sidebar menu.
  2. Click Create New Key to begin generating your API key.
  3. Enter a name for the key and (optional) specify allowed IP addresses, then click Create API Key.
  4. Copy your newly created API key and store it securely.

We cannot recover your API Key if you lose it.

2

Step 2: Create Your Conversation

In this example, we will use stock replica ID rfe12d8b9597 (Nathan) and stock persona ID pdced222244b (Sales Coach).

To enable closed captions, set the enable_closed_captions parameter to true when creating the conversation:

cURL
curl --request POST \
  --url https://tavusapi.com/v2/conversations \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api_key>' \
  --data '{
  "persona_id": "pdced222244b",
  "replica_id": "rfe12d8b9597",
  "callback_url": "https://yourwebsite.com/webhook",
  "conversation_name": "Improve Sales Technique",
  "conversational_context": "I want to improve my sales techniques. Help me practice handling common objections from clients and closing deals more effectively.",
  "properties": {
    "enable_closed_captions": true
   }
}'

Note: Replace <api_key> with your actual API key.

3

Step 3: Join the Conversation

To join the conversation, click the link in the conversation_url field from the response:

{
  "conversation_id": "ca4301628cb9",
  "conversation_name": "Improve Sales Technique",
  "conversation_url": "<conversation_link>",
  "status": "active",
  "callback_url": "https://yourwebsite.com/webhook",
  "created_at": "2025-05-13T06:42:58.291561Z"
}

Closed captions will appear during the conversation whenever you or the replica speaks.