Ideal House
Zum Hauptinhalt springen

API zum Ändern von Möbeln Dokumentation#

Basis-URL:https://api.ideal.house
Version: v1
Aktualisiert: 2026-05-21


📖 Übersicht#

Die API zum Ändern von Möbeln gestaltet Möbel in einem Innenraumbild um oder ändert sie. Übergeben Sie ein Ausgangsbild und optionale Stilanweisungen und fragen Sie dann asynchron das Aufgabenergebnis ab.

  1. Erstellen Sie eine Aufgabe — Übergeben Sie imageUrl und optionale Anweisungen und erhalten Sie eine taskId.
  2. Ergebnisse regelmäßig abfragen — Verwenden Sie taskId, um den Aufgabenstatus und das Ausgabebild abzurufen.

🔐 Authentifizierung#

Alle API-Anforderungen müssen einen API-Schlüssel im Anfrageheader enthalten.

HeaderWert
APIKEYyour_api_key_here

💰 Credit-Abbuchung#

[!WARNING] 🪙 1 Credit wird abgezogen, wenn eine Aufgabe erfolgreich erstellt wird. Wenn die Aufgabe letztendlich fehlschlägt, wird der abgezogene Credit automatisch erstattet.
Unzureichende Guthabeneinheiten führen zum Fehlercode 9051. Siehe Referenz zum Guthabenverbrauch.

VorgangAbgebuchte Credits
Möbel-Austausch-Aufgabe1 Guthabeneinheit

🎨 Stileinstellungen#

Diese API unterstützt optionale Stilkonfigurationen, die vom API-Stilkonfiguration-Endpunkt zurückgegeben werden.

Verwenden:

Klartext
GET /api/v1/style/change_furniture/getStyles
StilgruppeAnforderungsfeldBeschreibung
roomTypeindoorTypeIdRaumtypoption
styleindoorStyleIdInnenstiloption
elementsindoorElemIdRaumelementoption. Unterstützt mehrere Options-IDs durch Komma getrennt, z.B. id1,id2

Jede Option enthält:

FeldBeschreibung
nameMultilinguale Optionsbezeichnung
idWert, der im Anforderungsfeld übergeben werden soll
urlVorschaubild für die Option

📌 API Endpoints#

1. Aufgabe zum Ändern von Möbeln erstellen#

Endpoint

Klartext
POST /api/v1/changeFurniture/generate

Anforderungsheader

KopfzeileErforderlichBeschreibung
APIKEY✅ JaIhr API Authentifizierungsschlüssel
Content-Type✅ Jaapplication/json

Anforderungstext

FeldTypErforderlichBeschreibung
imageUrlstring✅ JaURL des Quellinnenraumbilds
promptstring❌ OptionalTextanweisung für das gewünschte Ergebnis
indoorTypeIdstring❌ OptionalRaumtyp-ID aus roomType Stileinstellungen
indoorStyleIdstring❌ OptionalInnenstil-ID aus style Stileinstellungen
indoorElemIdstring❌ OptionalRaumelement-ID aus elements Stileinstellungen. Unterstützt mehrere IDs durch Komma getrennt, z.B. id1,id2

Nur imageUrl ist erforderlich. Alle anderen Felder sind optional.

🖼️ Bildanforderungen: Verwenden Sie JPG/JPEG, PNG oder WebP. Jedes Bild darf nicht größer als 20 MB sein, mit Abmessungen von 128 × 128 px bis zu 6,000 × 6,000 px (inklusiv). Bilder, die die maximalen Pixelabmessungen überschreiten, werden vor der Verarbeitung automatisch proportional so herunterskaliert, dass sie in 6,000 × 6,000 px passen. Bild-URL muss für den API-Server direkt zugänglich sein.

📥 Anfragebeispiele#

cURL
bash
curl -X POST "https://api.ideal.house/api/v1/changeFurniture/generate" \
  -H "APIKEY: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "imageUrl": "https://example.com/living-room.jpg",
    "prompt": "replace the sofa with a modern warm neutral sofa",
    "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"
  }'
Java (OkHttp)
java
import okhttp3.*;

import java.io.IOException;

public class ChangeFurnitureApiExample {

    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/living-room.jpg",
                    "prompt": "replace the sofa with a modern warm neutral sofa",
                    "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"
                }
                """;

        Request request = new Request.Builder()
                .url(BASE_URL + "/api/v1/changeFurniture/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/living-room.jpg",
    "prompt": "replace the sofa with a modern warm neutral sofa",
    "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"
}

response = requests.post(
    f"{BASE_URL}/api/v1/changeFurniture/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 createChangeFurnitureTask() {
  try {
    const response = await axios.post(
      `${BASE_URL}/api/v1/changeFurniture/generate`,
      {
        imageUrl: 'https://example.com/living-room.jpg',
        prompt: 'replace the sofa with a modern warm neutral sofa',
        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'
      },
      {
        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);
  }
}

createChangeFurnitureTask();

📤 Antwort#

json
{
  "code": 0,
  "message": "success",
  "data": 1234567890123456789
}
FeldTypBeschreibung
codeinteger0 zeigt Erfolg an
messagestringAntwortnachricht
datalongAufgaben-ID zum Abfragen von Ergebnissen

2. Aufgabenergebnis abrufen#

Endpoint

Klartext
GET /api/v1/changeFurniture/result

Anforderungsheader

KopfzeileErforderlichBeschreibung
APIKEY✅ JaIhr API Authentifizierungsschlüssel

Query-Parameter

ParameterTypErforderlichBeschreibung
taskIdlong✅ JaVom Erstellungsendpunkt zurückgegebene Aufgaben-ID

📥 Anfragebeispiele#

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

import java.io.IOException;

public class ChangeFurnitureResultExample {

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

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

pollChangeFurnitureResult(1234567890123456789n);

📤 Antwortbeispiel#

json
{
  "code": 0,
  "message": "success",
  "data": {
    "id": 1234567890123456789,
    "status": "Success",
    "waitNumber": 0,
    "percentage": 100,
    "input": {
      "imageUrl": "https://example.com/living-room.jpg",
      "prompt": "replace the sofa with a modern warm neutral sofa",
      "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"
    },
    "output": {
      "resultUrl": "https://cdn.ideal.house/output/change_furniture_result.jpg",
      "width": 1024,
      "height": 1024
    }
  }
}

Antwort (Aufgabe wird verarbeitet / in Warteschlange)

json
{
  "code": 0,
  "message": "success",
  "data": {
    "id": 1234567890123456789,
    "status": "Processing",
    "waitNumber": 1,
    "percentage": 45,
    "input": {
      "imageUrl": "https://example.com/living-room.jpg",
      "prompt": "replace the sofa with a modern warm neutral sofa"
    },
    "output": null
  }
}

Antwort (Aufgabe fehlgeschlagen)

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

📊 Aufgabenstatus#

StatusBeschreibung
UnprocessedAufgabe wurde erstellt und wartet in der Warteschlange
ProcessingAufgabe läuft derzeit
SuccessAufgabe erfolgreich abgeschlossen
FailedAufgabe fehlgeschlagen und kein Ergebnis erzeugt

Alle 3-5 Sekunden abfragen. Siehe API Aufgabenlimit.


❌ Fehlerantworten#

CodeNameBeschreibung
1011PARAM_ERRORFehler in den Anfrageparametern
5002API_KEY_INVALIDUngültiger oder fehlender API Schlüssel
9010SCAN_TEXT_ERRORPrompt hat Inhaltsüberprüfung nicht bestanden
9038PROHIBITED_CONTENTGeneriertes Bild enthält verbotene Inhalte
9051COINS_NOT_ENOUGHUnzureichende Credits

Vollständige gemeinsame Fehlerdefinitionen finden Sie in der Referenz zu Fehlercodes.