核心能力
- 文生图 — 根据文字描述生成图片
- 灵活尺寸 — 通过
size指定输出分辨率 - URL 或 Base64 — 通过
response_format选择返回格式
快速示例
参数说明
响应字段
API 参考
查看 Qwen Image Plus 的交互式 API Playground。
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
通过 Starrise AI API 调用阿里巴巴 Qwen Image Plus 文生图模型。
size 指定输出分辨率response_format 选择返回格式curl https://ai.alad.com/v1/images/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen-image-plus",
"prompt": "吉卜力风格的可爱猫咪",
"size": "1024x1024",
"response_format": "url"
}'
import requests
response = requests.post(
"https://ai.alad.com/v1/images/generations",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"model": "qwen-image-plus",
"prompt": "吉卜力风格的可爱猫咪",
"size": "1024x1024",
"response_format": "url"
}
)
result = response.json()
print(result["data"][0]["url"])
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
model | string | 是 | 固定为 qwen-image-plus |
prompt | string | 是 | 图片描述文字 |
n | integer | 否 | 生成张数,默认 1 |
size | string | 否 | 输出尺寸,如 1024x1024 |
response_format | string | 否 | url(默认)或 b64_json |
| 字段 | 说明 |
|---|---|
data[].url | 图片下载链接(有效期约 24 小时) |
data[].b64_json | Base64 编码图片(仅 response_format=b64_json 时返回) |
data[].revised_prompt | AI 扩展后的实际提示词 |
created | 创建时间戳 |
