Analyze preset references
curl --request POST \
--url https://api.bitstudio.ai/assets/preset-analysis \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"image_ids": [
"11111111-1111-4111-8111-111111111111"
]
}
'import requests
url = "https://api.bitstudio.ai/assets/preset-analysis"
payload = { "image_ids": ["11111111-1111-4111-8111-111111111111"] }
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({image_ids: ['11111111-1111-4111-8111-111111111111']})
};
fetch('https://api.bitstudio.ai/assets/preset-analysis', 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/assets/preset-analysis",
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([
'image_ids' => [
'11111111-1111-4111-8111-111111111111'
]
]),
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/assets/preset-analysis"
payload := strings.NewReader("{\n \"image_ids\": [\n \"11111111-1111-4111-8111-111111111111\"\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/assets/preset-analysis")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"image_ids\": [\n \"11111111-1111-4111-8111-111111111111\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bitstudio.ai/assets/preset-analysis")
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 \"image_ids\": [\n \"11111111-1111-4111-8111-111111111111\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"preset_name": "White studio — full length",
"preset_type": "human_studio",
"prompt": "Full-length model photo on a white seamless background with soft studio light.",
"set": "",
"scene": "",
"pose": ""
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"cta": true,
"next_action": "<string>",
"current_plan": "<string>",
"user_message": "<string>",
"extra_context": "<string>"
}Reusable assets
Analyze preset references
Analyze one to three uploaded reference images. Returns a suggested preset name, type, and prompt; it does not create or save a preset asset.
POST
/
assets
/
preset-analysis
Analyze preset references
curl --request POST \
--url https://api.bitstudio.ai/assets/preset-analysis \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"image_ids": [
"11111111-1111-4111-8111-111111111111"
]
}
'import requests
url = "https://api.bitstudio.ai/assets/preset-analysis"
payload = { "image_ids": ["11111111-1111-4111-8111-111111111111"] }
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({image_ids: ['11111111-1111-4111-8111-111111111111']})
};
fetch('https://api.bitstudio.ai/assets/preset-analysis', 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/assets/preset-analysis",
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([
'image_ids' => [
'11111111-1111-4111-8111-111111111111'
]
]),
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/assets/preset-analysis"
payload := strings.NewReader("{\n \"image_ids\": [\n \"11111111-1111-4111-8111-111111111111\"\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/assets/preset-analysis")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"image_ids\": [\n \"11111111-1111-4111-8111-111111111111\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bitstudio.ai/assets/preset-analysis")
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 \"image_ids\": [\n \"11111111-1111-4111-8111-111111111111\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"preset_name": "White studio — full length",
"preset_type": "human_studio",
"prompt": "Full-length model photo on a white seamless background with soft studio light.",
"set": "",
"scene": "",
"pose": ""
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"cta": true,
"next_action": "<string>",
"current_plan": "<string>",
"user_message": "<string>",
"extra_context": "<string>"
}Work with reusable assets.
Authorizations
Create an API key in Studio → account menu → API Keys. Keep it on your server.
Body
application/json
Uploaded reference images owned by the caller.
Required array length:
1 - 3 elementsResource ID.
Response
Analyze one to three uploaded reference images. Returns a suggested preset name, type, and prompt; it does not create or save a preset asset.