curl --request POST \
--url https://api.deapi.ai/api/v2/videos/audio-syncs \
--header 'Accept: <accept>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'prompt=A beautiful sunset over mountains with dramatic music' \
--form audio='@example-file' \
--form width=512 \
--form height=512 \
--form frames=97 \
--form fps=24 \
--form seed=42 \
--form model=Ltx2_3_22B_Dist_INT8 \
--form 'negative_prompt=blur, darkness, noise' \
--form 'first_frame_image=<string>' \
--form 'last_frame_image=<string>' \
--form guidance=7.5 \
--form steps=20 \
--form webhook_url=https://your-server.com/webhooks/deapi \
--form webhook_secret=a1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5 \
--form first_frame_image.0='@example-file' \
--form first_frame_image.1='@example-file' \
--form last_frame_image.0='@example-file' \
--form last_frame_image.1='@example-file'import requests
url = "https://api.deapi.ai/api/v2/videos/audio-syncs"
files = {
"audio": ("example-file", open("example-file", "rb")),
"first_frame_image.0": ("example-file", open("example-file", "rb")),
"first_frame_image.1": ("example-file", open("example-file", "rb")),
"last_frame_image.0": ("example-file", open("example-file", "rb")),
"last_frame_image.1": ("example-file", open("example-file", "rb"))
}
payload = {
"prompt": "A beautiful sunset over mountains with dramatic music",
"width": "512",
"height": "512",
"frames": "97",
"fps": "24",
"seed": "42",
"model": "Ltx2_3_22B_Dist_INT8",
"negative_prompt": "blur, darkness, noise",
"first_frame_image": "<string>",
"last_frame_image": "<string>",
"guidance": "7.5",
"steps": "20",
"webhook_url": "https://your-server.com/webhooks/deapi",
"webhook_secret": "a1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5"
}
headers = {
"Accept": "<accept>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('prompt', 'A beautiful sunset over mountains with dramatic music');
form.append('audio', '<string>');
form.append('width', '512');
form.append('height', '512');
form.append('frames', '97');
form.append('fps', '24');
form.append('seed', '42');
form.append('model', 'Ltx2_3_22B_Dist_INT8');
form.append('negative_prompt', 'blur, darkness, noise');
form.append('first_frame_image', '<string>');
form.append('last_frame_image', '<string>');
form.append('guidance', '7.5');
form.append('steps', '20');
form.append('webhook_url', 'https://your-server.com/webhooks/deapi');
form.append('webhook_secret', 'a1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5');
form.append('first_frame_image.0', '{
"fileName": "example-file"
}');
form.append('first_frame_image.1', '{
"fileName": "example-file"
}');
form.append('last_frame_image.0', '{
"fileName": "example-file"
}');
form.append('last_frame_image.1', '{
"fileName": "example-file"
}');
const options = {method: 'POST', headers: {Accept: '<accept>', Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.deapi.ai/api/v2/videos/audio-syncs', 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.deapi.ai/api/v2/videos/audio-syncs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prompt\"\r\n\r\nA beautiful sunset over mountains with dramatic music\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"width\"\r\n\r\n512\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"height\"\r\n\r\n512\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"frames\"\r\n\r\n97\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fps\"\r\n\r\n24\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"seed\"\r\n\r\n42\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nLtx2_3_22B_Dist_INT8\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"negative_prompt\"\r\n\r\nblur, darkness, noise\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"first_frame_image\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"last_frame_image\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"guidance\"\r\n\r\n7.5\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"steps\"\r\n\r\n20\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_url\"\r\n\r\nhttps://your-server.com/webhooks/deapi\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_secret\"\r\n\r\na1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"first_frame_image.0\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"first_frame_image.1\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"last_frame_image.0\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"last_frame_image.1\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Accept: <accept>",
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$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.deapi.ai/api/v2/videos/audio-syncs"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prompt\"\r\n\r\nA beautiful sunset over mountains with dramatic music\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"width\"\r\n\r\n512\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"height\"\r\n\r\n512\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"frames\"\r\n\r\n97\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fps\"\r\n\r\n24\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"seed\"\r\n\r\n42\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nLtx2_3_22B_Dist_INT8\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"negative_prompt\"\r\n\r\nblur, darkness, noise\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"first_frame_image\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"last_frame_image\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"guidance\"\r\n\r\n7.5\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"steps\"\r\n\r\n20\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_url\"\r\n\r\nhttps://your-server.com/webhooks/deapi\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_secret\"\r\n\r\na1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"first_frame_image.0\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"first_frame_image.1\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"last_frame_image.0\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"last_frame_image.1\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "<accept>")
req.Header.Add("Authorization", "Bearer <token>")
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.deapi.ai/api/v2/videos/audio-syncs")
.header("Accept", "<accept>")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prompt\"\r\n\r\nA beautiful sunset over mountains with dramatic music\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"width\"\r\n\r\n512\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"height\"\r\n\r\n512\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"frames\"\r\n\r\n97\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fps\"\r\n\r\n24\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"seed\"\r\n\r\n42\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nLtx2_3_22B_Dist_INT8\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"negative_prompt\"\r\n\r\nblur, darkness, noise\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"first_frame_image\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"last_frame_image\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"guidance\"\r\n\r\n7.5\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"steps\"\r\n\r\n20\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_url\"\r\n\r\nhttps://your-server.com/webhooks/deapi\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_secret\"\r\n\r\na1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"first_frame_image.0\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"first_frame_image.1\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"last_frame_image.0\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"last_frame_image.1\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deapi.ai/api/v2/videos/audio-syncs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = '<accept>'
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prompt\"\r\n\r\nA beautiful sunset over mountains with dramatic music\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"width\"\r\n\r\n512\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"height\"\r\n\r\n512\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"frames\"\r\n\r\n97\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fps\"\r\n\r\n24\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"seed\"\r\n\r\n42\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nLtx2_3_22B_Dist_INT8\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"negative_prompt\"\r\n\r\nblur, darkness, noise\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"first_frame_image\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"last_frame_image\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"guidance\"\r\n\r\n7.5\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"steps\"\r\n\r\n20\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_url\"\r\n\r\nhttps://your-server.com/webhooks/deapi\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_secret\"\r\n\r\na1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"first_frame_image.0\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"first_frame_image.1\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"last_frame_image.0\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"last_frame_image.1\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"data": {
"request_id": "c08a339c-73e5-4d67-a4d5-231302fbff9a"
}
}{
"data": {},
"message": "<string>",
"errors": [
"<unknown>"
],
"statusCode": 123
}{
"message": "Client account is suspended. If you believe this is a mistake, contact us."
}{
"data": {},
"message": "<string>",
"errors": [
"<unknown>"
],
"statusCode": 123
}{
"message": "The selected model does not support Text To Image.",
"errors": {
"model": [
"This model is not available on your plan. Please upgrade to access it."
]
}
}{
"message": "Too Many Attempts."
}Video Audio Sync (Audio-to-Video)
Generate a video conditioned on an audio track.
curl --request POST \
--url https://api.deapi.ai/api/v2/videos/audio-syncs \
--header 'Accept: <accept>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'prompt=A beautiful sunset over mountains with dramatic music' \
--form audio='@example-file' \
--form width=512 \
--form height=512 \
--form frames=97 \
--form fps=24 \
--form seed=42 \
--form model=Ltx2_3_22B_Dist_INT8 \
--form 'negative_prompt=blur, darkness, noise' \
--form 'first_frame_image=<string>' \
--form 'last_frame_image=<string>' \
--form guidance=7.5 \
--form steps=20 \
--form webhook_url=https://your-server.com/webhooks/deapi \
--form webhook_secret=a1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5 \
--form first_frame_image.0='@example-file' \
--form first_frame_image.1='@example-file' \
--form last_frame_image.0='@example-file' \
--form last_frame_image.1='@example-file'import requests
url = "https://api.deapi.ai/api/v2/videos/audio-syncs"
files = {
"audio": ("example-file", open("example-file", "rb")),
"first_frame_image.0": ("example-file", open("example-file", "rb")),
"first_frame_image.1": ("example-file", open("example-file", "rb")),
"last_frame_image.0": ("example-file", open("example-file", "rb")),
"last_frame_image.1": ("example-file", open("example-file", "rb"))
}
payload = {
"prompt": "A beautiful sunset over mountains with dramatic music",
"width": "512",
"height": "512",
"frames": "97",
"fps": "24",
"seed": "42",
"model": "Ltx2_3_22B_Dist_INT8",
"negative_prompt": "blur, darkness, noise",
"first_frame_image": "<string>",
"last_frame_image": "<string>",
"guidance": "7.5",
"steps": "20",
"webhook_url": "https://your-server.com/webhooks/deapi",
"webhook_secret": "a1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5"
}
headers = {
"Accept": "<accept>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('prompt', 'A beautiful sunset over mountains with dramatic music');
form.append('audio', '<string>');
form.append('width', '512');
form.append('height', '512');
form.append('frames', '97');
form.append('fps', '24');
form.append('seed', '42');
form.append('model', 'Ltx2_3_22B_Dist_INT8');
form.append('negative_prompt', 'blur, darkness, noise');
form.append('first_frame_image', '<string>');
form.append('last_frame_image', '<string>');
form.append('guidance', '7.5');
form.append('steps', '20');
form.append('webhook_url', 'https://your-server.com/webhooks/deapi');
form.append('webhook_secret', 'a1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5');
form.append('first_frame_image.0', '{
"fileName": "example-file"
}');
form.append('first_frame_image.1', '{
"fileName": "example-file"
}');
form.append('last_frame_image.0', '{
"fileName": "example-file"
}');
form.append('last_frame_image.1', '{
"fileName": "example-file"
}');
const options = {method: 'POST', headers: {Accept: '<accept>', Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.deapi.ai/api/v2/videos/audio-syncs', 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.deapi.ai/api/v2/videos/audio-syncs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prompt\"\r\n\r\nA beautiful sunset over mountains with dramatic music\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"width\"\r\n\r\n512\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"height\"\r\n\r\n512\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"frames\"\r\n\r\n97\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fps\"\r\n\r\n24\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"seed\"\r\n\r\n42\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nLtx2_3_22B_Dist_INT8\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"negative_prompt\"\r\n\r\nblur, darkness, noise\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"first_frame_image\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"last_frame_image\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"guidance\"\r\n\r\n7.5\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"steps\"\r\n\r\n20\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_url\"\r\n\r\nhttps://your-server.com/webhooks/deapi\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_secret\"\r\n\r\na1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"first_frame_image.0\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"first_frame_image.1\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"last_frame_image.0\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"last_frame_image.1\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Accept: <accept>",
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$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.deapi.ai/api/v2/videos/audio-syncs"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prompt\"\r\n\r\nA beautiful sunset over mountains with dramatic music\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"width\"\r\n\r\n512\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"height\"\r\n\r\n512\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"frames\"\r\n\r\n97\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fps\"\r\n\r\n24\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"seed\"\r\n\r\n42\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nLtx2_3_22B_Dist_INT8\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"negative_prompt\"\r\n\r\nblur, darkness, noise\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"first_frame_image\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"last_frame_image\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"guidance\"\r\n\r\n7.5\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"steps\"\r\n\r\n20\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_url\"\r\n\r\nhttps://your-server.com/webhooks/deapi\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_secret\"\r\n\r\na1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"first_frame_image.0\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"first_frame_image.1\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"last_frame_image.0\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"last_frame_image.1\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "<accept>")
req.Header.Add("Authorization", "Bearer <token>")
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.deapi.ai/api/v2/videos/audio-syncs")
.header("Accept", "<accept>")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prompt\"\r\n\r\nA beautiful sunset over mountains with dramatic music\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"width\"\r\n\r\n512\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"height\"\r\n\r\n512\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"frames\"\r\n\r\n97\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fps\"\r\n\r\n24\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"seed\"\r\n\r\n42\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nLtx2_3_22B_Dist_INT8\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"negative_prompt\"\r\n\r\nblur, darkness, noise\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"first_frame_image\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"last_frame_image\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"guidance\"\r\n\r\n7.5\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"steps\"\r\n\r\n20\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_url\"\r\n\r\nhttps://your-server.com/webhooks/deapi\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_secret\"\r\n\r\na1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"first_frame_image.0\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"first_frame_image.1\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"last_frame_image.0\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"last_frame_image.1\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deapi.ai/api/v2/videos/audio-syncs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = '<accept>'
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prompt\"\r\n\r\nA beautiful sunset over mountains with dramatic music\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"width\"\r\n\r\n512\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"height\"\r\n\r\n512\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"frames\"\r\n\r\n97\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fps\"\r\n\r\n24\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"seed\"\r\n\r\n42\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nLtx2_3_22B_Dist_INT8\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"negative_prompt\"\r\n\r\nblur, darkness, noise\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"first_frame_image\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"last_frame_image\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"guidance\"\r\n\r\n7.5\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"steps\"\r\n\r\n20\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_url\"\r\n\r\nhttps://your-server.com/webhooks/deapi\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_secret\"\r\n\r\na1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"first_frame_image.0\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"first_frame_image.1\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"last_frame_image.0\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"last_frame_image.1\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"data": {
"request_id": "c08a339c-73e5-4d67-a4d5-231302fbff9a"
}
}{
"data": {},
"message": "<string>",
"errors": [
"<unknown>"
],
"statusCode": 123
}{
"message": "Client account is suspended. If you believe this is a mistake, contact us."
}{
"data": {},
"message": "<string>",
"errors": [
"<unknown>"
],
"statusCode": 123
}{
"message": "The selected model does not support Text To Image.",
"errors": {
"model": [
"This model is not available on your plan. Please upgrade to access it."
]
}
}{
"message": "Too Many Attempts."
}request_id for status polling.
slug and check specific limits.Authorizations
Sanctum personal access token, sent as Authorization: Bearer <token>. The token is opaque — it carries no claims and no embedded expiry, so do not attempt to decode it. Issue and revoke tokens from your account dashboard.
Headers
application/json Body
Audio to video generation parameters
Every example in this schema is a working set for the model example shown — they are not defaults and not portable. Sizes, step counts, frame counts and frame rates are all per-model: read info.limits and info.defaults for the model you actually intend to use from GET /api/v2/models. Substituting a different model while keeping these values is the most common source of a 422.
The main prompt for video generation
"A beautiful sunset over mountains with dramatic music"
Audio file to condition the video generation. Supported formats: MP3, WAV, OGG, FLAC. Maximum file size: 20 MB.
Width of the generated video in pixels. The accepted range is model-specific — read info.limits.min_width/max_width and min_height/max_height for your model from GET /api/v2/models. Some models also publish dimension_multiple or resolution_step: values are snapped DOWN to that grid before validation, so an off-grid size is silently reduced rather than rejected. max_pixels and max_ratio, where present, cap total area and aspect ratio on top of the per-side bounds.
512
Height of the generated video in pixels. The accepted range is model-specific — read info.limits.min_width/max_width and min_height/max_height for your model from GET /api/v2/models. Some models also publish dimension_multiple or resolution_step: values are snapped DOWN to that grid before validation, so an off-grid size is silently reduced rather than rejected. max_pixels and max_ratio, where present, cap total area and aspect ratio on top of the per-side bounds.
512
Number of video frames to generate. The accepted range is model-specific — read info.limits.min_frames/max_frames for your model from GET /api/v2/models; a value outside it is rejected with 422.
97
FPS of the generated video. The model dictates the value: read info.defaults.fps for your model from GET /api/v2/models. Where min_fps equals max_fps that is the only accepted value; anything outside the range is rejected with 422.
24
Random seed for generation
42
The model to use for video generation. Available models can be retrieved via the GET /api/v2/models endpoint.
"Ltx2_3_22B_Dist_INT8"
Elements to avoid in the generated video
"blur, darkness, noise"
Image for the first frame of video (optional). Supported formats: JPG, JPEG, PNG, GIF, BMP, WebP. Maximum file size: 10 MB.
Image for the last frame of video (optional). Supported formats: JPG, JPEG, PNG, GIF, BMP, WebP. Maximum file size: 10 MB.
Guidance scale. Required only when the model declares info.features.supports_guidance; for a model that does not, the value is accepted and ignored. Bounds are info.limits.min_guidance / max_guidance, from GET /api/v2/models.
7.5
Number of inference steps. Required when the model publishes step bounds: send it if info.limits.min_steps / max_steps or info.defaults.steps is present for your model in GET /api/v2/models, and stay inside that range. Key off those fields rather than info.features.supports_steps, which some models omit while still using steps.
20
Optional HTTPS URL to receive webhook notifications for job status changes (processing, completed, failed). Must be HTTPS. Max 2048 characters. A per-request URL is self-contained: it is delivered even when the account has no webhook configuration, or the account webhook is disabled. See the webhooks block at the top level of this document for the event payloads and the headers each delivery carries.
2048"https://your-server.com/webhooks/deapi"
Optional per-request HMAC secret (min. 32 chars) used to sign the webhook callback. Overrides the account-default secret for this job only. If omitted, the account-default secret signs the callback; if no secret exists at all, the callback is still delivered but UNSIGNED (empty X-DeAPI-Signature header). Requires webhook_url to also be set.
32 - 255"a1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5"
Response
ID of the inference request.
Information from success endpoint
Show child attributes
Show child attributes
Was this page helpful?