万相 2.6 / Alibaba
图像生成 API
万相 2.6 文生图模型,输入文本描述即可生成高质量图像。API 为同步接口,提交请求后直接返回生成结果,无需轮询。通常耗时 8-15 秒。
接口信息
POST
https://nexusflow.hk/v1/tasks同步调用 - 请求完成后直接返回图片 URL,无需额外查询。响应中
status 直接为 "succeeded"。POST
https://nexusflow.hk/v1/images/generations也支持 OpenAI 风格图像生成入口,适合复用 OpenAI SDK 的
images.generate 调用;新接入建议优先使用统一任务接口 /v1/tasks。支持的模型
同步接口说明:
- wan2.6-t2i 为同步接口,提交请求后直接返回生成结果,无需轮询。
- 请求耗时通常 8-15 秒,请确保客户端超时设置足够(建议 > 30 秒)。
- 图片 URL 有效期 24 小时,获取后请立即下载保存。
- 按生成图片数量计费(如 n=4 则 ¥0.80),仅对成功任务计费。
请求参数
完整调用示例
curl -X POST 'https://nexusflow.hk/v1/tasks' \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.6-t2i",
"prompt": "一只可爱的橘猫在阳光下打盹,水彩画风格,温暖色调",
"size": "1024x1024",
"n": 1
}'
# 响应直接返回生成结果(无需轮询):
# {
# "id": "4b0a0920-...",
# "object": "task",
# "status": "succeeded",
# "model": "wan2.6-t2i",
# "type": "image",
# "output": {
# "type": "image",
# "image_url": "https://nexusflow.hk/storage/xxx.png",
# "images": ["https://...png"]
# },
# "created_at": "2026-06-01T10:00:00.000Z",
# "completed_at": "2026-06-01T10:00:10.000Z"
# }响应示例
成功响应
{
"id": "4b0a0920-ce86-4fbe-81cc-55e3b89a6ed1",
"object": "task",
"status": "succeeded",
"model": "wan2.6-t2i",
"type": "image",
"output": {
"type": "image",
"image_url": "https://nexusflow.hk/storage/xxx.png",
"images": [
"https://nexusflow.hk/storage/xxx.png"
]
},
"created_at": "2026-06-01T10:00:00.000Z",
"completed_at": "2026-06-01T10:00:10.000Z"
}失败响应
{
"error": {
"message": "InvalidParameter: prompt is empty",
"type": "upstream_error",
"code": "upstream_error"
}
}响应字段
计费说明
视频生成 API
查看文生视频接口文档
异步任务 API
查看通用异步任务接口文档
完整定价
查看所有模型定价