Skip to content
Copy Page
Dev Portal

Inputs

When starting tasks through the Runway API, you’ll often need to provide assets like images. Some restrictions exist for what you can provide.

Assets can be provided via URLs or Data URIs.

The size limits of inputs differ based on whether they are provided as a URL or as a data URI in the JSON request body.

Input typeURL size limitData URI size limit
Image16MB5MB
Video32MB16MB
Audio32MB16MB

In all cases, URLs must meet some basic minimum requirements:

  1. All URLs must be HTTPS.
  2. URLs must reference a domain name in the hostname position, not an IP address.
  3. The server should respond with valid Content-Type and Content-Length headers.
  4. Redirects are not followed. If the URL returns a 3XX response code, the request is considered failed.
  5. The length of any single URL should not exceed 2048 characters.

Additionally, the server responding to the request must support HTTP HEAD requests.

When specifying a URL, the Content-Type response header must be returned, and it must match the media type of your asset. File extensions in URLs are not considered. The Content-Types that are supported are listed below for the supported asset types.

Be aware that application/octet-stream and other generic values are explicitly not supported.

Runway will use a User-Agent header that starts with RunwayML API/ when making requests to your server. If you use a scraping-prevention tool or WAF, be sure to allowlist our user agent string prefix.

A data URI allows you to pass the base64 encoded assets as part of a request to our API, rather than passing a URL to the asset hosted on another server. This can reduce the complexity of your integration by eliminating an upload step, but it also has a lower limit on the size of the assets that can be provided.

Data URIs are accepted in any field where a URL is accepted unless otherwise specified.

  • An appropriate content type must be specified in the data URI. For instance, your data URI for a JPEG should start with something like data:image/jpg;base64,.
  • Data URIs must use the base64 extension. The expected format is data:content/type;base64,.
  • The size limit for your data URI (specified above) is the limit for the encoded data URI. Keep in mind that base64-encoding your asset increases its size by about 33%: to fit an image within the 5MB limit, the binary file must be 3.3MB or less.

Data URIs that do not follow these rules may be rejected with a 400 Bad Request error.

If you do not already have your asset stored in object storage, submitting your asset with a data URI can save you a step. However, the data URI size limit may be too small for some assets. If you cannot be sure that all assets are safely within the un-encoded size limit, you should upload assets to object storage instead.

Submitting a request with data URIs instead of URLs will change the performance characteristics of your integration. Data URIs are part of the request payload, and thus cause your HTTP requests to take longer to submit: all data must be sent serially to our servers. Because the request body JSON must be processed before the assets can be extracted from their data URIs, this may increase the latency of our server responses.

URLs, on the other hand, can be immediately processed in parallel. This means the time between submitting your HTTP request and the start of processing is likely much lower. However, latency between our servers and the server hosting your assets may increase the total request time. Using a CDN or object storage service will help to minimize this cost.

For fields that accept images, the asset must use one of the following encodings, along with the corresponding Content-Type header:

CodecContent-Type header
JPEGimage/jpg or image/jpeg
PNGimage/png
WebPimage/webp

GIF images are not supported.

For fields that accept videos, the asset must use one of the following codecs, along with the corresponding Content-Type header:

Container formatUsual file extensionExpected content typeSupported codecs
MP4.mp4video/mp4H.264, H.265/HEVC, AV1
QuickTime.movvideo/quicktimeH.264, H.265/HEVC, Apple ProRes (422 Proxy, 422 LT, 422, 422 HQ, 4444, 4444 XQ)
Matroska.mkvvideo/x-matroskaH.264, H.265/HEVC, VP8, VP9, AV1
WebM.webmvideo/webmVP8, VP9, AV1
3GPP.3gpvideo/3gppH.264
Ogg.ogvvideo/oggTheora

The following formats are supported but discouraged due to quality, performance, industry support, and file size:

Container formatUsual file extensionExpected content typeSupported codecs
QuickTime.movvideo/quicktimeMJPEG
Matroska.mkvvideo/x-matroskaMPEG2 (H.262)
AVI.avivideo/x-msvideoH.264, MJPEG, MSMPEG4v3
Flash Video.flvvideo/x-flvFLV1, H.264
MPEG.mpg, .mpegvideo/mpegMPEG2 (H.262)

Note that file extension is not considered by the API. Use this value for reference only.

  • H.264 / AVC - Most widely supported modern codec
  • H.265 / HEVC - High efficiency successor to H.264
  • AV1 - Royalty-free, modern codec
  • VP8 / VP9 - Google’s codecs, primarily for WebM
  • Apple ProRes - Professional editing codec (422 Proxy, 422 LT, 422, 422 HQ, 4444, 4444 XQ)
  • MPEG2 (H.262) - Legacy codec for DVDs and broadcasts (discouraged)
  • MJPEG - Motion JPEG, frame-by-frame compression (discouraged)
  • Theora - Open codec for Ogg containers
  • FLV1 - Legacy Flash Video codec (discouraged)
  • MSMPEG4v3 - Legacy Microsoft codec (discouraged)

For fields that accept audio, the asset must use one of the following codecs, along with the corresponding Content-Type header:

Container formatUsual file extensionContent typeSupported codecs
MP3.mp3audio/mpeg, audio/mp3MP3 (MPEG-1/2 Layer 3)
WAV.wavaudio/wav, audio/wave, audio/x-wavPCM (uncompressed)
FLAC.flacaudio/flac, audio/x-flacFLAC (lossless)
M4A.m4aaudio/mp4, audio/x-m4aAAC, ALAC
AAC.aacaudio/aac, audio/x-aacAAC (raw)
  • MP3 (MPEG-1/2 Layer 3) - Universal compatibility, lossy compression
  • AAC (Advanced Audio Coding) - Modern lossy codec, better quality than MP3 at same bitrate
  • FLAC (Free Lossless Audio Codec) - Lossless compression, popular for archival
  • PCM (Pulse Code Modulation) - Uncompressed audio, typically in WAV containers
  • ALAC (Apple Lossless Audio Codec) - Apple’s lossless codec, typically in M4A containers

When using video models, be aware of the supported ratio parameters, which configures the dimensions of the output files.

Examples:

  • Gen-4 Turbo and Act-Two support Landscape 1280:720 1584:672 1104:832, Portrait 720:1280 832:1104 and Square 960:960 outputs.
  • Gen-4 Aleph supports Landscape 1280:720 1584:672 1104:832 848:480, Portrait 720:1280 832:1104 480:848 and Square 960:960 outputs.
  • Gen-3 Alpha Turbo supports 1280:768 or 768:1280 outputs.

If your input asset is not exactly of the ratio you specify, the model will auto-crop your asset from the center to the aspect ratio parameter provided.

Third party models (e.g., veo3.1, veo3.1_fast, veo3, etc.) may crop or resize inputs in other ways.

Image references may be resized if they are too large or small to be provided to the model you choose. It is not recommended to provide reference images smaller than 640×640px or larger than 4K.