Skip to main content

How Imperial Billing Works

Imperial uses a transparent, usage-based system with two key metrics:

Storage

Total bytes stored in your account

Operations

Weighted count of API actions

Storage

Storage is measured in bytes and counts toward your tier’s limit.

What Counts as Storage?

Counted:
  • Uploaded images (compressed or original)
  • Uploaded videos
  • Video thumbnails
Not Counted:
  • Deleted files (instant reclamation)
  • Failed uploads
  • Temporary processing files

Storage Calculation

Storage Used = Sum of all file sizes in your account
Example:
  • 100 images × 500 KB each = 50 MB
  • 10 videos × 20 MB each = 200 MB
  • Total: 250 MB used
Check your current storage usage in the Dashboard Overview.

Reducing Storage Usage

Enable in Settings → Uploads - High Quality (80): ~40% smaller - Balanced (65): ~55% smaller - Optimized (50): ~70% smaller Compression is applied before upload, so you only pay for the compressed size.

Operations

Operations measure your API activity with a weighted system that makes reads much cheaper than writes.

Operation Classes

Heavy operations that modify or create resources. Counted Actions: - POST /images/upload - Upload file - DELETE /images/:id - Delete file Operation Count: - Each action = 1.0 operation - 10,000 uploads = 10,000 operations
Class A operations consume your limit faster. Optimize your upload workflows to stay within limits.
Light operations that only read data. Counted Actions: - File views via CDN URLs - Public image/video access Operation Count: - Each action = 0.1 operation - 10,000 views = 1,000 operations
Views are 10x cheaper! Your files can be viewed millions of times for a fraction of your operation limit.

Operation Tracking

Every action is logged with:
  • Operation type (upload, delete, view)
  • Class (A or B)
  • Weight (1.0 or 0.1)
  • Timestamp
  • Resource ID
  • API key used (Pro/Business only)
Pro and Business users can view detailed operation logs in the API Dashboard.

Real-World Examples

Monthly Activity: - Upload 500 screenshots (500 Class A ops) - Screenshots get 50,000 views (5,000 Class B ops) - Delete 100 old files (100 Class A ops) Total: 5,600 operations ✅ Fits in Starter tier (100K ops)

Monitoring Your Usage

Dashboard Overview

View your current usage at app.imperial.gay:
  • Storage: Progress bar showing GB used / GB limit
  • Operations: Monthly count with reset date
  • Charts: 7/30/90-day breakdowns
  • Projections: Estimated usage by month end

API Response Headers

Every API response includes usage headers:
X-Operations-Used: 45678
X-Operations-Limit: 100000
X-Storage-Used: 2147483648
X-Storage-Limit: 5368709120

Usage Alerts

Pro and Business users receive alerts at:
  • 50% of operation limit
  • 80% of operation limit
  • 90% of operation limit
  • 100% of operation limit

Overages & Limits

What Happens When You Hit Limits?

When you reach your storage limit:❌ New uploads will fail with error:
{
  "error": "Storage limit exceeded. You've used 5.0 GB of 5 GB.",
  "statusCode": 413
}
✅ Existing files remain accessible ✅ Views still work (don’t consume storage)Solutions:
  • Enable auto-compression
  • Delete old uploads
  • Upgrade to higher tier

No Surprise Charges

Imperial never charges overages. You’re limited to your tier’s allocation, but you’ll never receive unexpected bills.

Best Practices

Optimize Storage

1

Enable Auto-Compression

Reduce image sizes by 40-70% with negligible quality loss
2

Clean Up Regularly

Delete unused files to reclaim storage instantly
3

Choose Efficient Formats

  • WebP for images (best compression) - MP4 (H.264) for videos - Avoid BMP, TIFF, or uncompressed formats

Optimize Operations

1

Batch Uploads

Upload multiple files in one request instead of separate API calls
2

Cache Locally

Don’t re-upload files that haven’t changed
3

Leverage Views

Views are 10x cheaper than uploads. Link to files instead of re-uploading.
4

Monitor Usage

Check dashboard regularly to avoid hitting limits

Tier Limits Reference

Quick reference for all tiers:
TierStorageOperations/moClass A WeightClass B Weight30D Key Price
Free1 GB10,0001.00.1$0
Starter5 GB100,0001.00.1$2.49
Pro10 GB1,000,0001.00.1$6.99
Business200 GB5,000,0001.00.1$16.99
Need custom limits? Business tier customers can contact us for enterprise plans.

Frequently Asked Questions

Operations reset on your billing anniversary. For example, if you subscribed on the 15th, operations reset on the 15th of each month. Free tier resets on the 1st of each month.
No. Only successful operations count toward your limit.
Yes. Deleting a file instantly reclaims its storage space.
Yes. The dashboard sorts your uploads by file size. Pro/Business users get detailed analytics per file.
Every time someone accesses your file via CDN URLs, it counts as 0.1 operations. Views from the dashboard are not counted to avoid inflating your usage.
Not currently. Storage and operations are bundled per tier. Consider upgrading if you need more capacity.
Free, Starter, and Pro tiers have a 99.9% uptime target (no SLA). Business tier includes a 99.99% uptime SLA guarantee. Check our real-time status at status.imperial.gay
Imperial is optimized for speed with health checks under 2ms average response, file uploads between 300-800ms for images (varies for videos), and CDN delivery under 50ms globally at 95th percentile. Load tested at 100+ concurrent users with 0% error rate.

System Status

View Live Status

Real-time monitoring powered by BetterStack. Check API health, uptime history, and incident reports.

Need More Capacity?