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.

Image Input

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}

Video Input

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

HTTPS URL

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

Requirements:

  • Must use HTTPS protocol
  • Domain names only (no IP addresses)
  • Maximum file size: 32MB
  • 30-second timeout for fetching
  • No redirects allowed
  • Supported formats: MP4 (video/mp4), MOV (video/quicktime), MKV (video/x-matroska)
  • Supported codecs: H.264, H.265/HEVC

Example:

1{
2 "video_uri": "https://example.com/video.mp4"
3}

Data URI

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

Requirements:

  • Must include proper data URI prefix
  • Maximum encoded size: 15MB
  • Supported formats: MP4 (video/mp4), MOV (video/quicktime), MKV (video/x-matroska)
  • Supported codecs: H.264, H.265/HEVC

Format:

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

Example:

1{
2 "video_uri": "data:video/mp4;base64,AAAAIGZ0eXBpc29t..."
3}