# aPix Image Workspace (v2.3)

aPix is a lightweight Flask interface for generating high-quality images using **Google Gemini Image 3 Pro** (Nano Banana Pro) and **Google ImageFX (Whisk)**.

## Features

- **Dual Models**: Support for `Gemini Image 3 Pro` and `Google ImageFX (Whisk)`.
- **Multi-Image Generation**: Generate up to 4 variations at once with Whisk.
- **Reference Image Support**: Upload reference images for style transfer and composition control.
- **Smart Prompting**: Support for placeholders `{text}` and queue processing (`cat|dog|bird`).
- **Zero-Config Persistence**: Built for NAS/Docker with automatic config initialization and data persistence.
- **Mobile Friendly**: Guides for retrieving cookies on Android/iOS included.

## Quick Start (Docker / Synology NAS)

We recommend running aPix via Docker for the best experience.

1.  **Create `docker-compose.yml`**:
    ```yaml
    version: '3.8'
    services:
      app:
        image: git.khoavo.myds.me/vndangkhoa/apix:v2.3
        container_name: sdvn-apix-python
        restart: unless-stopped
        ports:
          - "8558:8888"
        environment:
          - PYTHONUNBUFFERED=1
        volumes:
          - ./config:/app/config
          - ./data/generated:/app/static/generated
          - ./data/uploads:/app/static/uploads
    ```

2.  **Run**:
    ```bash
    docker-compose up -d
    ```

3.  **Access**: Open `http://your-nas-ip:8558`.

## Configuration

- **API Key**: Enter your Google Gemini API Key in the settings (optional if using Whisk).
- **Whisk Cookies**: For ImageFX, paste your `Cookie` string from `labs.google`. 
    - *Tip*: Instructions for getting cookies on Mobile/PC are available in the app settings.

## Credits

- **Creator**: [Phạm Hưng](https://www.facebook.com/phamhungd/)
- **Group**: [SDVN - Cộng đồng AI Art](https://www.facebook.com/groups/stablediffusion.vn/)
- **Website**: [sdvn.vn](https://www.sdvn.vn)

---
*Version 2.3 | Dockerized for optimal performance.*
