tavus-cvi-quickstart
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTavus CVI Quick Start
Tavus CVI 快速入门
Get a real-time AI video conversation running in minutes.
几分钟内启动实时AI视频对话。
Fastest Path: Use Stock Resources
最快路径:使用预置资源
bash
curl -X POST https://tavusapi.com/v2/conversations \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"replica_id": "rfe12d8b9597",
"persona_id": "pdced222244b"
}'Response:
json
{
"conversation_id": "c123456",
"conversation_url": "https://tavus.daily.co/c123456",
"status": "active"
}Open in browser to join the call.
conversation_urlbash
curl -X POST https://tavusapi.com/v2/conversations \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"replica_id": "rfe12d8b9597",
"persona_id": "pdced222244b"
}'响应:
json
{
"conversation_id": "c123456",
"conversation_url": "https://tavus.daily.co/c123456",
"status": "active"
}在浏览器中打开即可加入通话。
conversation_urlStock Resources
预置资源
Replicas (the visual avatar):
- - Default
rfe12d8b9597 - - Nathan
re8e740a42
Personas (behavior/personality):
- - Default
pdced222244b - - Celebrity DJ
p24293d6
Replica(虚拟形象):
- - 默认形象
rfe12d8b9597 - - Nathan
re8e740a42
Persona(行为/性格设定):
- - 默认设定
pdced222244b - - 名人DJ
p24293d6
Create Custom Persona + Conversation
创建自定义Persona + 对话
Step 1: Create Persona
步骤1:创建Persona
bash
curl -X POST https://tavusapi.com/v2/personas \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"persona_name": "Sales Coach",
"pipeline_mode": "full",
"system_prompt": "You are a friendly sales coach helping reps practice cold calls. Ask probing questions and give constructive feedback.",
"context": "Focus on B2B SaaS sales scenarios.",
"default_replica_id": "rfe12d8b9597"
}'Response:
json
{
"persona_id": "p123456",
"persona_name": "Sales Coach"
}bash
curl -X POST https://tavusapi.com/v2/personas \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"persona_name": "Sales Coach",
"pipeline_mode": "full",
"system_prompt": "You are a friendly sales coach helping reps practice cold calls. Ask probing questions and give constructive feedback.",
"context": "Focus on B2B SaaS sales scenarios.",
"default_replica_id": "rfe12d8b9597"
}'响应:
json
{
"persona_id": "p123456",
"persona_name": "Sales Coach"
}Step 2: Start Conversation
步骤2:启动对话
bash
curl -X POST https://tavusapi.com/v2/conversations \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"persona_id": "p123456",
"conversation_name": "Practice Session"
}'bash
curl -X POST https://tavusapi.com/v2/conversations \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"persona_id": "p123456",
"conversation_name": "Practice Session"
}'Conversation Options
对话选项
json
{
"persona_id": "p123456",
"replica_id": "rfe12d8b9597",
"conversation_name": "Demo Call",
"conversational_context": "User is interested in enterprise pricing.",
"custom_greeting": "Hi! I'm excited to help you today.",
"callback_url": "https://your-webhook.com/tavus",
"properties": {
"enable_recording": true,
"max_duration": 600
}
}json
{
"persona_id": "p123456",
"replica_id": "rfe12d8b9597",
"conversation_name": "Demo Call",
"conversational_context": "User is interested in enterprise pricing.",
"custom_greeting": "Hi! I'm excited to help you today.",
"callback_url": "https://your-webhook.com/tavus",
"properties": {
"enable_recording": true,
"max_duration": 600
}
}End Conversation
结束对话
bash
curl -X POST https://tavusapi.com/v2/conversations/{conversation_id}/end \
-H "x-api-key: YOUR_API_KEY"bash
curl -X POST https://tavusapi.com/v2/conversations/{conversation_id}/end \
-H "x-api-key: YOUR_API_KEY"Key Concepts
核心概念
| Concept | What it is |
|---|---|
| Replica | The visual avatar (face, appearance) |
| Persona | Behavior, voice, LLM config, system prompt |
| Conversation | A live WebRTC session combining replica + persona |
| 概念 | 定义 |
|---|---|
| Replica | 虚拟形象(面部、外观) |
| Persona | 行为、语音、LLM配置、系统提示词 |
| Conversation | 结合Replica与Persona的实时WebRTC会话 |
Pipeline Modes
管道模式
- - Complete CVI with perception, STT, LLM, TTS (recommended)
full - - Bypass LLM, replica speaks what you send directly
echo - - Audio-only, no video
audio
- - 完整CVI,包含感知、STT、LLM、TTS(推荐)
full - - 绕过LLM,Replica直接复述你发送的内容
echo - - 仅音频,无视频
audio
Latency
延迟
~600ms utterance-to-utterance response time with full pipeline.
完整管道下,话语到话语的响应时间约为600ms。
Next Steps
后续步骤
- tavus-cvi-persona - Deep dive on persona configuration
- tavus-cvi-ui - React component integration
- tavus-cvi-interactions - Control conversations programmatically
- tavus-cvi-knowledge - Add knowledge base and memories
- tavus-cvi-persona - 深入了解Persona配置
- tavus-cvi-ui - React组件集成
- tavus-cvi-interactions - 以编程方式控制对话
- tavus-cvi-knowledge - 添加知识库与记忆功能