Ideal House
콘텐츠로 이동

가상 홈 스테이징 API 문서#

기본 URL: https://api.ideal.house
버전: v1
갱신일: 2026-04-13


📖 개요#

가상 홈 스테이징 API는 AI를 사용하여 비어 있거나 일부 가구만 놓인 방을 새롭게 꾸밀 수 있도록 합니다.
방 이미지 URL과 선택적 텍스트 프롬프트를 제출한 다음 생성된 결과를 비동기로 조회합니다.

  1. 작업 생성imageUrl과 선택 사항인 prompt를 제출하고 taskId를 받습니다.
  2. 결과 폴링taskId로 작업 상태를 조회하고 출력 이미지를 가져옵니다.

🔐 인증#

모든 API 요청은 API 키로 인증해야 합니다.

요청 헤더에 API 키를 포함하세요.

헤더
APIKEYyour_api_key_here

⚠️ API 키를 안전하게 보관하세요. 클라이언트 측 코드 또는 공개 저장소에 노출하지 마세요.


💰 크레딧 차감#

[!WARNING] 🪙 작업이 성공적으로 생성되면 1크레딧이 차감됩니다.
작업이 최종적으로 실패하면 차감된 크레딧은 자동 환불됩니다.
크레딧이 부족하면 오류 코드 9051을 반환합니다. 📄 크레딧 차감 참조를 참고하세요.

작업차감 크레딧
가상 홈 스테이징 작업1크레딧

📌 API 엔드포인트#


1. 가상 홈 스테이징 작업 생성#

새 가상 홈 스테이징 작업을 생성하고 폴링용 고유 taskId를 반환합니다.

엔드포인트

일반 텍스트
POST /api/v1/virtualStaging/generate

요청 헤더

헤더필수 여부설명
APIKEY✅ 예API 인증 키
Content-Type✅ 예application/json

요청 본문

필드유형필수 여부설명
imageUrlstring✅ 예원본 방 이미지 URL
promptstring❌ 아니요스타일과 가구 배치를 유도하는 선택적 프롬프트
indoorTypeIdstring❌ 아니요선택적 공간 유형 프리셋입니다. 실내 유형 옵션을 참고하세요.
indoorStyleIdstring❌ 아니요선택적 인테리어 스타일 프리셋입니다. 인테리어 스타일 옵션을 참고하세요.
indoorElemIdstring❌ 아니요선택적 공간 요소 프리셋입니다. id1,id2처럼 여러 ID를 쉼표로 구분하여 사용할 수 있습니다.

🖼️ 이미지 요건: JPG/JPEG, PNG 또는 WebP를 사용하세요. 각 이미지는 20 MB 이하여야 하며 크기는 128 × 128 px부터 6,000 × 6,000 px까지 허용됩니다(경계값 포함). 최대 픽셀 크기를 초과하는 이미지는 처리 전에 6,000 × 6,000 px 안에 들어오도록 비율을 유지하여 자동 축소됩니다. 이미지 URL은 API 서버에서 직접 접근할 수 있어야 합니다.


🎨 스타일 옵션#

indoorTypeId, indoorStyleIdindoorElemIdAPI 스타일 설정 엔드포인트에서 선택할 수 있습니다.

사용 항목:

일반 텍스트
GET /api/v1/style/virtual_staging/getStyles
스타일 그룹요청 필드설명
roomTypeindoorTypeId공간 유형 옵션
styleindoorStyleId인테리어 스타일 옵션
elementsindoorElemId공간 요소 옵션입니다. id1,id2처럼 여러 옵션 ID를 쉼표로 구분하여 사용할 수 있습니다.

각 옵션에는 name, idurl이 포함됩니다. 옵션의 id를 해당 요청 필드에 전달하세요.


📥 요청 예제#

cURL
bash
curl -X POST "https://api.ideal.house/api/v1/virtualStaging/generate" \
  -H "APIKEY: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "imageUrl": "https://example.com/empty-living-room.jpg",
    "prompt": "Warm and modern living room styling",
    "indoorTypeId": "Interior Design_Interior Scene_Living Room",
    "indoorStyleId": "Interior_Interior Style_Popular_Vs_Modern Farmhouse",
    "indoorElemId": "Interior Design_Scene Elements_Living Room_Shelving,Interior Design_Scene Elements_Living Room_Coffee Table"
  }'
Java (OkHttp)
java
import okhttp3.*;

import java.io.IOException;

public class VirtualStagingApiExample {

    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 = """
                {
                    "imageUrl": "https://example.com/empty-bedroom.jpg",
                    "prompt": "Cozy contemporary bedroom",
                    "indoorTypeId": "Interior Design_Interior Scene_Bed Room",
                    "indoorStyleId": "Interior_Interior Style_Popular_Vs_Contemporary Warm",
                    "indoorElemId": "Interior Design_Scene Elements_Living Room_Shelving,Interior Design_Scene Elements_Living Room_Coffee Table"
                }
                """;

        Request request = new Request.Builder()
                .url(BASE_URL + "/api/v1/virtualStaging/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)
python
import requests

BASE_URL = "https://api.ideal.house"
API_KEY  = "your_api_key_here"

headers = {
    "APIKEY": API_KEY,
    "Content-Type": "application/json"
}

payload = {
    "imageUrl": "https://example.com/empty-home-office.jpg",
    "prompt": "Minimal modern home office",
    "indoorTypeId": "Interior Design_Interior Scene_Home Office",
    "indoorStyleId": "Interior_Interior Style_Popular_Vs_Modern Minimal",
    "indoorElemId": "Interior Design_Scene Elements_Living Room_Shelving,Interior Design_Scene Elements_Living Room_Coffee Table"
}

response = requests.post(
    f"{BASE_URL}/api/v1/virtualStaging/generate",
    headers=headers,
    json=payload
)

data = response.json()
task_id = data.get("data")
print(f"Task ID: {task_id}")
Node.js (axios)
javascript
const axios = require('axios');

const BASE_URL = 'https://api.ideal.house';
const API_KEY  = 'your_api_key_here';

async function createVirtualStagingTask() {
  try {
    const response = await axios.post(
      `${BASE_URL}/api/v1/virtualStaging/generate`,
      {
        imageUrl: 'https://example.com/empty-dining-room.jpg',
        prompt: 'Modern luxury dining room',
        indoorTypeId: 'Interior Design_Interior Scene_Dining Room',
        indoorStyleId: 'Interior_Interior Style_Popular_Vs_Modern Luxury',
        indoorElemId: 'Interior Design_Scene Elements_Living Room_Shelving,Interior Design_Scene Elements_Living Room_Coffee Table'
      },
      {
        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);
  }
}

createVirtualStagingTask();

📤 응답#

성공 응답

json
{
  "code": 0,
  "message": "success",
  "data": 1234567890123456789
}
필드유형설명
codeinteger0은 성공을 의미함
messagestring응답 메시지
datalong결과 폴링용 고유 작업 ID

2. 작업 결과 조회#

이전에 생성한 가상 홈 스테이징 작업의 현재 상태와 출력을 조회합니다.

엔드포인트

일반 텍스트
GET /api/v1/virtualStaging/result

요청 헤더

헤더필수 여부설명
APIKEY✅ 예API 인증 키

쿼리 매개변수

매개변수유형필수 여부설명
taskIdlong✅ 예작업 생성 엔드포인트가 반환한 작업 ID

📥 요청 예제#

cURL
bash
curl -X GET "https://api.ideal.house/api/v1/virtualStaging/result?taskId=1234567890123456789" \
  -H "APIKEY: your_api_key_here"
Java (OkHttp)
java
import okhttp3.*;

import java.io.IOException;

public class VirtualStagingResultExample {

    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/virtualStaging/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)
python
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/virtualStaging/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":
    output = result["output"]
    print("Result URL:", output["resultUrl"])
    print("Size:", output["width"], "x", output["height"])
else:
    print("Task ended with status:", status)
Node.js (axios)
javascript
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/virtualStaging/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 ended with status:', status);
      }
      break;
    }

    await new Promise(resolve => setTimeout(resolve, 3000));
  }
}

pollResult(1234567890123456789n);

📤 응답#

성공 응답 (작업 완료)

json
{
  "code": 0,
  "message": "success",
  "data": {
    "id": 1234567890123456789,
    "status": "Success",
    "waitNumber": 0,
    "percentage": 100,
    "input": {
      "imageUrl": "https://example.com/empty-room.jpg",
      "prompt": "modern country living room with warm neutral materials",
      "indoorTypeId": "Interior Design_Interior Scene_Living Room",
      "indoorStyleId": "Interior_Interior Style_Popular_Vs_Modern Farmhouse",
      "indoorElemId": "Interior Design_Scene Elements_Living Room_Shelving,Interior Design_Scene Elements_Living Room_Coffee Table"
    },
    "output": {
      "resultUrl": "https://cdn.ideal.house/output/virtual_staging_result.jpg",
      "width": 1024,
      "height": 1024
    }
  }
}

응답 (작업 처리 중 / 대기열에 있음)

json
{
  "code": 0,
  "message": "success",
  "data": {
    "id": 1234567890123456789,
    "status": "Processing",
    "waitNumber": 1,
    "percentage": 46,
    "input": {
      "imageUrl": "https://example.com/empty-room.jpg",
      "prompt": "coastal bedroom with soft light and natural textures",
      "indoorTypeId": "Interior Design_Interior Scene_Bed Room",
      "indoorStyleId": "Interior_Interior Style_Popular_Vs_Contemporary Warm"
    },
    "output": null
  }
}

응답 (작업 실패)

json
{
  "code": 0,
  "message": "success",
  "data": {
    "id": 1234567890123456789,
    "status": "Failed",
    "waitNumber": 0,
    "percentage": 100,
    "input": {
      "imageUrl": "https://example.com/empty-room.jpg",
      "prompt": "..."
    },
    "output": null
  }
}

응답 필드

필드유형설명
idlong작업 고유 식별자
statusstring현재 작업 상태 (작업 상태 참조)
waitNumberinteger대기열에서 앞에 있는 작업 수 (0은 현재 처리 중임을 의미함)
percentageinteger작업 완료 비율 (0-100)
errorReasonstringstatusFailed일 때의 실패 사유
inputobject이 작업에 제출한 원래 입력 매개변수
input.imageUrlstring원본 방 이미지 URL
input.promptstring사용자 프롬프트 (제공된 경우)
input.indoorTypeIdstring사용된 공간 유형 프리셋 (제공된 경우)
input.indoorStyleIdstring사용된 인테리어 스타일 프리셋 (제공된 경우)
input.indoorElemIdstring사용된 공간 요소 프리셋 (제공된 경우). 쉼표로 구분한 여러 ID를 포함할 수 있습니다.
outputobject생성 결과 (statusSuccess일 때만 제공됨)
output.resultUrlstring생성된 가상 홈 스테이징 결과 이미지 URL
output.widthinteger출력 이미지 너비(픽셀)
output.heightinteger출력 이미지 높이(픽셀)

📊 작업 상태#

상태의미
Unprocessed작업이 생성되어 대기열에서 기다리는 중
Processing작업이 현재 실행 중
Success작업이 성공적으로 완료됨
Failed작업이 실패하여 출력이 생성되지 않음

3-5초마다 폴링하세요. API 작업 제한을 참고하세요.


❌ 오류 응답#

모든 오류 응답은 동일한 JSON 구조를 사용합니다.

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

오류 코드 참조#

코드이름설명권장 조치
1001FAILED요청 실패 (일반 오류)구체적인 내용은 message 필드 확인
1003INTERNAL_ERROR내부 서버 오류잠시 후 재시도하고 계속 발생하면 지원팀에 문의
1011PARAM_ERROR요청 매개변수 오류 (예: imageUrl 누락)imageUrl이 제공되었으며 유효한 URL인지 확인
5002API_KEY_INVALID유효하지 않거나 누락된 API 키APIKEY 헤더가 있고 올바른지 확인
9010SCAN_TEXT_ERROR프롬프트가 콘텐츠 검토를 통과하지 못함민감하거나 금지된 콘텐츠를 제거하도록 프롬프트 수정
9038PROHIBITED_CONTENT생성된 출력 이미지에 금지된 콘텐츠가 포함됨프롬프트/스타일/입력을 조정하고 재시도
9051COINS_NOT_ENOUGH크레딧 부족크레딧을 충전하고 재시도

📄 전체 공통 오류 정의는 오류 코드 참조를 참고하세요.