Pixazo APIModelsAI Virtual Try On APIsGoogle Virtual Try On
Pixazo APIModelsAI Virtual Try On APIsGoogle Virtual Try On

Google Virtual Try On 1 API: Pricing, Documentation

by Google

Dress a person in any garment using Google's virtual try-on model on Vertex AI. Supply a photo of a person and a photo of a clothing item and receive up to four photorealistic variations, at the same resolution as the input.

Get API Key
Google Virtual Try On API

Models Version

WELCOME BONUS

Get $5 Free Credit on First Payment

No strings attached — add funds and get $5 bonus instantly

Claim Your $5 →

Google Virtual Try-On v1 API Documentation

POST https://gateway.pixazo.ai/google-virtual-try-on/v1/try-on

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Image to Image (Virtual Try On) - Google Virtual Try On

Dress a person in any garment. Supply a photograph of a person and a photograph of a clothing item, and the model returns photorealistic images of that person wearing it. Output resolution matches the person image you supply.

Request Code

POST /google-virtual-try-on/v1/try-on HTTP/1.1
Host: gateway.pixazo.ai
Ocp-Apim-Subscription-Key: YOUR_API_KEY
Content-Type: application/json

{
  "person_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/api-static/vto-person-example.jpg",
  "product_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/api-static/vto-garment-example.jpg",
  "num_images": 1
}
import requests

response = requests.post(
    "https://gateway.pixazo.ai/google-virtual-try-on/v1/try-on",
    headers={
        "Ocp-Apim-Subscription-Key": "YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json={
        "person_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/api-static/vto-person-example.jpg",
        "product_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/api-static/vto-garment-example.jpg",
        "num_images": 1,
    },
)

data = response.json()
print(data["request_id"])
const response = await fetch(
  "https://gateway.pixazo.ai/google-virtual-try-on/v1/try-on",
  {
    method: "POST",
    headers: {
      "Ocp-Apim-Subscription-Key": "YOUR_API_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      person_image_url: "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/api-static/vto-person-example.jpg",
      product_image_url: "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/api-static/vto-garment-example.jpg",
      num_images: 1,
    }),
  }
);

const data = await response.json();
console.log(data.request_id);
curl -X POST "https://gateway.pixazo.ai/google-virtual-try-on/v1/try-on" \
  -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "person_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/api-static/vto-person-example.jpg",
    "product_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/api-static/vto-garment-example.jpg",
    "num_images": 1
  }'

Output

{
  "request_id": "google-virtual-try-on_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/google-virtual-try-on_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, supply a webhook URL and we will POST the result to it as soon as the request reaches a terminal state.

Webhook Headers

HeaderRequiredDescription
X-Webhook-URLYes, to enableHTTPS endpoint that will receive the callback.
X-Webhook-ModeNoterminal (default) delivers once the request completes or fails. sync also delivers intermediate state changes.

Example: enable the Webhook

curl -X POST "https://gateway.pixazo.ai/google-virtual-try-on/v1/try-on" \\
  -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \\
  -H "Content-Type: application/json" \\
  -H "X-Webhook-URL: https://your-server.example.com/pixazo-callback" \\
  -d '{"person_image_url":"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/api-static/vto-person-example.jpg","product_image_url":"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/api-static/vto-garment-example.jpg","num_images":1}'

Webhook Payload (Success)

{
  "request_id": "google-virtual-try-on_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "google-virtual-try-on",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/google-virtual-try-on_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.jpg"
    ],
    "media_type": "image/jpeg"
  },
  "created_at": "2026-08-26T11:55:04.812Z",
  "completed_at": "2026-08-26 11:55:41"
}

Webhook Payload (Failure)

{
  "request_id": "google-virtual-try-on_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "google-virtual-try-on",
  "error": "person_image_url must be image/png or image/jpeg",
  "output": null
}

Delivery semantics

  • Terminal mode delivers exactly one callback, once the request has completed or failed.
  • Sync mode additionally delivers intermediate transitions, so expect more than one callback per request.
  • Callbacks are idempotent on request_id — deduplicate on it, as a retry may deliver the same payload twice.
  • Respond 200 within a few seconds. Slow or failing endpoints are retried, then abandoned.
  • HTTPS is required. Plain HTTP callback URLs are rejected.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / rangeDescription
person_image_urlYesstringPublicly reachable URLPhotograph of the person who will wear the garment. Must be a JPEG or PNG no larger than 7 MB.
product_image_urlYesstringPublicly reachable URLPhotograph of the clothing item. A flat-lay or catalogue shot on a plain background gives the best result.
num_imagesNointeger11 – 4How many variations to generate. Each image is billed separately. Values outside 1–4 are rejected before any charge is made.

Both input images must be image/png or image/jpeg and no larger than 7 MB each. Images are fetched server-side, so the URLs must be publicly reachable without authentication.

Example Request

curl -X POST "https://gateway.pixazo.ai/google-virtual-try-on/v1/try-on" \
  -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "person_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/api-static/vto-person-example.jpg",
    "product_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/api-static/vto-garment-example.jpg",
    "num_images": 1
  }'

Example Response

{
  "request_id": "google-virtual-try-on_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/google-virtual-try-on_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderRequiredDescription
Ocp-Apim-Subscription-KeyYesYour API subscription key.
Content-TypeYesMust be application/json.
X-Webhook-URLNoReceive the result by callback instead of polling.

Response Handling

CodeMeaningWhat to do
202Request accepted and queued.Poll https://gateway.pixazo.ai/v2/requests/status/{request_id} until the status is terminal.
400Invalid request body.Check that both image URLs are present and that num_images is between 1 and 4.
401Missing or invalid subscription key.Check the Ocp-Apim-Subscription-Key header.
402Insufficient wallet balance.Top up and retry. Nothing has been charged.
403Key is not subscribed to this API.Check your subscription.
429Rate limit exceeded.Back off and retry.
500Unexpected server error.Retry. If it persists, contact support with the request_id.

Error Responses

Submit-time errors are returned directly:

{
  "error": "Insufficient Balance",
  "message": "Your wallet balance is too low for this request."
}

Errors raised during generation appear on the status response and in the webhook callback, with status set to ERROR:

{
  "request_id": "google-virtual-try-on_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "google-virtual-try-on",
  "error": "product_image_url must be image/png or image/jpeg",
  "output": null
}

When a request fails, the amount held for it is released and you are not charged.

Retrieving Results

Poll the universal status endpoint with the request_id returned on submit.

curl "https://gateway.pixazo.ai/v2/requests/status/google-virtual-try-on_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \\
  -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY"

While the request is running:

{
  "request_id": "google-virtual-try-on_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "PROCESSING",
  "model_id": "google-virtual-try-on",
  "error": null,
  "output": null
}

Once complete:

{
  "request_id": "google-virtual-try-on_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "google-virtual-try-on",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/google-virtual-try-on_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.jpg"
    ],
    "media_type": "image/jpeg"
  },
  "created_at": "2026-08-26T11:55:04.812Z",
  "completed_at": "2026-08-26 11:55:41"
}

A single-image request returns one output.jpg. A request asking for more than one image returns one numbered URL per image:

  "media_url": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/google-virtual-try-on_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output_0.jpg",
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/google-virtual-try-on_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output_1.jpg",
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/google-virtual-try-on_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output_2.jpg"
  ]

Response Fields

FieldTypeDescription
request_idstringUnique identifier for this request. Use it to poll for the result.
statusstringCurrent state — see Status Values below.
model_idstringAlways google-virtual-try-on.
errorstring | nullFailure reason when status is FAILED or ERROR, otherwise null.
output.media_urlarrayOne JPEG URL per generated image, in the order produced. Length always equals num_images.
output.media_typestringAlways image/jpeg.
created_atstringISO 8601 timestamp of when the request was accepted.
completed_atstringTimestamp of when generation finished.
polling_urlstringFull URL to poll for this request, returned on submit.

Status Values

StatusMeaning
QUEUEDAccepted and waiting to start.
PROCESSINGGeneration is under way.
COMPLETEDFinished. Images are in output.media_url.
FAILEDGeneration failed. No charge is made.
ERRORThe request could not be processed. See error. No charge is made.

Flow

QUEUED  ->  PROCESSING  ->  COMPLETED\n                        \\->  FAILED / ERROR

Typical Workflow

  • POST the person and garment image URLs to the submit endpoint.
  • Read request_id from the 202 response.
  • Poll https://gateway.pixazo.ai/v2/requests/status/{request_id} every few seconds, or supply X-Webhook-URL and skip polling.
  • On COMPLETED, download the images from output.media_url.

Generation typically takes about 15–20 seconds for one or two images.

Google Virtual Try-On v1 API Pricing

ResolutionPrice (USD)
Per image$0.063

⚡ Performance

Live usage measured on Pixazo's gateway, split by model version. Generation time is how long a generation takes end-to-end (lower is better). Success rate is the percent of generations that complete (higher is better).

Show data for the last
Generations
1,000last 30d
~33 per day
Success rate
100.0%
of completed generations
Generation time
84.4savg
p95 97.6s
Requests
Aug 1max 1,000Aug 30
Google Virtual Try-On v1Avg 33/day
Generation Time
Aug 1max 84.4sAug 30
Google Virtual Try-On v1Avg 84.4s
Error Rate
Aug 1max 5.0%Aug 30
Google Virtual Try-On v1Avg 0.0%

〰 Uptime

Percent of generations that succeeded over the selected period, per model version.

Avg. Success Rate (30d)
100.00%
across all generations of this model family
Uptime
Aug 1max 100%Aug 30
SuccessfulAvg 100.00%