Video Tryon Serverless API

Video Tryon is Segmind’s next-generation AI video model for instant virtual try-on, allowing users to visualize any outfit on any person in high-quality, fully-preserved motion up to 50 seconds.

~205.13s
~$1.606
 1import requests
 2import json
 3
 4url = "https://api.segmind.com/v1/video-tryon"
 5headers = {
 6    "x-api-key": "YOUR_API_KEY",
 7    "Content-Type": "application/json"
 8}
 9
10data = {
11    "prompt": "A woman dressed in a Superman costume poses in a futuristic city.",
12    "reference_img": "https://segmind-resources.s3.amazonaws.com/input/e8601820-8a4a-4fff-81fb-2c21f77363c3-f9162e73-0c8b-4c77-997f-87ec85fc8c02.png",
13    "input_video": "https://segmind-resources.s3.amazonaws.com/input/28386d68-f3d4-435d-8ab0-b07bb3609fb9-clideo_editor_7880b044c8704498ae9c43258a503d92.mp4",
14    "base_64": false
15}
16
17response = requests.post(url, headers=headers, json=data)
18
19if response.status_code == 200:
20    result = response.json()
21    print(json.dumps(result, indent=2))
22else:
23    print(f"Error: {response.status_code}")
24    print(response.text)

API Endpoint

POSThttps://api.segmind.com/v1/video-tryon

Parameters

input_videorequired
string (uri)

The source video URL. Use short MP4s under 50 seconds

Default: "https://segmind-resources.s3.amazonaws.com/input/28386d68-f3d4-435d-8ab0-b07bb3609fb9-clideo_editor_7880b044c8704498ae9c43258a503d92.mp4"
promptrequired
string

Guides video modification.

reference_imgrequired
string (uri)

URL of the first frame of the video. This should be a modified version of the original first frame, it will be used to guide the video modification.

Default: "https://segmind-resources.s3.amazonaws.com/input/e8601820-8a4a-4fff-81fb-2c21f77363c3-f9162e73-0c8b-4c77-997f-87ec85fc8c02.png"
base_64optional
boolean

Base64 encoding of the output

Default: false

Response Type

Returns: Video

Common Error Codes

The API returns standard HTTP status codes. Detailed error messages are provided in the response body.

400

Bad Request

Invalid parameters or request format

401

Unauthorized

Missing or invalid API key

403

Forbidden

Insufficient permissions

404

Not Found

Model or endpoint not found

406

Insufficient Credits

Not enough credits to process request

429

Rate Limited

Too many requests

500

Server Error

Internal server error

502

Bad Gateway

Service temporarily unavailable

504

Timeout

Request timed out