Create Deployment
curl --request POST \
--url https://tavusapi.com/v2/deployments \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"pal_id": "pcb7a34da5fe",
"name": "<string>",
"password": "<string>",
"customization": {},
"limits": {},
"allowed_origins": [
"<string>"
]
}
'import requests
url = "https://tavusapi.com/v2/deployments"
payload = {
"pal_id": "pcb7a34da5fe",
"name": "<string>",
"password": "<string>",
"customization": {},
"limits": {},
"allowed_origins": ["<string>"]
}
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({
pal_id: 'pcb7a34da5fe',
name: '<string>',
password: '<string>',
customization: {},
limits: {},
allowed_origins: ['<string>']
})
};
fetch('https://tavusapi.com/v2/deployments', 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://tavusapi.com/v2/deployments",
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([
'pal_id' => 'pcb7a34da5fe',
'name' => '<string>',
'password' => '<string>',
'customization' => [
],
'limits' => [
],
'allowed_origins' => [
'<string>'
]
]),
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://tavusapi.com/v2/deployments"
payload := strings.NewReader("{\n \"pal_id\": \"pcb7a34da5fe\",\n \"name\": \"<string>\",\n \"password\": \"<string>\",\n \"customization\": {},\n \"limits\": {},\n \"allowed_origins\": [\n \"<string>\"\n ]\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://tavusapi.com/v2/deployments")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"pal_id\": \"pcb7a34da5fe\",\n \"name\": \"<string>\",\n \"password\": \"<string>\",\n \"customization\": {},\n \"limits\": {},\n \"allowed_origins\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tavusapi.com/v2/deployments")
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 \"pal_id\": \"pcb7a34da5fe\",\n \"name\": \"<string>\",\n \"password\": \"<string>\",\n \"customization\": {},\n \"limits\": {},\n \"allowed_origins\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"deployment_id": "d1234567890abcdef",
"pal_id": "pcb7a34da5fe",
"channel": "widget",
"status": "draft",
"name": "<string>",
"has_password": true,
"customization": {},
"replica_thumbnail_video_url": "<string>",
"thumbnail_video_url": "<string>",
"thumbnail_image_url": "<string>",
"limits": {},
"allowed_origins": [
"<string>"
],
"usage_total": 123,
"usage_today": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>"
}{
"message": "Invalid access token"
}Deployments
Create Deployment
Create a managed deployment for the widget, embed, or landing-page channel.
See Deployments overview.
POST
/
v2
/
deployments
Create Deployment
curl --request POST \
--url https://tavusapi.com/v2/deployments \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"pal_id": "pcb7a34da5fe",
"name": "<string>",
"password": "<string>",
"customization": {},
"limits": {},
"allowed_origins": [
"<string>"
]
}
'import requests
url = "https://tavusapi.com/v2/deployments"
payload = {
"pal_id": "pcb7a34da5fe",
"name": "<string>",
"password": "<string>",
"customization": {},
"limits": {},
"allowed_origins": ["<string>"]
}
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({
pal_id: 'pcb7a34da5fe',
name: '<string>',
password: '<string>',
customization: {},
limits: {},
allowed_origins: ['<string>']
})
};
fetch('https://tavusapi.com/v2/deployments', 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://tavusapi.com/v2/deployments",
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([
'pal_id' => 'pcb7a34da5fe',
'name' => '<string>',
'password' => '<string>',
'customization' => [
],
'limits' => [
],
'allowed_origins' => [
'<string>'
]
]),
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://tavusapi.com/v2/deployments"
payload := strings.NewReader("{\n \"pal_id\": \"pcb7a34da5fe\",\n \"name\": \"<string>\",\n \"password\": \"<string>\",\n \"customization\": {},\n \"limits\": {},\n \"allowed_origins\": [\n \"<string>\"\n ]\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://tavusapi.com/v2/deployments")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"pal_id\": \"pcb7a34da5fe\",\n \"name\": \"<string>\",\n \"password\": \"<string>\",\n \"customization\": {},\n \"limits\": {},\n \"allowed_origins\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tavusapi.com/v2/deployments")
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 \"pal_id\": \"pcb7a34da5fe\",\n \"name\": \"<string>\",\n \"password\": \"<string>\",\n \"customization\": {},\n \"limits\": {},\n \"allowed_origins\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"deployment_id": "d1234567890abcdef",
"pal_id": "pcb7a34da5fe",
"channel": "widget",
"status": "draft",
"name": "<string>",
"has_password": true,
"customization": {},
"replica_thumbnail_video_url": "<string>",
"thumbnail_video_url": "<string>",
"thumbnail_image_url": "<string>",
"limits": {},
"allowed_origins": [
"<string>"
],
"usage_total": 123,
"usage_today": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>"
}{
"message": "Invalid access token"
}For AI agents, use
https://docs.tavus.io/openapi.yaml for the full HTTP API contract.Authorizations
Body
application/json
PAL that powers the deployment.
Example:
"pcb7a34da5fe"
Delivery channel. See Deployments overview.
Available options:
widget, embed, landing-page Display name in the Platform.
Optional password visitors must enter before starting.
Visual and conversation settings. Configure in the Platform or via JSON Patch on update.
Call limits and max duration.
Origins allowed to load widget/embed deployments.
Response
Deployment created
A managed deployment. See Deployments overview.
Example:
"d1234567890abcdef"
PAL that powers the deployment.
Example:
"pcb7a34da5fe"
Available options:
widget, embed, landing-page Available options:
draft, active, inactive Removed. Use thumbnail_video_url and thumbnail_image_url instead.
URL for the face preview video thumbnail.
URL for the face preview image thumbnail.

