Input formats

Image input specification for the API

Some of our APIs use the image_uri parameter accepts images in two formats: HTTPS URLs for hosted images, or base64-encoded Data URIs for direct embedding.

HTTPS URL

Provide a direct link to an image that is publicly accessible on the web. The API will fetch the image from the provided URL.

Requirements:

  • Must use HTTPS protocol
  • Domain names only (no IP addresses)
  • Maximum file size: 15MB
  • 10-second timeout for fetching
  • No redirects allowed
  • Supported formats: PNG, JPEG, WEBP

Example:

1{
2 "image_uri": "https://example.com/sunset.jpg"
3}

Data URI

Embed the image directly in the request as a base64-encoded string. The image data is included inline rather than fetched from a URL.

Requirements:

  • Must include proper data URI prefix
  • Maximum encoded size: 7MB for image-to-video
  • Supported formats: PNG, JPEG, WEBP

Format:

data:image/{format};base64,{base64-encoded-data}

Example:

1{
2 "image_uri": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAA..."
3}