Overview
For files that exceed the Base64 size limits or when you need better upload performance, DomoAI provides a file upload API. This allows you to:- Upload files up to 80 MB
- Reuse uploaded files across multiple API calls
- Reduce request payload size for better performance
How It Works
The upload process uses presigned URLs - a secure, two-step upload flow:Request Upload URL
Call
POST /v1/upload/file with your filename to get a presigned URL and domoai_uri.Upload File
Upload your file directly to the presigned URL using a
PUT request with the provided headers.Supported File Types
| Category | Formats | Use Cases |
|---|---|---|
| Images | JPEG, PNG, WebP, AVIF | Image to Video, Template to Video, Talking Avatar |
| Audio | MP3, WAV, M4A, AAC | Talking Avatar |
| Video | MP4, WebM, MOV | Talking Avatar |
Step 1: Request Upload URL
Response
| Field | Description |
|---|---|
presigned_url | The URL to upload your file to |
headers | Required headers for the upload request |
domoai_uri | Token to reference the uploaded file in API calls |
Step 2: Upload File to Presigned URL
Use thepresigned_url and headers from the previous response to upload your file:
Step 3: Use domoai_uri in API Calls
Once uploaded, use thedomoai_uri in your API requests:
Limitations
| Limit | Value |
|---|---|
| Maximum file size | 80 MB |
| Minimum file size | 512 bytes |
domoai_uri validity | 24 hours |
Input Format Reference
All media inputs support three methods:You only need to provide one of these fields. If multiple are provided,
domoai_uri takes priority, followed by bytes_base64_encoded, then url.