API reference · Lightricks
lightricks/ltx23-v2v-trainer
Integrate this model through SandBase's unified API, with production-ready schemas and examples.
Production endpoint
Send your first request
OpenAI-compatible endpoint with unified authentication and usage tracking.
POST
https://api.sandbase.ai/v1/runModel ID
lightricks/ltx23-v2v-trainer01
Input Schema
21 parameters · 0 required · 21 optional
| Parameter | Type | Required | Description |
|---|---|---|---|
rank | integer | Optional | The rank of the LoRA adaptation. Higher values increase capacity but use more memory. · Options: 8, 16, 32, 64, 128 · Default: 32 8163264128 |
stg_scale | number | Optional | STG (Spatio-Temporal Guidance) scale. 0.0 disables STG. Recommended value is 1.0. · Min: 0 · Max: 3 · Default: 1 |
frame_rate | integer | Optional | Target frames per second for the video. · Min: 8 · Max: 60 · Default: 25 |
resolution | string | Optional | Resolution to use for training. Higher resolutions require more memory. · Options: low, medium, high · Default: "medium" lowmediumhigh |
validation | object[] | Optional | A list of validation inputs with prompts and reference videos. · Default: [] |
aspect_ratio | string | Optional | The aspect ratio of the generated image. · Options: 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16 21:916:93:24:35:41:14:53:42:39:16 |
debug_dataset | boolean | Optional | When enabled, the trainer returns a downloadable archive of your preprocessed training data for manual inspection. Use this to verify that your videos, images, and captions were processed correctly before committing to a full training run. · Default: false |
learning_rate | number | Optional | Learning rate for optimization. Higher values can lead to faster training but may cause overfitting. · Min: 0.000001 · Max: 1 · Default: 0.0002 |
trigger_phrase | string | Optional | A phrase that will trigger the LoRA style. Will be prepended to captions during training. · Default: "" |
number_of_steps | integer | Optional | The number of training steps. · Min: 100 · Max: 20000 · Default: 2000 |
auto_scale_input | boolean | Optional | If true, videos will be automatically scaled to the target frame count and fps. This option has no effect on image datasets. · Default: false |
number_of_frames | integer | Optional | Number of frames per training sample. Must satisfy frames % 8 == 1 (e.g., 1, 9, 17, 25, 33, 41, 49, 57, 65, 73, 81, 89, 97). · Min: 9 · Max: 121 · Default: 89 |
training_data_url | string | Optional | URL to zip archive with videos or images. Try to use at least 10 files, although more is better. **Supported video formats:** .mp4, .mov, .avi, .mkv **Supported image formats:** .png, .jpg, .jpeg Note: The dataset must contain ONLY videos OR ONLY images - mixed datasets are not supported. The archive can also contain text files with captions. Each text file should have the same name as the media file it corresponds to. |
validation_frame_rate | integer | Optional | Target frames per second for validation videos. · Min: 8 · Max: 60 · Default: 25 |
validation_resolution | string | Optional | The resolution to use for validation. · Options: low, medium, high · Default: "high" lowmediumhigh |
split_input_into_scenes | boolean | Optional | If true, videos above a certain duration threshold will be split into scenes. · Default: true |
validation_aspect_ratio | string | Optional | The aspect ratio to use for validation. · Options: 16:9, 1:1, 9:16 · Default: "1:1" 16:91:19:16 |
first_frame_conditioning_p | number | Optional | Probability of conditioning on the first frame during training. Lower values work better for video-to-video transformation. · Min: 0 · Max: 1 · Default: 0.1 |
validation_negative_prompt | string | Optional | A negative prompt to use for validation. · Default: "worst quality, inconsistent motion, blurry, jittery, distorted" |
validation_number_of_frames | integer | Optional | The number of frames in validation videos. · Min: 9 · Max: 121 · Default: 89 |
split_input_duration_threshold | number | Optional | The duration threshold in seconds. If a video is longer than this, it will be split into scenes. · Min: 1 · Max: 60 · Default: 30 |
02
Output Schema
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the generation task |
status | string | Task status: pending, running, completed, failed, timeout |
model | string | Model used for the generation |
outputs | array | Array of output items |
outputs[].url | string | URL of the generated artifact |
outputs[].content_type | string | MIME type (e.g. image/png, video/mp4) |
error | object | null | Error details if failed, null on success |
error.type | string | Machine-readable error type code |
error.message | string | Human-readable error description |
Async Workflow
This model uses asynchronous execution. Submit a request and poll for the result.
- Submit — POST to /v1/run, receive an
id - Poll — GET /v1/run/{id} until status is
completed,failed, ortimeout - Retrieve — Read
outputsfrom the completed response
03
Code Examples
Ready-to-run snippets
# Step 1: Submit
curl -X POST https://api.sandbase.ai/v1/run \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "lightricks/ltx23-v2v-trainer",
"rank": 32,
"stg_scale": 1,
"frame_rate": 25,
"resolution": "medium",
"validation": [],
"debug_dataset": false,
"learning_rate": 0.0002,
"trigger_phrase": "",
"number_of_steps": 2000,
"auto_scale_input": false,
"number_of_frames": 89,
"validation_frame_rate": 25,
"validation_resolution": "high",
"split_input_into_scenes": true,
"validation_aspect_ratio": "1:1",
"first_frame_conditioning_p": 0.1,
"validation_negative_prompt": "worst quality, inconsistent motion, blurry, jittery, distorted",
"validation_number_of_frames": 89,
"split_input_duration_threshold": 30,
"prompt": "a beautiful sunset over mountains"
}'
# Step 2: Poll result (replace <id>)
curl https://api.sandbase.ai/v1/run/<id> \
-H "Authorization: Bearer YOUR_API_KEY"
