FASHN Virtual Try-On V1.5
統合
モデルID
fashn/tryon/v1.5
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/fashn/tryon/v1.5?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.com/v1/requests/REQUEST_ID?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY"
const API = "https://api.doitong.com/v1";
const headers = {
"Authorization": "Bearer " + process.env.DOITONG_API_KEY,
"Content-Type": "application/json",
};
// Run the model; wait up to 20 s for the finished result in the same call
let res = await fetch(API + "/run/fashn/tryon/v1.5?wait=20", {
method: "POST",
headers,
body: JSON.stringify({
"model_image": "example",
"garment_image": "example"
}),
});
let request = await res.json();
if (!res.ok) throw new Error(request.error.code + ": " + request.error.message);
// Not finished yet: long-poll until it is
while (request.status === "queued" || request.status === "running") {
res = await fetch(API + "/requests/" + request.id + "?wait=20", { headers });
request = await res.json();
}
if (request.status !== "succeeded") throw new Error(JSON.stringify(request.error));
console.log(request.outputs.map((o) => o.url), request.cost.credits + " API credits ($" + request.cost.usd + ")");
import os
import requests
API = "https://api.doitong.com/v1"
headers = {"Authorization": "Bearer " + os.environ["DOITONG_API_KEY"]}
payload = {
"model_image": "example",
"garment_image": "example",
}
# Run the model; wait up to 20 s for the finished result in the same call
r = requests.post(API + "/run/fashn/tryon/v1.5", params={"wait": 20}, json=payload, headers=headers)
request = r.json()
if not r.ok:
raise RuntimeError(request["error"]["code"] + ": " + request["error"]["message"])
# Not finished yet: long-poll until it is
while request["status"] in ("queued", "running"):
request = requests.get(API + "/requests/" + request["id"], params={"wait": 20}, headers=headers).json()
if request["status"] != "succeeded":
raise RuntimeError(request["error"])
print([o["url"] for o in request["outputs"]], request["cost"]["credits"], "API credits", "$" + request["cost"]["usd"])
# 1. Connect once (Claude Code; Cursor, VS Code, Claude Desktop: https://doitong.com/ja/developers/docs/mcp)
claude mcp add --transport http doitong-models https://api.doitong.com/v1/mcp \
--header "Authorization: Bearer $DOITONG_API_KEY"
# 2. Your agent calls the "run" tool with:
{
"model_id": "fashn/tryon/v1.5",
"input": {
"model_image": "example",
"garment_image": "example"
}
}
Doitong APIを通じてFASHN Virtual Try-On V1.5モデル(fashn/tryon/v1.5)を呼び出します。エージェント向けドキュメント: https://doitong.com/ja/developers/models/fashn/tryon/v1.5.md
POST https://api.doitong.com/v1/run/fashn/tryon/v1.5?wait=20
Authorization: Bearer $DOITONG_API_KEY
Content-Type: application/json
{
"model_image": "example",
"garment_image": "example"
}
レスポンスのステータスが"queued"または"running"の場合、"succeeded"になるまでGET https://api.doitong.com/v1/requests/REQUEST_ID?wait=20をポーリングしてください。ファイルはoutputs[].urlにあります。同じボディでPOST https://api.doitong.com/v1/quote/fashn/tryon/v1.5を実行すると、実行前の正確な価格が返されます。
このリクエスト: $0.075 75 APIクレジット このページで実行
新しいAPIキーです。 これは今だけ表示され、コードと下記のAPIキー欄にすでに入力されています。秘密にしてください。ブラウザで実行されるコードに決して含めないでください。
リクエストを作成
コントロールはモデルスキーマから生成されます。値を変更するとコードと価格が更新されます。
POST
/run/fashn/tryon/v1.5?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.com/v1/run/fashn/tryon/v1.5?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.com/v1/requests/REQUEST_ID?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY"
const API = "https://api.doitong.com/v1";
const headers = {
"Authorization": "Bearer " + process.env.DOITONG_API_KEY,
"Content-Type": "application/json",
};
// Run the model; wait up to 20 s for the finished result in the same call
let res = await fetch(API + "/run/fashn/tryon/v1.5?wait=20", {
method: "POST",
headers,
body: JSON.stringify({
"model_image": "example",
"garment_image": "example"
}),
});
let request = await res.json();
if (!res.ok) throw new Error(request.error.code + ": " + request.error.message);
// Not finished yet: long-poll until it is
while (request.status === "queued" || request.status === "running") {
res = await fetch(API + "/requests/" + request.id + "?wait=20", { headers });
request = await res.json();
}
if (request.status !== "succeeded") throw new Error(JSON.stringify(request.error));
console.log(request.outputs.map((o) => o.url), request.cost.credits + " API credits ($" + request.cost.usd + ")");
import os
import requests
API = "https://api.doitong.com/v1"
headers = {"Authorization": "Bearer " + os.environ["DOITONG_API_KEY"]}
payload = {
"model_image": "example",
"garment_image": "example",
}
# Run the model; wait up to 20 s for the finished result in the same call
r = requests.post(API + "/run/fashn/tryon/v1.5", params={"wait": 20}, json=payload, headers=headers)
request = r.json()
if not r.ok:
raise RuntimeError(request["error"]["code"] + ": " + request["error"]["message"])
# Not finished yet: long-poll until it is
while request["status"] in ("queued", "running"):
request = requests.get(API + "/requests/" + request["id"], params={"wait": 20}, headers=headers).json()
if request["status"] != "succeeded":
raise RuntimeError(request["error"])
print([o["url"] for o in request["outputs"]], request["cost"]["credits"], "API credits", "$" + request["cost"]["usd"])
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "run",
"arguments": {
"model_id": "fashn/tryon/v1.5",
"input": {
"model_image": "example",
"garment_image": "example"
},
"wait_seconds": 20
}
}
}
FASHN Virtual Try-On V1.5について
`model_image`と`garment_image`(URLまたはbase64)を受け取り、人物に衣服を着せて描画します。`category`はトップス、ボトムス、ワンピース、autoに対応し、`garment_photo_type`は着用画像または平置き画像を指定します。`mode`で速度と品質のバランスを調整し、`num_samples`で1~4枚の画像を返します。
パラメータ
名前型
デフォルト許可される値
説明
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
1回の実行で生成する画像数。生成時のランダム性があっても、複数回試行することで良い結果を得る可能性を高められます。
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.5",
"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.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
"cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
}
}
ファイルの保存期間を選択すべてのoutputs[].urlはストレージ上のコピーです。アカウント設定または?storage=により、永久保存(GB・月単位で有料)または無料で7日保存できます。
すべてのモデルで同じ形式画像、動画、音声のいずれでも、type、url、content_type、width、height、durationが含まれます。outputはモデル独自の結果オブジェクトです。
出力フィールド
- images
- array of object {url, content_type, file_name, file_size}
その他のFASHN Virtual Try-Onバリアント
その他のモデル: 画像編集
AIエージェント向け:このページのMarkdown版はこちらです: https://doitong.com/ja/developers/models/fashn/tryon/v1.5.md. すべてのモデルとガイド: https://doitong.com/developers/llms.txt






