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

# Image Studio

> Generate images with OpenAI and Replicate-backed image models

<Info>
  Image Studio isn't just "enter prompt, get image." It's a full creative workflow with a gallery, model switching, history, lightbox previews, downloading, and deletion. One of the most product-ready apps in the repo.
</Info>

## What Your Users Can Do

* Write a prompt and generate images
* Switch between several image models
* Choose between OpenAI and Replicate-backed image models
* Browse creations in a visual gallery
* Preview images in a lightbox
* Search previous generations
* Download or delete results

It feels like a real AI creative tool, not a demo.

## Supported Models

| Model           | Provider  | Notes                     |
| --------------- | --------- | ------------------------- |
| GPT Image       | OpenAI    | Direct OpenAI integration |
| Nano Banana 2   | Replicate | --                        |
| Nano Banana Pro | Replicate | --                        |
| Seedream 5 Lite | Replicate | --                        |
| Imagen 4        | Replicate | --                        |
| Flux 1.1 Pro    | Replicate | --                        |
| Flux Schnell    | Replicate | --                        |
| Ideogram V2     | Replicate | --                        |
| Recraft V3      | Replicate | --                        |

Models are configured in `app/(apps)/image-studio/lib/models.ts`.

## What You Need

<CardGroup cols={3}>
  <Card title="Better Auth + PostgreSQL" icon="database" href="/services/better-auth-postgresql">
    Auth and saved generation history
  </Card>

  <Card title="Storage" icon="hard-drive" href="/services/storage">
    Generated files and persistent gallery items
  </Card>

  <Card title="Replicate" icon="robot" href="/providers/replicate">
    Most non-OpenAI image models
  </Card>
</CardGroup>

<Note>
  You also need `OPENAI_API_KEY` for GPT Image.
</Note>

## How It Works

<Steps>
  <Step title="Write a prompt and pick a model">
    The user types what they want and selects from the available model list.
  </Step>

  <Step title="Generate">
    The app routes the request to the correct provider (OpenAI or Replicate).
  </Step>

  <Step title="Store the result">
    The generated image is uploaded to object storage and linked to the user's account.
  </Step>

  <Step title="Gallery refresh">
    The gallery updates and shows the new image alongside previous creations.
  </Step>

  <Step title="Browse, search, download, or delete">
    Users can preview images in a lightbox, search through their history, download files, or clean up old generations.
  </Step>
</Steps>

The UI is built around a gallery plus a floating generation bar -- a much stronger pattern than hiding everything behind a form-heavy dashboard.

## Great Starting Point For...

You can reshape this app into:

* AI ad creative generators
* Social media asset tools
* Product mockup generators
* Brand visual tools
* Internal creative studios

It already handles the annoying product details like history, storage-backed assets, and model switching.

## Good First Customizations

* The model catalog in `app/(apps)/image-studio/lib/models.ts`
* Default model settings
* Credit pricing per model
* Branding and empty states
* Gallery filtering and sorting behavior

## Verification

<Check>
  Your setup is working if:

  * The page loads
  * At least one configured model is available
  * Generations complete successfully
  * New images appear in the gallery
  * Download and delete both work
</Check>
