Your first request
How to make your first request
Key details you need to make a request
- Base product URL: Every subscription plan has a unique starting url
- Blobr API keys: You need to add the key in the 'X-BLOBR-KEY' field in the header


For all your endpoints, add the 'Base URL' above, for example:
If you click on one of the endpoints it also provides you with the complete URL including the base url.
import requests
# Change the URL to match your base URL
url = "https://apis.palette.fm/105esxukgwqbp7g4/colorize_image_with_auto_prompt"
files = {'image': ('black_and_white.jpg', open(' ./black_and_white.jpg', 'rb'), 'image/jpeg' )}
headers = {"X-BLOBR-KEY": "YOUR API KEY"} #Add your API KEY
response = requests .post(url, files=files, headers=headers)
f = open( 'colorized_image.jpg', 'wb' )
f.write(response.content)
f.close()
import requests
url = "https://apis.palette.fm/105esxukgwqbp7g4/colorize_image_with_auto_prompt"
files = {
'image': ('black_and_white.jpg', open(' ./black_and_white.jpg', 'rb'), 'image/jpeg' )
}
data = {
"resolution": "watermarked-sd", # watermarked-sd, sd, full-hd, or 4k
"prompt": "", # replace with custom prompt
"standard_filter_id": "1", # 1-20 default filters
"artistic_filter_id": "O", # 1-100 more creative filters
"raw_captions": "false", # true or false, remove post and prefix from promot
"pre_fix": "", # create your own pre_fix, e.g. A photo of
"post_fix": "", # create your own pre_fix, e.g. HDR and colorful.
"auto_color": "true", # true or false, color balancing
"white_balance": "false", # white balancing
"temperature": "-0.1", # 0.0 - 1.0, cold or warm filter
"saturation": "1.1" # 0.0 - 2.0, adjust saturation
}
headers = {
"X-BLOBR-KEY": ""
}
response = requests .post(url, files=files, data=data, headers=headers)
f = open( 'colorized_image.jpg', 'wb' )
f.write(response.content)
f.close()
async function colorizeImage() {
const url = "https://apis.palette.fm/105esxukgwqbp7g4/colorize_image_with_auto_prompt";
const inputImage = document.querySelector('#inputImage'); // Assuming you have an input with id 'inputImage' for selecting the image file.
const imageFile = inputImage.files[0];
const formData = new FormData();
formData.append('image', imageFile, 'black_and_white.jpg');
formData.append('resolution', 'watermarked-sd');
formData.append('prompt', '');
formData.append('standard_filter_id', '1');
formData.append('artistic_filter_id', 'O');
formData.append('raw_captions', 'false');
formData.append('pre_fix', '');
formData.append('post_fix', '');
formData.append('auto_color', 'true');
formData.append('white_balance', 'false');
formData.append('temperature', '-0.1');
formData.append('saturation', '1.1');
const headers = {
"X-BLOBR-KEY": ""
};
try {
const response = await fetch(url, {
method: 'POST',
headers: headers,
body: formData
});
if (!response.ok) {
throw new Error(`HTTP error! Status: ${response.status}`);
}
const blob = await response.blob();
const a = document.createElement('a');
a.href = URL.createObjectURL(blob);
a.download = 'colorized_image.jpg';
a.click();
} catch (error) {
console.error('Error fetching the image:', error);
}
}
Last modified 5mo ago