curl --request POST \ --url https://api.vivix.ai/v1/realtime-avatar/sessions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "model": "vivix-a1-stream", "output": { "aspect_ratio": "9:16", "resolution": "720p" }, "avatars": [ { "avatar_id": "companion", "persona": "You are a warm, curious conversation companion. Speak in relaxed English and keep everyday replies brief. Acknowledge corrections without making excuses. Use small smiles and gentle nods, then let your hands rest while listening.", "visual": { "source_images": [ { "source_image_id": "front", "url": "https://static.vivi-x.ai/images/2026/07/20/b9b8e89651cd24ad.png", "media_type": "image/png", "description": "A young woman with curly black hair and a pink shirt, facing the camera in a softly lit room." } ] } } ], "pipeline_config": { "tts_config": { "tts_voice_id": "longanhuan_v3.6" } }}'
import requests
url = "https://api.vivix.ai/v1/realtime-avatar/sessions"
payload = {
"model": "vivix-a1-stream",
"output": {
"aspect_ratio": "9:16",
"resolution": "720p"
},
"avatars": [
{
"avatar_id": "companion",
"persona": "You are a warm, curious conversation companion. Speak in relaxed English and keep everyday replies brief. Acknowledge corrections without making excuses. Use small smiles and gentle nods, then let your hands rest while listening.",
"visual": { "source_images": [
{
"source_image_id": "front",
"url": "https://static.vivi-x.ai/images/2026/07/20/b9b8e89651cd24ad.png",
"media_type": "image/png",
"description": "A young woman with curly black hair and a pink shirt, facing the camera in a softly lit room."
}
] }
}
],
"pipeline_config": { "tts_config": { "tts_voice_id": "longanhuan_v3.6" } }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'vivix-a1-stream',
output: {aspect_ratio: '9:16', resolution: '720p'},
avatars: [
{
avatar_id: 'companion',
persona: 'You are a warm, curious conversation companion. Speak in relaxed English and keep everyday replies brief. Acknowledge corrections without making excuses. Use small smiles and gentle nods, then let your hands rest while listening.',
visual: {
source_images: [
{
source_image_id: 'front',
url: 'https://static.vivi-x.ai/images/2026/07/20/b9b8e89651cd24ad.png',
media_type: 'image/png',
description: 'A young woman with curly black hair and a pink shirt, facing the camera in a softly lit room.'
}
]
}
}
],
pipeline_config: {tts_config: {tts_voice_id: 'longanhuan_v3.6'}}
})
};
fetch('https://api.vivix.ai/v1/realtime-avatar/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vivix.ai/v1/realtime-avatar/sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'vivix-a1-stream',
'output' => [
'aspect_ratio' => '9:16',
'resolution' => '720p'
],
'avatars' => [
[
'avatar_id' => 'companion',
'persona' => 'You are a warm, curious conversation companion. Speak in relaxed English and keep everyday replies brief. Acknowledge corrections without making excuses. Use small smiles and gentle nods, then let your hands rest while listening.',
'visual' => [
'source_images' => [
[
'source_image_id' => 'front',
'url' => 'https://static.vivi-x.ai/images/2026/07/20/b9b8e89651cd24ad.png',
'media_type' => 'image/png',
'description' => 'A young woman with curly black hair and a pink shirt, facing the camera in a softly lit room.'
]
]
]
]
],
'pipeline_config' => [
'tts_config' => [
'tts_voice_id' => 'longanhuan_v3.6'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vivix.ai/v1/realtime-avatar/sessions"
payload := strings.NewReader("{\n \"model\": \"vivix-a1-stream\",\n \"output\": {\n \"aspect_ratio\": \"9:16\",\n \"resolution\": \"720p\"\n },\n \"avatars\": [\n {\n \"avatar_id\": \"companion\",\n \"persona\": \"You are a warm, curious conversation companion. Speak in relaxed English and keep everyday replies brief. Acknowledge corrections without making excuses. Use small smiles and gentle nods, then let your hands rest while listening.\",\n \"visual\": {\n \"source_images\": [\n {\n \"source_image_id\": \"front\",\n \"url\": \"https://static.vivi-x.ai/images/2026/07/20/b9b8e89651cd24ad.png\",\n \"media_type\": \"image/png\",\n \"description\": \"A young woman with curly black hair and a pink shirt, facing the camera in a softly lit room.\"\n }\n ]\n }\n }\n ],\n \"pipeline_config\": {\n \"tts_config\": {\n \"tts_voice_id\": \"longanhuan_v3.6\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.post("https://api.vivix.ai/v1/realtime-avatar/sessions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"vivix-a1-stream\",\n \"output\": {\n \"aspect_ratio\": \"9:16\",\n \"resolution\": \"720p\"\n },\n \"avatars\": [\n {\n \"avatar_id\": \"companion\",\n \"persona\": \"You are a warm, curious conversation companion. Speak in relaxed English and keep everyday replies brief. Acknowledge corrections without making excuses. Use small smiles and gentle nods, then let your hands rest while listening.\",\n \"visual\": {\n \"source_images\": [\n {\n \"source_image_id\": \"front\",\n \"url\": \"https://static.vivi-x.ai/images/2026/07/20/b9b8e89651cd24ad.png\",\n \"media_type\": \"image/png\",\n \"description\": \"A young woman with curly black hair and a pink shirt, facing the camera in a softly lit room.\"\n }\n ]\n }\n }\n ],\n \"pipeline_config\": {\n \"tts_config\": {\n \"tts_voice_id\": \"longanhuan_v3.6\"\n }\n }\n}")
.asString();
require 'uri'
require 'net/http'
url = URI("https://api.vivix.ai/v1/realtime-avatar/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"vivix-a1-stream\",\n \"output\": {\n \"aspect_ratio\": \"9:16\",\n \"resolution\": \"720p\"\n },\n \"avatars\": [\n {\n \"avatar_id\": \"companion\",\n \"persona\": \"You are a warm, curious conversation companion. Speak in relaxed English and keep everyday replies brief. Acknowledge corrections without making excuses. Use small smiles and gentle nods, then let your hands rest while listening.\",\n \"visual\": {\n \"source_images\": [\n {\n \"source_image_id\": \"front\",\n \"url\": \"https://static.vivi-x.ai/images/2026/07/20/b9b8e89651cd24ad.png\",\n \"media_type\": \"image/png\",\n \"description\": \"A young woman with curly black hair and a pink shirt, facing the camera in a softly lit room.\"\n }\n ]\n }\n }\n ],\n \"pipeline_config\": {\n \"tts_config\": {\n \"tts_voice_id\": \"longanhuan_v3.6\"\n }\n }\n}"
response = http.request(request)
puts response.read_body
{ "code": 0, "message": "success", "data": { "session_id": "avatar-session-123", "status": "active", "session": { "mode": "video_avatar", "active_avatar_id": "companion", "source_image_id": "front" }, "control": { "url": "wss://api.vivix.ai/v1/realtime-avatar/control?session_id=avatar-session-123", "client_secret": "ctl_..." }, "output": { "aspect_ratio": "9:16", "resolution": "720p" }, "delivery": { "media": { "transport": "trtc", "trtc": { "sdk_app_id": "1400000000", "room_id": "avatar-session-123", "user_id": "viewer", "user_sig": "...", "publisher_user_id": "publisher_xxx" } } }, "model": "vivix-a1-stream", "expires_at": "2026-07-16T10:05:00Z", "recording_mode": "off", "auto_close": { "disconnected_timeout_seconds": 0, "interaction_idle_timeout_seconds": 0 }, "conversation": { "tools": [], "turn_detection": { "type": "server_vad", "silence_duration_ms": 500 } }, "avatars": [ { "avatar_id": "companion", "persona": "You are a warm, curious conversation companion. Speak in relaxed English and keep everyday replies brief. Acknowledge corrections without making excuses. Use small smiles and gentle nods, then let your hands rest while listening.", "visual": { "source_images": [ { "source_image_id": "front", "url": "https://static.vivi-x.ai/images/2026/07/20/b9b8e89651cd24ad.png", "media_type": "image/png" } ] } } ] }}
curl --request POST \ --url https://api.vivix.ai/v1/realtime-avatar/sessions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "model": "vivix-a1-stream", "output": { "aspect_ratio": "9:16", "resolution": "720p" }, "avatars": [ { "avatar_id": "companion", "persona": "You are a warm, curious conversation companion. Speak in relaxed English and keep everyday replies brief. Acknowledge corrections without making excuses. Use small smiles and gentle nods, then let your hands rest while listening.", "visual": { "source_images": [ { "source_image_id": "front", "url": "https://static.vivi-x.ai/images/2026/07/20/b9b8e89651cd24ad.png", "media_type": "image/png", "description": "A young woman with curly black hair and a pink shirt, facing the camera in a softly lit room." } ] } } ], "pipeline_config": { "tts_config": { "tts_voice_id": "longanhuan_v3.6" } }}'
import requests
url = "https://api.vivix.ai/v1/realtime-avatar/sessions"
payload = {
"model": "vivix-a1-stream",
"output": {
"aspect_ratio": "9:16",
"resolution": "720p"
},
"avatars": [
{
"avatar_id": "companion",
"persona": "You are a warm, curious conversation companion. Speak in relaxed English and keep everyday replies brief. Acknowledge corrections without making excuses. Use small smiles and gentle nods, then let your hands rest while listening.",
"visual": { "source_images": [
{
"source_image_id": "front",
"url": "https://static.vivi-x.ai/images/2026/07/20/b9b8e89651cd24ad.png",
"media_type": "image/png",
"description": "A young woman with curly black hair and a pink shirt, facing the camera in a softly lit room."
}
] }
}
],
"pipeline_config": { "tts_config": { "tts_voice_id": "longanhuan_v3.6" } }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'vivix-a1-stream',
output: {aspect_ratio: '9:16', resolution: '720p'},
avatars: [
{
avatar_id: 'companion',
persona: 'You are a warm, curious conversation companion. Speak in relaxed English and keep everyday replies brief. Acknowledge corrections without making excuses. Use small smiles and gentle nods, then let your hands rest while listening.',
visual: {
source_images: [
{
source_image_id: 'front',
url: 'https://static.vivi-x.ai/images/2026/07/20/b9b8e89651cd24ad.png',
media_type: 'image/png',
description: 'A young woman with curly black hair and a pink shirt, facing the camera in a softly lit room.'
}
]
}
}
],
pipeline_config: {tts_config: {tts_voice_id: 'longanhuan_v3.6'}}
})
};
fetch('https://api.vivix.ai/v1/realtime-avatar/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vivix.ai/v1/realtime-avatar/sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'vivix-a1-stream',
'output' => [
'aspect_ratio' => '9:16',
'resolution' => '720p'
],
'avatars' => [
[
'avatar_id' => 'companion',
'persona' => 'You are a warm, curious conversation companion. Speak in relaxed English and keep everyday replies brief. Acknowledge corrections without making excuses. Use small smiles and gentle nods, then let your hands rest while listening.',
'visual' => [
'source_images' => [
[
'source_image_id' => 'front',
'url' => 'https://static.vivi-x.ai/images/2026/07/20/b9b8e89651cd24ad.png',
'media_type' => 'image/png',
'description' => 'A young woman with curly black hair and a pink shirt, facing the camera in a softly lit room.'
]
]
]
]
],
'pipeline_config' => [
'tts_config' => [
'tts_voice_id' => 'longanhuan_v3.6'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vivix.ai/v1/realtime-avatar/sessions"
payload := strings.NewReader("{\n \"model\": \"vivix-a1-stream\",\n \"output\": {\n \"aspect_ratio\": \"9:16\",\n \"resolution\": \"720p\"\n },\n \"avatars\": [\n {\n \"avatar_id\": \"companion\",\n \"persona\": \"You are a warm, curious conversation companion. Speak in relaxed English and keep everyday replies brief. Acknowledge corrections without making excuses. Use small smiles and gentle nods, then let your hands rest while listening.\",\n \"visual\": {\n \"source_images\": [\n {\n \"source_image_id\": \"front\",\n \"url\": \"https://static.vivi-x.ai/images/2026/07/20/b9b8e89651cd24ad.png\",\n \"media_type\": \"image/png\",\n \"description\": \"A young woman with curly black hair and a pink shirt, facing the camera in a softly lit room.\"\n }\n ]\n }\n }\n ],\n \"pipeline_config\": {\n \"tts_config\": {\n \"tts_voice_id\": \"longanhuan_v3.6\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.post("https://api.vivix.ai/v1/realtime-avatar/sessions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"vivix-a1-stream\",\n \"output\": {\n \"aspect_ratio\": \"9:16\",\n \"resolution\": \"720p\"\n },\n \"avatars\": [\n {\n \"avatar_id\": \"companion\",\n \"persona\": \"You are a warm, curious conversation companion. Speak in relaxed English and keep everyday replies brief. Acknowledge corrections without making excuses. Use small smiles and gentle nods, then let your hands rest while listening.\",\n \"visual\": {\n \"source_images\": [\n {\n \"source_image_id\": \"front\",\n \"url\": \"https://static.vivi-x.ai/images/2026/07/20/b9b8e89651cd24ad.png\",\n \"media_type\": \"image/png\",\n \"description\": \"A young woman with curly black hair and a pink shirt, facing the camera in a softly lit room.\"\n }\n ]\n }\n }\n ],\n \"pipeline_config\": {\n \"tts_config\": {\n \"tts_voice_id\": \"longanhuan_v3.6\"\n }\n }\n}")
.asString();
require 'uri'
require 'net/http'
url = URI("https://api.vivix.ai/v1/realtime-avatar/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"vivix-a1-stream\",\n \"output\": {\n \"aspect_ratio\": \"9:16\",\n \"resolution\": \"720p\"\n },\n \"avatars\": [\n {\n \"avatar_id\": \"companion\",\n \"persona\": \"You are a warm, curious conversation companion. Speak in relaxed English and keep everyday replies brief. Acknowledge corrections without making excuses. Use small smiles and gentle nods, then let your hands rest while listening.\",\n \"visual\": {\n \"source_images\": [\n {\n \"source_image_id\": \"front\",\n \"url\": \"https://static.vivi-x.ai/images/2026/07/20/b9b8e89651cd24ad.png\",\n \"media_type\": \"image/png\",\n \"description\": \"A young woman with curly black hair and a pink shirt, facing the camera in a softly lit room.\"\n }\n ]\n }\n }\n ],\n \"pipeline_config\": {\n \"tts_config\": {\n \"tts_voice_id\": \"longanhuan_v3.6\"\n }\n }\n}"
response = http.request(request)
puts response.read_body
{ "code": 0, "message": "success", "data": { "session_id": "avatar-session-123", "status": "active", "session": { "mode": "video_avatar", "active_avatar_id": "companion", "source_image_id": "front" }, "control": { "url": "wss://api.vivix.ai/v1/realtime-avatar/control?session_id=avatar-session-123", "client_secret": "ctl_..." }, "output": { "aspect_ratio": "9:16", "resolution": "720p" }, "delivery": { "media": { "transport": "trtc", "trtc": { "sdk_app_id": "1400000000", "room_id": "avatar-session-123", "user_id": "viewer", "user_sig": "...", "publisher_user_id": "publisher_xxx" } } }, "model": "vivix-a1-stream", "expires_at": "2026-07-16T10:05:00Z", "recording_mode": "off", "auto_close": { "disconnected_timeout_seconds": 0, "interaction_idle_timeout_seconds": 0 }, "conversation": { "tools": [], "turn_detection": { "type": "server_vad", "silence_duration_ms": 500 } }, "avatars": [ { "avatar_id": "companion", "persona": "You are a warm, curious conversation companion. Speak in relaxed English and keep everyday replies brief. Acknowledge corrections without making excuses. Use small smiles and gentle nods, then let your hands rest while listening.", "visual": { "source_images": [ { "source_image_id": "front", "url": "https://static.vivi-x.ai/images/2026/07/20/b9b8e89651cd24ad.png", "media_type": "image/png" } ] } } ] }}