Overview
PhotoRoom API uses AI to remove backgrounds from product and portrait photos, producing clean PNG images with transparent backgrounds suitable for e-commerce and marketing. It is designed for high-volume batch processing and delivers professional-quality results without manual editing. Simply upload an image with your API key and receive a cutout in seconds.
Beginner Tip
Upload images as multipart/form-data using the image_file field, and you will get back a PNG with the background removed. Use the background_color parameter to replace transparency with a solid color if your target platform does not support PNG transparency.
Available Data
Example Response
{
"id": "Dwu85P9SOIk",
"urls": {
"full": "https://images.unsplash.com/photo-...",
"regular": "https://images.unsplash.com/photo-...?w=1080",
"thumb": "https://images.unsplash.com/photo-...?w=200"
},
"width": 4000,
"height": 3000,
"user": {
"name": "John Doe",
"username": "johndoe"
}
} Field Reference
result_b64 Base64-encoded PNG of the processed image with the background removed; decode this to get the image bytes. foreground_top Y-coordinate of the top of the detected subject bounding box within the original image. foreground_left X-coordinate of the left edge of the detected subject bounding box. foreground_width Width in pixels of the bounding box around the detected subject. foreground_height Height in pixels of the bounding box around the detected subject. Implementation Example
// ⚠️ Note: This URL may be a documentation page. Check official docs for actual API endpoint.
const url = "https://www.photoroom.com/api/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
headers: {
"X-API-Key": "YOUR_API_KEY"
}
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
Common Errors & Troubleshooting
Matrix Score Breakdown
Partially tested on Apr 5, 2026
Technical Specifications
Related Tags
Similar APIs
View All →APITemplate.io
APITemplate.io lets you generate images and PDFs on the fly by filling data into pre-designed templates.
Bruzu
Bruzu provides programmatic access to image generation with query string via REST API.
CheetahO
CheetahO is an image optimization API that compresses and resizes photos without visible quality loss.
Dagpi
⭐ Beginner's PickDagpi is a free image manipulation API that applies filters, effects, and fun transformations to images with a single HTTP request.
Duply
Duply provides programmatic access to generate, edit, scale and manage images and videos smarter & faster via REST API.