curl --request POST \
--url https://api.bitstudio.ai/images/virtual-try-on \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"person_image_id": "11111111-1111-4111-8111-111111111111",
"outfit_asset_id": "22222222-2222-4222-8222-222222222222",
"model": "nano-banana-2",
"resolution": "standard",
"num_images": 1,
"speed": "fast"
}
'import requests
url = "https://api.bitstudio.ai/images/virtual-try-on"
payload = {
"person_image_id": "11111111-1111-4111-8111-111111111111",
"outfit_asset_id": "22222222-2222-4222-8222-222222222222",
"model": "nano-banana-2",
"resolution": "standard",
"num_images": 1,
"speed": "fast"
}
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_asset_id: '22222222-2222-4222-8222-222222222222',
model: 'nano-banana-2',
resolution: 'standard',
num_images: 1,
speed: 'fast'
})
};
fetch('https://api.bitstudio.ai/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/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_asset_id' => '22222222-2222-4222-8222-222222222222',
'model' => 'nano-banana-2',
'resolution' => 'standard',
'num_images' => 1,
'speed' => 'fast'
]),
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/images/virtual-try-on"
payload := strings.NewReader("{\n \"person_image_id\": \"11111111-1111-4111-8111-111111111111\",\n \"outfit_asset_id\": \"22222222-2222-4222-8222-222222222222\",\n \"model\": \"nano-banana-2\",\n \"resolution\": \"standard\",\n \"num_images\": 1,\n \"speed\": \"fast\"\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/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_asset_id\": \"22222222-2222-4222-8222-222222222222\",\n \"model\": \"nano-banana-2\",\n \"resolution\": \"standard\",\n \"num_images\": 1,\n \"speed\": \"fast\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bitstudio.ai/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_asset_id\": \"22222222-2222-4222-8222-222222222222\",\n \"model\": \"nano-banana-2\",\n \"resolution\": \"standard\",\n \"num_images\": 1,\n \"speed\": \"fast\"\n}"
response = http.request(request)
puts response.read_body[
{
"id": "11111111-1111-4111-8111-111111111111",
"status": "pending",
"path": null,
"width_px": null,
"height_px": null,
"created_timestamp": "2026-09-06T12:00:00Z"
}
]{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"cta": true,
"next_action": "<string>",
"current_plan": "<string>",
"user_message": "<string>",
"extra_context": "<string>"
}Try an outfit on a person
By default returns an array of pending jobs. With create_version=true, returns the person image with a newly linked version; track that version’s source_image_id.
curl --request POST \
--url https://api.bitstudio.ai/images/virtual-try-on \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"person_image_id": "11111111-1111-4111-8111-111111111111",
"outfit_asset_id": "22222222-2222-4222-8222-222222222222",
"model": "nano-banana-2",
"resolution": "standard",
"num_images": 1,
"speed": "fast"
}
'import requests
url = "https://api.bitstudio.ai/images/virtual-try-on"
payload = {
"person_image_id": "11111111-1111-4111-8111-111111111111",
"outfit_asset_id": "22222222-2222-4222-8222-222222222222",
"model": "nano-banana-2",
"resolution": "standard",
"num_images": 1,
"speed": "fast"
}
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_asset_id: '22222222-2222-4222-8222-222222222222',
model: 'nano-banana-2',
resolution: 'standard',
num_images: 1,
speed: 'fast'
})
};
fetch('https://api.bitstudio.ai/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/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_asset_id' => '22222222-2222-4222-8222-222222222222',
'model' => 'nano-banana-2',
'resolution' => 'standard',
'num_images' => 1,
'speed' => 'fast'
]),
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/images/virtual-try-on"
payload := strings.NewReader("{\n \"person_image_id\": \"11111111-1111-4111-8111-111111111111\",\n \"outfit_asset_id\": \"22222222-2222-4222-8222-222222222222\",\n \"model\": \"nano-banana-2\",\n \"resolution\": \"standard\",\n \"num_images\": 1,\n \"speed\": \"fast\"\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/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_asset_id\": \"22222222-2222-4222-8222-222222222222\",\n \"model\": \"nano-banana-2\",\n \"resolution\": \"standard\",\n \"num_images\": 1,\n \"speed\": \"fast\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bitstudio.ai/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_asset_id\": \"22222222-2222-4222-8222-222222222222\",\n \"model\": \"nano-banana-2\",\n \"resolution\": \"standard\",\n \"num_images\": 1,\n \"speed\": \"fast\"\n}"
response = http.request(request)
puts response.read_body[
{
"id": "11111111-1111-4111-8111-111111111111",
"status": "pending",
"path": null,
"width_px": null,
"height_px": null,
"created_timestamp": "2026-09-06T12:00:00Z"
}
]{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"cta": true,
"next_action": "<string>",
"current_plan": "<string>",
"user_message": "<string>",
"extra_context": "<string>"
}num_images: 1; omitting it also creates one output. See request settings.
Track jobs and versions.Authorizations
Create an API key in Studio → account menu → API Keys. Keep it on your server.
Body
Uploaded person image. Supply this or person_image_url.
Direct URL of a person photo.
Optional source version belonging to person_image_id.
Reusable outfit asset. Supply an outfit asset, image, or URL.
Uploaded garment image.
Direct garment photo URL.
Multiple garment assets; supported models only.
3Resource ID.
Multiple garment uploads; supported models only.
3Resource ID.
Multiple garment URLs; supported models only.
3Use nano-banana-2 for this example. Other model availability and multi-outfit support vary.
"nano-banana-2"
Output quality. Send explicitly. Pixel dimensions depend on the image model.
standard, high "standard"
Number of outputs. Defaults to 1. Account limits still apply.
1 <= x <= 81
Optional styling instructions.
Processing option. fast is used in the example; accepted values depend on the model.
"fast"
false returns an array of new jobs. true links a version to the person image and returns that parent image.
Additional reusable reference asset IDs. Supported types depend on the operation.
Optional model-dependent output ratio.
Optional style directions.
Optional seed; it does not guarantee identical results.
Embedded storefront metadata. Omit for standard Studio integrations.
Embedded storefront metadata. Omit for standard Studio integrations.
Embedded storefront metadata. Omit for standard Studio integrations.
Embedded storefront metadata. Omit for standard Studio integrations.
Embedded storefront metadata. Omit for standard Studio integrations.
Embedded storefront metadata. Omit for standard Studio integrations.
Response
By default returns an array of pending jobs. With create_version=true, returns the person image with a newly linked version; track that version’s source_image_id.
- object[]
- object
Resource ID.
Job state. Only completed has a finished result.
pending, generating, completed, failed, policy_blocked, nsfw_filtered Result URL. Can be null while the job is pending.
Whether the upload is a reusable asset reference.
Operation that created this job.
Human-readable failure detail.
Machine-readable failure category, when available.
input_rejected, provider_unavailable, queue_timeout, policy_blocked Linked reusable assets.
Resource ID.
Related versions. May be omitted or empty. Never infer a new version is completed from the parent status.
Show child attributes
Show child attributes