p-image-try-on

Virtually fit one or more garments onto a person's photo

Overview

p-image-try-on is Pruna's virtual try-on model that fits garments onto a person's photo. Provide a photo of a person and garment reference images, and the model will realistically dress the person in the provided garments.

Rate Limit: 500 requests per minute

Category: Image Editing

Price: 0.015$ for the first image input, plus 0.008$ for each additional image input

Quickstart

Start with uploading your images

# Upload person photo
curl -X POST "https://api.pruna.ai/v1/files" \
  -H "apikey: YOUR_API_KEY" \
  -F "content=@/path/to/person.jpg"

# Upload garment image
curl -X POST "https://api.pruna.ai/v1/files" \
  -H "apikey: YOUR_API_KEY" \
  -F "content=@/path/to/garment.png"

Note: Use -F (form) with @ prefix to upload a file from your local filesystem. The file path should be absolute or relative to your current directory.

Try On (Synchronous)
curl -X POST 'https://api.pruna.ai/v1/predictions' \
-H 'Content-Type: application/json' \
-H 'apikey: YOUR_API_KEY' \
-H 'Model: p-image-try-on' \
-H 'Try-Sync: true' \
-d '{
"input": {
"person_image": "https://your-url.com/person.jpg",
"garment_images": ["https://your-url.com/garment.png"],
"prompt": ""
}
}'
Try On (Asynchronous)
curl -X POST 'https://api.pruna.ai/v1/predictions' \
-H 'Content-Type: application/json' \
-H 'apikey: YOUR_API_KEY' \
-H 'Model: p-image-try-on' \
-d '{
"input": {
"person_image": "https://your-url.com/person.jpg",
"garment_images": ["https://your-url.com/garment.png"],
"prompt": ""
}
}'

Parameters

Required Parameters
ParameterTypeDescription
person_imagestringImage URL of the person to edit
garment_imagesarray of stringGarment reference images. Up to 6 recommended, up to 11 supported.
Optional Parameters
ParameterTypeDefaultDescription
seedintegerRandom seed. Leave blank for a random seed.
promptstring""Experimental guidance for non-flatlay garment images, e.g. which garment from which image to use.
turbobooleanfalseRun faster with additional optimizations. Not recommended for more than 4 garments.
output_formatstringjpgFormat of the saved output image (webp, jpg, png).
output_qualityinteger95Quality for jpg/webp outputs from 0 to 100.
reference_posestringEXPERIMENTAL: Optional reference pose image. When provided, the person is reposed to match this reference before virtual try-on. Might fail for some seeds.
preserve_input_sizebooleantrueReturn the output at the original input resolution.