Skip to main content
POST
通义千问(图像)

简介

通义千问图像系列(百炼 Qwen Image)支持中文场景文生图与多图编辑。通过 OpenAI 兼容接口调用:
  • 文生图POST /v1/images/generations,模型 qwen-image-plus
  • 图像编辑POST /v1/images/edits,模型 qwen-image-edit-plus
完整参数与多模型对比请参见 图片生成

认证

string
必填
Bearer Token,如 Bearer sk-xxxxxxxxxx

支持的模型

请求示例

常用参数

  • input.messages:Qwen 消息结构,content 中为 text 和/或 image
  • parameters.prompt_extend:是否扩展提示词(编辑系列建议短 prompt 开启、长 prompt 关闭)
  • parameters.n:输出张数;qwen-image-edit-plus 支持 1–6 张
  • parameters.size:输出尺寸,如 2048*2048
  • response_format:支持 urlb64_json
qwen-image-plus 仅文生图,不支持参考图输入。多图编辑请使用 qwen-image-edit-plus 并走 /v1/images/edits
更多说明见 图片生成图像编辑