p-image-try-on
Virtually fit one or more garments onto a person's photo
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: 15 units for the first image input, plus 8 units for each additional image input
Quickstart
Section titled “Quickstart”Start with uploading your images
Section titled “Start with uploading your images”# Upload person photocurl -X POST "https://api.pruna.ai/v1/files" \ -H "apikey: YOUR_API_KEY" \ -F "content=@/path/to/person.jpg"
# Upload garment imagecurl -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)
Section titled “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)
Section titled “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
Section titled “Parameters”Required Parameters
Section titled “Required Parameters”| Parameter | Type | Description |
|---|---|---|
| person_image | string | Image URL of the person to edit |
| garment_images | array of string | Garment reference images. Up to 6 recommended, up to 11 supported. |
Optional Parameters
Section titled “Optional Parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
| seed | integer | — | Random seed. Leave blank for a random seed. |
| prompt | string | "" | Experimental guidance for non-flatlay garment images, e.g. which garment from which image to use. |
| turbo | boolean | false | Run faster with additional optimizations. Not recommended for more than 4 garments. |
| output_format | string | jpg | Format of the saved output image (webp, jpg, png). |
| output_quality | integer | 95 | Quality for jpg/webp outputs from 0 to 100. |
| reference_pose | string | — | Optional reference pose image. When provided, the person is reposed to match this reference before virtual try-on. |
| preserve_input_size | boolean | true | Return the output at the original input resolution. |