AI image generation

Sell AI images, metered by credits.

A complete image generator: a composer, FLUX models on fal.ai, a credit debited per render and refunded if it fails, and every image stored in your own private Cloudflare R2 bucket — browsed in a gallery with folders, likes and remix.

  • fal.ai FLUX models
  • Private R2 storage, signed URLs
  • Credits refunded on failure
yourbrand.com
.envSITE_PROFILE="image-studio"one line picks this site type
Built in

What you don't have to build.

Text-to-image & image-to-image

Prompt a FLUX model on fal.ai, or start from an existing image when image-to-image is enabled.

A credit per render

Each model and size has a credit cost. The debit is recorded with the generation, and a failed render is refunded automatically.

Your own private bucket

Finished images are copied to Cloudflare R2 and shown through short-lived signed URLs — the bucket never goes public.

A gallery people use

Folders, likes, remix from any prompt, bulk download and a lightbox with the full prompt and settings.

Reconciled, not hopeful

Webhook and polling both finish a job idempotently, and a reconcile script catches anything stuck.

A mock for local work

Explore every screen without provider keys using the local generation mock.

How it works

From first click to working product.

  1. 1

    Prompt

    The user picks a model and size; the credit cost is shown before they press Generate.

  2. 2

    Debit & send

    Credits are debited with the generation row, then the job goes to fal.ai.

  3. 3

    Store privately

    The result is copied into your R2 bucket and the job completes once.

  4. 4

    Gallery

    The image appears in the gallery; a failed job refunds its credits.

The real thing

Not a mock-up. The shipped screens.

Screenshots of the template running locally with sample data, on the house design. Switch SITE_DESIGN and the public pages wear any of the other designs.

AI Image Studio — The composer with model, size and credit cost.
The composer with model, size and credit cost.
AI Image Studio — The gallery, shown with demo art — your users' renders land here.
The gallery, shown with demo art — your users' renders land here.
Set it up

A few lines of config. Then it's live.

SITE_PROFILE="image-studio"
FAL_KEY="…"
R2_ACCOUNT_ID="…"
R2_BUCKET="your-images"
R2_ACCESS_KEY_ID="…"
  1. 1

    Unzip and install

    Copy the folder and run the installer — it creates the database and secrets.

    php scripts/install.php
  2. 2

    Add your keys, run the doctor

    It checks every key, extension and permission and names anything missing.

    php scripts/doctor.php
  3. 3

    Deploy to your server

    NGINX + PHP on any small VPS, with the step-by-step deploy guide and nightly backups.

Good for

  • Avatar & headshot makers
  • Product-shot generators
  • Sticker & art tools
  • Niche style generators
  • Internal creative tools
Questions

AI Image Studio, answered.

All seven site types. One price.

Full source, every site type, the admin, the CMS, 43 designs and the deploy guides — £49, once. Unlimited own and client projects.