Create Order
Create a new order for real estate image enhancement using a three-step upload process. Supports files up to 50MB each.
Three-Step Upload Process
- 1. POST
/api/v1/orders/upload-urls- Request pre-signed upload URLs - 2. PUT to each signed URL - Upload files directly to storage
- 3. POST
/api/v1/orders/from-uploads- Create order with file references
POST
/api/v1/orders/upload-urlsStep 1: Generate pre-signed upload URLs for direct client-to-storage uploads. Returns URLs valid for 1 hour.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
interiorCount | number | Optional | Number of interior photos to upload (default: 0) |
exteriorCount | number | Optional | Number of exterior photos to upload (default: 0) |
Response
Response
200 OK
{
"uploadSessionId": "550e8400-e29b-41d4-a716-446655440000",
"interiorUrls": [
{
"uploadUrl": "https://storage.supabase.co/...?token=...",
"filePath": "interior-uploads/pending/session-id/file.tmp",
"index": 0,
"type": "interior"
}
],
"exteriorUrls": [],
"expiresIn": 3600,
"message": "Upload URLs generated successfully"
}POST
/api/v1/orders/from-uploadsStep 3: Create order using pre-uploaded file references. Files must be uploaded to signed URLs from step 1 before calling this endpoint.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
address | string | Required | Full property address (street, city, state, zip) |
serviceType | string | Required | Type of service: 'exterior', 'interior', or 'both' |
uploadSessionId | string | Required | Upload session ID from step 1 response |
interiorFiles | object[] | Optional | Array of interior file references (required if serviceType is 'interior' or 'both') |
exteriorFiles | object[] | Optional | Array of exterior file references |
exteriorEnhancements | string[] | Optional | Array of exterior enhancement IDs (applies to all exterior photos) |
interiorEnhancements | string[] | Optional | Array of interior enhancement IDs (applies to all interior photos) |
photoConfigs | object[] | Optional | Advanced: per-image enhancement configurations (overrides default enhancements) |
Available Enhancements
Exterior Enhancements
- •
grass_enhancement- Transform lawns to appear lush and healthy - •
sky_enhancement- Replace overcast skies with vibrant blue skies - •
golden_hour- Warm sunset lighting with soft golden glow - •
twilight_conversion- Professional dusk photography with deep blue sky
Interior Enhancements
- •
hdr_enhancement- Balance interior and exterior exposures - •
flambient_enhancement- Blend flash and ambient lighting - •
declutter- Remove clutter and personal items - •
furniture_removal- Remove furniture to show empty space - •
virtual_staging- Add professional furniture and decor
Response Fields
Response
| Name | Type | Required | Description |
|---|---|---|---|
success | boolean | Required | Whether the order was created successfully |
jobId | string | Required | Unique job identifier for status checking |
status | string | Required | Current job status (typically 'processing') |
creditCost | number | Required | Total credits deducted for this order |
photosUploaded | number | Required | Number of photos successfully uploaded |
assets | array | Required | List of uploaded assets with IDs and filenames |
message | string | Required | Success message |
Error Responses
400 Bad Request
400 Error
{
"error": "Missing required fields",
"details": {
"address": "Property address is required"
}
}402 Insufficient Credits
402 Error
{
"error": "Insufficient credits",
"details": {
"required": 15,
"current": 5,
"shortfall": 10
}
}