🎨 E-commerce / Real Estate / Marketing

AI Photo Editor

Upload a photo, describe an edit in plain English, get an edited version back — or skip the upload and generate an image from scratch. One Workers AI model, two modes, no image-editing pipeline to build.

The Problem

""We want to let users (or our own team) restyle product photos, stage empty rooms, or spin up creative variations — but a real image-editing pipeline means a diffusion model to host, GPUs, and an inpainting/masking UI just to get started.""

The Outcome

1

Workers AI model (@cf/black-forest-labs/flux-2-klein-4b) handles BOTH photo editing and text-to-image generation — no separate model, no masking UI, no GPU to provision.

Live demo below
🎨

AI Photo Editor

Workers AI · Flux-2 Klein

📤

Drop a photo, or click to browse

JPEG, PNG, WebP · up to 8MB

Productionising this

What changes when you ship this for real

Content moderation

Users can submit inappropriate images or prompts to a public-facing endpoint. Before shipping this beyond an internal demo, add a moderation pass — Cloudflare's Workers AI text/image classification models can screen prompts and uploads, or route flagged content to a manual review queue.

Rate limiting

At $0.000059/input-tile + $0.000287/output-tile per 512x512 call, this is far from free at demo-day volume, let alone public traffic. Add a KV or Durable Object-backed rate limiter per session/IP before this goes anywhere near production.

Storage strategy

This demo returns the result as an inline base64 string — fine for a single ephemeral view, wasteful for anything users expect to revisit. If results need to persist, write the decoded image to R2 and return a signed URL instead of re-sending base64 on every load.

Latency is a real UX constraint

10-15 seconds is not "basically instant" — design the surrounding UI (loading states, disabled buttons, an explicit ETA) around that reality rather than treating it as a background operation users won't notice.

Copyright / consent for photos of people

Editing photos that contain real people raises consent and likeness questions independent of Cloudflare's tooling — a production deployment should have a policy on whose photos can be uploaded and what edits are permitted (e.g. no photos of people without consent, no impersonation-style edits).

Undocumented model behaviour

The image field for edit-mode input on this model is not documented on the public model page as of this writing — it was confirmed via live testing. Undocumented behaviour can change without notice; pin a specific model version if this becomes a production dependency, and re-verify after any Workers AI catalog update.