Full and Trial only. The Free and the Lite accept the AI’s props and ignore them.
The Layers
The person opens the AI with ✦. Closing it keeps the conversation, typed words and marked areas for when it opens again. Your code can open and close it with
ask.open() and ask.close().


onAiChooseCommands or onAiEditImage, Remove Object with onAiEditImage, Remove Background with onAiRemoveBackground, and Annotate with onAiChooseCommands and Annotate on. With enableAiRemoveBackgroundPrompt, the person can describe what to keep.


lang.texts (aiExample keys).
onAiChooseCommands is the one that makes the AI talk. The other functions work alone too: a site that gives only onAiEditImage gets the brush with Edit and Remove Object, one that gives only onAiRemoveBackground gets Remove Background alone, one that gives only onAiDetectObjects gets Detect, and with onAiChooseCommands beside them the AI’s conversation removes, generates, cuts and detects through them.
The Annotate Mode at Work
Each of these jobs started as a request in Annotate and was finished by hand where needed. Every piece remains editable. Use Cases shows more examples.
Insurance and car rental

Education

Track days and driving schools
How a Request Flows
- The person asks, in Edit or in Annotate.
- The editor calls
onAiChooseCommandswith the conversation and the tools. - The model looks at the photo with
read_screenshot, to see where each thing is. - The model places each piece with the editor’s commands. The person sees the changes and can stop the request.
- It looks again, zooming in on each number and arrow tip it placed, fixes what it doesn’t like, and answers in words. That answer is the reply the person reads.
ask.end() ends it.
With a Mark
- The person marks an area with the Brush, writes what to put there or adds a reference image, then taps Generate. In Remove Object, they mark the area and tap Remove.
- With
onAiChooseCommands, a Generate in words goes through the conversation: the model gets the words with the marked areas’ boxes in the photo’s px and is told to remove them withretouch_removeor generate in them withretouch_run, both of{ "kind": "MARK" }, which changes exactly the marked pixels, among anything else the words ask (never annotating: the Annotate mode is the one way to annotate with the AI). A Remove Object, a Generate with an image, every Generate withoutonAiChooseCommands, and, with it, Generate pressed again with the same words over the same areas go straight toonAiEditImage. onAiEditImagegets the piece of the photo around the mark, its mask, the words and the image, and gives back the image it made. With nothing marked, a request that adds or changes something sends it the whole photo with no mask ('EDIT_PHOTO'), and its image lands over the whole photo.- The editor pastes the image into the mark alone, its edge feathered and its color matched to the photo around it; outside the mark, every pixel stays as it was. Generate pressed again over the same areas, or
retouch.more(), asks for another in its place, each one undo step: Undo walks back through them. WithonAiChooseCommands, that holds for the same words, the image asked again as the model asked for it; other words go to the model, as step 2 says.
onAiRemoveBackground with the photo, and keeps only the alpha it gives back. Then, with onAiEditImage, the mode’s row is the new background’s field and its Generate, which has onAiEditImage paint it under the subject. That Generate goes as a Generate on a mark does: in words, through the conversation with onAiChooseCommands, the model told the background by its own kind and its box, never as a mark, and writing the fill’s words in English; without onAiChooseCommands, straight to onAiEditImage. Either way the new background goes under the whole subject.
What We Recommend
These models did best in our measurements. Bria makes several models for different jobs; fal and Runware are providers that run them. The mixed server uses both providers, and onAiEditImage also has a server for each provider alone.
Each function’s page compares alternatives and has ready servers. Bria FIBO 2.0 Edit is also available on fal: in our tests it gave comparable results and was faster there.
What It Costs
An AI request costs by its rounds, as one in Annotate does, and each fill or cut it asks for adds that call’s price. Each round sends the conversation so far, so the servers keep the provider’s cache on: in our measurements about 90% of the input came from the cache, at a tenth of its price. A fill’s and a cut’s times are your server’s, from the editor’s call to its answer, the uploads included. The costs above are at the providers’ prices of November 2026.
Your Keys
Each function posts to your server, and only your server holds a key: the editor and the page never see one. Your server is also where you choose the model, limit who may use the AI, and count what each person spends.On Cloudflare Workers
The servers on these pages run as they are printed on Node and on Cloudflare Workers: their image work goes through photon, which is WebAssembly, where sharp, being native code, would run on Node alone. The editor’s playground runs them on both. On a Worker, they need two things:- The Workers Paid plan. Workers Free gives a request 10 ms of CPU, and past it Cloudflare stops the Worker and answers its error 1102. A fill’s image work takes far more: from under 0.05 s of CPU (FLUX 3 Image’s box) to about 0.87 s (FLUX Outpainting’s whole call on a 2048 × 2048 canvas), and about 0.25 s for the cut every Expand makes, measured on Node (What the Editor Sends, What Your Server Adapts). Workers Paid gives a request 30 s of CPU, up to 5 minutes with
limits.cpu_msin your Wrangler file. The wait for the model, the seconds a fill takes, uses no CPU: it counts toward neither the limit nor the bill. - Node.js compatibility. The servers use
Buffer, and read their keys fromprocess.env. A Worker has both with a compatibility date of 2026-08-04 or later. On an earlier date, add the compatibility flagnodejs_compat, and before 2025-04-01nodejs_compat_populate_process_envtoo, which puts your secrets inprocess.env.
- Answer at once, and write while the call runs. A Worker learns that the page let go of a request only when it writes to it. An answer sent whole at the end never hears the Stop: once the page has left, Cloudflare ends the Worker’s work outright, so fal’s cancel is never sent. So the route answers 200 at once, writes a space every quarter of a second, then the JSON, which takes spaces before its value; the request’s
signalthen aborts at the next space after the Stop. Before the compatibility date 2026-11-17, it aborts only with the compatibility flagenable_request_signal. - Put a call’s error in the body. The status is sent before the call ends, so a failure answers
{ error }in the 200, and the page reads it there:if (answer.error) { throw new Error(answer.error); }. - Keep the work with
waitUntil. The page leaving ends whatever of the Worker’s workctx.waitUntildoesn’t hold, so the route holds the call until it has stopped. - Wait for fal’s cancel. A Worker drops a request still in flight once its own request has ended, so
fal-job.tswaits for fal’s answer to the cancel before the call rejects.
worker.ts