seedinteger
The same seed and the same input given to the same version of the model will output the same image every time.
sandbase-ai/cat-vtonCatVTON is a virtual try-on model. It dresses the person in a photo with a garment from a second image, with controls for the covered body area, guidance, steps, and aspect ratio.
Попробовать модель
PNG, JPEG, WebP или GIF · максимум 20 MiB
PNG, JPEG, WebP или GIF · максимум 20 MiB
Ваш результат появится здесь
Заполните входные данные, затем нажмите «Запустить».
CatVTON virtual try-on: dress the person in human_image_url with the garment in garment_image_url.
| Field | Type | Default | Notes |
|---|---|---|---|
aspect_ratio | 21:9 / 16:9 / 3:2 / 4:3 / 5:4 / 1:1 / 4:5 / 3:4 / 2:3 / 9:16 | — | Output frame shape. |
guidance_scale | number 0–20 | 2.5 | How strictly to follow the garment. |
num_inference_steps | integer 1–50 | 30 | More steps add detail and time. |
seed | integer | random | Fix it to compare prompt changes. |
cloth_type | upper / lower / overall / inner / outer | — | Which body area the garment covers. |
garment_image_url | image URL | — | Photo of the garment. |
human_image_url | image URL | — | Photo of the person. |
$0.00125 per image.
| Request | Price |
|---|---|
| One image | $0.0013 |
Failed runs are not charged.
Начните разработку
Отправьте эту модель через SandBase Unified Run API.
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
-X POST "https://api.sandbase.ai/v1/run" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'SANDBASE_JSON'
{
"model": "sandbase-ai/cat-vton",
"cloth_type": "upper",
"guidance_scale": 2.5,
"human_image_url": "https://static.sandbase.ai/examples/bfl/flux-2/virtual-tryon/input_images_0.png",
"garment_image_url": "https://static.sandbase.ai/examples/bfl/flux-2/virtual-tryon/input_images_1.png",
"num_inference_steps": 30
}
SANDBASE_JSON
)
run_id=$(printf '%s' "$result" | jq -r .id)
for attempt in $(seq 1 120); do
status=$(printf '%s' "$result" | jq -r .status)
case "$status" in completed|failed|timeout) break ;; esac
sleep 2
result=$(curl --fail-with-body --silent \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
"https://api.sandbase.ai/v1/run/$run_id")
done
status=$(printf '%s' "$result" | jq -r .status)
[ "$status" = completed ] || { echo "Generation ended: $status" >&2; exit 1; }
printf '%s\n' "$result"Создайте ключ SandBase API и задайте его в окружении сервера. Все запросы используют аутентификацию Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Храните ключ на сервере. Не раскрывайте его в коде браузера и не коммитьте в репозиторий.
Отправьте POST на /v1/run с этим ID модели и её входными данными. Пример запроса выше включает отправку и опрос.
Используйте возвращённый ID запуска, чтобы опрашивать статус до завершения, ошибки или таймаута. Читайте вывод только после завершения.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Передайте публично доступный URL файла в поле image, video или audio модели. Поддерживаемые форматы и лимиты показаны рядом с каждым полем Playground.
Используйте управление загрузкой или заменой в поддерживаемых полях изображений в Playground. Поля URL видео принимают размещённое видео для вождения; это не означает поддержку загрузки видео.
seedintegerThe same seed and the same input given to the same version of the model will output the same image every time.
cloth_typestringType of the Cloth to be tried on. Options: upper: Upper body cloth lower: Lower body cloth overall: Full body cloth inner: Inner cloth, like T-shirt inside a jacket outer: Outer cloth, like a jacket over a T-shirt
Возможные значения: "upper", "lower", "overall", "inner", "outer"
aspect_ratiostringThe aspect ratio of the generated image.
Возможные значения: "21:9", "16:9", "3:2", "4:3", "5:4", "1:1", "4:5", "3:4", "2:3", "9:16"
guidance_scalenumberThe CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you.
По умолчанию: 2.5
Минимум: 0
Максимум: 20
human_image_urlstringUrl for the human image.
garment_image_urlstringUrl to the garment image.
num_inference_stepsintegerThe number of inference steps to perform.
По умолчанию: 30
Минимум: 1
Максимум: 50
{
"model": "sandbase-ai/cat-vton",
"cloth_type": "upper",
"guidance_scale": 2.5,
"human_image_url": "https://static.sandbase.ai/examples/bfl/flux-2/virtual-tryon/input_images_0.png",
"garment_image_url": "https://static.sandbase.ai/examples/bfl/flux-2/virtual-tryon/input_images_1.png",
"num_inference_steps": 30
}В завершённом запуске результат доступен в output. Ниже приведён сохранённый пример модели, а не новая генерация.
Пример вывода ещё не опубликован. После завершённого запуска откройте Playground → Result → JSON, чтобы посмотреть ответ.