Create a video
curl --request POST \
--url https://api.boson.ai/v1/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ref_image": "<string>",
"model": "higgs-avatar",
"input": "<string>",
"input_tts": {
"input": "Hello, this is a test.",
"model": "higgs-tts-3",
"voice": "default",
"response_format": "mp3",
"stream": false,
"ref_audio": "<string>",
"ref_text": "<string>",
"normalize": true,
"language": null,
"timestamps": false
},
"size": "640x640"
}
'import requests
url = "https://api.boson.ai/v1/videos"
payload = {
"ref_image": "<string>",
"model": "higgs-avatar",
"input": "<string>",
"input_tts": {
"input": "Hello, this is a test.",
"model": "higgs-tts-3",
"voice": "default",
"response_format": "mp3",
"stream": False,
"ref_audio": "<string>",
"ref_text": "<string>",
"normalize": True,
"language": None,
"timestamps": False
},
"size": "640x640"
}
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({
ref_image: '<string>',
model: 'higgs-avatar',
input: '<string>',
input_tts: {
input: 'Hello, this is a test.',
model: 'higgs-tts-3',
voice: 'default',
response_format: 'mp3',
stream: false,
ref_audio: '<string>',
ref_text: '<string>',
normalize: true,
language: null,
timestamps: false
},
size: '640x640'
})
};
fetch('https://api.boson.ai/v1/videos', 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.boson.ai/v1/videos",
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([
'ref_image' => '<string>',
'model' => 'higgs-avatar',
'input' => '<string>',
'input_tts' => [
'input' => 'Hello, this is a test.',
'model' => 'higgs-tts-3',
'voice' => 'default',
'response_format' => 'mp3',
'stream' => false,
'ref_audio' => '<string>',
'ref_text' => '<string>',
'normalize' => true,
'language' => null,
'timestamps' => false
],
'size' => '640x640'
]),
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.boson.ai/v1/videos"
payload := strings.NewReader("{\n \"ref_image\": \"<string>\",\n \"model\": \"higgs-avatar\",\n \"input\": \"<string>\",\n \"input_tts\": {\n \"input\": \"Hello, this is a test.\",\n \"model\": \"higgs-tts-3\",\n \"voice\": \"default\",\n \"response_format\": \"mp3\",\n \"stream\": false,\n \"ref_audio\": \"<string>\",\n \"ref_text\": \"<string>\",\n \"normalize\": true,\n \"language\": null,\n \"timestamps\": false\n },\n \"size\": \"640x640\"\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.boson.ai/v1/videos")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ref_image\": \"<string>\",\n \"model\": \"higgs-avatar\",\n \"input\": \"<string>\",\n \"input_tts\": {\n \"input\": \"Hello, this is a test.\",\n \"model\": \"higgs-tts-3\",\n \"voice\": \"default\",\n \"response_format\": \"mp3\",\n \"stream\": false,\n \"ref_audio\": \"<string>\",\n \"ref_text\": \"<string>\",\n \"normalize\": true,\n \"language\": null,\n \"timestamps\": false\n },\n \"size\": \"640x640\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.boson.ai/v1/videos")
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 \"ref_image\": \"<string>\",\n \"model\": \"higgs-avatar\",\n \"input\": \"<string>\",\n \"input_tts\": {\n \"input\": \"Hello, this is a test.\",\n \"model\": \"higgs-tts-3\",\n \"voice\": \"default\",\n \"response_format\": \"mp3\",\n \"stream\": false,\n \"ref_audio\": \"<string>\",\n \"ref_text\": \"<string>\",\n \"normalize\": true,\n \"language\": null,\n \"timestamps\": false\n },\n \"size\": \"640x640\"\n}"
response = http.request(request)
puts response.read_body{
"id": "video_8a1f2c3d4e5f6a7b8c9d0e1f",
"object": "video",
"model": "<string>",
"status": "queued",
"progress": 123,
"size": "<string>",
"created_at": 123,
"error": "<string>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}Avatar API
Create a video
Create an avatar talking-head video (async). Returns the Video object with status: "queued"; poll GET /v1/videos/{video_id} and download the rendered MP4 from GET /v1/videos/{video_id}/content. Provide a reference image plus exactly one driving input — input (audio-to-video) or input_tts (text-to-video). The body may be JSON or multipart/form-data (upload ref_image / input as raw files).
POST
/
v1
/
videos
Create a video
curl --request POST \
--url https://api.boson.ai/v1/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ref_image": "<string>",
"model": "higgs-avatar",
"input": "<string>",
"input_tts": {
"input": "Hello, this is a test.",
"model": "higgs-tts-3",
"voice": "default",
"response_format": "mp3",
"stream": false,
"ref_audio": "<string>",
"ref_text": "<string>",
"normalize": true,
"language": null,
"timestamps": false
},
"size": "640x640"
}
'import requests
url = "https://api.boson.ai/v1/videos"
payload = {
"ref_image": "<string>",
"model": "higgs-avatar",
"input": "<string>",
"input_tts": {
"input": "Hello, this is a test.",
"model": "higgs-tts-3",
"voice": "default",
"response_format": "mp3",
"stream": False,
"ref_audio": "<string>",
"ref_text": "<string>",
"normalize": True,
"language": None,
"timestamps": False
},
"size": "640x640"
}
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({
ref_image: '<string>',
model: 'higgs-avatar',
input: '<string>',
input_tts: {
input: 'Hello, this is a test.',
model: 'higgs-tts-3',
voice: 'default',
response_format: 'mp3',
stream: false,
ref_audio: '<string>',
ref_text: '<string>',
normalize: true,
language: null,
timestamps: false
},
size: '640x640'
})
};
fetch('https://api.boson.ai/v1/videos', 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.boson.ai/v1/videos",
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([
'ref_image' => '<string>',
'model' => 'higgs-avatar',
'input' => '<string>',
'input_tts' => [
'input' => 'Hello, this is a test.',
'model' => 'higgs-tts-3',
'voice' => 'default',
'response_format' => 'mp3',
'stream' => false,
'ref_audio' => '<string>',
'ref_text' => '<string>',
'normalize' => true,
'language' => null,
'timestamps' => false
],
'size' => '640x640'
]),
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.boson.ai/v1/videos"
payload := strings.NewReader("{\n \"ref_image\": \"<string>\",\n \"model\": \"higgs-avatar\",\n \"input\": \"<string>\",\n \"input_tts\": {\n \"input\": \"Hello, this is a test.\",\n \"model\": \"higgs-tts-3\",\n \"voice\": \"default\",\n \"response_format\": \"mp3\",\n \"stream\": false,\n \"ref_audio\": \"<string>\",\n \"ref_text\": \"<string>\",\n \"normalize\": true,\n \"language\": null,\n \"timestamps\": false\n },\n \"size\": \"640x640\"\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.boson.ai/v1/videos")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ref_image\": \"<string>\",\n \"model\": \"higgs-avatar\",\n \"input\": \"<string>\",\n \"input_tts\": {\n \"input\": \"Hello, this is a test.\",\n \"model\": \"higgs-tts-3\",\n \"voice\": \"default\",\n \"response_format\": \"mp3\",\n \"stream\": false,\n \"ref_audio\": \"<string>\",\n \"ref_text\": \"<string>\",\n \"normalize\": true,\n \"language\": null,\n \"timestamps\": false\n },\n \"size\": \"640x640\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.boson.ai/v1/videos")
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 \"ref_image\": \"<string>\",\n \"model\": \"higgs-avatar\",\n \"input\": \"<string>\",\n \"input_tts\": {\n \"input\": \"Hello, this is a test.\",\n \"model\": \"higgs-tts-3\",\n \"voice\": \"default\",\n \"response_format\": \"mp3\",\n \"stream\": false,\n \"ref_audio\": \"<string>\",\n \"ref_text\": \"<string>\",\n \"normalize\": true,\n \"language\": null,\n \"timestamps\": false\n },\n \"size\": \"640x640\"\n}"
response = http.request(request)
puts response.read_body{
"id": "video_8a1f2c3d4e5f6a7b8c9d0e1f",
"object": "video",
"model": "<string>",
"status": "queued",
"progress": 123,
"size": "<string>",
"created_at": 123,
"error": "<string>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}Authorizations
Body
application/jsonmultipart/form-data
Provide a ref_image plus exactly one driving input: input (audio-to-video) or input_tts (text-to-video).
Response
The created Video object.
A video generation job (the create / retrieve response).