Upload Media
Endpoints
Upload Media
Upload images and videos to your Imperial account
POST
Upload Media
Request
Headers
string
required
Your authentication token in one of these formats: - API Key (Pro/Business):
Bearer imperial_live_xxxxxxxxxxxxx - Upload Key (Free/Starter): Bearer imperial_upload_xxxxxxxxxxxxx See Authentication for more details.string
required
Must be
multipart/form-data for file uploadsBody
file
required
The image or video file to upload. Supports: - Images: JPEG, PNG, WebP, GIF - Videos: MP4,
WebM, MOV, AVI
Response
string
Unique identifier for the upload
string
Direct CDN URL to access the uploaded file
string
Thumbnail URL (generated automatically for videos)
string
The stored filename
string
The original filename before upload
number
File size in bytes
string
MIME type of the uploaded file (e.g.,
image/jpeg, video/mp4)boolean
Whether the file was compressed (only for images with auto-compress enabled)
string
ISO 8601 timestamp of upload
Example Requests
Example Response
Video Upload Response
When uploading a video, a thumbnail is automatically generated:Error Responses
Storage Limit Exceeded
Invalid File Type
Unauthorized
Features
Auto-Compression
Enable auto-compression in your Dashboard Settings to automatically compress images on upload:- JPEG: Compressed with customizable quality (default: 80%)
- PNG: Optimized compression level 9
- WebP: Compressed with quality setting
Batch Uploads
You can upload multiple files in a single request by including multiplefile fields:

