Docs

API Documentation

House Plan Generation API Documentation

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


📖 Overview

The House Plan Generation API allows you to create AI-generated exterior house plan images based on architectural style, area, structural configuration, and interior layout preferences. Upon successful generation, the API produces exactly 3 result images per task, all stored 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.
⚠️ Partial Result Refund: If the task status is Success but the number of result images returned in output.resultList is fewer than 3, the originally deducted credits will be automatically refunded to your account.
Insufficient credits will return error code 9051. 📄 See Credits Deduction Reference.

Model (modelType)Credits Deducted
Base20 credits
Pro40 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

FieldTypeRequiredDescription
stylestring❌ OptionalArchitectural style. Defaults to Barndominium. See Style Options
totalAreastring❌ OptionalTotal house area. Supports metric (m²) and imperial (ft²). See Total Area Options
storiesstring❌ OptionalNumber of floors / stories (e.g., 1, 2, 3)
bedroomsstring❌ OptionalNumber of bedrooms (e.g.,1,2 3, 4, 5+)
bathroomsstring❌ OptionalNumber of bathrooms (e.g., 1,1.5,2,2.5,3 3.5, 4+)
roofTypestring❌ OptionalRoof structure type. See Roof Type Options
foundationstring❌ OptionalFoundation type. See Foundation Options
garageCapacitystring❌ OptionalNumber of garage spaces (e.g., 0, 1, 2, 3)
outdoorSpacesstring❌ OptionalOutdoor areas, multiple values joined with commas. See Outdoor Spaces Options
layoutConceptstring❌ OptionalOverall interior layout concept. See Layout Concept Options
kitchenFeaturesstring❌ OptionalKitchen layout style. Defaults to Open. See Kitchen Features Options
keyRoomsstring❌ OptionalKey special rooms, multiple values joined with commas. See Key Rooms Options
promptstring❌ OptionalCustom text prompt to further guide the generation
refImageUrlstring❌ OptionalURL of a reference house image to guide the style
modelTypestring❌ OptionalModel quality type. Enum: Base, Pro. Defaults to Base. ⚠️ Flash mode is not supported

🎨 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

💡 You can also enter a custom style description.


📐 Total Area Options

The totalArea field accepts predefined range values in either metric (m²) or imperial (ft²) units. You may also enter a custom value.

Metric (m²)

ValueDescription
< 140m²Less than 140 square meters
140-230m²140 to 230 square meters
150-200m²150 to 200 square meters
230-325m²230 to 325 square meters
> 325m²Greater than 325 square meters

Imperial (ft²)

ValueDescription
< 1500ft²Less than 1500 square feet
1500-2500ft²1500 to 2500 square feet
2500ft²2500 square feet
2500-3500ft²2500 to 3500 square feet
> 3500ft²Greater than 3500 square feet

💡 You can also provide a custom value such as "180m²" or "2000ft²".


🏠 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

💡 You can also enter a custom roof type description.


🏗️ Foundation Options

ValueDescription
SlabConcrete slab directly on ground
BasementFull basement below ground level

💡 You can also enter a custom foundation type description.


🚗 Garage Capacity

The garageCapacity field accepts a numeric string representing the number of car spaces:

ValueDescription
0No garage
1Single-car garage
2Double-car garage
3Triple-car garage
4+Triple-car garage

🌿 Outdoor Spaces Options

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

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"

💡 You can also provide custom outdoor space descriptions.


🏛️ Layout Concept Options

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

💡 You can also enter a custom layout description.


🍳 Kitchen Features Options

ValueDescription
OpenDefault. Open kitchen connected to living/dining area
CloseEnclosed separate kitchen space

🚪 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"

💡 You can also provide custom room descriptions.


Model Types

ValueDescription
BaseDefault. Balanced speed and quality
ProHigher quality output with 4K first-step generation, slower

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


📥 Request Examples

cURL

# Basic request
curl -X POST "https://api.ideal.house/api/v1/housePlan/generate" \
  -H "APIKEY: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "style": "Modern",
    "totalArea": "140-230m²",
    "stories": "2",
    "bedrooms": "4",
    "bathrooms": "3",
    "roofType": "Flat roof",
    "foundation": "Slab",
    "garageCapacity": "2",
    "outdoorSpaces": "Front porch,Deck",
    "layoutConcept": "Open Concept",
    "kitchenFeatures": "Open",
    "keyRooms": "Home Office,Media Room",
    "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",
    "totalArea": "> 325m²",
    "stories": "3",
    "bedrooms": "5",
    "bathrooms": "4",
    "roofType": "Gable roof",
    "foundation": "Basement",
    "garageCapacity": "3",
    "outdoorSpaces": "Front porch,Balcony,Courtyard,Outdoor Kitchen",
    "layoutConcept": "Traditional",
    "kitchenFeatures": "Close",
    "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": "Modern",
                "totalArea": "140-230m²",
                "stories": "2",
                "bedrooms": "4",
                "bathrooms": "3",
                "roofType": "Flat roof",
                "foundation": "Slab",
                "garageCapacity": "2",
                "outdoorSpaces": "Front porch,Deck",
                "layoutConcept": "Open Concept",
                "kitchenFeatures": "Open",
                "keyRooms": "Home Office,Media Room",
                "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": "Modern",
    "totalArea": "140-230m²",
    "stories": "2",
    "bedrooms": "4",
    "bathrooms": "3",
    "roofType": "Flat roof",
    "foundation": "Slab",
    "garageCapacity": "2",
    "outdoorSpaces": "Front porch,Deck",
    "layoutConcept": "Open Concept",
    "kitchenFeatures": "Open",
    "keyRooms": "Home Office,Media Room",
    "modelType": "Base"
}

# Pro model with reference image and custom prompt
# payload = {
#     "style": "Victorian",
#     "totalArea": "> 325m²",
#     "stories": "3",
#     "bedrooms": "5",
#     "bathrooms": "4",
#     "roofType": "Gable roof",
#     "foundation": "Basement",
#     "garageCapacity": "3",
#     "outdoorSpaces": "Front porch,Balcony,Courtyard,Outdoor Kitchen",
#     "layoutConcept": "Traditional",
#     "kitchenFeatures": "Close",
#     "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"
# }

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: 'Modern',
        totalArea: '140-230m²',
        stories: '2',
        bedrooms: '4',
        bathrooms: '3',
        roofType: 'Flat roof',
        foundation: 'Slab',
        garageCapacity: '2',
        outdoorSpaces: 'Front porch,Deck',
        layoutConcept: 'Open Concept',
        kitchenFeatures: 'Open',
        keyRooms: 'Home Office,Media Room',
        modelType: 'Base'

        // Pro model with reference and prompt:
        // style: 'Victorian',
        // totalArea: '> 325m²',
        // stories: '3',
        // bedrooms: '5',
        // roofType: 'Gable roof',
        // foundation: 'Basement',
        // garageCapacity: '3',
        // outdoorSpaces: 'Front porch,Balcony,Courtyard,Outdoor Kitchen',
        // layoutConcept: 'Traditional',
        // kitchenFeatures: 'Close',
        // 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'
      },
      {
        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("Primary Result URL:", output["resultUrl"])
    print("All Result Images:", 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('Primary Result URL:', result.output.resultUrl);
        console.log('All Result Images:', 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 3 result images per successful task. All generated images are stored in output.resultList. The output.resultUrl contains the first (primary) image. If fewer than 3 images are returned despite a Success status, the deducted credits will be automatically refunded.

Success Response (Task Completed)

{
  "code": 0,
  "message": "success",
  "data": {
    "id": 1234567890123456789,
    "status": "Success",
    "waitNumber": 0,
    "percentage": 100,
    "input": {
      "style": "Modern",
      "totalArea": "140-230m²",
      "stories": "2",
      "bedrooms": "4",
      "bathrooms": "3",
      "roofType": "Flat roof",
      "foundation": "Slab",
      "garageCapacity": "2",
      "outdoorSpaces": "Front porch,Deck",
      "layoutConcept": "Open Concept",
      "kitchenFeatures": "Open",
      "keyRooms": "Home Office,Media Room",
      "modelType": "Base"
    },
    "output": {
      "resultUrl": "https://cdn.ideal.house/output/house_plan_1.jpg",
      "resultList": [
        "https://cdn.ideal.house/output/house_plan_1.jpg",
        "https://cdn.ideal.house/output/house_plan_2.jpg",
        "https://cdn.ideal.house/output/house_plan_3.jpg"
      ],
      "width": 1024,
      "height": 1024
    }
  }
}

Response (Task Processing / In Queue)

{
  "code": 0,
  "message": "success",
  "data": {
    "id": 1234567890123456789,
    "status": "Processing",
    "waitNumber": 1,
    "percentage": 45,
    "input": {
      "style": "Modern",
      "totalArea": "140-230m²",
      "stories": "2",
      "bedrooms": "4",
      "bathrooms": "3",
      "roofType": "Flat roof",
      "foundation": "Slab",
      "garageCapacity": "2",
      "outdoorSpaces": "Front porch,Deck",
      "layoutConcept": "Open Concept",
      "kitchenFeatures": "Open",
      "keyRooms": "Home Office,Media Room",
      "modelType": "Base"
    },
    "output": null
  }
}

Response (Task Failed)

{
  "code": 0,
  "message": "success",
  "data": {
    "id": 1234567890123456789,
    "status": "Failed",
    "waitNumber": 0,
    "percentage": 0,
    "input": {
      "style": "Modern",
      "totalArea": "140-230m²",
      "stories": "2",
      "bedrooms": "4",
      "bathrooms": "3",
      "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.roofTypestringRoof type
input.foundationstringFoundation type
input.garageCapacitystringNumber of garage spaces
input.outdoorSpacesstringOutdoor spaces (comma-separated)
input.layoutConceptstringOverall layout concept
input.kitchenFeaturesstringKitchen layout style
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 primary generated house plan image
output.resultListarray<string>URLs to all generated result images (normally 3 images; if fewer than 3 are returned, deducted credits are automatically refunded)
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

💡 Polling Recommendation: Poll the result endpoint every 3–5 seconds. Avoid polling too frequently to prevent rate limiting.


❌ 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.


┌─────────────────────────────────────────────────────────┐
│                                                         │
│  1. POST /api/v1/housePlan/generate                     │
│     → Receive taskId                                    │
│                                                         │
│  2. Wait 3–5 seconds                                    │
│                                                         │
│  3. GET /api/v1/housePlan/result?taskId={taskId}        │
│     → Check status field                               │
│                                                         │
│     ┌──────────────────────────────────────────────┐   │
│     │ status == "Unprocessed" or "Processing"       │   │
│     │   → waitNumber: position in queue             │   │
│     │   → percentage: current progress              │   │
│     │   → Repeat step 2 & 3                         │   │
│     └──────────────────────────────────────────────┘   │
│                                                         │
│     ┌──────────────────────────────────────────────┐   │
│     │ status == "Success"                           │   │
│     │   → output.resultUrl: primary image           │   │
│     │   → output.resultList: all images (normally 3) │   │
│     └──────────────────────────────────────────────┘   │
│                                                         │
│     ┌──────────────────────────────────────────────┐   │
│     │ status == "Failed" or "Termination"           │   │
│     │   → Handle error accordingly                  │   │
│     └──────────────────────────────────────────────┘   │
│                                                         │
└─────────────────────────────────────────────────────────┘

© Ideal House AI — All rights reserved.