图片
编辑图片
以 multipart/form-data 上传来源图片并用文本提示编辑,与 OpenAI client.images.edit() 兼容。内部沿用图生图(i2i)管线,响应一律是同步 JSON;mask 目前不支持,response_format 只支持 URL(不支持 b64_json)。
POST
/api/v1/images/edits验证
Authorization必填string · header
在 Authorization 标头以 Bearer token 传入 API 密钥。
Body
image必填file
要编辑的来源图片文件。可重复传多个 image 字段(或 image[]),最多 8 张,每张上限 10 MB,MIME 必须是 image/*。
≤ 8 files, ≤ 10 MB each, image/*
prompt必填string
编辑指示的文本描述。
minLength: 1
Example:
"change the background to a night city"modelstring
图片编辑模型。省略时使用服务器默认(目前为 gpt-5.4-image-2)。
Example:
"openai/gpt-5.4-image-2"ninteger
要生成的结果数量,1–10。
1–10
Example:
1sizestring
输出尺寸,必须是「宽x高」的像素格式(例如 1024x1024);格式不符时此字段会被静默忽略。
format: <width>x<height>
Example:
"1024x1024"响应示例