Skip to navigation

Input Formats

Media input specification for the API

Input Methods

The API accepts media through image_uri, video_uri, and audio_uri parameters using three methods:

  • Cloud Storage: upload with v1/upload and pass the returned storage_uri.
  • HTTPS URL: a public link the API downloads.
  • Data URI: the file inline in the request, base64-encoded.

Each method has a size limit.


Cloud Storage Upload

Upload via v1/upload endpoint. Returns a storage_uri for use in generation requests. Pass it as-is.

{
"image_uri": "ltx://<bucket>/uploads/<file-id>"
}
Max file sizeUpload URL expiresFile availableAuthentication
200 MB1 hour24 hoursAPI key
200 MB is the upload endpoint cap. Each feature applies its own size limit when the file is used in a generation request (for example, images are capped at 15 MB), so a large upload may be rejected at generation time depending on the endpoint. See Per-endpoint video limits.

HTTPS URL

Direct link to publicly accessible files. API fetches during request.

{
"image_uri": "YOUR_IMAGE_URI"
}

Requirements:

  • HTTPS only
  • Timeout: 30s
  • Domain names (no IPs)
  • Publicly accessible
  • No redirects
  • The response’s Content-Type must be one of the MIME types in Supported Formats. For example, image/jpg and application/octet-stream are rejected.

Data URI (Base64)

Inline base64-encoded data. Format: data:{mime-type};base64,{encoded-data}

{
"image_uri": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAA..."
}
Base64 encoding increases file size by ~33%. The whole JSON request body is capped at 32 MB, so a request carrying several data URIs can exceed it even when each fits its own limit. Over the cap, the API returns 413 request_too_large_error.

Size limits

Cloud Storage and HTTPS URLs share the same limits. Data URIs have lower ones, measured on the encoded size.

MediaCloud Storage or HTTPS URLData URI
Images15 MB7 MB
Video32 MB, higher on some endpoints15 MB
Audio32 MB15 MB

Per-endpoint video limits

Video input is capped at 32 MB on most endpoints. These accept more:

EndpointMax video size
extend100 MB
video-to-video-hdr200 MB
video-to-video-reframe200 MB
video-alpha-gen200 MB
video-upscale200 MB

To send a file this large, use Cloud Storage or an HTTPS URL. Data URI input keeps its own lower limit on every endpoint.


Supported Formats

Images

FormatMIME Type
PNGimage/png
JPEG / JPGimage/jpeg
WEBPimage/webp

Videos

FormatMIME TypeCodecs
MP4video/mp4H.264, H.265
MOVvideo/quicktimeH.264, H.265
MKVvideo/x-matroskaH.264, H.265

Audio

FormatMIME TypeCodecs
WAVaudio/wavPCM (16-bit, 24-bit, 32-bit float), AAC, MP3, Vorbis, FLAC
MP3audio/mpegMP3
M4Aaudio/mp4AAC
OGGaudio/oggOpus, Vorbis
Other PCM formats, such as 32-bit integer or 8-bit, are not supported.