Customizations
Call Time
Configure call duration and timeout behavior to manage how and when a conversation ends.
Create a Conversation with Custom Duration and Timeout
1
Step 1: Get an API Key
- Go to the Tavus platform and select API Key from the sidebar menu.
- Click Create New Key to begin generating your API key.
- Enter a name for the key and (optional) specify allowed IP addresses, then click Create API Key.
- 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).
Use the following request body example:
cURL
Note: Replace <api_key>
with your actual API key.
The request example above includes the following customizations:
Parameter | Description |
---|---|
max_call_durations | Sets the maximum call length in seconds. Maximum: 3600 seconds. |
participant_left_timeout | Time (in seconds) to wait before ending the call after the last participant leaves. Default: 0. |
participant_absent_timeout | Time (in seconds) to end the call if no one joins after it’s created. Default: 300. |
3
Step 3: Join the Conversation
To join the conversation, click the link in the conversation_url field from the response:
Based on the call time settings above:
- The conversation will automatically end after 1800 seconds (30 minutes), regardless of activity.
- If the participant leaves the conversation, it will end 60 seconds after they disconnect.
- If the participant is present but inactive (e.g., not speaking or engaging), the conversation ends after 120 seconds of inactivity.