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 up to four 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: Not yet set but usage is tracked.

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"]
}
}'
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"]
}
}'

Parameters

Required Parameters
ParameterTypeDescription
person_imagestringImage URL of the person to edit
garment_imagesarray of stringUp to 4 garment reference images; extra images are ignored
Optional Parameters
ParameterTypeDefaultDescription
seedintegerRandom seed. Leave blank for a random seed.
output_formatstringjpgFormat of the saved output image (webp, jpg, png).
output_qualityinteger95Quality for jpg/webp outputs from 0 to 100.
preserve_input_sizebooleantrueResize the final result back to the capped person image size.