LLitMediaAPI Docs

Video Generation

Create video generation tasks from a text prompt or a source image. The endpoint is asynchronous: create a task, then poll Task Status until it completes.

i

Generation consumes credits (base credits × duration × quality × output-count multipliers, see Pricing & Credits) and requires a valid Authorization: Bearer <API_KEY> header.

Create a video task

POST /v1/videos

One endpoint covers every input shape: a single image_url (image-to-video), image_url + last_image_url (first/last frame), or image_url_list / video_url_list / audio_url_list (multiple reference images / videos / audios); omit all of them for text-to-video. The chosen model code must support that mode — see the Models page (Frame / Reference / Ref video / Ref audio columns). last_image_url is mutually exclusive with the three reference lists, and audio_url_list must accompany image or video references.

Body parameters

FieldTypeRequiredDescription
modelstringRequiredStatic video model code, e.g. "kling-3.0". The Models page lists every code with its allowed parameter values.
promptstringRequiredText description of the video to generate. Max length is per model (see Models page).
image_urlstringOptionalPublic URL of the source image. When present the task runs as image-to-video. In first/last-frame mode this is the first frame; in reference mode it is merged into image_url_list. Image count / size / format limits are per model.
last_image_urlstringOptionalPublic URL of the last frame image. First/last-frame mode only: must be sent together with image_url (first frame), and the model must support Frame (see Models page). Mutually exclusive with image_url_list.
image_url_listarray<string>OptionalMultiple reference image URLs (a JSON array, or a comma-separated string). Reference mode only: the model must support Reference (see Models page); the total count (including image_url) must stay within the model's image limit. Mutually exclusive with last_image_url.
video_url_listarray<string>OptionalReference video URLs (a JSON array, or a comma-separated string; .mp4 / .mov). Reference mode only: the model must support Ref video (see Models page); the count must stay within the model's video limit. Mutually exclusive with last_image_url.
audio_url_listarray<string>OptionalReference audio URLs (a JSON array, or a comma-separated string; .mp3 / .wav). Reference mode only: the model must support Ref audio (see Models page); the count must stay within the model's audio limit. Must be sent together with image_url / image_url_list / video_url_list. Mutually exclusive with last_image_url.
ratiostringOptionalAspect ratio, e.g. "16:9", "9:16", "1:1". Allowed values and default vary by model.
qualitystringOptionalOutput resolution tier (normalized to lowercase). Allowed values and default vary by model.
durationintOptionalClip length in seconds. Allowed values and default vary by model.
video_numintOptionalNumber of variants to generate, up to the model's max (1–4). Default 1.
soundintOptionalSound effect switch: 1 on, 0 off. Only accepted on models marked with Sound on the Models page.
seedintOptionalReproducibility seed. 0 = random.
negative_promptstringOptionalWhat to avoid in the output.
CURL — TEXT TO VIDEO
curl -X POST "https://litvideo-api.litmedia.ai/v1/videos" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer lvsk-xxxxxxxxxxxxxxxx" \
  -d '{
    "model": "litai-5",
    "prompt": "A neon-lit city street at night, cinematic drone shot",
    "ratio": "16:9",
    "duration": 5,
    "quality": "720p"
  }'
CURL — IMAGE TO VIDEO
curl -X POST "https://litvideo-api.litmedia.ai/v1/videos" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer lvsk-xxxxxxxxxxxxxxxx" \
  -d '{
    "model": "kling-3.0",
    "prompt": "Slow zoom-in, hair moving in the wind",
    "image_url": "https://example.com/portrait.jpg",
    "duration": 5,
    "quality": "std"
  }'
CURL — FIRST / LAST FRAME
curl -X POST "https://litvideo-api.litmedia.ai/v1/videos" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer lvsk-xxxxxxxxxxxxxxxx" \
  -d '{
    "model": "vidu-q3-pro",
    "prompt": "The scene morphs smoothly from dawn to dusk",
    "image_url": "https://example.com/first.jpg",
    "last_image_url": "https://example.com/last.jpg",
    "duration": 5,
    "quality": "1080p"
  }'
CURL — MULTIPLE REFERENCE IMAGES
curl -X POST "https://litvideo-api.litmedia.ai/v1/videos" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer lvsk-xxxxxxxxxxxxxxxx" \
  -d '{
    "model": "kling-3-omni",
    "prompt": "A character walking through a neon alley",
    "image_url_list": [
      "https://example.com/ref-1.jpg",
      "https://example.com/ref-2.jpg",
      "https://example.com/ref-3.jpg"
    ],
    "duration": 5,
    "quality": "std"
  }'
CURL — REFERENCE VIDEOS & AUDIOS
curl -X POST "https://litvideo-api.litmedia.ai/v1/videos" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer lvsk-xxxxxxxxxxxxxxxx" \
  -d '{
    "model": "seedance-2.5",
    "prompt": "Recreate the camera movement and rhythm of the reference video with the character from the reference images",
    "image_url_list": [
      "https://example.com/character-1.jpg",
      "https://example.com/character-2.jpg"
    ],
    "video_url_list": [
      "https://example.com/motion-ref.mp4"
    ],
    "audio_url_list": [
      "https://example.com/voice-ref.mp3"
    ],
    "duration": 10,
    "quality": "720p"
  }'

Response

On success, data carries the unique task identifier used to poll progress (tsk_ + 32 random hex characters, bound to your account):

RESPONSE
{
  "code": 200,
  "msg": "success",
  "data": {
    "task_id": "tsk_9f2c8a17b34d6e05a1c2d3e4f5067890"
  }
}
i

The model code and every parameter value are validated against the Models catalog before the task is created. Unknown codes, unsupported modes, oversized prompts or out-of-range values fail the request with an error envelope (code 1046).

Recommended flow

  1. Pick a model code from the Models page and check its supported parameter values.
  2. POST to /v1/videos and store the returned task_id.
  3. Poll Task Status (GET /v1/tasks/{task_id}) every few seconds until the task succeeds or fails.
  4. Download or display the result video URL from the status payload.
On this page