API reference · Lightricks

lightricks/ltx23-v2v-trainer

Integrate this model through SandBase's unified API, with production-ready schemas and examples.

IMAGEAsyncOpen model
Production endpoint

Send your first request

OpenAI-compatible endpoint with unified authentication and usage tracking.

POSThttps://api.sandbase.ai/v1/run
Model IDlightricks/ltx23-v2v-trainer
01

Input Schema

21 parameters · 0 required · 21 optional

ParameterTypeRequiredDescription
rankintegerOptionalThe rank of the LoRA adaptation. Higher values increase capacity but use more memory. · Options: 8, 16, 32, 64, 128 · Default: 32
8163264128
stg_scalenumberOptionalSTG (Spatio-Temporal Guidance) scale. 0.0 disables STG. Recommended value is 1.0. · Min: 0 · Max: 3 · Default: 1
frame_rateintegerOptionalTarget frames per second for the video. · Min: 8 · Max: 60 · Default: 25
resolutionstringOptionalResolution to use for training. Higher resolutions require more memory. · Options: low, medium, high · Default: "medium"
lowmediumhigh
validationobject[]OptionalA list of validation inputs with prompts and reference videos. · Default: []
aspect_ratiostringOptionalThe 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_datasetbooleanOptionalWhen 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_ratenumberOptionalLearning rate for optimization. Higher values can lead to faster training but may cause overfitting. · Min: 0.000001 · Max: 1 · Default: 0.0002
trigger_phrasestringOptionalA phrase that will trigger the LoRA style. Will be prepended to captions during training. · Default: ""
number_of_stepsintegerOptionalThe number of training steps. · Min: 100 · Max: 20000 · Default: 2000
auto_scale_inputbooleanOptionalIf 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_framesintegerOptionalNumber 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_urlstringOptionalURL 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_rateintegerOptionalTarget frames per second for validation videos. · Min: 8 · Max: 60 · Default: 25
validation_resolutionstringOptionalThe resolution to use for validation. · Options: low, medium, high · Default: "high"
lowmediumhigh
split_input_into_scenesbooleanOptionalIf true, videos above a certain duration threshold will be split into scenes. · Default: true
validation_aspect_ratiostringOptionalThe aspect ratio to use for validation. · Options: 16:9, 1:1, 9:16 · Default: "1:1"
16:91:19:16
first_frame_conditioning_pnumberOptionalProbability 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_promptstringOptionalA negative prompt to use for validation. · Default: "worst quality, inconsistent motion, blurry, jittery, distorted"
validation_number_of_framesintegerOptionalThe number of frames in validation videos. · Min: 9 · Max: 121 · Default: 89
split_input_duration_thresholdnumberOptionalThe 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

FieldTypeDescription
idstringUnique identifier for the generation task
statusstringTask status: pending, running, completed, failed, timeout
modelstringModel used for the generation
outputsarrayArray of output items
outputs[].urlstringURL of the generated artifact
outputs[].content_typestringMIME type (e.g. image/png, video/mp4)
errorobject | nullError details if failed, null on success
error.typestringMachine-readable error type code
error.messagestringHuman-readable error description

Async Workflow

This model uses asynchronous execution. Submit a request and poll for the result.

  1. Submit — POST to /v1/run, receive an id
  2. Poll — GET /v1/run/{id} until status is completed, failed, or timeout
  3. Retrieve — Read outputs from 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"