Skip to main content

Create Your Account

Visit app.imperial.gay, sign up with your email and password, then verify your email address by checking your inbox for a verification link.
You must verify your email before uploading files. If you don’t see the email, check your spam folder or request a new verification link from the dashboard banner.

Enable Two-Factor Authentication (Optional)

For added security, enable 2FA in your account settings. Navigate to Settings, then Security, and click Enable Two-Factor Authentication. Scan the QR code with your authenticator app (Google Authenticator, Authy, etc.), enter the 6-digit code to confirm, and save your recovery codes in a secure location.
Imperial also supports passkeys (WebAuthn) for passwordless login. Set them up in Settings for the most secure and convenient authentication method.

Get Your API Key

Upload Key Only 1. Navigate to SettingsSecurity 2. Copy your upload key (starts with imperial_upload_) 3. Use this key for uploading images and videos
Free and Starter tiers have upload-only keys. Upgrade to Pro for full API access.
Your keys start with imperial_upload_ (upload key) or imperial_live_ (API key) and provide access to your account. Never share them publicly or commit them to version control.

Upload Your First Image

Use this simple cURL command to upload an image:
curl -X POST https://api.imperial.gay/images/upload \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@/path/to/your/image.jpg"
Replace YOUR_API_KEY with your actual API key and update the file path.

Response

{
  "_id": "67d8f9a1b2c3d4e5f6789012",
  "url": "https://origin.imperial.gay/uploads/user-id/upload-id-image.jpg",
  "filename": "upload-id-image.jpg",
  "fileSize": 245678,
  "mimeType": "image/jpeg",
  "createdAt": "2026-01-07T12:34:56.789Z"
}

Upload a Video

Imperial supports video uploads too! Just change the file type:
curl -X POST https://api.imperial.gay/images/upload \
  -H "Authorization: Bearer YOUR_KEY_HERE" \
  -F "file=@/path/to/your/video.mp4"
Videos automatically generate thumbnails for faster gallery loading.

What’s Next?

Features

  • Zero Egress Fees - Unlimited bandwidth powered by Cloudflare R2
  • Auto Compression - Optionally compress images to save storage
  • Video Support - Upload and host videos with automatic thumbnails
  • Fast CDN - Global content delivery with under 50ms latency worldwide
  • High Performance - Handles 100+ concurrent users with sub-2ms avg response time
  • Storage Tiers - Flexible plans from 1GB to 200GB
  • Secure - 2FA, passkeys, email verification, and recovery codes
  • Reliable - 99.9% uptime monitored via status.imperial.gay