Create a talking avatar job
curl --request POST \
--url https://api.adskull.io/v1/talking-avatars \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"avatar_image_url": "<string>",
"script": "<string>",
"mode": "script",
"audio_url": "<string>",
"voice_id": "<string>",
"product_placement": false,
"product_image_url": "<string>",
"background_url": "<string>"
}
'import requests
url = "https://api.adskull.io/v1/talking-avatars"
payload = {
"avatar_image_url": "<string>",
"script": "<string>",
"mode": "script",
"audio_url": "<string>",
"voice_id": "<string>",
"product_placement": False,
"product_image_url": "<string>",
"background_url": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
avatar_image_url: '<string>',
script: '<string>',
mode: 'script',
audio_url: '<string>',
voice_id: '<string>',
product_placement: false,
product_image_url: '<string>',
background_url: '<string>'
})
};
fetch('https://api.adskull.io/v1/talking-avatars', 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.adskull.io/v1/talking-avatars",
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_image_url' => '<string>',
'script' => '<string>',
'mode' => 'script',
'audio_url' => '<string>',
'voice_id' => '<string>',
'product_placement' => false,
'product_image_url' => '<string>',
'background_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-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.adskull.io/v1/talking-avatars"
payload := strings.NewReader("{\n \"avatar_image_url\": \"<string>\",\n \"script\": \"<string>\",\n \"mode\": \"script\",\n \"audio_url\": \"<string>\",\n \"voice_id\": \"<string>\",\n \"product_placement\": false,\n \"product_image_url\": \"<string>\",\n \"background_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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.adskull.io/v1/talking-avatars")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"avatar_image_url\": \"<string>\",\n \"script\": \"<string>\",\n \"mode\": \"script\",\n \"audio_url\": \"<string>\",\n \"voice_id\": \"<string>\",\n \"product_placement\": false,\n \"product_image_url\": \"<string>\",\n \"background_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.adskull.io/v1/talking-avatars")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"avatar_image_url\": \"<string>\",\n \"script\": \"<string>\",\n \"mode\": \"script\",\n \"audio_url\": \"<string>\",\n \"voice_id\": \"<string>\",\n \"product_placement\": false,\n \"product_image_url\": \"<string>\",\n \"background_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "image_generation_job",
"status": "queued",
"credits_reserved": 123,
"assets": [
{
"id": "<string>",
"object": "asset",
"type": "image",
"url": "<string>",
"mime_type": "<string>",
"size_bytes": 123,
"duration_seconds": 123,
"width": 123,
"height": 123,
"expires_at": "2023-11-07T05:31:56Z"
}
],
"created_at": "2023-11-07T05:31:56Z",
"progress_percent": 50,
"credits_used": 123,
"credits_refunded": 0,
"request": {},
"failure_code": "<string>",
"failure_message": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"failed_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Unique key for safe retries of job creation requests.
8 - 128Body
- Option 1
- Option 2
Talking-avatar request. Lip-syncs a still portrait to either a generated script (TTS) or an existing audio file.
Pricing: 3 credits per second, minimum 5 seconds. +5 credits when
product_placement=true. For script mode, duration ≈ len(script) / 10
seconds, and script must be at least 100 characters (enforced server-side).
Hosted portrait image (png/jpg/jpeg/webp, ≤ 50 MB).
Script for mode=script. Min 100 chars (server-enforced).
100 - 8192• script — generate speech from script (default).
• audio — lip-sync to the provided audio_url.
script, audio Hosted audio URL for mode=audio (mp3/wav/m4a, ≤ 50 MB).
Optional library or custom voice ID. If omitted in mode=script,
the first voice in your library catalog is used.
When true (with product_image_url), fuses a product into the shot. Adds 5 credits.
Required when product_placement=true.
Optional hosted background image URL.
Response
Talking avatar job accepted.
image_generation_job, video_generation_job, talking_avatar_job queued, processing, completed, failed, canceled Show child attributes
Show child attributes
0 <= x <= 100curl --request POST \
--url https://api.adskull.io/v1/talking-avatars \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"avatar_image_url": "<string>",
"script": "<string>",
"mode": "script",
"audio_url": "<string>",
"voice_id": "<string>",
"product_placement": false,
"product_image_url": "<string>",
"background_url": "<string>"
}
'import requests
url = "https://api.adskull.io/v1/talking-avatars"
payload = {
"avatar_image_url": "<string>",
"script": "<string>",
"mode": "script",
"audio_url": "<string>",
"voice_id": "<string>",
"product_placement": False,
"product_image_url": "<string>",
"background_url": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
avatar_image_url: '<string>',
script: '<string>',
mode: 'script',
audio_url: '<string>',
voice_id: '<string>',
product_placement: false,
product_image_url: '<string>',
background_url: '<string>'
})
};
fetch('https://api.adskull.io/v1/talking-avatars', 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.adskull.io/v1/talking-avatars",
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_image_url' => '<string>',
'script' => '<string>',
'mode' => 'script',
'audio_url' => '<string>',
'voice_id' => '<string>',
'product_placement' => false,
'product_image_url' => '<string>',
'background_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-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.adskull.io/v1/talking-avatars"
payload := strings.NewReader("{\n \"avatar_image_url\": \"<string>\",\n \"script\": \"<string>\",\n \"mode\": \"script\",\n \"audio_url\": \"<string>\",\n \"voice_id\": \"<string>\",\n \"product_placement\": false,\n \"product_image_url\": \"<string>\",\n \"background_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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.adskull.io/v1/talking-avatars")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"avatar_image_url\": \"<string>\",\n \"script\": \"<string>\",\n \"mode\": \"script\",\n \"audio_url\": \"<string>\",\n \"voice_id\": \"<string>\",\n \"product_placement\": false,\n \"product_image_url\": \"<string>\",\n \"background_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.adskull.io/v1/talking-avatars")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"avatar_image_url\": \"<string>\",\n \"script\": \"<string>\",\n \"mode\": \"script\",\n \"audio_url\": \"<string>\",\n \"voice_id\": \"<string>\",\n \"product_placement\": false,\n \"product_image_url\": \"<string>\",\n \"background_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "image_generation_job",
"status": "queued",
"credits_reserved": 123,
"assets": [
{
"id": "<string>",
"object": "asset",
"type": "image",
"url": "<string>",
"mime_type": "<string>",
"size_bytes": 123,
"duration_seconds": 123,
"width": 123,
"height": 123,
"expires_at": "2023-11-07T05:31:56Z"
}
],
"created_at": "2023-11-07T05:31:56Z",
"progress_percent": 50,
"credits_used": 123,
"credits_refunded": 0,
"request": {},
"failure_code": "<string>",
"failure_message": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"failed_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}
