Virtual try-on for clothes
Show a person wearing your clothes: send one photo of the person and up to 6 garment pictures (flat lays or product shots) and get one realistic photo back.
POST /api/v1/nodes/virtual-try-on
How it works
Your agent pays for itself

1Needs something

2Finds it on TollNode

3Pays a few cents

4Gets the result
Two ways to use Virtual try-on for clothes
Way 1 · Pay per call (x402)
For AI agents, no sign-up
Your agent sends the request, gets a 402 with the exact price (from $0.033 per image), signs a USDC payment on Base and retries. Nothing is collected unless the call succeeds.
npx agentcash add https://tollnode.comnpx agentcash@latest fetch https://tollnode.com/api/v1/nodes/virtual-try-on -m POST -b '{"max_garments":1,"person_image":"https://tollnode.com/examples/video-p-video-avatar.jpg","garment_images":["https://tollnode.com/examples/image-instant.jpg"]}'Way 2 · Account + API key
For apps and teams
Create a free account, load a balance with USDC on Base, create an API key and call any node. Same prices; each successful call is deducted from your balance.
curl -X POST https://tollnode.com/api/v1/nodes/virtual-try-on \
-H "Authorization: Bearer $TOLLNODE_API_KEY" \
-H "content-type: application/json" \
-d '{"max_garments":1,"person_image":"https://tollnode.com/examples/video-p-video-avatar.jpg","garment_images":["https://tollnode.com/examples/image-instant.jpg"]}'Step-by-step, with code in JavaScript and Python: full guide for Virtual try-on for clothes.
Input
| Field | Type | Notes |
|---|---|---|
| seed | integer | Optional whole number. The same seed with the same input gives a very similar result again; leave it out for a new result each time |
| prompt | string | Optional: which garment from which picture, when the pictures are not flat laysLimit: up to 500 characters |
| max_garments | enum | How many garment pictures you send at most; sets the price. More pictures than this are refused before anything runs, and not charged. Default 1 (1, 2, 3, 4, 6) |
| person_image* | string | Photo of the person to dress (https URL). Use a full-body photo for trousers, skirts or shoes; a portrait only shows the top half. Or send it inline as a base64 data: URI (the whole request, base64 included, must stay under 4.5 MB); for a bigger file get an upload link (MCP upload_file or POST /api/v1/uploads) and send its fileUrlLimit: https link (any size; upload_file gives one) or base64 data: URI (whole request under 4.5 MB) |
| output_format | enum | File type of the result: jpg, png, webp (jpg, png, webp) |
| garment_images* | array | 1 to 6 garment pictures (https URLs): flat lays or product photos. Or send it inline as a base64 data: URI (the whole request, base64 included, must stay under 4.5 MB); for a bigger file get an upload link (MCP upload_file or POST /api/v1/uploads) and send its fileUrlLimit: 1 to 6 items; each https link (any size; upload_file gives one) or base64 data: URI (whole request under 4.5 MB) |
Sending files. Give person_image, garment_images a public link, or the file inline if the whole request stays under 4.5 MB. For bigger files (up to 100 MB) your agent gets a free upload link first: the MCP tool upload_file, or POST /api/v1/uploads. Files are deleted once the job is done. How it works
Example response
{
"images": [
"https://tollnode.com/api/v1/files/00000000-0000-0000-0000-000000000000/0"
]
}FAQ
- What does the Virtual try-on for clothes node return?
- Show a person wearing your clothes: send one photo of the person and up to 6 garment pictures (flat lays or product shots) and get one realistic photo back.
- How much does one call cost?
- from $0.033 in USDC on Base per image (one call = one image), charged only when it succeeds, depending on max_garments (1: $0.033, 2: $0.043, 3: $0.054, 4: $0.065, 6: $0.087). No sign-up, subscription or API key.
- What happens if the call fails?
- You are not charged. TollNode checks your signed payment first, runs the node, and only collects the payment if the result is usable. A failed, empty or timed-out call is never settled, so there is nothing to refund.
- How does an AI agent pay?
- With x402. The first request returns HTTP 402 and the exact price. Any x402 wallet signs the USDC payment and retries automatically. In Claude Code or Cursor, run npx agentcash add https://tollnode.com once.
- Can I use an API key instead?
- Yes. Create a free account, add funds in USDC on Base, create an API key and send it as Authorization: Bearer. Each successful call is deducted from your balance at the same price; failed calls cost nothing.