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"
}
}授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
请求头
AnyFast 可转发的 DashScope 数据检查控制请求头。
请求体
application/json
- Option 1
- Option 2
OpenAI 兼容扁平请求或 DashScope 兼容嵌套请求。
对于特定内容请求,请选择 Direct 资源下对应的 -nsfw 模型。
可用选项:
wan2.7-image-pro, wan2.7-image, wan2.7-image-pro-nsfw, wan2.7-image-nsfw 文本提示词。
Maximum string length:
5000单图编辑使用的公网图片 URL 或 Base64 Data URI。
示例:
"2K"
必填范围:
1 <= x <= 12必填范围:
0 <= x <= 2147483647可用选项:
url, b64_json 此页面对您有帮助吗?