Installation
Install the SDK using your preferred package manager:Quick Start
Configuration
Basic Configuration
Upload Keys vs API Keys
Free & Starter tiers use upload keys (
imperial_upload_*) which only support uploads. Pro &
Business tiers use API keys (imperial_live_*) which support all operations.Upload Methods
Upload Single File
Upload a single image or video file:Upload Options
Batch Upload
Upload multiple files at once (Pro/Business only):Media Management
List Media
Get Media Details
Delete Media
Usage Information
Track your storage and operations usage:Rate Limiting
The SDK automatically handles rate limit headers:Error Handling
The SDK provides typed error classes for better error handling:Folders, Tags, Privacy (API Keys)
Upload keys (
imperial_upload_*) are upload-only. Folders/tags/privacy require an API key
(imperial_live_*) with the right scopes.Scopes You’ll Need
- Uploads:
images:read,images:write,images:delete - Folders:
folders:read,folders:write
List Folders
Create Folder
Move Uploads + Tags (Bulk)
Set Visibility
Create Access URL For Private Upload
Error Types
Advanced Usage
Custom Timeout
Progress Tracking
Retry Logic
TypeScript Support
The SDK is fully typed with comprehensive TypeScript definitions:Examples
Express.js Integration
Next.js App Router
CLI Tool
Support
- Documentation: imperial.pics/docs
- GitHub: github.com/imperial-host/imperial-v3-reborn
- NPM: @imperial-host/sdk
- Issues: Report bugs on GitHub Issues

