apyhub
Back
▣ ARTIFICIAL INTELLIGENCE · SMART GENERATION

Generate Text to Video With LTX 2 Video (RTX 5090)

What it does

This service turns a text prompt or a source photo into a short LTX-2 video on a dedicated NVIDIA RTX 5090, and gives you a task ID to track progress.

Text to Video — Send a prompt, and optionally seed, model, length, quality, and resolution. Use the POST /v1/video/generate endpoint to start the job. length supports 3s, 5s, or 10s, quality can be fast, balanced, or best, and resolution can be sd or hd.

Image to Video — Send an image (base64-encoded) and a prompt describing the motion, and optionally seed, length (3s, 5s, or 10s), quality (fast, balanced, or best), and resolution (sd or hd). Use the POST /v1/video/i2v-ltx2 endpoint to animate a photo while keeping the composition of the source image — a good fit for ad mockups, product demos, and social content.

Both endpoints respond with status, message, and task_id so you can store the job and poll later. Poll the shared GET /v1/video/tasks/:task_id endpoint until the job reaches completed or error. The status response includes type, status, task_id, elapsed_s, and, when generation finishes, an output_url for the final MP4. If something fails, check the error field on the task response.

This service is a good fit for ad mockups, concept previews, social clips, and internal creative iteration where a short video draft is enough — whether starting from a text description or animating an existing photo.

Notes: Text-to-video and image-to-video with LTX-2 19B (distilled) on a dedicated NVIDIA RTX 5090. Text-to-video generates a ~5-second cinematic clip in ~30-60 seconds; image-to-video generates a ~5-second clip in ~30-60 seconds.

▣ ENDPOINT 01 / 03
POST
Generate a short video (LTX-2, RTX 5090)
https://api.eu.apyhub.com/mastera-ai/ltx-2-video-rtx-5090/v1/video/generate

QUICKSTART

GUIDE

Quickstart

Generate a short text-to-video task from a prompt.

curl -X POST "https://api.eu.apyhub.com/mastera-ai/ltx-2-video-rtx-5090/v1/video/generate" \
  -H 'apy-token: $APY_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "length": "3s",
    "model": "ltx2",
    "prompt": "A red fox running through fresh snow, slow motion, cinematic lighting",
    "quality": "fast",
    "resolution": "sd",
    "seed": 0
  }'

What you'll get back

Returns a JSON object with status, message, and task_id string fields. status indicates the job state, message contains a human-readable note, and task_id is the queued generation task identifier.

{
  "task_id": "67ddbf74b89f",
  "status": "queued",
  "message": "Video generation started. Poll GET /v1/video/tasks/{task_id}."
}
TRY ITLIVE · 10000 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Text description of the video to generate.
Random seed for reproducible generation.
Video model to use.
Approximate duration (3s, 5s or 10s).

About this endpoint

What it does

Starts a text-to-video generation request using the LTX-2 model and returns a task identifier for tracking the job. The request body includes the text prompt and optional generation settings such as seed, length, quality, and resolution.

Request Body

ParameterTypeDescription
promptStringText description of the video to generate.
seedIntegerRandom seed for reproducible generation. Default: 0.
modelENUMVideo model to use. Allowed value: ltx2. Default: ltx2.
lengthENUMApproximate duration. Allowed values: 3s, 5s, 10s. Default: 5s.
qualityENUMGeneration quality (inference steps). Allowed values: fast, balanced, best. Default: fast.
resolutionENUMOutput resolution. Allowed values: sd (SD 480p), hd (HD 720p). Default: sd.

Response

Returns a JSON object with status, message, and task_id fields. The status is a string indicating the job state, message is a string, and task_id is the identifier for the submitted task.

ParameterTypeDescription
statusStringJob status. Example: queued.
messageStringInformational message returned by the service.
task_idStringIdentifier for the submitted task.

Notes

This endpoint kicks off an async job and returns immediately with a job identifier; the actual work runs in the background. Pair this call with the corresponding job_check endpoint — poll that until the status reaches a terminal state to retrieve the result. Extract the job id from task_id in the response.

▣ ENDPOINT 02 / 03
POST
Generate a short video from photo (LTX-2 I2V, RTX 5090)
https://api.eu.apyhub.com/mastera-ai/ltx-2-video-rtx-5090/v1/video/i2v-ltx2

QUICKSTART

GUIDE

Quickstart

Start an image-to-video generation job with a source photo and a motion prompt.

curl -X POST "https://api.eu.apyhub.com/mastera-ai/ltx-2-video-rtx-5090/v1/video/i2v-ltx2" \
  -H 'apy-token: $APY_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "prompt": "the subject slowly turns and smiles at the camera",
    "image": "<base64-encoded-image>",
    "quality": "fast",
    "resolution": "sd",
    "length": "5s",
    "seed": 0
  }'

What you'll get back

Returns a JSON object with status (string), message (string), and task_id (string) fields.

{
  "task_id": "67ddbf74b89f",
  "status": "queued",
  "message": "Video generation started. Poll GET /v1/video/tasks/{task_id}."
}
​```
TRY ITLIVE · 10000 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Base64-encoded source image to animate.
The text description of the motion to generate.
Random seed for reproducible generation.
Output clip duration.
Generation quality tier.

About this endpoint

What this endpoint does

Image to Video Generator turns a photo into a short animated LTX-2 clip and gives you a task ID to track progress. Send an image (base64-encoded) and a prompt describing the motion, and optionally seed, length (3s, 5s, or 10s), quality (fast, balanced, or best), and resolution (sd or hd); the request is queued and processed on RTX 5090 hardware.

The POST /v1/video/i2v-ltx2 endpoint starts a generation task and returns a status, message, and task_id. Poll GET /v1/video/tasks/:task_id (same poller as the LTX-2 text-to-video endpoint) until the job reaches completed or error. The status response includes type, status, task_id, elapsed_s, and, when generation finishes, an output_url for the final MP4.

Use Image to Video Generator when you want to animate a product photo, portrait, or scene image into a short cinematic clip while keeping the composition of the source photo — a good fit for ad mockups, product demos, and social content.

Request Body

ParameterTypeDescription
promptStringThe text description of the motion to generate.
imageStringBase64-encoded source image to animate.
seedIntegerRandom seed for reproducible generation. Default: 0.
lengthENUMOutput clip duration. Allowed values: 3s, 5s, 10s. Default: 5s.
qualityENUMGeneration quality tier. Allowed values: fast, balanced, best. Default: fast.
resolutionENUMOutput resolution tier. Allowed values: sd, hd. Default: sd.

Response

Returns a JSON object with status, message, and task_id fields. status is a string indicating the job state, message is a string, and task_id is the identifier for the submitted task.

ParameterTypeDescription
statusStringJob status.
messageStringAdditional message about the request or job.
task_idStringThe job identifier to use when checking progress.

Notes

This endpoint kicks off an async job and returns immediately with a job identifier; the actual work runs in the background. Pair this call with the video-get-task endpoint (GET /v1/video/tasks/:task_id) — poll that until the status reaches a terminal state to retrieve the result. Extract the job id from task_id.

Notes: Image-to-video with LTX-2 19B (distilled) on a dedicated NVIDIA RTX 5090. Generates a ~5-second clip in ~30-60 seconds.

▣ ENDPOINT 03 / 03
GET
Poll LTX-2 video status (RTX 5090)
https://api.eu.apyhub.com/mastera-ai/ltx-2-video-rtx-5090/v1/video/tasks/:task_id

QUICKSTART

GUIDE

Quickstart

Fetch the status of a video generation task by its task_id.

curl -X GET "https://api.eu.apyhub.com/mastera-ai/ltx-2-video-rtx-5090/v1/video/tasks/:task_id" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with these top-level fields: type (string), error (string), status (queued, generating, completed, or error), task_id (string), elapsed_s (number), and output_url (string, present only when status is completed).

{
  "type": "ltx2",
  "status": "completed",
  "task_id": "ltx-task-123",
  "elapsed_s": 12.4,
  "output_url": "https://cdn.example.com/video.mp4"
}
TRY ITLIVE · 1 ATOM
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Polls the status of an LTX-2 video generation task by task_id and returns the task’s current state and related fields. When the task is completed, the response can include the finished MP4 URL in output_url.

Path Parameter(s)

AttributeTypeDescription
task_idStringThe task identifier in the path (:task_id).

Response

Returns a JSON object with type, error, status, task_id, elapsed_s, and output_url fields. The status field is a string enum that indicates the task state; output_url is only present when status is completed.

ParameterTypeDescription
typeStringTask type string; the schema example is ltx2.
errorStringError message returned by the task, when available.
statusENUMTask state. Allowed values: queued, generating, completed, error.
task_idStringThe task identifier.
elapsed_sNumberElapsed time in seconds.
output_urlStringURL to the finished MP4, returned only when status is completed.
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.