LTX-2 Video API Documentation
LTX-2 Video API generate request - Request Code
POST https://gateway.pixazo.ai/ltx-2-video-api-581/v1/ltx-2-video-api-request HTTP/1.1
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"image_url": "https://storage.googleapis.com/falserverless/example_inputs/ltxv-2-i2v-input.jpg",
"prompt": "A woman stands still amid a busy neon-lit street at night. The camera slowly dollies in toward her face as people blur past, their motion emphasizing her calm presence. City lights flicker and reflections shift across her denim jacket.",
"duration": 6,
"resolution": "1080p",
"aspect_ratio": "16:9",
"fps": 25,
"generate_audio": true
} import requests
url = "https://gateway.pixazo.ai/ltx-2-video-api-581/v1/ltx-2-video-api-request"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"image_url": "https://storage.googleapis.com/falserverless/example_inputs/ltxv-2-i2v-input.jpg",
"prompt": "A woman stands still amid a busy neon-lit street at night. The camera slowly dollies in toward her face as people blur past, their motion emphasizing her calm presence. City lights flicker and reflections shift across her denim jacket.",
"duration": 6,
"resolution": "1080p",
"aspect_ratio": "16:9",
"fps": 25,
"generate_audio": True
}
response = requests.post(url, json=data, headers=headers)
print(response.json()) const url = 'https://gateway.pixazo.ai/ltx-2-video-api-581/v1/ltx-2-video-api-request';
const data = {
image_url: 'https://storage.googleapis.com/falserverless/example_inputs/ltxv-2-i2v-input.jpg',
prompt: 'A woman stands still amid a busy neon-lit street at night. The camera slowly dollies in toward her face as people blur past, their motion emphasizing her calm presence. City lights flicker and reflections shift across her denim jacket.',
duration: 6,
resolution: '1080p',
aspect_ratio: '16:9',
fps: 25,
generate_audio: true
};
fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
},
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error)); curl -X POST "https://gateway.pixazo.ai/ltx-2-video-api-581/v1/ltx-2-video-api-request" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"image_url": "https://storage.googleapis.com/falserverless/example_inputs/ltxv-2-i2v-input.jpg",
"prompt": "A woman stands still amid a busy neon-lit street at night. The camera slowly dollies in toward her face as people blur past, their motion emphasizing her calm presence. City lights flicker and reflections shift across her denim jacket.",
"duration": 6,
"resolution": "1080p",
"aspect_ratio": "16:9",
"fps": 25,
"generate_audio": true
}' import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.time.Duration;
public class ApiExample {
public static void main(String[] args) throws Exception {
String url = "https://gateway.pixazo.ai/ltx-2-video-api-581/v1/ltx-2-video-api-request";
String json = "{" + "\n" +
" \"image_url\": \"https://storage.googleapis.com/falserverless/example_inputs/ltxv-2-i2v-input.jpg\"," + "\n" +
" \"prompt\": \"A woman stands still amid a busy neon-lit street at night. The camera slowly dollies in toward her face as people blur past, their motion emphasizing her calm presence. City lights flicker and reflections shift across her denim jacket.\"," + "\n" +
" \"duration\": 6," + "\n" +
" \"resolution\": \"1080p\"," + "\n" +
" \"aspect_ratio\": \"16:9\"," + "\n" +
" \"fps\": 25," + "\n" +
" \"generate_audio\": true" + "\n" +
"}";
HttpClient client = HttpClient.newBuilder()
.connectTimeout(Duration.ofSeconds(10))
.build();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Content-Type", "application/json")
.header("Cache-Control", "no-cache")
.header("Ocp-Apim-Subscription-Key", "YOUR_SUBSCRIPTION_KEY")
.POST(HttpRequest.BodyPublishers.ofString(json))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
} <?php
$url = 'https://gateway.pixazo.ai/ltx-2-video-api-581/v1/ltx-2-video-api-request';
$data = [
'image_url' => 'https://storage.googleapis.com/falserverless/example_inputs/ltxv-2-i2v-input.jpg',
'prompt' => 'A woman stands still amid a busy neon-lit street at night. The camera slowly dollies in toward her face as people blur past, their motion emphasizing her calm presence. City lights flicker and reflections shift across her denim jacket.',
'duration' => 6,
'resolution' => '1080p',
'aspect_ratio' => '16:9',
'fps' => 25,
'generate_audio' => true
];
$json = json_encode($data);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json',
'Cache-Control: no-cache',
'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?> Output
Successful API response:
{
"status": "IN_QUEUE",
"request_id": "ltx2-v-7a3b4c5d-6e8f-9012-3456-7890abcdef",
"message": "Video generation request queued successfully."
} Request Body - LTX-2 Video API generate request
Parameters for https://gateway.pixazo.ai/ltx-2-video-api-581/v1/ltx-2-video-api-request:
| Parameter | Required | Type | Description |
|---|---|---|---|
| image_url | Yes | string | Publicly accessible URL to the input image (JPEG/PNG). Must be reachable by the service. |
| prompt | Yes | string | Detailed textual description of the desired motion, camera movement, and visual context for the generated video. |
| duration | No | integer | Duration of the generated video in seconds. Range: 2–10. |
| resolution | No | string | Output video resolution. Accepted values: "720p", "1080p", "2160p". |
| aspect_ratio | No | string | Aspect ratio of the output video. Accepted values: "16:9", "9:16", "1:1". |
| fps | No | integer | Frames per second of the output video. Accepted values: 24, 25, 30. |
| generate_audio | No | boolean | Whether to generate synchronized audio that matches the video motion and mood. |
Example Request - LTX-2 Video API generate request
JSON
{
"image_url": "https://storage.googleapis.com/falserverless/example_inputs/ltxv-2-i2v-input.jpg",
"prompt": "A woman stands still amid a busy neon-lit street at night. The camera slowly dollies in toward her face as people blur past, their motion emphasizing her calm presence. City lights flicker and reflections shift across her denim jacket.",
"duration": 6,
"resolution": "1080p",
"aspect_ratio": "16:9",
"fps": 25,
"generate_audio": true
} Response - LTX-2 Video API generate request
JSON
{
"status": "IN_QUEUE",
"request_id": "ltx2-v-7a3b4c5d-6e8f-9012-3456-7890abcdef",
"message": "Video generation request queued successfully."
} Request Headers
| Header | Description |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | Your subscription key for authentication |
Response Handling
The LTX-2 Video API returns specific HTTP status codes and response bodies to indicate the success or failure of a request. Developers should implement error handling in their applications to manage these responses effectively.
Common Status Codes and Responses
| Status Code | Description | Response Body |
|---|---|---|
| 200 | Success - The request was successfully processed. | { "success": true, ... } |
| 400 | Bad Request - The request contains invalid parameters or missing fields. | { "error": "Invalid request parameters" } |
| 401 | Unauthorized - The provided subscription key is missing or invalid. | { "error": "Invalid or missing authentication" } |
| 403 | Forbidden - The subscription does not have access to this API or action. | { "error": "Access denied for this operation" } |
| 404 | Not Found - The requested resource or endpoint could not be found. | { "error": "Endpoint not found" } |
| 429 | Too Many Requests - The request rate limit has been exceeded. | { "error": "Rate limit exceeded, please retry later" } |
| 500 | Internal Server Error - An unexpected error occurred on the server. | { "error": "An unexpected error occurred, please try again later" } |
Example Error Response
{
"error": "Invalid parameters"
} Retrieving Results
After submitting your request, use this endpoint to check status and retrieve results.
Endpoint
POST https://gateway.pixazo.ai/ltx-2-video-api-581/v1/ltx-2-video-api-request-result
Request Body
{ "request_id": "ltx2-v-7a3b4c5d-6e8f-9012-3456-7890abcdef" } POST https://gateway.pixazo.ai/ltx-2-video-api-581/v1/ltx-2-video-api-request-result HTTP/1.1
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"request_id": "ltx2-v-7a3b4c5d-6e8f-9012-3456-7890abcdef"
} import requests
url = "https://gateway.pixazo.ai/ltx-2-video-api-581/v1/ltx-2-video-api-request-result"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"request_id": "ltx2-v-7a3b4c5d-6e8f-9012-3456-7890abcdef"
}
response = requests.post(url, json=data, headers=headers)
print(response.json()) const url = 'https://gateway.pixazo.ai/ltx-2-video-api-581/v1/ltx-2-video-api-request-result';
const data = {
request_id: 'ltx2-v-7a3b4c5d-6e8f-9012-3456-7890abcdef'
};
fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
},
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error)); curl -X POST "https://gateway.pixazo.ai/ltx-2-video-api-581/v1/ltx-2-video-api-request-result" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"request_id": "ltx2-v-7a3b4c5d-6e8f-9012-3456-7890abcdef"
}' import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.time.Duration;
public class PollingExample {
public static void main(String[] args) throws Exception {
String url = "https://gateway.pixazo.ai/ltx-2-video-api-581/v1/ltx-2-video-api-request-result";
String json = "{" + "\n" +
" \"request_id\": \"ltx2-v-7a3b4c5d-6e8f-9012-3456-7890abcdef\"" + "\n" +
"}";
HttpClient client = HttpClient.newBuilder()
.connectTimeout(Duration.ofSeconds(10))
.build();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Content-Type", "application/json")
.header("Cache-Control", "no-cache")
.header("Ocp-Apim-Subscription-Key", "YOUR_SUBSCRIPTION_KEY")
.POST(HttpRequest.BodyPublishers.ofString(json))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
} <?php
$url = 'https://gateway.pixazo.ai/ltx-2-video-api-581/v1/ltx-2-video-api-request-result';
$data = [
'request_id' => 'ltx2-v-7a3b4c5d-6e8f-9012-3456-7890abcdef'
];
$json = json_encode($data);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json',
'Cache-Control: no-cache',
'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?> LTX-2 Video API Pricing
| Resolution | Price (USD) |
|---|---|
| All Resolution | $0.6 |
Ready to generate LTX-2 Video API assets?
Start with an API key, then automate your pipeline.