Skip to main content
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 uploads

Body

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
Videos are never compressed to preserve quality.

Batch Uploads

You can upload multiple files in a single request by including multiple file fields:
The response will contain an array of upload results.

Storage Management

Uploads count towards your storage limit based on your subscription tier:
Upgrade your plan in the Dashboard to get more storage and operations.