LTX-2 API
activeLTX-2 19B — advanced AI video generation with text-to-video, image-to-video, lipsync, and control modes. Up to 1080p, 5–20 seconds.
Quick Start
Send a request to the LTX-2 API:
| 1 | curl -X POST https://apiin.one/api/v1/videos/generations \ |
| 2 | -H "Authorization: Bearer YOUR_API_KEY" \ |
| 3 | -H "Content-Type: application/json" \ |
| 4 | -d '{ |
| 5 | "model": "ltx-2", |
| 6 | "prompt": "A cat playing piano in a jazz bar, cinematic lighting", |
| 7 | "resolution": "720p", |
| 8 | "aspect_ratio": "16:9", |
| 9 | "duration": 5 |
| 10 | }' |
API Endpoint
/api/v1/videos/generationsSend a POST request with your API key to generate content using LTX-2.
Headers
Bearer YOUR_API_KEY
application/json
Body Parameters
Model identifier: ltx-2
Text description (required for text-to-video and image-to-video)
Mode: text-to-video, image-to-video, lipsync, or control
Image URL for image-to-video mode
Audio URL for lipsync mode
Audio duration in seconds for lipsync (5–20)
Video URL for control mode
Video duration for control mode (5–20)
Control mode: pose, depth, or canny
Audio mode for control: preserve, generate, or none
Output resolution: 480p, 720p, or 1080p Defaults to 720p.
Aspect ratio: 16:9 or 9:16 (text-to-video only) Defaults to 16:9.
Video duration in seconds (5–20) Defaults to 5.
Random seed for reproducibility (-1 for random) Defaults to -1.
Example Request
| 1 | { |
| 2 | "model": "ltx-2", |
| 3 | "prompt": "A cat playing piano in a jazz bar, cinematic lighting", |
| 4 | "resolution": "720p", |
| 5 | "aspect_ratio": "16:9", |
| 6 | "duration": 5 |
| 7 | } |
Example Response
Successful task creation response.
| 1 | { |
| 2 | "code": 200, |
| 3 | "message": "success", |
| 4 | "data": { |
| 5 | "task_id": "n50xxxx_ltx2", |
| 6 | "status": "IN_PROGRESS" |
| 7 | } |
| 8 | } |
Check Task Status
For asynchronous tasks, poll the status endpoint to check when your task is complete:
/api/v1/tasks/{task_id}Returns the current status of a generation task. Poll until status is 'completed' or 'failed'.
| 1 | curl https://apiin.one/api/v1/tasks/task_abc123 \ |
| 2 | -H "Authorization: Bearer aio_your_key" |
Use Cases
- ✓Generate high-quality videos from text prompts
- ✓Animate images into video with image-to-video mode
- ✓Create lipsync videos by combining audio with AI video
- ✓Apply pose/depth/edge control to existing video
API Tester
Test the LTX-2 API directly from your browser:
Error Codes
| 1 | { |
| 2 | "error": { |
| 3 | "code": 400, |
| 4 | "message": "Invalid parameters", |
| 5 | "type": "invalid_request" |
| 6 | } |
| 7 | } |
Frequently Asked Questions
How much does LTX-2 cost?
Credits depend on mode, resolution, and duration. Text/image-to-video: 20–76 credits. Lipsync: 32–128 credits. Control: 64–256 credits.
What modes does LTX-2 support?
Four modes: text-to-video, image-to-video, lipsync (audio+video), and control (pose/depth/canny). Specify with the "type" parameter.
What resolutions are supported?
480p, 720p, and 1080p. Higher resolutions cost more credits.
Why Use LTX-2 Through API in One?
Ready to use LTX-2?
Get Your API Key →