Nova RouterNova Router
Quick StartAPI ReferenceAgent Tool Integrations
AI Model APIImagesNative OpenAI Format

Edit Image

Creates an edited or extended image given an original image and a prompt.

POST
/v1/images/edits/
AuthorizationBearer <token>

In: header

Request Body

multipart/form-data

image*file

The image to edit. Must be a valid PNG file, less than 4MB, and square. If no mask is provided, the image must have transparency, which will be used as the mask.

Formatbinary
mask?file

An additional image whose fully transparent areas (for example, where alpha is zero) indicate where the original image should be edited. Must be a valid PNG file, less than 4MB, and the same dimensions as the original image.

Formatbinary
prompt*string

A text description of the desired image. Maximum length is 1000 characters.

n?string

The number of images to generate. Must be between 1 and 10.

size?string

The size of the generated image. Must be one of 256x256, 512x512, or 1024x1024.

response_format?string

The format of the returned generated image. Must be either url or b64_json.

user?string

A unique identifier representing your end user, which can help OpenAI monitor and detect abuse. Learn more.

model?string

Response Body

application/json

curl -X POST "https://router.bit-tech.com.cn/v1/images/edits/" \  -F image="cmMtdXBsb2FkLTE2ODc4MzMzNDc3NTEtMjA=/31225951_59371037e9_small.png" \  -F prompt="A cute baby sea otter wearing a beret."
{}

How is this guide?