Ideal House
콘텐츠로 이동

실내 리모델링 API 문서#

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


📖 개요#

실내 리모델링 API는 실내 이미지를 리모델링하며, 선택적으로 공간 스타일 옵션, 텍스트 지침 및 색상 지침을 사용할 수 있습니다.

작업 흐름은 비동기 방식입니다.

  1. 작업 생성imageUrl과 선택 매개변수를 제출하고 taskId를 받습니다.
  2. 결과 폴링taskId로 작업 상태와 생성된 이미지를 조회합니다.

🔐 인증#

헤더
APIKEYyour_api_key_here

💰 크레딧 차감#

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

작업차감 크레딧
실내 리모델링 작업1크레딧

🎨 스타일 옵션#

이 API는 API 스타일 설정 엔드포인트가 반환하는 선택적 스타일 매개변수를 지원합니다.

사용 항목:

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

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


🎨 색상 지침#

colorStringcolorImgUrl은 선택적인 색상 지침 입력입니다.

경우동작
colorString만 제공됨colorString 사용
colorImgUrl만 제공됨색상 참조 이미지 사용
둘 다 제공됨colorString 우선 적용
둘 다 제공되지 않음색상 지침 기본값 auto

📌 API 엔드포인트#

1. 실내 리모델링 작업 생성#

엔드포인트

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

요청 헤더

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

요청 본문

필드유형필수 여부설명
imageUrlstring✅ 예원본 실내 이미지 URL
promptstring❌ 선택원하는 리모델링에 대한 텍스트 지침
indoorTypeIdstring❌ 선택roomType 스타일 옵션의 공간 유형 ID
indoorStyleIdstring❌ 선택style 스타일 옵션의 인테리어 스타일 ID
indoorElemIdstring❌ 선택elements 스타일 옵션의 공간 요소 ID입니다. id1,id2처럼 여러 ID를 쉼표로 구분하여 사용할 수 있습니다.
colorStringstring❌ 선택색상 팔레트 문자열입니다. 예: [[174,238,238],[36,36,36]]
colorImgUrlstring❌ 선택색상 참조 이미지 URL

imageUrl만 필수입니다. 나머지 필드는 모두 선택 사항입니다.

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

📥 요청 예제#

cURL
bash
curl -X POST "https://api.ideal.house/api/v1/interiorRemodel/generate" \
  -H "APIKEY: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "imageUrl": "https://example.com/interior.jpg",
    "prompt": "modern warm remodel with clean built-in storage",
    "indoorTypeId": "Interior Design_Interior Scene_Living Room",
    "indoorStyleId": "Interior_Interior Style_Popular_Modern Country",
    "indoorElemId": "Interior Design_Scene Elements_Living Room_Shelving,Interior Design_Scene Elements_Living Room_Coffee Table",
    "colorString": "[[174,238,238],[36,36,36],[117,64,95]]"
  }'
Java (OkHttp)
java
import okhttp3.*;

import java.io.IOException;

public class InteriorRemodelApiExample {

    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/interior.jpg",
                    "prompt": "modern warm remodel with clean built-in storage",
                    "indoorTypeId": "Interior Design_Interior Scene_Living Room",
                    "indoorStyleId": "Interior_Interior Style_Popular_Modern Country",
                    "indoorElemId": "Interior Design_Scene Elements_Living Room_Shelving,Interior Design_Scene Elements_Living Room_Coffee Table",
                    "colorString": "[[174,238,238],[36,36,36],[117,64,95]]"
                }
                """;

        Request request = new Request.Builder()
                .url(BASE_URL + "/api/v1/interiorRemodel/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/interior.jpg",
    "prompt": "modern warm remodel with clean built-in storage",
    "indoorTypeId": "Interior Design_Interior Scene_Living Room",
    "indoorStyleId": "Interior_Interior Style_Popular_Modern Country",
    "indoorElemId": "Interior Design_Scene Elements_Living Room_Shelving,Interior Design_Scene Elements_Living Room_Coffee Table",
    "colorString": "[[174,238,238],[36,36,36],[117,64,95]]"
}

response = requests.post(
    f"{BASE_URL}/api/v1/interiorRemodel/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 createInteriorRemodelTask() {
  try {
    const response = await axios.post(
      `${BASE_URL}/api/v1/interiorRemodel/generate`,
      {
        imageUrl: 'https://example.com/interior.jpg',
        prompt: 'modern warm remodel with clean built-in storage',
        indoorTypeId: 'Interior Design_Interior Scene_Living Room',
        indoorStyleId: 'Interior_Interior Style_Popular_Modern Country',
        indoorElemId: 'Interior Design_Scene Elements_Living Room_Shelving,Interior Design_Scene Elements_Living Room_Coffee Table',
        colorString: '[[174,238,238],[36,36,36],[117,64,95]]'
      },
      {
        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);
  }
}

createInteriorRemodelTask();

📤 응답#

json
{
  "code": 0,
  "message": "success",
  "data": 1234567890123456789
}

2. 작업 결과 조회#

엔드포인트

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

요청 헤더

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

쿼리 매개변수

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

📥 요청 예제#

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

import java.io.IOException;

public class InteriorRemodelResultExample {

    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/interiorRemodel/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/interiorRemodel/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 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 pollInteriorRemodelResult(taskId) {
  const headers = { APIKEY: API_KEY };

  while (true) {
    const response = await axios.get(
      `${BASE_URL}/api/v1/interiorRemodel/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));
  }
}

pollInteriorRemodelResult(1234567890123456789n);

📤 응답 예제#

json
{
  "code": 0,
  "message": "success",
  "data": {
    "id": 1234567890123456789,
    "status": "Success",
    "waitNumber": 0,
    "percentage": 100,
    "input": {
      "imageUrl": "https://example.com/interior.jpg",
      "prompt": "modern warm remodel with clean built-in storage",
      "indoorTypeId": "Interior Design_Interior Scene_Living Room",
      "indoorStyleId": "Interior_Interior Style_Popular_Modern Country",
      "colorString": "[[174,238,238],[36,36,36],[117,64,95]]"
    },
    "output": {
      "resultUrl": "https://cdn.ideal.house/output/interior_remodel_result.jpg",
      "width": 1024,
      "height": 1024
    }
  }
}

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

json
{
  "code": 0,
  "message": "success",
  "data": {
    "id": 1234567890123456789,
    "status": "Processing",
    "waitNumber": 1,
    "percentage": 45,
    "input": {
      "imageUrl": "https://example.com/interior.jpg",
      "prompt": "modern warm remodel with clean built-in storage"
    },
    "output": null
  }
}

응답 (작업 실패)

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

📊 작업 상태#

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

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


❌ 오류 응답#

코드이름설명
1011PARAM_ERROR요청 매개변수 오류
5002API_KEY_INVALID유효하지 않거나 누락된 API 키
9010SCAN_TEXT_ERROR프롬프트가 콘텐츠 검토를 통과하지 못함
9038PROHIBITED_CONTENT생성된 이미지에 금지된 콘텐츠가 포함됨
9051COINS_NOT_ENOUGH크레딧 부족

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