curl --request POST \
--url https://www.anyfast.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "wan2.7-image",
"prompt": "电影感花店,精致的窗户和漂亮的木质门,门口摆放着鲜花",
"size": "2K",
"n": 1,
"watermark": false,
"thinking_mode": true
}
'
{
"data": [
{
"url": "https://dashscope-result.example.com/generated.png",
"b64_json": "",
"revised_prompt": ""
}
],
"created": 1784274013,
"metadata": {
"output": {
"choices": [
{
"finish_reason": "stop",
"message": {
"content": [
{
"image": "https://dashscope-result.example.com/generated.png",
"type": "image"
}
],
"role": "assistant"
}
}
],
"finished": true
},
"usage": {
"image_count": 1,
"input_tokens": 25,
"output_tokens": 2,
"size": "2048*2048",
"total_tokens": 27
},
"request_id": "f30f2d2b-e0ee-9a47-ba5e-68b66360fe47"
}
}图像生成
Wan2.7 Image / Pro
通过 AnyFast 调用 wan2.7-image 和 wan2.7-image-pro,完成图像生成、编辑与组图生成。
POST
/
v1
/
images
/
generations
curl --request POST \
--url https://www.anyfast.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "wan2.7-image",
"prompt": "电影感花店,精致的窗户和漂亮的木质门,门口摆放着鲜花",
"size": "2K",
"n": 1,
"watermark": false,
"thinking_mode": true
}
'
{
"data": [
{
"url": "https://dashscope-result.example.com/generated.png",
"b64_json": "",
"revised_prompt": ""
}
],
"created": 1784274013,
"metadata": {
"output": {
"choices": [
{
"finish_reason": "stop",
"message": {
"content": [
{
"image": "https://dashscope-result.example.com/generated.png",
"type": "image"
}
],
"role": "assistant"
}
}
],
"finished": true
},
"usage": {
"image_count": 1,
"input_tokens": 25,
"output_tokens": 2,
"size": "2048*2048",
"total_tokens": 27
},
"request_id": "f30f2d2b-e0ee-9a47-ba5e-68b66360fe47"
}
}授权
请求体
application/json
- Option 1
- Option 2
OpenAI 兼容扁平请求或 DashScope 兼容嵌套请求。
此页面对您有帮助吗?