Skip to main content
POST
图像编辑(Edits)

简介

POST /v1/images/edits 为 OpenAI 兼容的图像编辑端点,在给定原图与提示词下生成编辑或扩展结果。适用于:
  • 通义千问qwen-image-edit-plus(见 通义千问(图像)
  • GPT-Image-2:支持 JSON(image URL/Base64)或 multipart/form-dataimage[] 文件上传)
文生图仍使用 POST /v1/images/generations。GPT-Image-2 也可仅通过 generations 携带 image 字段完成图生图,见 GPT-Image-2

认证

string
必填
Bearer Token,如 Bearer sk-xxxxxxxxxx

请求示例

常用参数

GPT-Image-2
  • prompt:编辑描述
  • image:URL、Base64 或 multipart 文件(可多张)
  • size / quality / n:与 generations 类似
通义千问
  • input.messages:含 image + text 的 Qwen 结构
  • parameters.n:输出数量
响应格式因模型而异(b64_jsonurl)。详见 图片生成