curl --request POST \
--url https://api.deapi.ai/api/v1/client/aud2video/price-calculation \
--header 'Accept: <accept>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"width": 512,
"height": 512,
"frames": 97,
"fps": 24,
"model": "Ltx2_3_22B_Dist_INT8",
"steps": 20
}
'import requests
url = "https://api.deapi.ai/api/v1/client/aud2video/price-calculation"
payload = {
"width": 512,
"height": 512,
"frames": 97,
"fps": 24,
"model": "Ltx2_3_22B_Dist_INT8",
"steps": 20
}
headers = {
"Accept": "<accept>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Accept: '<accept>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
width: 512,
height: 512,
frames: 97,
fps: 24,
model: 'Ltx2_3_22B_Dist_INT8',
steps: 20
})
};
fetch('https://api.deapi.ai/api/v1/client/aud2video/price-calculation', 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/v1/client/aud2video/price-calculation",
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([
'width' => 512,
'height' => 512,
'frames' => 97,
'fps' => 24,
'model' => 'Ltx2_3_22B_Dist_INT8',
'steps' => 20
]),
CURLOPT_HTTPHEADER => [
"Accept: <accept>",
"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.deapi.ai/api/v1/client/aud2video/price-calculation"
payload := strings.NewReader("{\n \"width\": 512,\n \"height\": 512,\n \"frames\": 97,\n \"fps\": 24,\n \"model\": \"Ltx2_3_22B_Dist_INT8\",\n \"steps\": 20\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "<accept>")
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.deapi.ai/api/v1/client/aud2video/price-calculation")
.header("Accept", "<accept>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"width\": 512,\n \"height\": 512,\n \"frames\": 97,\n \"fps\": 24,\n \"model\": \"Ltx2_3_22B_Dist_INT8\",\n \"steps\": 20\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deapi.ai/api/v1/client/aud2video/price-calculation")
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["Content-Type"] = 'application/json'
request.body = "{\n \"width\": 512,\n \"height\": 512,\n \"frames\": 97,\n \"fps\": 24,\n \"model\": \"Ltx2_3_22B_Dist_INT8\",\n \"steps\": 20\n}"
response = http.request(request)
puts response.read_body{
"data": {
"price": 0.15
}
}{
"data": {},
"message": "<string>",
"errors": [
"<unknown>"
],
"statusCode": 123
}{
"data": {},
"message": "<string>",
"errors": [
"<unknown>"
],
"statusCode": 123
}{
"message": "The selected model does not support Text To Image.",
"errors": {
"model": [
"The selected model does not support Text To Image."
]
}
}{
"message": "Too Many Attempts."
}Audio-to-Video Price Calculation
Endpoint for calculating price for audio2video inference
curl --request POST \
--url https://api.deapi.ai/api/v1/client/aud2video/price-calculation \
--header 'Accept: <accept>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"width": 512,
"height": 512,
"frames": 97,
"fps": 24,
"model": "Ltx2_3_22B_Dist_INT8",
"steps": 20
}
'import requests
url = "https://api.deapi.ai/api/v1/client/aud2video/price-calculation"
payload = {
"width": 512,
"height": 512,
"frames": 97,
"fps": 24,
"model": "Ltx2_3_22B_Dist_INT8",
"steps": 20
}
headers = {
"Accept": "<accept>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Accept: '<accept>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
width: 512,
height: 512,
frames: 97,
fps: 24,
model: 'Ltx2_3_22B_Dist_INT8',
steps: 20
})
};
fetch('https://api.deapi.ai/api/v1/client/aud2video/price-calculation', 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/v1/client/aud2video/price-calculation",
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([
'width' => 512,
'height' => 512,
'frames' => 97,
'fps' => 24,
'model' => 'Ltx2_3_22B_Dist_INT8',
'steps' => 20
]),
CURLOPT_HTTPHEADER => [
"Accept: <accept>",
"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.deapi.ai/api/v1/client/aud2video/price-calculation"
payload := strings.NewReader("{\n \"width\": 512,\n \"height\": 512,\n \"frames\": 97,\n \"fps\": 24,\n \"model\": \"Ltx2_3_22B_Dist_INT8\",\n \"steps\": 20\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "<accept>")
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.deapi.ai/api/v1/client/aud2video/price-calculation")
.header("Accept", "<accept>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"width\": 512,\n \"height\": 512,\n \"frames\": 97,\n \"fps\": 24,\n \"model\": \"Ltx2_3_22B_Dist_INT8\",\n \"steps\": 20\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deapi.ai/api/v1/client/aud2video/price-calculation")
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["Content-Type"] = 'application/json'
request.body = "{\n \"width\": 512,\n \"height\": 512,\n \"frames\": 97,\n \"fps\": 24,\n \"model\": \"Ltx2_3_22B_Dist_INT8\",\n \"steps\": 20\n}"
response = http.request(request)
puts response.read_body{
"data": {
"price": 0.15
}
}{
"data": {},
"message": "<string>",
"errors": [
"<unknown>"
],
"statusCode": 123
}{
"data": {},
"message": "<string>",
"errors": [
"<unknown>"
],
"statusCode": 123
}{
"message": "The selected model does not support Text To Image.",
"errors": {
"model": [
"The selected model does not support Text To Image."
]
}
}{
"message": "Too Many Attempts."
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
application/json Body
Audio to video price calculation parameters
Width of the generated video in pixels
512
Height of the generated video in pixels
512
Number of video frames to generate. The accepted range is model-specific - read info.limits.min_frames / info.limits.max_frames for your model from the Model Selection endpoint before sending the request; a value outside that range is rejected with 422. For the example model Ltx2_3_22B_Dist_INT8 the allowed range is 49-241 (default 120).
x >= 197
FPS of generated video. The accepted range is model-specific - read info.limits.min_fps / info.limits.max_fps for your model from the Model Selection endpoint before sending the request; a value outside that range is rejected with 422. For the example model Ltx2_3_22B_Dist_INT8 the only accepted value is 24.
x >= 124
The model to use for video generation. Available models can be retrieved via the GET /api/v1/client/models endpoint.
"Ltx2_3_22B_Dist_INT8"
Number of inference steps. The accepted range is model-specific - read info.limits.min_steps / info.limits.max_steps for your model from the Model Selection endpoint before sending the request; a value outside that range is rejected with 422.
x >= 120
Response
Calculated price for audio2video inference.
Show child attributes
Show child attributes
Was this page helpful?