跳转到内容

FASHN Virtual Try-On V1.6

集成

模型 id fashn/tryon/v1.6
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.ru/v1/run/fashn/tryon/v1.6?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model_image": "example",
    "garment_image": "example"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.ru/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

此请求: $0.075 75 API 积分 · ≈ ₽7.85 在此页面运行

获取 API 密钥
FASHN 图像编辑 #try-on#fashion#clothing

更新的 v1.6 虚拟试衣模型,以更高输出分辨率将服装渲染到模特照片上

FASHN · 图像

你的第一个结果将在此显示

在下方构建请求,并使用你的 API 密钥运行。输出会复制到我们的存储中,可永久保存或免费保存 7 天。

构建请求

控件根据模型架构生成。更改控件时,代码和价格会同步更新。

•必填

以 URL 或 base64 数据提供的模型图像。

•必填

以 URL 或 base64 数据提供的服装图像。

默认 1

单次运行的图像数量,允许同时进行多次尝试,以提高在生成随机性存在时获得良好结果的概率。

高级 category · mode · garment_photo_type · moderation_level · output_format · seed · segmentation_free · enable_safety_checker
category 默认 auto

试穿服装类别,使用 'auto' 请求自动尝试识别类别。

mode 默认 balanced

速度与质量权衡的运行模式:'balanced' 寻求折中,'quality' 以较慢处理速度提供更好结果,'performance' 运行更快但可能降低质量。

garment_photo_type 默认 auto

用于调整内部参数的服装照片类别。平铺拍摄和幽灵模特图像使用 'flat-lay';展示模特穿着服装的照片使用 'model'。使用 'auto' 时,系统会尝试自行识别类别。

moderation_level 默认 permissive

服装图像审核策略。使用 'none' 禁用过滤器需要账户授权;没有授权时,该选择会按 'permissive' 处理。在 'permissive' 下仅拦截露骨内容;'conservative' 还会排除内衣和泳装。

output_format 默认 png

图像格式选择:'png' 可提供最佳质量,'jpeg' 可加快生成速度。

用于可复现生成的种子:固定随机性,使相同输入能够生成相同结果;更改种子则会强制生成不同结果。

POST /run/fashn/tryon/v1.6?wait=20 报价 → $0.075
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.ru/v1/run/fashn/tryon/v1.6?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model_image": "example",
    "garment_image": "example"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.ru/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

运行此请求

你的密钥会保留在此浏览器中:仅发送到 Doitong API;只有勾选“记住”后才会保存到 localStorage。 获取 API 密钥

关于 FASHN Virtual Try-On V1.6

将`garment_image`中的服装穿到`model_image`中的人物身上,两者均支持URL或base64。`category`接受tops、bottoms、one-pieces或auto,`garment_photo_type`接受model、flat-lay或auto。`mode`为performance、balanced或quality,`num_samples`生成1到4个png或jpeg结果。

参数

名称类型 默认值允许值 描述
model_image必填
类型string
以 URL 或 base64 数据提供的模型图像。
garment_image必填
类型string
以 URL 或 base64 数据提供的服装图像。
category可选
类型enum
默认值auto
topsbottomsone-piecesauto
试穿服装类别,使用 'auto' 请求自动尝试识别类别。
mode可选
类型enum
默认值balanced
performancebalancedquality
速度与质量权衡的运行模式:'balanced' 寻求折中,'quality' 以较慢处理速度提供更好结果,'performance' 运行更快但可能降低质量。
garment_photo_type可选
类型enum
默认值auto
automodelflat-lay
用于调整内部参数的服装照片类别。平铺拍摄和幽灵模特图像使用 'flat-lay';展示模特穿着服装的照片使用 'model'。使用 'auto' 时,系统会尝试自行识别类别。
moderation_level可选
类型enum
默认值permissive
nonepermissiveconservative
服装图像审核策略。使用 'none' 禁用过滤器需要账户授权;没有授权时,该选择会按 'permissive' 处理。在 'permissive' 下仅拦截露骨内容;'conservative' 还会排除内衣和泳装。
seed可选
类型integer | null
用于可复现生成的种子:固定随机性,使相同输入能够生成相同结果;更改种子则会强制生成不同结果。
num_samples可选
类型integer
默认值1
1 – 4
单次运行的图像数量,允许同时进行多次尝试,以提高在生成随机性存在时获得良好结果的概率。
segmentation_free可选
类型boolean
默认值true
禁用对模型图像的人体解析。
output_format可选
类型enum
默认值png
pngjpeg
图像格式选择:'png' 可提供最佳质量,'jpeg' 可加快生成速度。
enable_safety_checker可选
类型boolean
默认值true
调用方获得授权后,可将其设置为 false 以放宽审核。
必填

输出

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "fashn/tryon/v1.6",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 75,
    "usd": "0.075",
    "charged": 75,
    "refunded": 0
  },
  "input": {
    "model_image": "example",
    "garment_image": "example"
  },
  "output": {
    "images": [
      {
        "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
        "content_type": "image/jpeg",
        "file_name": "0-output.jpeg",
        "file_size": 1843200
      }
    ]
  },
  "outputs": [
    {
      "type": "image",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "width": 1024,
      "height": 768,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
你的文件,由你选择每个 outputs[].url 都是存储中的副本:可永久保存(按 GB-月付费),也可免费保存 7 天,由账户设置或 ?storage= 决定。
每个模型的结构相同图像、视频和音频均包含 type、url、content_type、width、height 和 duration。output 是模型自身的结果对象。
输出字段
images
array of object {url, content_type, file_name, file_size}

更多模型:图像编辑

对于 AI 代理:此页面的 Markdown 版本位于 https://doitong.com/zh/developers/models/fashn/tryon/v1.6.md. 所有模型和指南: https://doitong.com/developers/llms.txt