Documentation renewed! For old docs, visit doc.newapi.pro
New APINew API
User GuideInstallationAPI ReferenceAI ApplicationsHelp & SupportBusiness Cooperation
AI Model APIsImagesNative OpenAI Format

Edit Image

Create 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*string

要编辑的图像。必须是有效的 PNG 文件,小于 4MB,并且是方形的。如果未提供遮罩,图像必须具有透明度,将用作遮罩。

mask?string

附加图像,其完全透明区域(例如,alpha 为零的区域)指示image应编辑的位置。必须是有效的 PNG 文件,小于 4MB,并且尺寸与原始image相同。

prompt*string

所需图像的文本描述。最大长度为 1000 个字符。

n?string

要生成的图像数。必须介于 1 和 10 之间。

size?string

生成图像的大小。必须是256x256512x5121024x1024之一。

response_format?string

生成的图像返回的格式。必须是urlb64_json

user?string

代表您的最终用户的唯一标识符,可以帮助 OpenAI 监控和检测滥用行为。了解更多

model?string

Response Body

application/json

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

How is this guide?

Last updated on