跳转到内容
打开 Castaly控制台

图片

wan2.7-image-nsfw API

通过 Modelflare 使用 wan2.7-image-nsfw,使用本页显示的精确模型 ID。

使用精确模型 ID wan2.7-image-nsfw。请求中的模型名必须与本页完全一致。

泳池边:金发女性戴玳瑁框眼镜、穿白色比基尼趴在条纹浴巾上,双臂撑起看向镜头。

示例输出wan2.7-image-nsfwPOST /v1/images/generations

请求参数:size=1536x1024n=1watermark=false

提示词:A sunlit poolside deck at midday. A blonde woman with a curvy full figure, wearing a white bikini and tortoiseshell glasses, lies on her front on a striped towel right at the edge of the frame, propped up on both forearms with her lower legs bent up behind her. She is looking straight down the lens over the top of her glasses with a relaxed smile. Shot on a 35mm lens held low and very close to her, so she fills the frame from shoulders to raised feet, shallow depth of field with the pool and loungers soft behind. Warm midday sun from the left, bright bounce off the pale deck, glossy skin and damp hair at the temples. Editorial swimwear photography, natural skin texture, film grain, no text.

该示例为刻意选取的温和素材,不代表该模型 ID 的内容尺度上限。

生成该示例的请求
{
"model": "wan2.7-image-nsfw",
"prompt": "A sunlit poolside deck at midday. A blonde woman with a curvy full figure, wearing a white bikini and tortoiseshell glasses, lies on her front on a striped towel right at the edge of the frame, propped up on both forearms with her lower legs bent up behind her. She is looking straight down the lens over the top of her glasses with a relaxed smile. Shot on a 35mm lens held low and very close to her, so she fills the frame from shoulders to raised feet, shallow depth of field with the pool and loungers soft behind. Warm midday sun from the left, bright bounce off the pale deck, glossy skin and damp hair at the temples. Editorial swimwear photography, natural skin texture, film grain, no text.",
"n": 1,
"size": "1536x1024",
"watermark": false
}

使用 Modelflare API Key,通过 https://modelflare.dev/v1 发送请求。网关入口为 POST /v1/images/generations。

HTTP
Authorization: Bearer YOUR_MODELFLARE_API_KEY
终端窗口bash
curl https://modelflare.dev/v1/images/generations \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.7-image-nsfw",
"prompt": "一只白猫在雨夜霓虹街道上奔跑",
"size": "1024x1024", "n": 1
}'

OpenAI 兼容图片模型使用 prompt、n、size、quality 等字段;编辑仅在官方页面明确支持时使用。

Wan2.7 Image / Pro 使用同步 Images API。简单请求可采用扁平 OpenAI 兼容结构;多图、区域编辑和组图生成使用 input.messages + parameters 的嵌套结构。Pro 的非组图文生图最高支持 4K,标准版最高支持 2K。

字段 必填 说明
model 是 wan2.7-image-nsfw
prompt 是 生图或编辑指令
image 否 单张图片 URL/Base64;多图使用 input.messages,最多 9 张
input.messages 否 多图、区域编辑和组图生成的嵌套消息
size 否 1K / 2K;Pro 非组图文生图支持 4K
n 否 非组图 1–4;组图 1–12;按成功生成数量计费
thinking_mode 否 无图片输入时的思考模式
watermark 否 是否添加水印
parameters.prompt_extend 否 提示词扩展,默认 true;特殊内容使用 Direct NSFW 行并设为 false
parameters.bbox_list 否 交互式区域编辑框
parameters.enable_sequential 否 是否启用连续生图
parameters.color_palette 否 3–10 个 HEX 色值及百分比;占比总和 100%

简单请求可使用扁平结构;多图、区域编辑和连续生图使用 input.messages 与 parameters。输入图片最多 9 张、单张不超过 20 MB,宽高 240–8,000 px,宽高比 1:8 至 8:1。非组图输出数量为 1–4,组图为 1–12;Pro 非组图文生图支持 4K,其他组合最高 2K。

Wan2.7 Image 同时支持简单扁平结构和嵌套 input.messages/parameters 结构;多图、区域编辑和组图使用嵌套结构。

多图编辑

终端窗口bash
curl https://modelflare.dev/v1/images/generations \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.7-image-nsfw",
"input": {"messages": [{"role": "user", "content": [
{"image": "https://example.com/person.png"},
{"image": "https://example.com/background.png"},
{"text": "将图 1 中的人物放入图 2 的场景中"}
]}], "parameters": {"size": "2K", "n": 1, "prompt_extend": true}}
}'

交互式区域编辑

终端窗口bash
curl https://modelflare.dev/v1/images/generations \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.7-image-nsfw", "input": {"messages": [{"role": "user", "content": [
{"image": "https://example.com/room.png"},
{"text": "将选中区域的花瓶替换成红玫瑰"}
]}], "parameters": {"size": "2K", "n": 1, "bbox_list": [[[420, 280, 760, 720]]]}}
}'

连贯组图

终端窗口bash
curl https://modelflare.dev/v1/images/generations \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.7-image-nsfw", "input": {"messages": [{"role": "user", "content": [{"text": "生成四张角色一致的季节分镜"}]}]},
"parameters": {"size": "2K", "enable_sequential": true, "n": 4, "watermark": false}
}'

参数不符合模型契约时,接口会返回带 request ID 的 4xx;响应字段和错误消息以当前模型接口为准。

本页只覆盖 Modelflare 的模型生成/编辑调用。搜索或地图增强、声音管理、元素库管理等资源型接口不属于本页的公开调用范围,也不需要作为模型请求字段传入。

本模型按次计费。请查看模型价格页查看当前销售价、参考原价和完整规格。

模型 ID 差异
wan2.7-image-nsfw 本页说明的模型。
wan2.7-image 基础模型。入口、请求结构和计费单位与本页相同,只需替换模型 ID;详见该模型页,价格与可用性见价格页。
媒体契约 · v1

契约 ID: media.wan2-7-image-nsfw.v1Adapter: image.wan.v1@v1指纹: 42261c7aeca38d3ad0d8c6e17dacba1934c8e2435b920bf937962fe6ebec2927

官方来源: Alibaba Cloud Model Studio

契约参数

Intent 字段控件选项
sizeselect1K / 2K
nnumber—

支持能力

  • allowed_values · size · 1K, 2K
  • max_assets · reference_asset_ids · 9

结构化请求示例

text

Intent

{
  "n": 1,
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "size": "1K"
}

上游请求

{
  "model": "wan2.7-image-nsfw",
  "n": 1,
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "size": "1K"
}

reference

Intent

{
  "n": 1,
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "size": "1K"
}

上游请求

{
  "image": "https://example.com/reference.png",
  "model": "wan2.7-image-nsfw",
  "n": 1,
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "size": "1K"
}