Photo Enhancer API Documentation
© Ideal House AI — All rights reserved.
Base URL:
https://api.ideal.house
Version: v1
Updated: 2026-04-17
Overview
The Photo Enhancer API lets you enhance real estate photos asynchronously by choosing a presetId, providing a custom prompt, or combining both.
Current request model:
presetIdis optional.promptis optional.presetIdandpromptcannot both be empty. At least one of them must be provided.- Use
imageUrlas the only image input field. imageUrlsupports both single-image and multi-image formats.
Workflow:
- Call the generate endpoint and get a
taskId. - Poll the result endpoint with that
taskId. - Read the generated image URL after the task succeeds.
Authentication
All API requests must include your API key in the request header.
| Header | Required | Description |
|---|---|---|
APIKEY | Yes | Your API authentication key |
Content-Type | Yes | application/json for POST requests |
Credits
Each successful task creation deducts credits based on imageSize: 4K deducts 20 credits, and all other sizes deduct 10 credits. If the task later fails, the credits are refunded automatically.
For credit rules, see credits-deduction.md.
Endpoints
1. Create Task
Create a new image enhancement task.
Endpoint
POST /api/v1/photoEnhancer/generate
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
presetId | string | No | Optional preset request value. Choose one from Preset Reference. |
imageUrl | string | array<string> | Yes | Image input. Supports a single URL string, or a URL array such as ["https://a.jpg", "https://b.jpg"]. |
prompt | string | No | Optional custom prompt text. |
imageSize | string | No | Optional output size. Supported values: 512, 1K, 2K, 4K. If omitted for API calls, the server defaults to 4K. |
imageUrl Format
Single image:
{
"imageUrl": "https://example.com/room.jpg"
}
Multiple images:
{
"imageUrl": [
"https://example.com/room_1.jpg",
"https://example.com/room_2.jpg"
]
}
Behavior Notes
imageUrlis the only request image field for this API.presetIdmay be omitted.promptmay be omitted.presetIdandpromptcannot both be empty. At least one of them must be provided.- If
imageUrlis a normal URL string, the task uses one image. - If
imageUrlis an array, the server parses it into an internal image list. hdr-merge-hdr-mergeis the preset that is designed for multiple images.- Multiple images generally produce the best results only with
hdr-merge-hdr-merge. - Other
presetIdvalues are not designed for multi-image generation. If you submit multiple images with them, the generated result may not be good. Single-image input is recommended.
Request Examples
cURL
# Single image example
curl -X POST "https://api.ideal.house/api/v1/photoEnhancer/generate" \
-H "APIKEY: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"imageUrl": "https://example.com/exterior.jpg",
"presetId": "virtual-twilight-warm-sunset-twilight",
"imageSize": "4K"
}'
# HDR Merge example - multi-image input
curl -X POST "https://api.ideal.house/api/v1/photoEnhancer/generate" \
-H "APIKEY: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"imageUrl": [
"https://example.com/interior_under.jpg",
"https://example.com/interior_mid.jpg",
"https://example.com/interior_over.jpg"
],
"presetId": "hdr-merge-hdr-merge",
"imageSize": "4K"
}'
# Prompt-only example
curl -X POST "https://api.ideal.house/api/v1/photoEnhancer/generate" \
-H "APIKEY: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"imageUrl": "https://example.com/interior.jpg",
"prompt": "Brighten the room, keep the lighting natural, and make the image listing-ready.",
"imageSize": "4K"
}'
Java (OkHttp)
import okhttp3.*;
import java.io.IOException;
public class PhotoEnhancerApiExample {
private static final String BASE_URL = "https://api.ideal.house";
private static final String API_KEY = "your_api_key_here";
public static void main(String[] args) throws IOException {
OkHttpClient client = new OkHttpClient();
// Single image example
String requestBody = """
{
"imageUrl": "https://example.com/exterior.jpg",
"presetId": "virtual-twilight-warm-sunset-twilight",
"imageSize": "4K"
}
""";
// HDR Merge example - multi-image input
// String requestBody = """
// {
// "imageUrl": [
// "https://example.com/interior_under.jpg",
// "https://example.com/interior_mid.jpg",
// "https://example.com/interior_over.jpg"
// ],
// "presetId": "hdr-merge-hdr-merge",
// "imageSize": "4K"
// }
// """;
// Prompt-only example
// String requestBody = """
// {
// "imageUrl": "https://example.com/interior.jpg",
// "prompt": "Brighten the room, keep the lighting natural, and make the image listing-ready.",
// "imageSize": "4K"
// }
// """;
Request request = new Request.Builder()
.url(BASE_URL + "/api/v1/photoEnhancer/generate")
.addHeader("APIKEY", API_KEY)
.addHeader("Content-Type", "application/json")
.post(RequestBody.create(requestBody, MediaType.parse("application/json")))
.build();
try (Response response = client.newCall(request).execute()) {
System.out.println("Response: " + response.body().string());
}
}
}
Python (requests)
import requests
BASE_URL = "https://api.ideal.house"
API_KEY = "your_api_key_here"
headers = {
"APIKEY": API_KEY,
"Content-Type": "application/json"
}
# Single image example
payload = {
"imageUrl": "https://example.com/interior.jpg",
"presetId": "image-optimization-full-correction-suite",
"prompt": "Keep the result natural and listing-ready."
}
# HDR Merge example - multi-image input
# payload = {
# "imageUrl": [
# "https://example.com/interior_under.jpg",
# "https://example.com/interior_mid.jpg",
# "https://example.com/interior_over.jpg"
# ],
# "presetId": "hdr-merge-hdr-merge",
# "imageSize": "4K"
# }
# Prompt-only example
# payload = {
# "imageUrl": "https://example.com/interior.jpg",
# "prompt": "Brighten the room, keep the lighting natural, and make the image listing-ready.",
# "imageSize": "4K"
# }
response = requests.post(
f"{BASE_URL}/api/v1/photoEnhancer/generate",
headers=headers,
json=payload
)
data = response.json()
task_id = data.get("data")
print(f"Task ID: {task_id}")
Node.js (axios)
const axios = require('axios');
const BASE_URL = 'https://api.ideal.house';
const API_KEY = 'your_api_key_here';
async function createPhotoEnhancerTask() {
try {
const response = await axios.post(
`${BASE_URL}/api/v1/photoEnhancer/generate`,
{
imageUrl: 'https://example.com/interior.jpg',
presetId: 'image-quality-correction-ai-photo-sharpening',
imageSize: '4K'
// HDR Merge example - multi-image input:
// imageUrl: [
// 'https://example.com/interior_under.jpg',
// 'https://example.com/interior_mid.jpg',
// 'https://example.com/interior_over.jpg'
// ],
// presetId: 'hdr-merge-hdr-merge',
// imageSize: '4K'
// Prompt-only example:
// imageUrl: 'https://example.com/interior.jpg',
// prompt: 'Brighten the room, keep the lighting natural, and make the image listing-ready.',
// imageSize: '4K'
},
{
headers: {
'APIKEY': API_KEY,
'Content-Type': 'application/json'
}
}
);
console.log('Task ID:', response.data.data);
} catch (error) {
console.error('Error:', error.response?.data || error.message);
}
}
createPhotoEnhancerTask();
Success Response
{
"code": 0,
"message": "success",
"data": 1234567890123456789
}
| Field | Type | Description |
|---|---|---|
code | integer | 0 means success |
message | string | Response message |
data | long | Generated task id |
2. Get Task Result
Get the current task status and output.
Endpoint
GET /api/v1/photoEnhancer/result
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
taskId | long | Yes | Task id returned by the generate endpoint |
Request Examples
cURL
curl -X GET "https://api.ideal.house/api/v1/photoEnhancer/result?taskId=1234567890123456789" \
-H "APIKEY: your_api_key_here"
Java (OkHttp)
import okhttp3.*;
import java.io.IOException;
public class PhotoEnhancerResultExample {
private static final String BASE_URL = "https://api.ideal.house";
private static final String API_KEY = "your_api_key_here";
public static void main(String[] args) throws IOException {
OkHttpClient client = new OkHttpClient();
long taskId = 1234567890123456789L;
Request request = new Request.Builder()
.url(BASE_URL + "/api/v1/photoEnhancer/result?taskId=" + taskId)
.addHeader("APIKEY", API_KEY)
.get()
.build();
try (Response response = client.newCall(request).execute()) {
System.out.println("Response: " + response.body().string());
}
}
}
Python (requests)
import requests
import time
BASE_URL = "https://api.ideal.house"
API_KEY = "your_api_key_here"
headers = {
"APIKEY": API_KEY
}
task_id = 1234567890123456789
while True:
response = requests.get(
f"{BASE_URL}/api/v1/photoEnhancer/result",
headers=headers,
params={"taskId": task_id}
)
data = response.json()
result = data.get("data", {})
status = result.get("status")
print(f"Status: {status}, Progress: {result.get('percentage')}%, Queue: {result.get('waitNumber')}")
if status in ("Success", "Failed"):
break
time.sleep(3)
if status == "Success":
print("Result URL:", result["output"]["resultUrl"])
else:
print("Task failed")
Node.js (axios)
const axios = require('axios');
const BASE_URL = 'https://api.ideal.house';
const API_KEY = 'your_api_key_here';
async function pollResult(taskId) {
const headers = { 'APIKEY': API_KEY };
while (true) {
const response = await axios.get(
`${BASE_URL}/api/v1/photoEnhancer/result`,
{
headers,
params: { taskId }
}
);
const result = response.data.data;
const { status, percentage, waitNumber } = result;
console.log(`Status: ${status} | Progress: ${percentage}% | Queue: ${waitNumber}`);
if (['Success', 'Failed'].includes(status)) {
if (status === 'Success') {
console.log('Result URL:', result.output.resultUrl);
console.log('Size:', result.output.width, 'x', result.output.height);
} else {
console.log('Task failed');
}
break;
}
await new Promise(resolve => setTimeout(resolve, 3000));
}
}
pollResult(1234567890123456789n);
Response Example
{
"code": 0,
"message": "success",
"data": {
"id": 1234567890123456789,
"status": "Success",
"waitNumber": 0,
"percentage": 100,
"input": {
"imageUrl": [
"https://example.com/interior_under.jpg",
"https://example.com/interior_mid.jpg",
"https://example.com/interior_over.jpg"
],
"imageUrls": [
"https://example.com/interior_under.jpg",
"https://example.com/interior_mid.jpg",
"https://example.com/interior_over.jpg"
],
"prompt": "Keep the result natural and listing-ready.",
"presetId": "hdr-merge-hdr-merge",
"imageSize": "4K",
"isApiCall": true,
"modelType": "Pro",
"model": "NanoBanana"
},
"output": {
"resultUrl": "https://cdn.ideal.house/output/photo_enhancer_result.jpg",
"width": 3840,
"height": 2880
}
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
id | long | Task unique identifier |
status | string | Current task status |
waitNumber | integer | Number of tasks ahead in queue |
percentage | integer | Task progress from 0 to 100 |
input | object | Original request data stored with the task |
input.imageUrl | string | array<string> | Original request value sent by the client |
input.imageUrls | array<string> | Server-normalized internal image list |
input.prompt | string | Optional custom prompt text |
input.presetId | string | null | Optional preset request value |
input.imageSize | string | Requested image size. Supported values: 512, 1K, 2K, 4K |
output | object | null | Output object when the task succeeds |
output.resultUrl | string | Final image URL |
output.width | integer | Output width in pixels |
output.height | integer | Output height in pixels |
Task Status
| Status | Description |
|---|---|
Unprocessed | Task has been created but has not started yet |
Processing | Task is currently running |
Success | Task finished successfully |
Failed | Task failed |
Polling recommendation: poll every 3 to 5 seconds.
Preset Reference
Summary:
- Public categories:
11 - Public presets from config:
136 - Extra API preset:
1 - Total documented request values:
137 - Request field:
presetId
Extra API Preset
| Preset Name (EN) | Request Value (presetId) | Notes |
|---|---|---|
HDR Merge | hdr-merge-hdr-merge | Recommended for multi-image input such as bracketed exposure merging |
Image Optimization (image-optimization)
| Preset Name (EN) | Request Value (presetId) |
|---|---|
Full Correction Suite | image-optimization-full-correction-suite |
Real Estate Photo Editing | image-optimization-real-estate-photo-editing |
MLS Photo Enhancement | image-optimization-mls-photo-enhancement |
Single Exposure Editing | image-optimization-single-exposure-editing |
Social Media Photo Optimization | image-optimization-social-media-photo-optimization |
Glare and Reflection Reduction | image-optimization-glare-and-reflection-reduction |
Exposure Balancing | image-optimization-exposure-balancing |
Image Quality & Correction (image-quality-correction)
| Preset Name (EN) | Request Value (presetId) |
|---|---|
360 VR Enhanced Tour | image-quality-correction-360-vr-enhanced-tour |
AI Photo Sharpening | image-quality-correction-ai-photo-sharpening |
Real Estate Photo Editing | image-quality-correction-real-estate-photo-editing |
Compression Artifact Fix | image-quality-correction-compression-artifact-fix |
Lens Distortion Correction | image-quality-correction-lens-distortion-correction |
Image Upscaling | image-quality-correction-image-upscaling |
Noise Reduction | image-quality-correction-noise-reduction |
Perspective Correction | image-quality-correction-perspective-correction |
Auto Crop & Straighten | image-quality-correction-auto-crop-straighten |
Chromatic Aberration Fix | image-quality-correction-chromatic-aberration-fix |
Vignette Removal | image-quality-correction-vignette-removal |
MLS Photo Resize | image-quality-correction-mls-photo-resize |
Exterior Enhancement (exterior-enhancement)
| Preset Name (EN) | Request Value (presetId) |
|---|---|
Drone & Aerial | exterior-enhancement-drone-aerial |
Driveway | exterior-enhancement-driveway |
Curb Appeal | exterior-enhancement-curb-appeal |
Exterior Color | exterior-enhancement-exterior-color |
Exterior Photo | exterior-enhancement-exterior-photo |
Lawn & Yard | exterior-enhancement-lawn-yard |
Pool | exterior-enhancement-pool |
Fence & Gate | exterior-enhancement-fence-gate |
Landscaping | exterior-enhancement-landscaping |
Roof | exterior-enhancement-roof |
Interior Enhancement (interior-enhancement)
| Preset Name (EN) | Request Value (presetId) |
|---|---|
Window Pull | interior-enhancement-window-pull |
Occupied to Vacant | interior-enhancement-occupied-to-vacant |
Enhance Hardwood Floors Photo | interior-enhancement-enhance-hardwood-floors-photo |
Interior Photo | interior-enhancement-interior-photo |
Flash Ambient Blending Real Estate | interior-enhancement-flash-ambient-blending-real-estate |
Ceiling Light & Hot Spot Fix | interior-enhancement-ceiling-light-hot-spot-fix |
Lighting, Color & Exposure (lighting-color-exposure)
| Preset Name (EN) | Request Value (presetId) |
|---|---|
Balance Highlight Shadow Real Estate | lighting-color-exposure-balance-highlight-shadow-real-estate |
Brighten Dark Interior Photo | lighting-color-exposure-brighten-dark-interior-photo |
Brighten Dark Real Estate Photo | lighting-color-exposure-brighten-dark-real-estate-photo |
Brightness Enhancer | lighting-color-exposure-brightness-enhancer |
Cozy Warm Interior Editing | lighting-color-exposure-cozy-warm-interior-editing |
Enhance Brightness Of Photo | lighting-color-exposure-enhance-brightness-of-photo |
Enhance Natural Light Interior | lighting-color-exposure-enhance-natural-light-interior |
Exposure Balancing | lighting-color-exposure-exposure-balancing |
Mixed Lighting Fix | lighting-color-exposure-mixed-lighting-fix |
Flat Photo Contrast Fix | lighting-color-exposure-flat-photo-contrast-fix |
Fluorescent Light Color Fix | lighting-color-exposure-fluorescent-light-color-fix |
How To Brighten Dark Photos | lighting-color-exposure-how-to-brighten-dark-photos |
Contrast Enhancement | lighting-color-exposure-contrast-enhancement |
Increase Brightness Listing Photo | lighting-color-exposure-increase-brightness-listing-photo |
Interior Exposure Balancing | lighting-color-exposure-interior-exposure-balancing |
Lift Dark Shadows Real Estate | lighting-color-exposure-lift-dark-shadows-real-estate |
Overexposed Window Fix | lighting-color-exposure-overexposed-window-fix |
Color Correction | lighting-color-exposure-color-correction |
Highlight Recovery | lighting-color-exposure-highlight-recovery |
Shadow Recovery | lighting-color-exposure-shadow-recovery |
Reduce Highlights In My Image To Balance Exposure | lighting-color-exposure-reduce-highlights-in-my-image-to-balance-exposure |
Color Cast Removal | lighting-color-exposure-color-cast-removal |
Tungsten Daylight Mix Correction | lighting-color-exposure-tungsten-daylight-mix-correction |
Warm Tone Enhancement | lighting-color-exposure-warm-tone-enhancement |
Cool Tone Enhancement | lighting-color-exposure-cool-tone-enhancement |
White Balance Fix Interior Photo | lighting-color-exposure-white-balance-fix-interior-photo |
Turn On Lights | lighting-color-exposure-turn-on-lights |
Vibrance & Saturation Boost | lighting-color-exposure-vibrance-saturation-boost |
Natural Light Enhancement | lighting-color-exposure-natural-light-enhancement |
Sky Replacement (sky-replacement)
| Preset Name (EN) | Request Value (presetId) |
|---|---|
Blue Sky / Clear Sky | sky-replacement-blue-sky-clear-sky |
Sunrise Sky | sky-replacement-sunrise-sky |
Cloudy Sky | sky-replacement-cloudy-sky |
Partly Cloudy | sky-replacement-partly-cloudy |
Dramatic Clouds | sky-replacement-dramatic-clouds |
Sunset Sky | sky-replacement-sunset-sky |
Soft Sunset | sky-replacement-soft-sunset |
Dramatic Sunset | sky-replacement-dramatic-sunset |
Luxury Sunset Tones | sky-replacement-luxury-sunset-tones |
Fix Gray Sky Real Estate | sky-replacement-fix-gray-sky-real-estate |
Golden Hour Sky | sky-replacement-golden-hour-sky |
Night Sky / Starry Sky | sky-replacement-night-sky-starry-sky |
Sky Replacement | sky-replacement-sky-replacement |
Virtual Twilight (virtual-twilight)
| Preset Name (EN) | Request Value (presetId) |
|---|---|
Bright Marketing Twilight | virtual-twilight-bright-marketing-twilight |
Day To Dusk Photo Conversion | virtual-twilight-day-to-dusk-photo-conversion |
Deep Blue Twilight | virtual-twilight-deep-blue-twilight |
Light Subtle Twilight | virtual-twilight-light-subtle-twilight |
Luxury Twilight | virtual-twilight-luxury-twilight |
Midnight Blue Twilight | virtual-twilight-midnight-blue-twilight |
Warm Sunset Twilight | virtual-twilight-warm-sunset-twilight |
Weather & Seasonal Editing (weather-seasonal-editing)
| Preset Name (EN) | Request Value (presetId) |
|---|---|
Golden Hour | weather-seasonal-editing-golden-hour |
Blue Hour | weather-seasonal-editing-blue-hour |
Haze & Fog Removal | weather-seasonal-editing-haze-fog-removal |
Harsh Sunlight & Shadow Fix | weather-seasonal-editing-harsh-sunlight-shadow-fix |
Overcast To Sunny | weather-seasonal-editing-overcast-to-sunny |
Rain & Wet Weather Fix | weather-seasonal-editing-rain-wet-weather-fix |
Spring Enhancement | weather-seasonal-editing-spring-enhancement |
Summer Enhancement | weather-seasonal-editing-summer-enhancement |
Night to Day | weather-seasonal-editing-night-to-day |
Fall Foliage | weather-seasonal-editing-fall-foliage |
Snow / Winter Conditions | weather-seasonal-editing-snow-winter-conditions |
Full Season Change / Season Swap | weather-seasonal-editing-full-season-change-season-swap |
Snow Removal | weather-seasonal-editing-snow-removal |
Holiday Decorations (holiday-decorations)
| Preset Name (EN) | Request Value (presetId) |
|---|---|
Christmas Exterior | holiday-decorations-christmas-exterior |
Christmas Interior | holiday-decorations-christmas-interior |
Easter Exterior | holiday-decorations-easter-exterior |
Easter Interior | holiday-decorations-easter-interior |
Halloween Exterior | holiday-decorations-halloween-exterior |
Halloween Interior | holiday-decorations-halloween-interior |
New Year Exterior | holiday-decorations-new-year-exterior |
New Year Interior | holiday-decorations-new-year-interior |
Thanksgiving Dining Room | holiday-decorations-thanksgiving-dining-room |
Thanksgiving Exterior | holiday-decorations-thanksgiving-exterior |
Thanksgiving Interior | holiday-decorations-thanksgiving-interior |
Fourth of July / Independence Day | holiday-decorations-fourth-of-july-independence-day |
Hanukkah Interior | holiday-decorations-hanukkah-interior |
Spring / Ramadan Decorations | holiday-decorations-spring-ramadan-decorations |
Valentine's Day Bedroom | holiday-decorations-valentine-s-day-bedroom |
Valentine's Day Exterior | holiday-decorations-valentine-s-day-exterior |
Valentine's Day Interior | holiday-decorations-valentine-s-day-interior |
Fire in Fireplace (fire-in-fireplace)
| Preset Name (EN) | Request Value (presetId) |
|---|---|
Add Fire To Fireplace | fire-in-fireplace-add-fire-to-fireplace |
Bright Marketing Fire | fire-in-fireplace-bright-marketing-fire |
Modern Clean Fire | fire-in-fireplace-modern-clean-fire |
Subtle Natural Fire | fire-in-fireplace-subtle-natural-fire |
Traditional Cozy Fire | fire-in-fireplace-traditional-cozy-fire |
Vibrant Showcase Fire | fire-in-fireplace-vibrant-showcase-fire |
Object & Element Specific (object-element-specific)
| Preset Name (EN) | Request Value (presetId) |
|---|---|
Crack & Wall Repair | object-element-specific-crack-wall-repair |
Floor Reflection Real Estate | object-element-specific-floor-reflection-real-estate |
People & Pet Removal | object-element-specific-people-pet-removal |
Trash Can Removal | object-element-specific-trash-can-removal |
Remove Cars | object-element-specific-remove-cars |
Clutter Removal | object-element-specific-clutter-removal |
Date Stamp Removal | object-element-specific-date-stamp-removal |
Sign Removal | object-element-specific-sign-removal |
Glare Removal | object-element-specific-glare-removal |
Mirror Reflection Fix | object-element-specific-mirror-reflection-fix |
Remove Power Lines | object-element-specific-remove-power-lines |
Stain Removal | object-element-specific-stain-removal |
Watermark Removal | object-element-specific-watermark-removal |
Window Reflection Removal | object-element-specific-window-reflection-removal |
TV Screen Fix | object-element-specific-tv-screen-fix |
Wire & Cable Removal | object-element-specific-wire-cable-removal |
Error Responses
All errors use this structure:
{
"code": 5002,
"message": "Invalid API Key",
"data": null
}
| Code | Name | Description |
|---|---|---|
1001 | FAILED | Generic request failure |
1003 | INTERNAL_ERROR | Internal server error |
1011 | PARAM_ERROR | Missing or invalid request parameter |
5002 | API_KEY_INVALID | Invalid or missing API key |
9010 | SCAN_TEXT_ERROR | Prompt text failed review |
9038 | PROHIBITED_CONTENT | Generated image content was rejected |
9051 | COINS_NOT_ENOUGH | Insufficient credits |
For the full common error list, see error-codes.md.
Recommended Integration Flow
1. POST /api/v1/photoEnhancer/generate
-> receive taskId
2. Wait 3 to 5 seconds
3. GET /api/v1/photoEnhancer/result?taskId={taskId}
-> inspect status
4. If status is Success
-> read output.resultUrl
5. If status is Unprocessed or Processing
-> continue polling
© Ideal House AI — All rights reserved.