images-userImage Edit

Edit Image

post

Edits images using natural language instructions. Supports openai/gpt-image-1 model with PNG, WEBP, or JPG formats (max 50MB per image, up to 16 images). Requires multipart/form-data.

Authorizations
AuthorizationstringRequired

FastRouter API Key. Get yours at https://fastrouter.ai

Format: Authorization: Bearer YOUR_API_KEY

Body
imageone ofRequired

The image(s) to edit. Must be PNG, WEBP, or JPG and smaller than 50MB each. Supports up to 16 images.

string · binaryOptional

Single image file

or
string · binary[] · max: 16Optional

Array of image files (up to 16)

promptstring · max: 32000Required

Text description of the desired modification. Max length: 32,000 characters for gpt-image-1.

Example: Change the color of the cycle to blue
modelstring · enumRequired

Must be 'openai/gpt-image-1'

Default: openai/gpt-image-1Possible values:
ninteger · min: 1 · max: 10Optional

Number of edited images to generate (1-10)

Default: 1
sizestring · enumOptional

Output image size. Options: 1024x1024, 1536x1024, 1024x1536, or auto

Default: 1024x1024Possible values:
output_formatstring · enumOptional

Output image format: png, jpeg, or webp

Default: pngPossible values:
output_compressioninteger · max: 100Optional

Compression level (0-100) for JPEG or WEBP outputs. Higher values mean better quality.

Default: 100
maskstring · binaryOptional

Optional PNG mask file (< 4MB). Transparent areas indicate regions to edit. Must match dimensions of the first input image.

backgroundstring · enumOptional

Controls background transparency: transparent, opaque, or auto. If transparent, output format must be png or webp.

Default: autoPossible values:
response_formatstring · enumOptional

Format of the response data

Default: urlPossible values:
Responses
chevron-right
200

Image edited successfully

application/json
post
/images/edits

Last updated