Wan2.7 Image
使用 Wan2.7 Image 生成或编辑图像。支持多种模式:
- 文生图:仅提供
prompt - 图像编辑:提供
prompt+image - 组图生成:设置
enable_sequential: true
接口同步返回最终图片 URL。
Documentation Index
Fetch the complete documentation index at: https://docs.anyfast.ai/llms.txt
Use this file to discover all available pages before exploring further.
授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
请求体
模型 ID。wan2.7-image-pro 文生图支持 4K 输出;wan2.7-image 生成速度更快。
wan2.7-image-pro, wan2.7-image "wan2.7-image-pro"
图片描述文字,支持中英文,最多 5000 个字符。
"一间有着精致窗户的花店,漂亮的木质门,摆放着花朵"
编辑用输入图片 — URL(HTTP/HTTPS)或 Base64 数据 URI(data:{MIME};base64,{data})。
支持格式:JPEG、JPG、PNG(不支持透明通道)、BMP、WEBP。最大 20 MB,宽高 240–8000 px,宽高比 1:8–8:1。最多 9 张图片。
"https://example.com/input.jpg"
生成图片张数。
- 关闭组图模式(
enable_sequential: false):1–4,默认1。 - 开启组图模式(
enable_sequential: true):1–12,默认12,实际张数由模型决定。
1 <= x <= 121
输出分辨率,支持两种方式(不可混用):
- 预设规格:
1K(1024×1024)、2K(2048×2048,默认)、4K(4096×4096,仅 wan2.7-image-pro 文生图)。 - 自定义像素:
{宽}x{高}— 文生图总像素 768×768–4096×4096,其他场景最高 2048×2048,宽高比 1:8–8:1。
"2K"
启用组图输出模式。为 true 时,n 表示最大生成张数,实际数量由模型决定。
开启思考模式以增强推理能力、提升出图质量。仅在无图片输入且关闭组图模式时生效。
是否在生成图片右下角添加水印。
随机数种子,范围 [0, 2147483647]。相同种子可获得相近结果,但不保证完全一致。
0 <= x <= 2147483647返回图片 URL 或 Base64 编码。
url, b64_json "url"