返回模型目录
在线 APIQwen Image

Qwen2 Image

qwen2-image

Reliable Qwen image route for text generation and image editing workflows with broad prompt and aspect-ratio support.

模型概览
端点
/api/v1/images/generations
积分成本
10 credits / image
典型耗时
20-60 sec
输入与输出
Text or image → PNG or JPEG

能力

  • Text-to-image
  • Image editing
  • Long prompts
  • Common aspect ratios

请求参数

参数类型要求说明
modelstring必填Model identifier. 默认值: qwen2-image
promptstring必填Generation or edit instruction, up to 5000 characters.
image_urlsstring[]可选Source image URLs. Supplying an image activates edit mode.
aspect_ratiostring可选Output aspect ratio. 默认值: 16:9
output_formatpng | jpeg可选Generated file format. 默认值: png

请求示例

curl https://qwenapi.org/api/v1/images/generations \
  -H "Authorization: Bearer $QWEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "qwen2-image",
  "prompt": "A clean architectural model photographed in a daylight studio",
  "aspect_ratio": "4:3",
  "output_format": "png"
}'

生成端点为异步任务。请使用同一个 Bearer 密钥轮询 GET /api/v1/tasks/。