Version 1.0
Base URL: https://api.palazzo.ai
OVERVIEW
The Palazzo B2C API enables you to leverage advanced AI capabilities for virtual staging, style application, and image analysis. Whether you’re uploading images, applying custom styles, or analyzing rooms, the API provides seamless tools to enhance user experience.
Key Features
Upload and stage room images with a variety of styles.
Analyze images to extract meaningful data such as furniture, room type, and color schemes.
Automate batch processing for large-scale integrations.
Ensure personalized and branded experiences with options like watermarks and staging environments.
Authentication
All API endpoints require an API key for authentication. Reach out to dev@palazzo.ai for an API key.
Example Request with API Key
http
Copy code
GET /generations/batch/{batchId}?apiKey=YOUR_API_KEY HTTP/1.1
Host: api.palazzo.ai
🔒 Important: Keep your API key secure. Avoid sharing or exposing it in public code repositories.
endpoints
1. Upload File for Generation
POST /generations/upload
Description:
Upload an image file to generate virtual staging designs. This endpoint allows you to upload a single image and receive a URL to reference the file in subsequent requests.
Parameters
apiKey (query, required): Your unique API key for authentication.
Request Body
image (form-data, required): The image file to be uploaded. Supported formats are JPEG, PNG, and WEBP.
Request Body
200 OK: The image has been successfully uploaded.
Example:
json
Copy code
{
"statusCode": 200,
"success": true,
"data": {
"imageUrl": "https://palazzob2c-dev.s3.amazonaws.com/image-aeb3412e.webp"
}
}
Example cURL Request:
bash
Copy code
curl -X POST "https://api.palazzo.ai/generations/upload?apiKey=YOUR_API_KEY" \
-H "Content-Type: multipart/form-data" \
-F "image=@room.jpeg"
2. Retrieve Generations for a Batch
GET /generations/batch/{batchId}
Description:
Retrieve details about all generations in a specified batch. Use this endpoint to check the status or results of staged images for a batch.
Parameters
batchId (path, required): The unique ID of the batch.
Example: 8644835e-ffec-41ef-a949-3ce73da1447e
Response
200 OK: Returns the details of all generations in the batch.
Example:
json
Copy code
{
"items": [
{
"originUrl": "https://palazzob2c-dev.s3.amazonaws.com/image.png",
"results": [
{
"status": "SUCCESS",
"style": "EMPTY_ROOM",
"imageUrl": "https://palazzob2c-dev.s3.amazonaws.com/generated-image.webp",
"thumbnailUrl": "https://palazzob2c-dev.s3.amazonaws.com/thumbnail.webp"
}
]
}
],
"batchStatus": "COMPLETED"
}
403 Forbidden: User not authorized.
404 Not Found: Batch ID not found.
Example cURL Request:
bash
Copy code
curl -X GET "https://api.palazzo.ai/generations/batch/8644835e-ffec-41ef-a949-3ce73da1447e?apiKey=YOUR_API_KEY"
3. Create Batch Generations
POST /generations/v2/batch
Description:
Create a batch of generations for multiple images with specified styles. This is ideal for bulk staging operations.
Request Body
useStaging (boolean, optional): Whether to use a staging environment for generation.
applyWatermark (boolean, optional): Whether to apply a watermark to the generated images.
items (array, required): A list of objects, each containing the imageUrl for generation.
styles (array, required): A list of styles to apply.
Example styles: COASTAL, INDUSTRIAL, CONTEMPORARY.
Example Request Body:
json
Copy code
{
"useStaging": true,
"applyWatermark": true,
"items": [
{ "imageUrl": "https://palazzob2c-dev.s3.amazonaws.com/image.webp" }
],
"styles": ["COASTAL", "MID_CENTURY_MODERN"]
}
Request Body
201 Created: The batch was successfully created.
Example:
json
Copy code
{
"statusCode": 201,
"success": true,
"data": {
"batchId": "4014561e-be65-42fb-9e0c-5133972fcefb"
}
}
Example cURL Request:
bash
Copy code
curl -X POST "https://api.palazzo.ai/generations/v2/batch?apiKey=YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"useStaging": true,
"applyWatermark": true,
"items": [{ "imageUrl": "https://palazzob2c-dev.s3.amazonaws.com/image.webp" }],
"styles": ["COASTAL", "MID_CENTURY_MODERN"]
}'
4. Analyze an Image
POST /analysis/evaluate
Description:
Analyze an image to extract key details about the room, including furniture, colors, and lighting. This endpoint is useful for assessing room attributes programmatically.
Request Body
url (string, required): The URL of the image to analyze.
Example Request Body:
json
Copy code
{
"url": "https://example.com/image.jpg"
}
Response
200 OK: Analysis successful.
Example:
json
Copy code
{
"statusCode": 200,
"success": true,
"data": {
"roomType": "bedroom",
"photographyScore": 8,
"aestheticsScore": 8,
"isFurnished": true,
"details": {
"furniture": ["bed", "shelves"],
"colors": ["blue", "white"],
"lightingQuality": "bright and airy"
}
}
}
400 Bad Request: Invalid input.
500 Internal Server Error: An error occurred during processing.
Example cURL Request:
bash
Copy code
curl -X POST "https://api.palazzo.ai/analysis/evaluate?apiKey=YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/image.jpg"}'
error codes
Common Errors
Code
Description
400
403
404
500
Bad Request. Invalid or missing input.
Forbidden. Unauthorized access.
Resource not found.
Internal server error.