Edit a photo with AI starts from the photo you attach
generate_image_from_image is the attached-image edit job. A blank-prompt generate is a different job, and using it as an edit wastes credits.
Attach a photo, describe the change, get an edit back. That is the whole job. Edit a photo with AI is one named agent capability. generate_image_from_image is the tool: it requires a prompt and an image_url. If you skip the photo and ask the agent to "make the same shot but with a sunset behind her," you did not edit the photo. You rolled a new still that might look related. That generate is a different job, and it wastes credits on a cousin of the original.
The image-to-image contract is the attached file. The model is allowed to change what you named. It is not allowed to pretend the file was never there.
What the edit job actually takes
The agent routes to an image-edit-capable model and always passes your image along. You describe the change: swap the background, restyle the outfit, pull the extra person out of the wall. The output is an edited image saved next to the original. Iterate with a follow-up on that file, not with a fresh text-to-image prompt that re-describes the scene from memory.
Required inputs on generate_image_from_image are the prompt, the image URL, and the model list. Optional mask, seed, aspect, resolution, and extra references exist so you can constrain the change. They do not turn the call into a blank canvas. No attached image means the tool is the wrong row.
The AI photo editor is the same work with buttons. The agent path is the same work in a sentence. Neither one is generate an image from text. That job's primary tool is generate_images, and it is instructed to ask about style, aspect, and count before it spends. Mixing the two is how a locked product plate becomes a new product.
What this job is not
A new still from a paragraph. If you do not have the photo — or you are willing to throw the photo away — you wanted text-to-image. Do not attach a reference "for vibe" and then prompt a different subject. That is two jobs colliding in one charge.
Background removal as a dedicated cutout. Remove the background from a photo is a narrower ask on the same family. If all you needed was a clean subject, say that. "Edit this, also make the background disappear, also restyle the jacket" is three changes billed as one messy edit.
Upscale. Upscale an image adds pixels to a keeper. It does not restyle. Running an edit model because the file looks soft is how you get a sharper different picture.
Video. An image-edit model does not animate. Turn a photo into a video is the motion job. Editing first, then animating, is two named jobs in order. Animating in order to "fix the still" is a generate you will crop.
Spend the edit credits on a change you can name
The cheap habit is "make it better." Better is not a change. Name the object and the attribute: the wall, the sky, the extra hand, the type on the label. Then look at a region you did not mention. If it moved, the instruction was too wide and you paid to repaint the plate.
Lock the still you are keeping. Edit that still. If the still is not the still, do not edit it — regenerate on the generate job, pick a keeper, then edit. Using generate_image_from_image as a sampler is how you buy ten cousins and keep none.
The text-to-image tool is the door for a scene that does not exist yet. This page is only the door for a scene that does.
FAQ
Can I edit without attaching a photo?
No. generate_image_from_image requires image_url. A prompt-only request is generate an image from text. Sending that request as an "edit" still charges a generate, and you lose the pixels you were trying to keep.
Is this the same as remove-background?
Only if the change you want is the cutout. Background removal is its own capability on the same edit family. Ask for the cutout when that is the job. Ask for an edit when the subject, the light, or the styling has to move.
Should I upscale before I edit?
No. Upscale a keeper. Edit a locked still. Upscaling a miss, then editing the miss, is two bills on a file you will throw away. Pick the still, change what you named, then upscale if print or a 4K plate actually needs it.
Why not describe the original photo in a new prompt instead?
Because description is lossy. Hair, label kerning, the exact hand — those are in the file, not in your sentence. generate_images will invent a relative. generate_image_from_image starts from the relative you already paid for.