Skip to main content

Why files?

ModelRoute acts as a secure intermediary between you and AI providers. When you upload a file:
  1. Your file stays on ModelRoute — providers never receive your original file URL or storage credentials
  2. ModelRoute transfers the file to the provider using provider-specific mechanisms
  3. Output files are stored on ModelRoute — you download them via ModelRoute, not from the provider
This design ensures provider isolation. Switching providers or adding new ones never requires changes to your file handling code.

File references

Every uploaded file gets a unique reference in the format:
file_<uuid>
Example: file_f47ac10b-58cc-4372-a567-0e02b2c3d479 Use file references in execution inputs (e.g., an image to transform) and read them from execution outputs (e.g., a generated image).

Limits

LimitValue
Maximum file size100 MB
Supported upload methodPresigned URL (PUT)
File retentionFiles are retained for the lifetime of your organization
File accessScoped to your organization — no cross-org access

File lifecycle

  1. Request a presigned upload URLPOST /v1/files/upload
  2. Upload via HTTP PUT to the presigned URL
  3. Use the file reference in execution inputs
  4. Download results — execution outputs contain file references you can download

Next steps

Uploading Files

Step-by-step guide to uploading files.

Downloading Files

How to download execution results.