curl --request POST \
--url https://api.bitstudio.ai/images \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file' \
--form type=virtual-try-on-outfitimport requests
url = "https://api.bitstudio.ai/images"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = { "type": "virtual-try-on-outfit" }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('type', 'virtual-try-on-outfit');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.bitstudio.ai/images', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"type\"\r\n\r\nvirtual-try-on-outfit\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$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"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"type\"\r\n\r\nvirtual-try-on-outfit\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"type\"\r\n\r\nvirtual-try-on-outfit\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bitstudio.ai/images")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"type\"\r\n\r\nvirtual-try-on-outfit\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"id": "11111111-1111-4111-8111-111111111111",
"status": "completed",
"path": "https://media.bitstudio.ai/public/homepage/2026-09/bitstudio-shirt-reference-front-v1-77caf2ea41d661e4.webp",
"width_px": 900,
"height_px": 1125,
"is_generated": false,
"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>"
}Upload an image
Upload a JPEG, PNG, or WebP file. General uploads allow up to 15 MiB; video-last-frame allows 10 MiB. Use the returned id in later requests.
curl --request POST \
--url https://api.bitstudio.ai/images \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file' \
--form type=virtual-try-on-outfitimport requests
url = "https://api.bitstudio.ai/images"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = { "type": "virtual-try-on-outfit" }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('type', 'virtual-try-on-outfit');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.bitstudio.ai/images', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"type\"\r\n\r\nvirtual-try-on-outfit\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$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"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"type\"\r\n\r\nvirtual-try-on-outfit\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"type\"\r\n\r\nvirtual-try-on-outfit\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bitstudio.ai/images")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"type\"\r\n\r\nvirtual-try-on-outfit\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"id": "11111111-1111-4111-8111-111111111111",
"status": "completed",
"path": "https://media.bitstudio.ai/public/homepage/2026-09/bitstudio-shirt-reference-front-v1-77caf2ea41d661e4.webp",
"width_px": 900,
"height_px": 1125,
"is_generated": false,
"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>"
}Authorizations
Create an API key in Studio → account menu → API Keys. Keep it on your server.
Body
Response
Upload a JPEG, PNG, or WebP file. General uploads allow up to 15 MiB; video-last-frame allows 10 MiB. Use the returned id in later requests.
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