Skip to main content

Image-to-video

Send one image and a text prompt that describes the motion. The image becomes the first frame of the clip. The response contains the generated video clip. The request is synchronous. There is no task to poll. A clip is 1 to 8 seconds long, at 1080p or 720p, with an optional soundtrack.

Models

Both models also serve Text-to-video. See Choosing a model.

Endpoint

The path /v1/videos/animations is an alias. It gives the same result and the same billing.

Request

Every request must include your API key and a JSON content type. See Authentication.
string
required
Your API key.
string
required
Must be application/json.
string
required
The model that generates the clip.Options: nunchux-ltx-2.5-video, nunchux-ltx-2.3-video
string
required
A text description of the motion. Describe what moves, the camera movement and the light. Do not describe again what the image already shows.
array
required
The input image. Send one message with one image_url part. The model accepts one image.You can also send the image as a top-level image_url string.
integer
default:1920
Output width in pixels. Send it together with height. The size selects the tier, 1080p or 720p. 1080p costs more per second.Options: 1920 (1080p), 1280 (720p)
integer
default:1080
Output height in pixels. Send it together with width.Options: 1080 (1080p), 720 (720p)
number
default:6
The clip length in seconds. Range: 1 to 8. The model renders at 24 frames per second, so the length of the clip can differ from your value by a fraction of a second. The response gives the length of the clip.
object
Model options.
integer
The random seed. When you do not send a seed, the model selects one and returns it in the response. The same seed with the same parameters gives the same result.
integer
default:1
The number of clips to generate. Only 1 is supported.
string
default:"b64_json"
The format of the returned clip.Options: b64_json, url
Unsupported fieldsLTX does not accept steps, guidance_scale, negative_prompt or num_frames. A request that contains one of them returns a 400.
A minimal request body:

Response

The response is JSON. The data array contains one MP4 clip, as base64 data or as a URL.
integer
required
The Unix timestamp of the generation.
string
required
The model that generated the clip.
string
required
Always radical_speed. This field does not show the LTX tier. The width and height of the clip show it.
integer
required
The seed of the clip. Send it again to get the same result.
array
required
The generated clip.
A base64 clip is large. A 6 second 1080p clip can be more than 10 MB of base64 data. Use response_format: "url" when you do not need the data in the response.

Example

This example reads a local JPEG file and sends it as a data URI. A clip takes some time to render. Set the timeout of your HTTP client to 120 seconds.

Tips

  • Write the motion, not the image. Say what moves, how the camera moves, and how the light changes.
  • Use an image with the framing that you want in the clip. The clip keeps the framing of the image.
  • When extra.audio is true, describe the sound in the prompt.
  • Start at 1080p and 6 seconds. Use 720p for faster and lower-cost previews.
  • Keep the seed when you like a result. Then change one parameter at a time.

Errors and limits

A clip is billed per second of output video, at the rate of its tier: 1080p costs more per second than 720p. See the pricing page for current rates. Nunchux charges only for a successful clip. A request that fails is never billed. Every request counts toward the requests-per-minute cap of your plan. A request also holds one simultaneous-jobs slot until the response returns. See Rate limits. For authentication and credit errors, see Error codes.