# Image Library

## Brand Asset Library

The Brand Asset Library is your central hub for all visual content in Cuppa. Upload your own brand images, generate new ones with AI, use existing images as style references, and edit images with text prompts. Everything lives in one unified grid, organized by time.

***

### What You Can Do

* **Upload brand assets**: Logos, photos, illustrations, screenshots
* **Generate AI images**: Single, batch, or variations
* **Use images as references**: Generate new images inspired by an existing one
* **Edit images with AI**: Modify any image using a text prompt
* **Download and copy URLs**: Quick access for use anywhere
* **Manage your library**: Archive, delete, and organize assets

***

### Getting There

Navigate to **Image Library** in the left sidebar. You'll see a unified grid showing both uploaded assets and AI-generated images, sorted by most recent.

***

### Uploading Assets

#### How to Upload

1. Click the **Upload** area at the top of the Image Library (or drag and drop files directly)
2. Select one or more files
3. Assets appear in your library immediately

#### Supported Formats

| Format   | Notes                                   |
| -------- | --------------------------------------- |
| JPEG/JPG | Photos, screenshots                     |
| PNG      | Graphics, screenshots with transparency |
| WebP     | Modern web images                       |
| SVG      | Vector graphics, logos                  |

#### Limits

* **Max file size**: 50MB per file
* **Multiple uploads**: Yes, upload several files at once
* **Thumbnails**: Generated automatically for fast loading

#### What Gets Stored

For each uploaded asset, Cuppa captures:

* Original file at full resolution
* Auto-generated thumbnail (WebP, 400px max width)
* Metadata: dimensions, file type, file size
* Creation date

***

### AI Image Generation

#### Accessing the Generator

You can generate images two ways:

1. **From Image Library**: Use the prompt bar at the top of the page
2. **From Generate Images page**: Navigate to **Generate Images** in the sidebar for the full generation interface

#### Generation Modes

| Mode           | Description                                                   | Use Case                               |
| -------------- | ------------------------------------------------------------- | -------------------------------------- |
| **Single**     | One image from one prompt                                     | Quick one-off generation               |
| **Batch**      | Multiple images from different prompts (one per line, max 20) | Creating a set of unique images        |
| **Variations** | Multiple variations of the same prompt (2-10)                 | Exploring different takes on a concept |

#### Using Different Models

Click the model selector to choose your AI image model. Available models depend on your configured API keys and plan.

#### Aspect Ratio and Resolution

For supported models, you can control:

* **Aspect ratio**: 16:9, 1:1, 9:16, 4:3, 3:4, and more
* **Resolution**: 1K, 2K, or 4K (model-dependent)

#### Brand Colors

On Power plans and above, toggle **Brand Colors** to automatically include your brand's color palette in the generation prompt.

***

### Reference Mode

Use any image in your library as a style reference for new generations.

#### How to Use

1. Hover over any image in the library
2. Click **Use as Reference**
3. The prompt bar switches to Reference mode
4. Adjust the **Reference Strength** slider (0-100%) to control how closely the new image matches the reference style
5. Enter your prompt and generate

Higher strength means the output will more closely match the visual style of your reference image. Lower strength gives the AI more creative freedom.

***

### Edit Mode

Edit any existing image using a text prompt (powered by Flux Kontext Pro).

#### How to Use

1. Hover over any image in the library
2. Click **Edit with AI**
3. The prompt bar switches to Edit mode
4. Describe the changes you want (e.g., "change the background to a sunset," "add a red border," "remove the text")
5. Generate the edited version

The original image is preserved. Edits create new images in your library.

***

### Managing Your Library

#### Grid View

Images are organized in time-grouped sections:

* This Week
* This Month
* By month and year (older)

Each image shows a badge indicating whether it's an **AI** generated image or an uploaded asset.

#### Image Actions

Hover over any image to see quick actions:

| Action               | Description                                                |
| -------------------- | ---------------------------------------------------------- |
| **Use as Reference** | Start a new generation using this image as style reference |
| **Edit with AI**     | Open edit mode with this image                             |
| **Download**         | Save the image to your computer                            |
| **Copy URL**         | Copy the public URL to clipboard                           |
| **Delete**           | Remove from library (uploaded assets only)                 |

#### Detail View

Click any image to open the detail modal, which shows:

* Full-size preview
* Metadata (dimensions, file type for uploads; prompt, model, aspect ratio for generated images)
* Creation date
* All available actions

***

### Image Statuses

AI-generated images show a status during creation:

| Status          | What It Means                                     |
| --------------- | ------------------------------------------------- |
| **In Progress** | Image is being generated (animated loading state) |
| **Complete**    | Image is ready to use                             |
| **Failed**      | Generation failed (click to retry)                |

Failed generations show an error card with a retry button. Images stuck in progress for more than an hour are automatically marked as failed.

***

### Storage

* **Uploaded assets** are stored in Cloudflare R2 with public URLs
* **Generated images** are stored via the image generation provider
* All images are scoped to your selected brand/site

***

### Plan Availability

| Feature                      | Minimum Plan         |
| ---------------------------- | -------------------- |
| AI Image Generation          | Hobby (with API key) |
| Image Upload / Asset Library | Business             |
| Reference Mode               | Hobby (with API key) |
| Edit Mode                    | Hobby (with API key) |
| Brand Colors in Generation   | Power                |

***

### Troubleshooting

#### Upload failing

**Check:**

* File is under 50MB
* Format is JPEG, PNG, WebP, or SVG
* You have a stable internet connection

#### Generated image stuck on "In Progress"

* Generation typically takes 10-60 seconds depending on the model
* If stuck for more than a few minutes, the image will auto-fail after 1 hour
* Check that your API key for the selected model is valid and has credits

#### "Failed" generation

* Click the retry button on the failed image card
* If it keeps failing, try a different model or simplify your prompt
* Check your API key balance/credits

#### Reference mode not working as expected

* Try adjusting the reference strength slider
* Higher strength (70-100%) closely follows the reference style
* Lower strength (10-40%) uses it as loose inspiration
* Not all models support reference mode equally

***

### Related Docs

* Brand Kit: Brand colors and visual identity
* Mood Board: Visual inspiration board
* Knowledge Sources: Text-based brand context


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://learn.cuppa.ai/creative-studio/image-library.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
