Skip to main content

Documentation Index

Fetch the complete documentation index at: https://apixo.ai/docs/llms.txt

Use this file to discover all available pages before exploring further.

Overview

LTX 2 19B is a Lightricks video generation model for text-to-video and image-to-video workflows. It also supports LoRA-conditioned variants when you need custom styles, characters, or structural guidance. Use this page when you are ready to call the API after trying the model in the APIXO playground.
CapabilityValue
Model IDltx-2-19b
Modestext-to-video, image-to-video, text-to-video-LoRA, image-to-video-LoRA
Prompt length1-5000 characters
Reference imagesExactly 1 URL for image-to-video and image-to-video-LoRA
Aspect ratios16:9, 9:16 for text-to-video modes
Resolution tiers480p, 720p, 1080p
Duration5-20 seconds
LoRA controlsUp to 3 LoRA items, each with path and scale
Seed-1, or 1 through 2147483647

Endpoint and authentication

Base URL:
https://api.apixo.ai/api/v1
MethodEndpointPurpose
POST/generateTask/ltx-2-19bSubmit a generation task
GET/statusTask/ltx-2-19b?taskId={taskId}Poll task status and retrieve results
All requests require your APIXO API key:
Authorization: Bearer YOUR_API_KEY
Submit requests also require:
Content-Type: application/json

Copy-paste async quickstart

This minimal request submits a text-to-video task and returns a taskId.
curl -X POST "https://api.apixo.ai/api/v1/generateTask/ltx-2-19b" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "request_type": "async",
    "input": {
      "mode": "text-to-video",
      "prompt": "a cinematic shot of a small robot walking through a rainy neon street",
      "resolution": "720p",
      "duration": 10,
      "aspect_ratio": "16:9"
    }
  }'
Successful response:
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678"
  }
}
Save the taskId; you need it to poll for the final result.

Poll for result

curl -X GET "https://api.apixo.ai/api/v1/statusTask/ltx-2-19b?taskId=task_12345678" \
  -H "Authorization: Bearer YOUR_API_KEY"
Processing response:
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678",
    "state": "processing",
    "createTime": 1767965610929
  }
}
Success response:
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678",
    "state": "success",
    "resultJson": "{\"resultUrls\":[\"https://file.apixo.ai/video.mp4\"]}",
    "createTime": 1767965610929,
    "completeTime": 1767965652317,
    "costTime": 41388
  }
}
Failed response:
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678",
    "state": "failed",
    "failCode": "SensitiveContent",
    "failMsg": "Content violates provider policy, please adjust the prompt",
    "createTime": 1767965610929,
    "completeTime": 1767965620132
  }
}
Parse resultJson after state becomes success:
const payload = JSON.parse(data.resultJson);
const videoUrls = payload.resultUrls;

Request body

Text-to-video

{
  "request_type": "async",
  "input": {
    "mode": "text-to-video",
    "prompt": "a futuristic city with flying cars at sunset",
    "resolution": "1080p",
    "duration": 10,
    "aspect_ratio": "16:9",
    "seed": 54248617
  }
}

Image-to-video

{
  "request_type": "async",
  "input": {
    "mode": "image-to-video",
    "prompt": "make the scene cinematic with a slow camera push and soft motion",
    "image_urls": [
      "https://example.com/source.jpg"
    ],
    "resolution": "720p",
    "duration": 8
  }
}

Image-to-video with LoRA

{
  "request_type": "async",
  "input": {
    "mode": "image-to-video-LoRA",
    "prompt": "animate this character in a stylized studio lighting setup",
    "image_urls": [
      "https://example.com/source.jpg"
    ],
    "resolution": "720p",
    "duration": 8,
    "loras": [
      {
        "path": "https://huggingface.co/username/model.safetensors?download=true",
        "scale": 1.2
      }
    ]
  }
}

Parameters

request_type
string
default:"async"
required
Result delivery mode. Use async for polling with statusTask, or callback for webhook delivery.
callback_url
string
Required when request_type is callback. Must be a public HTTPS endpoint that can receive the final task payload. See Webhooks.
input
object
required
LTX 2 19B input parameters.

Response format

Submit task response

POST /generateTask/ltx-2-19b returns a task ID when the task is accepted:
code
integer
API status code. 200 means the task was accepted.
message
string
Human-readable status message.
data.taskId
string
Unique task identifier used with the status endpoint.

Status response fields

taskId
string
Unique task identifier.
state
string
Current task state: pending, processing, success, or failed.
resultJson
string
JSON string containing the generated video URLs in resultUrls. Present when state is success.
failCode
string
Machine-readable failure code. Present when state is failed.
failMsg
string
Human-readable failure message. Present when state is failed.
createTime
integer
Task creation timestamp in Unix milliseconds.
completeTime
integer
Task completion timestamp in Unix milliseconds. Present after completion.
costTime
integer
Processing duration in milliseconds when available. Present after completion.

Webhook callback mode

Use callback mode when your backend should receive the final result automatically instead of polling.
curl -X POST "https://api.apixo.ai/api/v1/generateTask/ltx-2-19b" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "request_type": "callback",
    "callback_url": "https://your-server.com/webhooks/apixo",
    "input": {
      "mode": "text-to-video",
      "prompt": "a clean product reveal video with a slow camera push-in",
      "resolution": "720p",
      "duration": 10,
      "aspect_ratio": "16:9"
    }
  }'
The callback data object uses the same terminal fields as the status response. See Webhooks for delivery requirements and retry behavior.

Billing

LTX 2 19B is billed per second. The backend selects the unit price by resolution and base vs LoRA mode, then multiplies that unit price by the submitted duration.
ResolutionBase modes priceLoRA modes priceMinimum 5s cost
480p$0.012 / second$0.015 / secondBase $0.06; LoRA $0.075
720p$0.016 / second$0.02 / secondBase $0.08; LoRA $0.10
1080p$0.024 / second$0.03 / secondBase $0.12; LoRA $0.15
Formula:
total cost = duration * selected per-second unit price
For current route and market comparison pricing, see Pricing.

Latency and polling

Actual latency may vary by prompt complexity, duration, resolution, LoRA loading, provider queue load, and storage transfer time.
WorkloadTypical generation timeRecommended first pollPoll interval
480p40s-60s40s after task creation5s
720p60s-90s60s after task creation5s
1080p90s-120s90s after task creation5s
LoRA modesAdd about 10s-20sAdd about 10s to the base first poll5s
For production video workloads, use callback mode to avoid frequent polling while generation is still running.
Result URLs are normally stored for 15 days. Download and store important outputs promptly. For image-to-video modes, provide exactly one source image. Public image URLs should be directly accessible by APIXO; JPG, PNG, or WebP files are the safest choice. For LoRA workflows, use public downloadable model URLs such as Hugging Face or Civitai download links. Each LoRA item must include both path and scale, even if you want a neutral scale like 1.0. Rate limits and concurrency can vary by account, API key, and route. If you receive 429, slow down requests and retry with backoff. For account-level details, see System APIs.

Errors and troubleshooting

HTTP errors

CodeMeaningWhat to do
400Invalid request body, missing input, missing mode, missing prompt, invalid resolution, invalid duration, invalid seed, invalid image_urls, or invalid lorasFix the request before retrying
401Missing or invalid API keyCheck the Authorization header
402Insufficient balance or quotaAdd balance or switch account/key
403Key or route cannot access the modelCheck permissions and route strategy
404Task not found when pollingCheck the taskId and model endpoint
429Rate limit or concurrency limit reachedRetry with exponential backoff
500Server error or unknown upstream failureRetry with backoff
502Upstream provider or network errorRetry with backoff
503Service temporarily unavailable or async queue is fullRetry later
504Upstream timeoutRetry or use callback mode for long-running jobs

Validation notes

ParameterBackend behavior
input.modeRequired for routing. Must be one of text-to-video, image-to-video, text-to-video-LoRA, image-to-video-LoRA.
input.promptRequired string. Must not be empty and cannot exceed 5000 characters.
input.resolutionRequired string. Must be 480p, 720p, or 1080p.
input.durationRequired JSON integer. Must be from 5 through 20; quoted strings are not valid.
input.image_urlsRequired for image-to-video modes. Must be an array with exactly 1 string URL.
input.aspect_ratioOptional for text-to-video modes. Must be 16:9 or 9:16; defaults to 16:9 when omitted.
input.seedOptional JSON integer. Must be -1, or from 1 through 2147483647.
input.lorasOptional array. If present, it cannot contain more than 3 items.
input.loras[].pathRequired for each LoRA item. Must be a non-empty string.
input.loras[].scaleRequired for each LoRA item. Must be numeric and from 0.0 through 4.0.

Task failure codes

Fail codeMeaningWhat to do
SensitiveContent / InputOutputSensitiveContentDetectedPrompt, input image, or output failed provider safety checksChange the prompt or input image
PromptInvalidPrompt was rejected or malformedAdjust the prompt and retry
ImageFormatIncorrect / InvalidImageSizeInput image failed upstream image validationUse a public, direct JPG, PNG, or WebP URL
ImageNotAccessAPIXO could not fetch an input URLUse a public HTTP or HTTPS URL that returns 200 or 206
RateLimitedProvider-side rate limitRetry with exponential backoff
TimeoutProvider-side timeoutRetry, simplify the request, or use callback mode
Unknown errorProvider returned an unmapped failureRetry with backoff or contact support with the taskId
See Error Codes for the full error reference.