curl --request POST \
--url https://api.budgetpixel.com/v1/wardrobe \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"image_url": "https://shop.example.com/products/linen-shirt"
}
'import requests
url = "https://api.budgetpixel.com/v1/wardrobe"
payload = { "image_url": "https://shop.example.com/products/linen-shirt" }
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_url: 'https://shop.example.com/products/linen-shirt'})
};
fetch('https://api.budgetpixel.com/v1/wardrobe', 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.budgetpixel.com/v1/wardrobe",
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_url' => 'https://shop.example.com/products/linen-shirt'
]),
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.budgetpixel.com/v1/wardrobe"
payload := strings.NewReader("{\n \"image_url\": \"https://shop.example.com/products/linen-shirt\"\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.budgetpixel.com/v1/wardrobe")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"image_url\": \"https://shop.example.com/products/linen-shirt\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.budgetpixel.com/v1/wardrobe")
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_url\": \"https://shop.example.com/products/linen-shirt\"\n}"
response = http.request(request)
puts response.read_body{
"category": "outerwear",
"colors": [
"camel",
"black"
],
"costume_character": "Ada Wong",
"costume_franchise": "Resident Evil",
"description": "Camel mid-length wool blend overcoat with waist belt, black turtleneck, black tailored trousers, black leather dress shoes.",
"fit": "women",
"handle": "camel_belted_overcoat_outfit",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "outfit",
"mention": "@camel_belted_overcoat_outfit",
"name": "Camel Belted Overcoat Outfit",
"preview_url": "<string>",
"source": "mine",
"tags": [
"minimalist",
"autumn",
"smart"
],
"thumbnail_url": "<string>",
"error": "<string>",
"how_to_use": "<string>",
"picture_url": "<string>",
"status": "processing"
}{
"category": "outerwear",
"colors": [
"camel",
"black"
],
"costume_character": "Ada Wong",
"costume_franchise": "Resident Evil",
"description": "Camel mid-length wool blend overcoat with waist belt, black turtleneck, black tailored trousers, black leather dress shoes.",
"fit": "women",
"handle": "camel_belted_overcoat_outfit",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "outfit",
"mention": "@camel_belted_overcoat_outfit",
"name": "Camel Belted Overcoat Outfit",
"preview_url": "<string>",
"source": "mine",
"tags": [
"minimalist",
"autumn",
"smart"
],
"thumbnail_url": "<string>",
"error": "<string>",
"how_to_use": "<string>",
"picture_url": "<string>",
"status": "processing"
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"code": "link_unreadable",
"link_problem": "blocked",
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}Add an outfit
Add clothes to your wardrobe so a character can wear them, from one source:
image_url: any picture’s own address, one of your BudgetPixel pictures, or a shop’s product page. A page is read once for the product picture and name it publishes for link previews. Many shops don’t allow automatic reading, or show no product picture; then the answer is422withcode: link_unreadable, alink_problem(blocked,login,not_found,no_image,not_clothes,bad_url,failed) and a message that says what to do instead: use the product picture’s own address (right-click it, Copy image address), or send the picture itself.image_data: the picture as base64 or a data URL.description: the clothes in words, designed for you (a link inside is read likeimage_url).
mode (optional): photo (someone wears it: the clothes are taken out onto an invisible
mannequin), clean (the picture shows only the clothes: used as it is) or text (from the
description). A picture from a link that shows the clothes on their own is used as it is,
whatever the mode: there is nobody to take them off.
Price: a clean picture is free; photo and text run an image model at its usual price
(model, default nano-banana-2.1), charged on success. Limited to 60 calls per day and 10 a minute per account.
Answer: 201 with the outfit when it is ready at once (a clean picture), else 202 with
its id and status: processing: the picture usually takes about a minute.
GET /v1/wardrobe/{id} returns it when status is ready, with its final handle.
curl --request POST \
--url https://api.budgetpixel.com/v1/wardrobe \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"image_url": "https://shop.example.com/products/linen-shirt"
}
'import requests
url = "https://api.budgetpixel.com/v1/wardrobe"
payload = { "image_url": "https://shop.example.com/products/linen-shirt" }
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_url: 'https://shop.example.com/products/linen-shirt'})
};
fetch('https://api.budgetpixel.com/v1/wardrobe', 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.budgetpixel.com/v1/wardrobe",
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_url' => 'https://shop.example.com/products/linen-shirt'
]),
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.budgetpixel.com/v1/wardrobe"
payload := strings.NewReader("{\n \"image_url\": \"https://shop.example.com/products/linen-shirt\"\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.budgetpixel.com/v1/wardrobe")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"image_url\": \"https://shop.example.com/products/linen-shirt\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.budgetpixel.com/v1/wardrobe")
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_url\": \"https://shop.example.com/products/linen-shirt\"\n}"
response = http.request(request)
puts response.read_body{
"category": "outerwear",
"colors": [
"camel",
"black"
],
"costume_character": "Ada Wong",
"costume_franchise": "Resident Evil",
"description": "Camel mid-length wool blend overcoat with waist belt, black turtleneck, black tailored trousers, black leather dress shoes.",
"fit": "women",
"handle": "camel_belted_overcoat_outfit",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "outfit",
"mention": "@camel_belted_overcoat_outfit",
"name": "Camel Belted Overcoat Outfit",
"preview_url": "<string>",
"source": "mine",
"tags": [
"minimalist",
"autumn",
"smart"
],
"thumbnail_url": "<string>",
"error": "<string>",
"how_to_use": "<string>",
"picture_url": "<string>",
"status": "processing"
}{
"category": "outerwear",
"colors": [
"camel",
"black"
],
"costume_character": "Ada Wong",
"costume_franchise": "Resident Evil",
"description": "Camel mid-length wool blend overcoat with waist belt, black turtleneck, black tailored trousers, black leather dress shoes.",
"fit": "women",
"handle": "camel_belted_overcoat_outfit",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "outfit",
"mention": "@camel_belted_overcoat_outfit",
"name": "Camel Belted Overcoat Outfit",
"preview_url": "<string>",
"source": "mine",
"tags": [
"minimalist",
"autumn",
"smart"
],
"thumbnail_url": "<string>",
"error": "<string>",
"how_to_use": "<string>",
"picture_url": "<string>",
"status": "processing"
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"code": "link_unreadable",
"link_problem": "blocked",
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}Authorizations
Body
Response
The outfit, ready.
An outfit a character can wear, called by writing its mention next to the character in a prompt.