# Ask AI to Edit and Annotate Photos in Your App

The AI opens from its ✦ beside Annotate's button, in four modes. In Edit, people say what the photo needs, or brush an area and say what to put there. Remove Object takes away what they brush, Remove Background takes the background off and paints a new one from their words, and Annotate composes the annotations as an art director. The editor holds no key: your server asks the models you pick. It is in the Full edition.

## What AI Gives Your Users

- **Manual editing:** Processed in your browser.
- **AI:** Your app sends the necessary data to the services you configure.
- **MCP:** Commands and screenshots pass through the configured relay between the editor and the connected agent.

Details: [AI data flow](https://docs.embededitor.com/ai/overview#how-a-request-flows) · [MCP privacy](https://docs.embededitor.com/mcp/overview#privacy)

- One Button, Four Modes: The AI's ✦ stands beside Annotate's button. A tap opens the AI in place of the tools, its modes on the menu's top edge: Edit, Remove Object, Remove Background and Annotate, each where your server can run it. Inside Annotate, the ✦ opens on Annotate. A tap on the lit ✦ closes the AI and loses nothing: the conversation, the words typed and the areas marked are there when it opens again.
- Edit in Words: In Edit, the person writes what they want and taps Generate, and the AI crops, adjusts, sets a filter or a frame, or hides faces, with the editor's own tools. Placing arrows, texts and numbers is the Annotate mode's work. Its reply shows on the card at the top of the photo.
- Brush an Area: Edit and Remove Object have a Brush and an Eraser. The Brush marks an area over what to change, an outline closed where it began marking its inside too, and the Eraser takes some of it back. Each area has its own bar to move it or delete it, as an annotation has.
- Remove Object: Brush over what should go and tap Remove: it is taken away, and the area filled with what surrounds it. Outside the area, every pixel stays the photo's own, and the whole is one undo step.
- Generate in an Area: In Edit, brush an area, say what to put there or add an image with Add Image, and tap Generate. An image fills the whole marked area. Generate again with the same words for another version: each is one undo step, and Undo and Redo go back and forth between them.
- Remove Background, Then a New One: Remove Background takes the background off in one tap and keeps the main subject, on a checkerboard where the photo is now transparent. Then the person describes a new background, and Generate paints it in behind the subject, its soft edges blended in. You can also give it a field where the person says what to keep, “the woman and her dog”. Saved as a PNG or a WebP, a photo with no background stays transparent.
- The Annotate Mode Composes the Annotations: In the Annotate mode, which the ✦ opens inside Annotate, the person says what to annotate, or gives a subject and the facts, and the AI composes the annotations as an art director: the story, the style, where each piece goes and what each text says. Generating again with the same words replaces the composition with another in a different style.
- Expand and Detect: Two AI buttons sit in their own tools. Expand, beside Crop in the Aspect section, grows the photo to a fixed ratio picked there and fills the new borders with more of the scene. Detect, in Obfuscate's pill, covers every face, license plate, document and screen in the photo with an area in one tap.
- Examples in Every Field: The AI's fields start with Examples, a question mark that opens a short list of what to ask there. A choice fills the field and sends nothing, and the list offers only what your editor can do.
- A Card That Folds: What the AI says shows on one card at the top of the photo: what it is doing, with Stop, then its reply or a failure. Its ⌃ folds it to a small pill, a tap on the pill opens it again, and once the AI is done its ✕ closes it. The next request goes on in the same conversation, so “make the 2 bigger” works.
- Everything Stays Editable: What the AI does with the editor's tools stays editable: every crop, filter, hidden area and annotation. What it paints becomes part of the photo. A whole request is one undo step, as is each Remove, Generate and Expand, and Stop or Escape keep what a request did so far.
- Your Server Holds the Key: The editor holds no key and runs no model. Each AI button calls a function you give it, which asks your server, and your server asks the model you pick: one for the conversation, one to fill an area, one to take the background off, one to find faces and plates. Each works alone, and the bill is yours.
- Models We Measured: We recommend Claude Sonnet 5.5 for the conversation: about US$ 0.13 and 46 seconds a request in the Annotate mode. Each of the other functions has a model we recommend, measured on our photos, and a ready server in the docs. This page's videos play the real answers four times as fast as they came.

## Real Examples, Done by the AI

- Interior Designer: Show a client their empty living room furnished before a single piece is bought, then point out the key pieces. Asked: “Furnish it in a warm modern style: an olive velvet sofa facing us, two cream armchairs, a walnut coffee table, a wool rug, plants”, then in Annotate, “Point out the three key pieces. The sofa is 3 m long; show its velvet up close”.
- Real Estate Agency: Turn a daytime listing photo into a warm dusk, clear the curb, mark what sells and sign it with the agency's logo. Asked: “Make it a warm dusk with the lights on”, then the bins brushed over, then Remove, then in Annotate, “Mark what sells”, then the agency's logo set as the signature.
- Online Store: Cut a product from its backdrop, set it in a new scene, widen it into a banner and call out what sells it. Asked: Remove Background, then “A wet street at night, neon reflections”, then Expand to 16:9, then in Annotate, “Call out its three selling points”.
- Wedding Planner: Show a couple the empty venue set for their banquet, then lay out their day on it. Asked: “Set it for a wedding banquet: round tables, white peonies, candles, fairy lights”, then in Annotate, “Lay out the day: ceremony, dance floor, bar, photo corner. In the room's warm tones, and show a centerpiece up close”.
- Wedding Photographer: Clean a wedding photo of exit signs and a guest's phone, warm its light, and hide the guests' faces for the public portfolio. Asked: The exit signs and a guest's phone brushed over, then Remove, then “Give it a soft golden light”, then “Hide the guests' faces for the public portfolio, keep the couple's”.
- Travel Creator: Empty a crowded beach, warm it to golden hour, make it a 9:16 story and draw the day on it. Asked: The people behind brushed over, then Remove, then “Golden hour”, then Expand to 9:16, then in Annotate, “Draw our day: the hotel, the hidden cove, the dive spot”.
- Renovation Contractor: Show a client their dated kitchen renovated, then name every material in it. Asked: “Renovate it: a marble counter, olive cabinets, brass fixtures”, then in Annotate, “Name the materials”.
- Restaurant: Restyle a dish shot on a plain table for the menu, then call out its ingredients. Asked: “Put it on a rustic oak table in morning window light, with a linen napkin”, then in Annotate, “Call out the ingredients for our menu post, titled On the plate”.
- UTV and Off-Road Tour Operator: Turn a daytime ride into golden hour with a dust trail behind it, then draw the tour on it, its distance and the buggy up close. Asked: “Make it golden hour with a dust trail behind it”, then in Annotate, “Draw the tour: the dunes, the canyon, the sunset stop”, then “Keep the tour, and add the 3 km to the canyon and a close-up of the buggy”.
- Insurance and Car Rental: Number every dent and scratch on the claim photo, each one named in a list beside it. Asked: “Mark the damage for the claim”.
- Construction: Label what the crew finished this week on the site photo the client gets. Asked: “Annotate this week's progress for the client”.
- Property Inspection: Flag what needs repair in a room, each with what to do about it. Asked: “Flag what needs repair”.
- Tech Support: Show a customer which cable goes into which port, labeled on the photo of the router. Asked: “Show the customer which cable goes where”.
- Hotel: Label the pool, the courts and the beaches on an aerial photo for the booking page. Asked: “Label the amenities for the booking page”.
- City Services: Circle and name each pothole on a road, so the repair crew knows where to go. Asked: “Mark the potholes for the repair crew”.
- Warehouse: Point out the hazards of an aisle on a photo for safety training. Asked: “Point out the safety hazards for our training”.
- Tour Operator: Name the peaks and draw the trail on a viewpoint photo for the tour page. Asked: “Name the peaks and draw the trail”.
- Event Planner: Lay out the stage, the food trucks, first aid and the exits on a photo of the empty field. Asked: “Plan the festival on this field: the stage, the food trucks, first aid and the exits”.
- Education: Label a building's architecture for a class, its parts numbered and a magnifier on the detail that matters. Asked: “Label its architecture for my class”.
- Mountain Bike Race: Mark the takeoff, the airtime and the landing of a jump, the line drawn between them. Asked: “Annotate the line: takeoff, airtime, landing”.
- Track Days and Driving Schools: Draw the racing line through a corner, its braking point, apex and exit numbered. Asked: “Mark the racing line: braking point, apex, exit”.
- Architecture Studio: Show a client their house's facade renovated, each new material named on it. Asked: “Renovate the facade: white render, black window frames, timber cladding”, then in Annotate, “Name the materials”.
- Landscape Designer: Show a client their bare backyard as the garden it could be. Asked: “A garden with olive trees, a timber deck and warm string lights”.
- Car Dealer: Take a car off a gray lot, put it on a coastal road at sunset and highlight its features. Asked: Remove Background, then “A coastal road at sunset”, then in Annotate, “Highlight its features”.
- Cosmetics Brand: Cut a bottle from its shoot, set it on water and petals, and widen it into a banner. Asked: Remove Background, then “Water ripples and white petals”, then Expand to 16:9.
- Fashion Store: Show a dress in new colors without a new shoot. Asked: The dress brushed over, then “An emerald silk dress”, then “A sapphire blue silk dress”.
- Street Photos and Dashcams: Hide every face and license plate in a street photo before it goes public. Asked: “Hide every face and license plate”.
- Marketplace Seller: Clear the clutter around a used armchair, brighten it and note its scratch for buyers. Asked: The lamp, its table and the papers brushed over, then Remove, then “Brighter”, then in Annotate, “Note the small scratch on the left arm”.
- Café: See the café dressed for Christmas before a single garland goes up. Asked: “Decorate it for Christmas: garlands and warm lights”.
- Pet Photographer: Take the leash out of a dog's portrait, the fur and the grass filled in where it ran. Asked: The leash brushed over, then Remove.
- Race Organizer: Hide the spectators' faces, keep the riders', and mark the course's key sections for the event page. Asked: “Hide the spectators' faces, keep the riders”, then in Annotate, “Mark the course's key sections for the event page”.
- Motorsport Media: Cut a race car from the track, put it in a pit lane at night and widen it into a 16:9 banner. Asked: Remove Background, then “A pit lane at night under floodlights”, then Expand to 16:9.

## The Props That Control It

```tsx
import { EmbedEditor, EmbedEditorProps } from '@embededitor/full/react';

// the conversation goes to your server, which holds the key and asks the model
const onAiChooseCommands: EmbedEditorProps['onAiChooseCommands'] = async ({ messages, signal, tools }) => {
	const res = await fetch('/api/ai-choose-commands', {
		body: JSON.stringify({ messages, tools }),
		headers: { 'content-type': 'application/json' },
		method: 'POST',
		signal
	});

	if (!res.ok) {
		throw new Error('The AI is busy. Try again in a moment.');
	}

	return res.json();
};

const PhotoEditor = ({ src }: { src: string }) => (
	<EmbedEditor
		onAiChooseCommands={onAiChooseCommands}
		src={src}
	/>
);
```

- [onAiChooseCommands](https://docs.embededitor.com/api-reference/props#ai): The AI's model: it gets the conversation and the tools in OpenAI's Chat Completions shape and gives back the model's next message. It gives the AI Edit and Annotate.
- [onAiDetectObjects](https://docs.embededitor.com/api-reference/props#ai): Obfuscate's Detect: finds every face, license plate, document and screen in the photo. Optional.
- [onAiEditImage](https://docs.embededitor.com/api-reference/props#ai): Fills an area: it gets the piece of the photo around the mark, its mask, the words and the image, and gives back the image it made. It gives the AI Remove Object, Generate and Expand.
- [onAiRemoveBackground](https://docs.embededitor.com/api-reference/props#ai): Takes the background off: it gets a JPEG of the photo and gives back a PNG with the background transparent. It gives the AI Remove Background.
- [enableAiRemoveBackgroundPrompt](https://docs.embededitor.com/api-reference/props#ai): Gives Remove Background a field for what to keep, sent to onAiRemoveBackground with the photo.
- [aiPrompts](https://docs.embededitor.com/api-reference/props#ai): Your own prompts for the AI, task by task, as lang.texts brings your own texts: any key left out keeps the editor's.

[Every prop in the docs](https://docs.embededitor.com/api-reference/props)

## Questions

### Where does the API key stay?

On your server. The editor holds no key and runs no model: each AI button calls a function you give it, which posts to your server, and your server asks the model. Check the person's session and limit the requests there, as on any paid endpoint.

### Do I have to give the AI every function?

No, each works alone. A model for the conversation alone gives Edit and Annotate; a function that fills an area alone gives the brush, Remove Object, Generate and Expand; one that takes the background off alone gives Remove Background; one that finds faces and plates alone gives Obfuscate's Detect. With the conversation beside the others, a request in words removes, generates, cuts and detects through them. Without any, the editor is as it is without AI.

### Which models should I use?

For the conversation, Claude Sonnet 5.5, the best grade for its price in our measurements. Claude Opus 5.5 brings more imagination and costs more; Claude Haiku 5.5 costs less than a tenth of Sonnet but composes worse. Any model that calls tools and looks at images can be the AI. For the pixels, Bria Eraser removes, FLUX.1 Fill [pro] generates from words, Seedream 5.5 puts the person's image in a marked area, Bria FIBO Edit 1.5 Expand expands, Bria FIBO 2.0 Edit paints a new background, Seedream 5.5 edits the whole photo by words, Bria RMBG 2.0 takes the background off and SAM 3 detects. The docs have a server ready for each, and for OpenAI and Gemini.

### What does a request cost?

With the recommended models, at the providers' prices of November 2026: a request in the Annotate mode about US$ 0.13 and 46 seconds with Claude Sonnet 5.5; a Remove Object US$ 0.04 and 14 to 22 seconds; a Generate in words US$ 0.05 and 7 to 10 seconds, plus the conversation's rounds; a Generate with an image US$ 0.044 and about 30 seconds; an Expand US$ 0.04 and about 21 seconds; a new background US$ 0.04 and 21 to 33 seconds; an edit of the whole photo by words US$ 0.043 and 31 to 41 seconds; a Remove Background US$ 0.018 and 7 to 17 seconds; a Detect US$ 0.02 and 2.7 to 4.7 seconds. A request in Edit costs by its rounds, as one in Annotate does.

### Does what the AI makes stay editable?

What it makes with the editor's tools does: every crop, adjustment, filter, hidden area, arrow, text and number stays editable, and one Undo takes a whole request back. What it paints, a Remove, a Generate, a new background or an Expand, becomes part of the photo, each image one undo step.

### Can the person stop the AI?

Yes. Stop or Escape stops a request and keeps what the AI did so far, and stops a Remove, a Generate or an Expand with the photo as it was. While it works, a card at the top of the photo says what it is doing, and the photo's edge glows.

## Try the rest of the editor in the playground.

This feature needs your server, so the playground opens without it, on the same photo. Change the edition, the colors and the tools, and copy the code for your app.

[Open in the Playground](https://embededitor.com/playground#c=eyJlZGl0aW9uIjoiRlVMTCIsInBob3RvIjoiYWktY3JlYXRlLWluZ3JlZGllbnRzIn0&group=ANNOTATIONS)
