Gateway

OpenAI Images Edit 兼容入口

Changed on

API Key 鉴权后转发到路由后的上游渠道。请求体支持 multipart/form-data 与 application/json(图片以 base64 或 data URL 传入)。

post/v1/images/edits

Request

Request body

background'transparent' | 'opaque' | 'auto'

GPT Image 输出背景。

maskstring

可选遮罩图片,base64 字符串或 data URL;解码后 GPT Image 最大 50 MiB、DALL-E 2 最大 4 MiB,且 JSON 请求体总大小最多 16 MiB。

modelstring

模型名称,默认 dall-e-2。

moderation'low' | 'auto'

GPT Image 内容审核级别。

ninteger

生成数量。

output_format'png' | 'jpeg' | 'webp'

GPT Image 输出格式。

promptstring

编辑提示词。

qualitystring

输出质量。

response_formatstring

返回格式。

sizestring

输出图片尺寸。

userstring

终端用户标识。

Response

OK

Changes

    • breaking

      added subschema #1 subschema #2 to the request body allOf list (media type: multipart/form-data)

    • warning

      removed subschema #1 subschema #2 from the request body allOf list (media type: multipart/form-data)

    • breaking

      added subschema #1 subschema #2 to the request body allOf list

    • breaking

      removed subschema #1 subschema #2 from the request body anyOf list

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • info

      the request's body type was generalized from object to no type