curl --request POST \
--url https://api.bitstudio.ai/v1/images/virtual-try-on \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"person_image_id": "11111111-1111-4111-8111-111111111111",
"outfit_image_ids": [
"22222222-2222-4222-8222-222222222222"
]
}
'import requests
url = "https://api.bitstudio.ai/v1/images/virtual-try-on"
payload = {
"person_image_id": "11111111-1111-4111-8111-111111111111",
"outfit_image_ids": ["22222222-2222-4222-8222-222222222222"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
person_image_id: '11111111-1111-4111-8111-111111111111',
outfit_image_ids: ['22222222-2222-4222-8222-222222222222']
})
};
fetch('https://api.bitstudio.ai/v1/images/virtual-try-on', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bitstudio.ai/v1/images/virtual-try-on",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'person_image_id' => '11111111-1111-4111-8111-111111111111',
'outfit_image_ids' => [
'22222222-2222-4222-8222-222222222222'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bitstudio.ai/v1/images/virtual-try-on"
payload := strings.NewReader("{\n \"person_image_id\": \"11111111-1111-4111-8111-111111111111\",\n \"outfit_image_ids\": [\n \"22222222-2222-4222-8222-222222222222\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.bitstudio.ai/v1/images/virtual-try-on")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"person_image_id\": \"11111111-1111-4111-8111-111111111111\",\n \"outfit_image_ids\": [\n \"22222222-2222-4222-8222-222222222222\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bitstudio.ai/v1/images/virtual-try-on")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"person_image_id\": \"11111111-1111-4111-8111-111111111111\",\n \"outfit_image_ids\": [\n \"22222222-2222-4222-8222-222222222222\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"jobs": [
{
"id": "11111111-1111-4111-8111-111111111111",
"status": "pending",
"task": "virtual-try-on",
"created_at": "2026-09-15T12:00:00Z",
"result": null,
"error": null,
"credits_used": 1
}
]
}{
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"error": "<string>",
"cta": true,
"next_action": "<string>"
}Virtual try-on
Dress a person in one to four items with V6.
curl --request POST \
--url https://api.bitstudio.ai/v1/images/virtual-try-on \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"person_image_id": "11111111-1111-4111-8111-111111111111",
"outfit_image_ids": [
"22222222-2222-4222-8222-222222222222"
]
}
'import requests
url = "https://api.bitstudio.ai/v1/images/virtual-try-on"
payload = {
"person_image_id": "11111111-1111-4111-8111-111111111111",
"outfit_image_ids": ["22222222-2222-4222-8222-222222222222"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
person_image_id: '11111111-1111-4111-8111-111111111111',
outfit_image_ids: ['22222222-2222-4222-8222-222222222222']
})
};
fetch('https://api.bitstudio.ai/v1/images/virtual-try-on', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bitstudio.ai/v1/images/virtual-try-on",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'person_image_id' => '11111111-1111-4111-8111-111111111111',
'outfit_image_ids' => [
'22222222-2222-4222-8222-222222222222'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bitstudio.ai/v1/images/virtual-try-on"
payload := strings.NewReader("{\n \"person_image_id\": \"11111111-1111-4111-8111-111111111111\",\n \"outfit_image_ids\": [\n \"22222222-2222-4222-8222-222222222222\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.bitstudio.ai/v1/images/virtual-try-on")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"person_image_id\": \"11111111-1111-4111-8111-111111111111\",\n \"outfit_image_ids\": [\n \"22222222-2222-4222-8222-222222222222\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bitstudio.ai/v1/images/virtual-try-on")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"person_image_id\": \"11111111-1111-4111-8111-111111111111\",\n \"outfit_image_ids\": [\n \"22222222-2222-4222-8222-222222222222\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"jobs": [
{
"id": "11111111-1111-4111-8111-111111111111",
"status": "pending",
"task": "virtual-try-on",
"created_at": "2026-09-15T12:00:00Z",
"result": null,
"error": null,
"credits_used": 1
}
]
}{
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"error": "<string>",
"cta": true,
"next_action": "<string>"
}Choose your inputs
There are two independent choices:- Person photo: send
person_image_urlfor a direct image URL, orperson_image_idfor an uploaded image. - Garments: send one array:
outfit_image_urlsfor direct image URLs,outfit_image_idsfor uploaded images, oroutfit_asset_idsfor saved products.
Request examples
Replace the example URLs or IDs with your own references. Each array entry is one garment;num_images controls how many output images to generate.
- Single item
- Multiple items
- Saved products
{
"person_image_url": "https://your-cdn.example/person.jpg",
"outfit_image_urls": ["https://your-cdn.example/shirt.jpg"]
}
{
"person_image_url": "https://your-cdn.example/person.jpg",
"outfit_image_urls": [
"https://your-cdn.example/shirt.jpg",
"https://your-cdn.example/trousers.jpg",
"https://your-cdn.example/jacket.jpg"
],
"num_images": 1
}
{
"person_image_id": "11111111-1111-4111-8111-111111111111",
"outfit_asset_ids": [
"22222222-2222-4222-8222-222222222222",
"33333333-3333-4333-8333-333333333333"
]
}
Submit and retrieve the result
A successful request returns HTTP202 with a jobs array. Save each id, then get the job until it finishes. Read the completed media from result.url and its reusable ID from result.id. Use an Idempotency-Key when submitting work that may be retried.
The Body reference below shows the required fields for each combination of person and garment sources.Authorizations
Create an API key in Studio → account menu → API Keys. Keep it on your server.
Headers
Use a unique key for each intended creation. Retry the same method, path and JSON with the same key to replay its response for 24 hours after completion. Conflicting requests and unfinished or uncertain outcomes return 409. An uncertain receipt is never automatically rerun.
1 - 128^[!-~]+$Body
- Uploaded person + garment images
- Uploaded person + saved products
- Uploaded person + garment URLs
- Person URL + garment images
- Person URL + saved products
- Person URL + garment URLs
Uploaded person image. Supply this or person_image_url.
Garment references. Choose one outfit source array per request. V6 supports up to four items; other models may accept fewer.
1 - 4 elementsResource ID.
Defaults to v6, available to all Studio API accounts with the required plan and credits. Older v4/v4x/v5 models can require account access.
v6, v1, nano-banana, nano-banana-pro, nano-banana-2, v4, v4x, v5 Output quality; dimensions depend on the model and aspect ratio.
standard, high Number of outputs. Defaults to 1. Account limits still apply.
1 <= x <= 81
Optional seed; it does not guarantee identical results.
Optional model-dependent output ratio.
Direct URL of a person photo.
Garment references. Choose one outfit source array per request. V6 supports up to four items; other models may accept fewer.
1 - 4 elementsGarment references. Choose one outfit source array per request. V6 supports up to four items; other models may accept fewer.
1 - 4 elementsResource ID.
Optional styling instructions.
Optional style directions.
Additional reusable reference asset IDs. Supported types depend on the operation.
V6 accepts fast (the default processing mode); choose resolution for quality. Other models have their own speed options.
"fast"
Response
Accepted; poll each job.
1Show child attributes
Show child attributes