Edit image

Edit or compose images from stored files or public URLs.

← All Image Generation endpoints · Capability overview

POST/v1/image-generation/edit

https://api.vee3.io/v1/image-generation/edit

50 tokens

Edit or compose images from stored files or public URLs.

Authorization

Send your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

MCP

The same capability is available as an MCP tool on Vee3 hosted MCP.

Tool name

image-generation.edit
Parameters6 fields
promptstringRequired

Text description of the image to generate or of the edit to apply.

max length 4000

imagesarrayRequired

Source images as stored file names from files.list_uploaded_files and/or public http or https image URLs. One image is an edit. Several images are composed into one scene. Upload files with files.upload_file first.

min 1, max 8

nintegerOptional

Number of images to generate (1 to 10). Each returned image costs 50 tokens.

Default: 1 · min 1, max 10

sizestringOptional

Optional output size as WIDTHxHEIGHT (for example 1024x1536) or auto. This sets aspect ratio, not exact pixel size. Omit for the default aspect ratio.

max length 32

output_format"webp" | "png" | "jpeg"Optional

Encoding of the returned image. webp is smaller; png is lossless.

Default: "webp"

file_namestringOptional

Optional account-relative storage path for the image. When n is greater than 1, an index is inserted before the extension (for example art/fox.webp becomes art/fox-1.webp and art/fox-2.webp). If omitted, the file is stored under image-generation/ with a generated name.

max length 255

Response19 fields
generation_idstring

Unique identifier, prefix igen_.

statusstring

Always "completed" for a successful generation.

promptstring

Echo of the requested prompt.

image_countinteger

Number of images returned and billed.

token_costinteger

Tokens charged for this request (50 times image_count).

output_formatenum

Encoding of the stored images (webp, png, or jpeg).

sizestring

Echo of the requested size when one was passed.

created_atstring

ISO 8601 timestamp.

imagesarrayitems
8 fields

Generated images stored in account file storage.

image_urlstring

Signed download URL from account file storage.

file_namestring

Account-relative path where the image was stored.

file_size_bytesinteger

Image file size in bytes.

retained_untilstring

ISO 8601 timestamp when account storage retention expires.

download_codestring

Short code to pass to the @vee3/cli `vee3-get-file` command.

download_idstring

Stable identifier for the reserved download.

expires_atstring

ISO 8601 timestamp when the download code can no longer be resolved (60 minutes after reserve).

commandstring

Suggested terminal command for downloading to a local path.

install_commandstring

One-time command to install the Vee3 CLI (`npm install -g @vee3/cli`). On networks that inspect HTTPS, install may require Node 22.15+ with NODE_OPTIONS=--use-system-ca.

troubleshootingstring

What to do if installation or downloading fails: re-read this tool's description via meta-tools.describe for setup and troubleshooting steps.

HTTP errors: unauthorized, validation_error, insufficient_tokens, payment_required, uploaded_file_name_in_use, image_generation_timeout, image_generation_blocked, uploaded_file_not_found, url_blocked, image_input_not_supported