> ## Documentation Index
> Fetch the complete documentation index at: https://docs.imperial.gay/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick Start

> Get started with Imperial in under 5 minutes

## Create Your Account

Visit [app.imperial.gay](https://app.imperial.gay), sign up with your email and password, then verify your email address by checking your inbox for a verification link.

<Warning>
  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.
</Warning>

## 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.

<Tip>
  Imperial also supports **passkeys** (WebAuthn) for passwordless login. Set them up in Settings for
  the most secure and convenient authentication method.
</Tip>

## Get Your API Key

<Tabs>
  <Tab title="Free & Starter">
    **Upload Key Only** 1. Navigate to **Settings** → **Security** 2. Copy your upload key (starts
    with `imperial_upload_`) 3. Use this key for uploading images and videos

    <Info>
      Free and Starter tiers have upload-only keys. [Upgrade to Pro](https://shop.imperial.gay) for
      full API access.
    </Info>
  </Tab>

  <Tab title="Pro & Business">
    **Full API Access** 1. Navigate to **Settings** → **API Keys** 2. Click **Create API Key** 3.
    Give it a name (e.g., "My App") 4. Copy and securely store your API key
    <Tip>You can create multiple API keys for different applications or environments.</Tip>
  </Tab>
</Tabs>

<Warning>
  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.
</Warning>

## Upload Your First Image

Use this simple cURL command to upload an image:

```bash theme={null}
curl -X POST https://api.imperial.gay/images/upload \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@/path/to/your/image.jpg"
```

<Tip>Replace `YOUR_API_KEY` with your actual API key and update the file path.</Tip>

### Response

```json theme={null}
{
  "_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:

```bash theme={null}
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?

<CardGroup cols={2}>
  <Card title="API Reference" icon="code" href="/api-reference/introduction">
    Explore all available endpoints
  </Card>

  <Card title="Dashboard" icon="house" href="https://app.imperial.gay">
    View your uploads in the dashboard
  </Card>
</CardGroup>

## 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
