一、支持模型
| 模型 |
|---|
qwen-image-3.0-pro |
qwen-image-3.0 |
qwen-image-2.1-pro |
qwen-image-2.1-turbo |
二、图片生成 API
POST https://{api_domain}/v3/aliyun-en/compatible-mode/v1/images/generations
文生图
curl -X POST 'https://{api_domain}/v3/aliyun-en/compatible-mode/v1/images/generations' \
-H 'Authorization: Bearer <YOUR_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"model": "qwen-image-3.0-pro",
"prompt": "一只橘猫趴在洒满阳光的窗台上,背景是城市街景,胶片质感",
"size": "1024x1024",
"n": 1,
"prompt_extend": true
}'
图像编辑
curl -X POST 'https://{api_domain}/v3/aliyun-en/compatible-mode/v1/images/generations' \
-H 'Authorization: Bearer <YOUR_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"model": "qwen-image-3.0",
"prompt": "保留图 1 人物的面部特征,换成图 2 的服装风格,背景改为咖啡店",
"image": [
"https://your-cdn.example.com/person.png",
"https://your-cdn.example.com/style.png"
],
"size": "2048x2048"
}'