# IDM VTON API

> Provider: **IDM-VTON**
> Source: https://www.pixazo.ai/models/idm-vton

Virtual try-on capabilities.

## IDM VTON v1

### Image to Image (Virtual Try On)

## idm-vton - IDM VTON API

## Request Code

HTTP Python JavaScript cURL

```
POST https://gateway.pixazo.ai/idm-vton-api/v1/r-idm-vton
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: your-subscription-key

{
  "garm_img": "https://example.com/garment.jpg",
  "human_img": "https://example.com/human.jpg",
  "garment_des": "A blue cotton dress",
  "category": "dress"
}
```

```
import requests

url = "https://gateway.pixazo.ai/idm-vton-api/v1/r-idm-vton"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "your-subscription-key"
}
data = {
    "garm_img": "https://example.com/garment.jpg",
    "human_img": "https://example.com/human.jpg",
    "garment_des": "A blue cotton dress",
    "category": "dress"
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
```

```
const url = 'https://gateway.pixazo.ai/idm-vton-api/v1/r-idm-vton';

const data = {
  garm_img: 'https://example.com/garment.jpg',
  human_img: 'https://example.com/human.jpg',
  garment_des: 'A blue cotton dress',
  category: 'dress'
};

fetch(url, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Cache-Control': 'no-cache',
    'Ocp-Apim-Subscription-Key': 'your-subscription-key'
  },
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
```

```
curl -v -X POST "https://gateway.pixazo.ai/idm-vton-api/v1/r-idm-vton" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: your-subscription-key" \
  --data-raw '{
    "garm_img": "https://example.com/garment.jpg",
    "human_img": "https://example.com/human.jpg",
    "garment_des": "A blue cotton dress",
    "category": "dress"
  }'
```

## Output

```
{
  "result_url": "https://result.pixazo.ai/output.jpg",
  "status": "completed",
  "job_set_id": "job-12345-abcde",
  "processing_time": 2.4
}
```

[Try Now](https://api.pixazo.ai/api-details#api=idm-vton-api&operation=idm-vton)

## Request Parameters - idm-vton

Parameter

Required

Type

Description

garm\_img

Yes

string

URL of the garment image to be tried on

human\_img

Yes

string

URL of the human model image

garment\_des

Yes

string

Description of the garment for better generation

category

Yes

string

Category of garment (e.g., dress, shirt, pants)

## Example Request

```
{
  "garm_img": "https://example.com/garment.jpg",
  "human_img": "https://example.com/human.jpg",
  "garment_des": "A blue cotton dress",
  "category": "dress"
}
```

## Response

```
{
  "result_url": "https://result.pixazo.ai/output.jpg",
  "status": "completed",
  "job_set_id": "job-12345-abcde",
  "processing_time": 2.4
}
```

## Request Headers

Header

Value

Content-Type

application/json

Cache-Control

no-cache

Ocp-Apim-Subscription-Key

your-subscription-key

## Response Handling

Common status codes for idm-vton.

Code

Meaning

200

Success

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

429

Too Many Requests

500

Internal Server Error
