Create Embed V2
curl --request POST \
--url https://api.liveavatar.com/v2/embeddings \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"avatar_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"context_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"voice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"voice_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "DEFAULT",
"max_session_duration": 123,
"default_language": "<string>",
"is_sandbox": false,
"orientation": "horizontal"
}
'import requests
url = "https://api.liveavatar.com/v2/embeddings"
payload = {
"avatar_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"context_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"voice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"voice_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "DEFAULT",
"max_session_duration": 123,
"default_language": "<string>",
"is_sandbox": False,
"orientation": "horizontal"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
avatar_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
context_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
voice_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
voice_agent_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
type: 'DEFAULT',
max_session_duration: 123,
default_language: '<string>',
is_sandbox: false,
orientation: 'horizontal'
})
};
fetch('https://api.liveavatar.com/v2/embeddings', 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.liveavatar.com/v2/embeddings",
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([
'avatar_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'context_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'voice_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'voice_agent_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'type' => 'DEFAULT',
'max_session_duration' => 123,
'default_language' => '<string>',
'is_sandbox' => false,
'orientation' => 'horizontal'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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.liveavatar.com/v2/embeddings"
payload := strings.NewReader("{\n \"avatar_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"context_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"voice_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"voice_agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"type\": \"DEFAULT\",\n \"max_session_duration\": 123,\n \"default_language\": \"<string>\",\n \"is_sandbox\": false,\n \"orientation\": \"horizontal\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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.liveavatar.com/v2/embeddings")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"avatar_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"context_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"voice_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"voice_agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"type\": \"DEFAULT\",\n \"max_session_duration\": 123,\n \"default_language\": \"<string>\",\n \"is_sandbox\": false,\n \"orientation\": \"horizontal\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.liveavatar.com/v2/embeddings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"avatar_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"context_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"voice_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"voice_agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"type\": \"DEFAULT\",\n \"max_session_duration\": 123,\n \"default_language\": \"<string>\",\n \"is_sandbox\": false,\n \"orientation\": \"horizontal\"\n}"
response = http.request(request)
puts response.read_body{
"code": 100,
"data": {
"embed_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"script": "<string>",
"orientation": "horizontal"
},
"message": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Embeddings
Create Embed V2
Create an embed avatar with sandbox support.
POST
/
v2
/
embeddings
Create Embed V2
curl --request POST \
--url https://api.liveavatar.com/v2/embeddings \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"avatar_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"context_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"voice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"voice_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "DEFAULT",
"max_session_duration": 123,
"default_language": "<string>",
"is_sandbox": false,
"orientation": "horizontal"
}
'import requests
url = "https://api.liveavatar.com/v2/embeddings"
payload = {
"avatar_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"context_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"voice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"voice_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "DEFAULT",
"max_session_duration": 123,
"default_language": "<string>",
"is_sandbox": False,
"orientation": "horizontal"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
avatar_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
context_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
voice_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
voice_agent_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
type: 'DEFAULT',
max_session_duration: 123,
default_language: '<string>',
is_sandbox: false,
orientation: 'horizontal'
})
};
fetch('https://api.liveavatar.com/v2/embeddings', 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.liveavatar.com/v2/embeddings",
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([
'avatar_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'context_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'voice_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'voice_agent_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'type' => 'DEFAULT',
'max_session_duration' => 123,
'default_language' => '<string>',
'is_sandbox' => false,
'orientation' => 'horizontal'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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.liveavatar.com/v2/embeddings"
payload := strings.NewReader("{\n \"avatar_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"context_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"voice_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"voice_agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"type\": \"DEFAULT\",\n \"max_session_duration\": 123,\n \"default_language\": \"<string>\",\n \"is_sandbox\": false,\n \"orientation\": \"horizontal\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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.liveavatar.com/v2/embeddings")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"avatar_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"context_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"voice_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"voice_agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"type\": \"DEFAULT\",\n \"max_session_duration\": 123,\n \"default_language\": \"<string>\",\n \"is_sandbox\": false,\n \"orientation\": \"horizontal\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.liveavatar.com/v2/embeddings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"avatar_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"context_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"voice_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"voice_agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"type\": \"DEFAULT\",\n \"max_session_duration\": 123,\n \"default_language\": \"<string>\",\n \"is_sandbox\": false,\n \"orientation\": \"horizontal\"\n}"
response = http.request(request)
puts response.read_body{
"code": 100,
"data": {
"embed_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"script": "<string>",
"orientation": "horizontal"
},
"message": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Cookies
Body
application/json
Resolve voice / context from a stored voice_agent (the new primitive). Mutually exclusive with voice_id / context_id.
Available options:
DEFAULT, WIDGET Max session duration in seconds
Default language code (e.g. 'en', 'es', 'multi')
Maximum string length:
5Whether to enable sandbox mode for sessions
Embed orientation: horizontal (16:9) or vertical (9:16)
Available options:
horizontal, vertical Was this page helpful?
⌘I