Skip to content

gpt imag 图像编辑接口

Servers

https://api.rainboxs.com/RAINBOXS API 服务器

Default


gpt imag 图像编辑接口

POST
/v1/images/edits

Parameters

Header Parameters

Authorization*

所有请求都需要在 HTTP Header 中包含 Authorization 字段,用于身份认证。

Type
string
Required
Example"sk-2SiNP"

Request Body

multipart/form-data
object

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

Format"binary"

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

Format"binary"

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

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

生成图像的大小。必须是256x256、512x512或 1024x1024之一。gpt-4o-image支持生成1x1、2x3和3x2比例的图片

生成的图像返回的格式。必须是url或b64_json。

Responses

application/json
JSON
{
}

Playground

Headers
Body

Samples

cURL
JavaScript
PHP
Python

Powered by VitePress OpenAPI