创建图像编辑
根据原始图像和提示创建编辑或扩展的图像。
AuthorizationBearer <token>
In: header
modelstring
模型标识,格式为 providerSlug/modelSlug,例如 qwen/qwen-image-edit。
imagefile
要编辑的图像。可以是文件(multipart/form-data)或 Base64 编码的字符串/URL(application/json)。
Format
binarymask?file
一个额外的图像,其完全透明的区域指示应该编辑图像的位置。可以是文件(multipart/form-data)或 Base64 编码的字符串/URL(application/json)。
Format
binarypromptstring
所需图像的文本描述。
n?integer
要生成的图像数量。必须在 1 到 6 之间。
Default
1Range
1 <= value <= 6size?string
生成图像的大小。支持的尺寸包括 1024x1024 等。
response_format?string
返回生成图像的格式。url 返回图片 URL,b64_json 返回 Base64 编码的图片。
Default
"url"Value in
"url" | "b64_json"user?string
代表您最终用户的唯一标识符,用于日志和审计。
vendor?string
指定 vendor slug。如果不指定,将根据优先级自动选择。
Response Body
curl -X POST "https://api.openroute.cn/v1/images/edits" \ -H "Content-Type: application/json" \ -d '{ "model": "qwen/qwen-image-edit", "image": "string", "prompt": "A sunlit indoor lounge area with a pool containing a flamingo" }'Last updated on
