LTX-2 API documentation
Create asynchronous text-to-video and image-to-video tasks, then poll the returned task ID until the video is ready.
https://ltx-2ai.comAuthentication
Use your API key as a Bearer token. Include Content-Type: application/json when sending a JSON request body.
Authorization: Bearer YOUR_API_KEY
Content-Type: application/jsonVideo generation is asynchronous. Poll the status endpoint every 5-10 seconds; shorter intervals add load without making the task complete sooner.
Create a video task
https://ltx-2ai.com/api/video/ltx-2/generateCreates an LTX-2 task and immediately returns a task_id. This reference covers text-to-video and image-to-video requests.
Generation modes
Send a prompt without an image. aspect_ratio controls the output frame.
Send a prompt and a publicly accessible image URL. The input image determines the output aspect ratio.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| type | string | No | Optional: text-to-video or image-to-video. If omitted, providing image selects image-to-video. |
| prompt | string | Yes | Video description, 3-2000 characters. Required for both modes. |
| image | string | No | Public image URL. Required for image-to-video; aliases image_url and imageUrl are accepted. |
| resolution | string | No | 480p, 720p, or 1080p. Default: 720p. |
| aspect_ratio | string | No | 16:9 or 9:16 for text-to-video. Default: 16:9. |
| duration | integer | No | Video duration from 5 to 20 seconds. Default: 5. |
| seed | integer | No | Random seed. Use -1 for a random result. |
| public | boolean | No | Whether the task may appear in public galleries. |
Request example
curl --request POST \
--url https://ltx-2ai.com/api/video/ltx-2/generate \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"type": "image-to-video",
"prompt": "The subject turns toward the camera and smiles naturally",
"image": "https://example.com/input.jpg",
"resolution": "720p",
"duration": 5,
"seed": -1
}'Response example
{
"code": 200,
"message": "success",
"data": {
"task_id": "n50abc123def456ltx2",
"status": "IN_PROGRESS",
"consumed_credits": 24
}
}Check task status
https://ltx-2ai.com/api/video/ltx-2/statusSend task_id as a GET query parameter. POST with a JSON body is also supported. Keep polling while the task is IN_PROGRESS.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| task_id | string | Yes | Task ID returned by the generate endpoint. |
Request example
curl --request GET \
--url 'https://ltx-2ai.com/api/video/ltx-2/status?task_id=n50abc123def456ltx2' \
--header 'Authorization: Bearer YOUR_API_KEY'Response example
{
"code": 200,
"message": "success",
"data": {
"task_id": "n50abc123def456ltx2",
"status": "SUCCESS",
"consumed_credits": 24,
"error_message": null,
"created_at": "2026-08-07T12:00:00Z",
"request": {
"type": "image-to-video",
"prompt": "The subject turns toward the camera and smiles naturally",
"image": "https://example.com/input.jpg",
"resolution": "720p",
"duration": 5
},
"response": [
"https://cdn.example.com/video.mp4"
]
}
}Status values
IN_PROGRESSThe video is queued or rendering. Continue polling.
SUCCESSGeneration completed. The response array contains the video URL.
FAILEDGeneration failed. Read error_message for details; deducted credits are refunded by the task service.
Error responses
| HTTP | Description |
|---|---|
| 400 | A required parameter is missing or invalid. |
| 401 | The Bearer API key is missing or invalid. |
| 404 | No task exists for the supplied task_id. |
| 405 | The HTTP method is not supported by this endpoint. |
| 500 | A temporary generation or status error occurred. Retry later or contact support. |
