Docs

API Documentation

House Plan Generation API Documentation

Base URL: https://api.ideal.house
Version: v1
Updated: 2026-06-12


📖 Overview

The House Plan Generation API allows you to create an AI-generated house plan presentation board based on architectural style, area, structural configuration, and interior layout preferences. Upon successful generation, the API produces exactly 1 composite result image per task. The image contains coordinated 2D floor plans, exterior elevations, and photorealistic exterior renderings in a single presentation board. The result is stored in output.resultUrl and also included as the only item in output.resultList. The workflow is asynchronous and involves two steps:

  1. Create a task — Submit your house plan parameters and receive a taskId.
  2. Poll for results — Use the taskId to query task status and retrieve the generated images.

🔐 Authentication

All API requests must be authenticated using an API Key.

Include your API Key in the request header:

HeaderValue
APIKEYyour_api_key_here

⚠️ Keep your API Key secure. Do not expose it in client-side code or public repositories.


💰 Credits Deduction

[!WARNING] 🪙 Credits are deducted based on the selected modelType upon successful task creation. If the task ultimately fails, the deducted credits will be automatically refunded to your account.
Insufficient credits will return error code 9051. 📄 See Credits Deduction Reference.

Model (modelType)Credits Deducted
Base10 credits
Pro20 credits

📌 API Endpoints


1. Create House Plan Task

Creates a new AI house plan generation task and returns a unique taskId for polling.

Endpoint

POST /api/v1/housePlan/generate

Request Headers

HeaderRequiredDescription
APIKEY✅ YesYour API authentication key
Content-Type✅ Yesapplication/json

Request Body

FieldTypeRequiredDescriptionDefault
stylestring / null✅ YesArchitectural style English name. See Style OptionsBarndominium
storiesstring✅ YesNumber of stories. Enum: 1, 2, 3+2
bedroomsstring✅ YesNumber of bedrooms. Enum: 1, 2, 3, 4, 5+2
bathroomsstring✅ YesNumber of bathrooms. Enum: 1, 1.5, 2, 2.5, 3, 3.5, 4+1
totalAreastring✅ YesTotal area range in min-max unit format. See Total Area Options150-200 m²
garageEnabledboolean✅ YesWhether to include a garagefalse
garageTypestring / null⚠️ ConditionalRequired when garageEnabled=true. See Garage Type Optionsnull
garageCapacitystring / null⚠️ ConditionalRequired when garageEnabled=true. See Garage Capacitynull
basementstring✅ YesBasement type. See Basement OptionsNone
roofTypestring / null❌ NoRoof structure type. See Roof Type Optionsnull
outdoorSpacesarray<string>❌ NoOutdoor areas. See Outdoor Spaces Options[]
layoutConceptstring / null❌ NoOverall interior layout concept. See Layout Concept Optionsnull
bedroomAreaRangesarray<object>✅ YesBedroom area ranges. Length must match the bedroom count. See Bedroom Area RangesSee example
bathroomLayoutsarray<object>✅ YesBathroom layout selections. Length must be Math.floor(bathrooms). See Bathroom LayoutsSee example
kitchenLayoutstring / null❌ NoKitchen layout. See Kitchen Optionsnull
kitchenFeatureOptionsarray<string>❌ NoOptional kitchen features. See Kitchen Options[]
keyRoomsstring / null❌ NoSpecial rooms joined by comma and space. See Key Rooms Optionsnull
promptstring❌ NoCustom text prompt to further guide generation""
refImageUrlstring❌ NoURL of a reference house image to guide the style""
modelTypestring✅ YesModel quality type. Enum: Base, Pro. ⚠️ Flash mode is not supportedBase

🎨 Style Options

ValueDescription
BarndominiumDefault. Metal barn-style hybrid home
CabinRustic wood cabin style
Cape CodClassic New England symmetrical style
CoastalLight, airy beach-inspired style
ColonialTraditional symmetric colonial architecture
ContemporaryClean lines and modern materials
CraftsmanHandcrafted details with natural materials
FarmhouseRustic country farmhouse style
French CountryElegant French provincial style
MediterraneanWarm stucco with terracotta elements
Mid-Century Modern1950s–70s clean geometric modernism
ModernMinimalist flat/angular modern design
RanchSingle-story sprawling layout
Shingle StyleContinuous wood shingle exterior
SouthwesternAdobe-inspired desert style
TransitionalBlend of traditional and contemporary
TudorHalf-timbered medieval English style
VictorianOrnate 19th-century decorative style

📐 Total Area Options

The totalArea field uses the format min-max unit. Metric values use ; imperial values use ft². The minimum value must be lower than the maximum value by at least one step.

UnitMinimumMaximumStepExample
5050010150-200 m²
ft²50050001001500-2000 ft²

🏠 Roof Type Options

ValueDescription
Gable roofClassic triangular peaked roof
Hip roofSlopes on all four sides
Flat roofMinimal pitch flat roof
Pitched roofGeneral steeply sloped roof

🏗️ Basement Options

ValueDescription
NoneNo basement
PartialPartial basement
FullFull basement

🚗 Garage Type Options

garageType is required only when garageEnabled=true; otherwise send null.

ValueDescription
DetachedDetached garage
Front EntryGarage entry faces the front
Side EntryGarage entry faces the side
Rear EntryGarage entry faces the rear

🚗 Garage Capacity

garageCapacity is required only when garageEnabled=true; otherwise send null.

ValueDescription
1Single-car garage
2Double-car garage
3+Three or more car spaces

🌿 Outdoor Spaces Options

The outdoorSpaces field accepts an array of the following values.

ValueDescription
Front porchCovered entrance porch at the front
Covered patioCovered outdoor patio area
DeckWooden or composite deck
BalconyElevated outdoor platform
CourtyardEnclosed or semi-enclosed outdoor yard
BreezewayCovered passageway connecting structures
Outdoor KitchenOutdoor cooking and dining area

Example

"outdoorSpaces": ["Front porch", "Deck", "Balcony"]

🏛️ Layout Concept Options

ValueDescription
Open ConceptOpen-plan connected living spaces
TraditionalSeparated rooms with defined boundaries
Split-LevelStaggered floor levels between areas

🛏️ Bedroom Area Ranges

The bedroomAreaRanges field must be an array whose length matches the bedrooms count. Each item uses the following shape:

FieldTypeDescription
namestringBedroom display name, for example Room 1 (Master)
minAreastringMinimum bedroom area. Must be a non-negative numeric string
maxAreastringMaximum bedroom area. Must be greater than or equal to minArea
unitstringArea unit. Enum: , ft²

Default example for bedrooms="2"

[
  { "name": "Room 1 (Master)", "minArea": "12", "maxArea": "18", "unit": "m²" },
  { "name": "Room 2", "minArea": "10", "maxArea": "14", "unit": "m²" }
]

🛁 Bathroom Layouts

The bathroomLayouts field must be an array whose length is Math.floor(bathrooms). For example, bathrooms="2.5" requires 2 bathroom layout objects.

FieldTypeDescription
namestringBathroom display name, for example Bathroom 1
layoutstring / nullEnum: With Wet & Dry Separation, Without Separation, or null

Default example for bathrooms="1"

[
  { "name": "Bathroom 1", "layout": null }
]

🍳 Kitchen Options

Kitchen Layout

ValueDescription
Open KitchenOpen kitchen connected to living/dining area
Closed KitchenEnclosed separate kitchen space

Kitchen Feature Options

ValueDescription
Eating BarEating bar / counter seating
Kitchen IslandKitchen island
Breakfast NookBreakfast nook

🚪 Key Rooms Options

The keyRooms field accepts one or more of the following values. When selecting multiple options, join them with a comma (,).

ValueDescription
Home OfficeDedicated home office or study
Bonus RoomFlexible multi-purpose bonus room
Media RoomHome theater or media center
MudroomEntry room for outdoor gear
Laundry RoomDedicated laundry space
Guest SuiteSelf-contained guest bedroom suite

Example

"keyRooms": "Home Office, Media Room, Guest Suite"

Model Types

ValueDescription
BaseDefault. Balanced speed and quality. Generates a high-resolution composite presentation board
ProHigher quality and higher-resolution output, slower

⚠️ Note: Flash mode is not available for this API. Only Base and Pro are supported.


📥 Request Examples

cURL

# Basic request with default values
curl -X POST "https://api.ideal.house/api/v1/housePlan/generate" \
  -H "APIKEY: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "style": "Barndominium",
    "stories": "2",
    "bedrooms": "2",
    "bathrooms": "1",
    "totalArea": "150-200 m²",
    "garageEnabled": false,
    "garageType": null,
    "garageCapacity": null,
    "basement": "None",
    "roofType": null,
    "outdoorSpaces": [],
    "layoutConcept": null,
    "bedroomAreaRanges": [
      { "name": "Room 1 (Master)", "minArea": "12", "maxArea": "18", "unit": "m²" },
      { "name": "Room 2", "minArea": "10", "maxArea": "14", "unit": "m²" }
    ],
    "bathroomLayouts": [
      { "name": "Bathroom 1", "layout": null }
    ],
    "kitchenLayout": null,
    "kitchenFeatureOptions": [],
    "keyRooms": null,
    "prompt": "",
    "refImageUrl": "",
    "modelType": "Base"
  }'

# Pro model with reference image and custom prompt
curl -X POST "https://api.ideal.house/api/v1/housePlan/generate" \
  -H "APIKEY: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "style": "Victorian",
    "stories": "3+",
    "bedrooms": "5+",
    "bathrooms": "4+",
    "totalArea": "300-380 m²",
    "garageEnabled": true,
    "garageType": "Front Entry",
    "garageCapacity": "3+",
    "basement": "Full",
    "roofType": "Gable roof",
    "outdoorSpaces": ["Front porch", "Balcony", "Courtyard", "Outdoor Kitchen"],
    "layoutConcept": "Traditional",
    "bedroomAreaRanges": [
      { "name": "Room 1 (Master)", "minArea": "18", "maxArea": "28", "unit": "m²" },
      { "name": "Room 2", "minArea": "12", "maxArea": "16", "unit": "m²" },
      { "name": "Room 3", "minArea": "12", "maxArea": "16", "unit": "m²" },
      { "name": "Room 4", "minArea": "10", "maxArea": "14", "unit": "m²" },
      { "name": "Room 5", "minArea": "10", "maxArea": "14", "unit": "m²" }
    ],
    "bathroomLayouts": [
      { "name": "Bathroom 1", "layout": "With Wet & Dry Separation" },
      { "name": "Bathroom 2", "layout": "With Wet & Dry Separation" },
      { "name": "Bathroom 3", "layout": "Without Separation" },
      { "name": "Bathroom 4", "layout": null }
    ],
    "kitchenLayout": "Closed Kitchen",
    "kitchenFeatureOptions": ["Kitchen Island", "Breakfast Nook"],
    "keyRooms": "Home Office, Bonus Room, Media Room, Guest Suite",
    "prompt": "Grand Victorian mansion with ornate details and wraparound porch",
    "refImageUrl": "https://example.com/reference-house.jpg",
    "modelType": "Pro"
  }'

Java (OkHttp)

import okhttp3.*;
import java.io.IOException;

public class HousePlanApiExample {

    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();

        String requestBody = """
            {
                "style": "Barndominium",
                "stories": "2",
                "bedrooms": "2",
                "bathrooms": "1",
                "totalArea": "150-200 m²",
                "garageEnabled": false,
                "garageType": null,
                "garageCapacity": null,
                "basement": "None",
                "roofType": null,
                "outdoorSpaces": [],
                "layoutConcept": null,
                "bedroomAreaRanges": [
                    { "name": "Room 1 (Master)", "minArea": "12", "maxArea": "18", "unit": "m²" },
                    { "name": "Room 2", "minArea": "10", "maxArea": "14", "unit": "m²" }
                ],
                "bathroomLayouts": [
                    { "name": "Bathroom 1", "layout": null }
                ],
                "kitchenLayout": null,
                "kitchenFeatureOptions": [],
                "keyRooms": null,
                "prompt": "",
                "refImageUrl": "",
                "modelType": "Base"
            }
            """;

        Request request = new Request.Builder()
            .url(BASE_URL + "/api/v1/housePlan/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"
}

payload = {
    "style": "Barndominium",
    "stories": "2",
    "bedrooms": "2",
    "bathrooms": "1",
    "totalArea": "150-200 m²",
    "garageEnabled": False,
    "garageType": None,
    "garageCapacity": None,
    "basement": "None",
    "roofType": None,
    "outdoorSpaces": [],
    "layoutConcept": None,
    "bedroomAreaRanges": [
        { "name": "Room 1 (Master)", "minArea": "12", "maxArea": "18", "unit": "m²" },
        { "name": "Room 2", "minArea": "10", "maxArea": "14", "unit": "m²" }
    ],
    "bathroomLayouts": [
        { "name": "Bathroom 1", "layout": None }
    ],
    "kitchenLayout": None,
    "kitchenFeatureOptions": [],
    "keyRooms": None,
    "prompt": "",
    "refImageUrl": "",
    "modelType": "Base"
}

response = requests.post(
    f"{BASE_URL}/api/v1/housePlan/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 createHousePlanTask() {
  try {
    const response = await axios.post(
      `${BASE_URL}/api/v1/housePlan/generate`,
      {
        style: 'Barndominium',
        stories: '2',
        bedrooms: '2',
        bathrooms: '1',
        totalArea: '150-200 m²',
        garageEnabled: false,
        garageType: null,
        garageCapacity: null,
        basement: 'None',
        roofType: null,
        outdoorSpaces: [],
        layoutConcept: null,
        bedroomAreaRanges: [
          { name: 'Room 1 (Master)', minArea: '12', maxArea: '18', unit: 'm²' },
          { name: 'Room 2', minArea: '10', maxArea: '14', unit: 'm²' }
        ],
        bathroomLayouts: [
          { name: 'Bathroom 1', layout: null }
        ],
        kitchenLayout: null,
        kitchenFeatureOptions: [],
        keyRooms: null,
        prompt: '',
        refImageUrl: '',
        modelType: 'Base'
      },
      {
        headers: {
          'APIKEY': API_KEY,
          'Content-Type': 'application/json'
        }
      }
    );

    const taskId = response.data.data;
    console.log('Task ID:', taskId);
    return taskId;
  } catch (error) {
    console.error('Error:', error.response?.data || error.message);
  }
}

createHousePlanTask();

📤 Response

Success Response

{
  "code": 0,
  "message": "success",
  "data": 1234567890123456789
}
FieldTypeDescription
codeinteger0 indicates success
messagestringResponse message
datalongThe unique task ID for polling results

2. Get Task Result

Retrieves the current status and output of a previously created house plan task.

Endpoint

GET /api/v1/housePlan/result

Request Headers

HeaderRequiredDescription
APIKEY✅ YesYour API authentication key

Query Parameters

ParameterTypeRequiredDescription
taskIdlong✅ YesThe task ID returned from the create task endpoint

📥 Request Examples

cURL

curl -X GET "https://api.ideal.house/api/v1/housePlan/result?taskId=1234567890123456789" \
  -H "APIKEY: your_api_key_here"

Java (OkHttp)

import okhttp3.*;
import java.io.IOException;

public class HousePlanResultExample {

    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/housePlan/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

# Poll until task is complete
while True:
    response = requests.get(
        f"{BASE_URL}/api/v1/housePlan/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", "Termination"):
        break

    time.sleep(3)  # Poll every 3 seconds

if status == "Success":
    output = result["output"]
    print("Composite Result URL:", output["resultUrl"])
    print("Result List:", output.get("resultList", []))
else:
    print("Task ended with status:", status)

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/housePlan/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', 'Termination'].includes(status)) {
      if (status === 'Success') {
        console.log('Composite Result URL:', result.output.resultUrl);
        console.log('Result List:', result.output.resultList);
      } else {
        console.log('Task ended with status:', status);
      }
      break;
    }

    // Wait 3 seconds before next poll
    await new Promise(resolve => setTimeout(resolve, 3000));
  }
}

pollResult(1234567890123456789n);

📤 Response

📸 Note: This API generates exactly 1 composite result image per successful task. The image combines 2D floor plans, exterior elevations, and photorealistic exterior renderings in a single presentation board. The output.resultUrl contains the composite image URL, and output.resultList contains the same URL as a single-item array for compatibility.

Success Response (Task Completed)

{
  "code": 0,
  "message": "success",
  "data": {
    "id": 1234567890123456789,
    "status": "Success",
    "waitNumber": 0,
    "percentage": 100,
    "input": {
      "style": "Barndominium",
      "stories": "2",
      "bedrooms": "2",
      "bathrooms": "1",
      "totalArea": "150-200 m²",
      "garageEnabled": false,
      "garageType": null,
      "garageCapacity": null,
      "basement": "None",
      "roofType": null,
      "outdoorSpaces": [],
      "layoutConcept": null,
      "bedroomAreaRanges": [
        { "name": "Room 1 (Master)", "minArea": "12", "maxArea": "18", "unit": "m²" },
        { "name": "Room 2", "minArea": "10", "maxArea": "14", "unit": "m²" }
      ],
      "bathroomLayouts": [
        { "name": "Bathroom 1", "layout": null }
      ],
      "kitchenLayout": null,
      "kitchenFeatureOptions": [],
      "keyRooms": null,
      "prompt": "",
      "refImageUrl": "",
      "modelType": "Base"
    },
    "output": {
      "resultUrl": "https://cdn.ideal.house/output/house_plan_composite.jpg",
      "resultList": [
        "https://cdn.ideal.house/output/house_plan_composite.jpg"
      ],
      "width": 2560,
      "height": 1440
    }
  }
}

Response (Task Processing / In Queue)

{
  "code": 0,
  "message": "success",
  "data": {
    "id": 1234567890123456789,
    "status": "Processing",
    "waitNumber": 1,
    "percentage": 45,
    "input": {
      "style": "Barndominium",
      "stories": "2",
      "bedrooms": "2",
      "bathrooms": "1",
      "totalArea": "150-200 m²",
      "garageEnabled": false,
      "garageType": null,
      "garageCapacity": null,
      "basement": "None",
      "roofType": null,
      "outdoorSpaces": [],
      "layoutConcept": null,
      "bedroomAreaRanges": [
        { "name": "Room 1 (Master)", "minArea": "12", "maxArea": "18", "unit": "m²" },
        { "name": "Room 2", "minArea": "10", "maxArea": "14", "unit": "m²" }
      ],
      "bathroomLayouts": [
        { "name": "Bathroom 1", "layout": null }
      ],
      "kitchenLayout": null,
      "kitchenFeatureOptions": [],
      "keyRooms": null,
      "prompt": "",
      "refImageUrl": "",
      "modelType": "Base"
    },
    "output": null
  }
}

Response (Task Failed)

{
  "code": 0,
  "message": "success",
  "data": {
    "id": 1234567890123456789,
    "status": "Failed",
    "waitNumber": 0,
    "percentage": 0,
    "input": {
      "style": "Barndominium",
      "stories": "2",
      "bedrooms": "2",
      "bathrooms": "1",
      "totalArea": "150-200 m²",
      "garageEnabled": false,
      "basement": "None",
      "modelType": "Base"
    },
    "output": null
  }
}

Response Fields

FieldTypeDescription
idlongTask unique identifier
statusstringCurrent task status (see Task Status)
waitNumberintegerNumber of tasks ahead in the queue (0 means currently processing)
percentageintegerTask completion percentage (0–100)
inputobjectThe original input parameters of the task
input.stylestringArchitectural style
input.totalAreastringTotal area range
input.storiesstringNumber of floors
input.bedroomsstringNumber of bedrooms
input.bathroomsstringNumber of bathrooms
input.garageEnabledbooleanWhether a garage was requested
input.garageTypestring / nullGarage type
input.garageCapacitystring / nullNumber of garage spaces
input.basementstringBasement type
input.roofTypestringRoof type
input.outdoorSpacesarray<string>Outdoor spaces
input.layoutConceptstringOverall layout concept
input.bedroomAreaRangesarray<object>Bedroom area ranges
input.bathroomLayoutsarray<object>Bathroom layout selections
input.kitchenLayoutstringKitchen layout style
input.kitchenFeatureOptionsarray<string>Optional kitchen features
input.keyRoomsstringKey special rooms (comma-separated)
input.promptstringCustom text prompt (if provided)
input.refImageUrlstringReference image URL (if provided)
input.modelTypestringModel type used
outputobjectGeneration result (only available when status is Success)
output.resultUrlstringURL to the generated composite house plan presentation board
output.resultListarray<string>URLs to generated result images. For House Plan, this is normally a single-item array containing the same URL as output.resultUrl
output.widthintegerOutput width in pixels
output.heightintegerOutput height in pixels

📊 Task Status

StatusDescription
UnprocessedTask has been created but not yet started
ProcessingTask is currently being processed
SuccessTask completed successfully — output is available
FailedTask failed due to an error
TerminationTask was interrupted or terminated

Poll every 3-5 seconds. See API Task Limit.


❌ Error Responses

All error responses share the same JSON structure:

{
  "code": 5002,
  "message": "Invalid API Key",
  "data": null
}

Error Code Reference

CodeNameDescriptionSuggested Action
1001FAILEDRequest failed (generic error)Check the message field for specific error details
1003INTERNAL_ERRORInternal server errorRetry after a short delay; contact support if it persists
1011PARAM_ERRORRequest parameter errorVerify all required parameters are provided and correctly formatted
5002API_KEY_INVALIDInvalid or missing API KeyEnsure the APIKEY header is present and the value is correct
9010SCAN_TEXT_ERRORText prompt failed content reviewModify the prompt to remove any sensitive or prohibited content
9038PROHIBITED_CONTENTGenerated output image contains prohibited contentAdjust prompt/style/inputs and retry
9051COINS_NOT_ENOUGHInsufficient coins / creditsTop up your account credits and retry

📄 For the complete list of common API error codes, refer to the Error Code Reference.