Ideal House
Zum Hauptinhalt springen

API zur virtuellen Raumausstattung Dokumentation#

Basis-URL: https://api.ideal.house
Version: v1
Aktualisiert: 2026-04-13


📖 Übersicht#

Die API zur virtuellen Raumausstattung gestaltet einen leeren oder teilweise möblierten Raum mithilfe von KI neu.
Sie senden die URL eines Raumbilds und einen optionalen Text-Prompt und rufen anschließend das generierte Ergebnis asynchron ab.

  1. Aufgabe erstellen — Senden Sie imageUrl und optionale prompt, dann erhalten Sie eine taskId.
  2. Ergebnisse regelmäßig abfragen — Verwenden Sie taskId, um Aufgabestatus abzufragen und das Ausgabebild zu erhalten.

🔐 Authentifizierung#

Alle API Anfragen müssen mit einem API Key authentifiziert werden.

Fügen Sie Ihren API Key in den Anforderungsheader ein:

KopfzeileWert
APIKEYyour_api_key_here

⚠️ Bewahren Sie Ihren API Key sicher auf. Geben Sie ihn nicht in Client-seitigem Code oder öffentlichen Repositorien frei.


💰 Guthabenverbrauch#

[!WARNING] 🪙 1 Guthabeneinheit wird bei erfolgreicher Aufgabenerstellung abgezogen.
Wenn die Aufgabe letztendlich fehlschlägt, wird der abgezogene Betrag automatisch erstattet.
Unzureichende Guthabeneinheiten geben Fehlercode 9051 zurück. 📄 Siehe Referenz zum Guthabenverbrauch.

VorgangAbgebuchte Credits
Aufgabe zur virtuellen Raumausstattung1 Guthabeneinheit

📌 API Endpunkte#


1. Aufgabe zur virtuellen Raumausstattung erstellen#

Erstellt eine neue Aufgabe zur virtuellen Raumausstattung und gibt eine eindeutige taskId für die Abfrage zurück.

Endpunkt

Klartext
POST /api/v1/virtualStaging/generate

Anforderungsheader

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

Anforderungskörper

FeldTypErforderlichBeschreibung
imageUrlstring✅ JaURL des Ausgangsraumbildes
promptstring❌ NeinOptionaler Prompt zur Vorgabe von Stil und Möblierung
indoorTypeIdstring❌ OptionalOptionale Raumtyp-Voreinstellung. Siehe Raumtyp-Optionen
indoorStyleIdstring❌ OptionalOptionale Einrichtungsstil-Voreinstellung. Siehe Einrichtungsstil-Optionen
indoorElemIdstring❌ NeinOptionale Raumelement-Voreinstellung. Unterstützt mehrere durch Komma getrennte IDs, z.B. id1,id2

🖼️ Bildanforderungen: Verwenden Sie JPG/JPEG, PNG oder WebP. Jedes Bild darf maximal 20 MB groß sein, mit Abmessungen von 128 × 128 px bis zu 6,000 × 6,000 px (inklusive). Bilder, die die maximalen Pixelabmessungen überschreiten, werden automatisch proportional herunter-skaliert, um innerhalb von 6,000 × 6,000 px vor der Verarbeitung zu passen. Das Bild-URL muss direkt vom API Server erreichbar sein.


🎨 Stileinstellungen#

indoorTypeId, indoorStyleId und indoorElemId können über den Endpunkt zur API-Stilkonfiguration ausgewählt werden.

Verwenden:

Klartext
GET /api/v1/style/virtual_staging/getStyles
StilgruppeAnforderungsfeldBeschreibung
roomTypeindoorTypeIdRaumtyp-Option
styleindoorStyleIdInnenstil-Option
elementsindoorElemIdRaumelement-Option. Unterstützt mehrere durch Komma getrennte Options-IDs, z.B. id1,id2

Jede Option enthält name, id und url. Übergeben Sie die Option-id in das entsprechende Anforderungsfeld.


📥 Anfragebeispiele#

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

📤 Antwort#

Erfolgreiche Antwort

json
{
  "code": 0,
  "message": "success",
  "data": 1234567890123456789
}
FeldTypBeschreibung
codeinteger0 zeigt Erfolg an
messagestringAntwortnachricht
datalongDie eindeutige Aufgaben-ID für die Ergebnisabfrage

2. Aufgabenergebnis abrufen#

Ruft den aktuellen Status und Ausgabe einer zuvor erstellten Aufgabe zur virtuellen Raumausstattung ab.

Endpunkt

Klartext
GET /api/v1/virtualStaging/result

Anforderungsheader

KopfzeileErforderlichBeschreibung
APIKEY✅ JaIhr API Authentifizierungsschlüssel

Abfrageparameter

ParameterTypErforderlichBeschreibung
taskIdlong✅ JaDie vom Erstellungsendpunkt zurückgegebene Aufgaben-ID

📥 Anfragebeispiele#

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

📤 Antwort#

Erfolgreiche Antwort (Aufgabe abgeschlossen)

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
    }
  }
}

Antwort (Aufgabe in Bearbeitung / in Warteschlange)

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
  }
}

Antwort (Aufgabe fehlgeschlagen)

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
  }
}

Antwortfelder

FeldTypBeschreibung
idlongEindeutiger Aufgabenbezeichner
statusstringAktueller Aufgabenstatus (siehe Aufgabestatus)
waitNumberintegerAnzahl der Aufgaben vor Ihnen in der Warteschlange (0 bedeutet aktuell in Bearbeitung)
percentageintegerFortschritt der Aufgabe in Prozent (0-100)
errorReasonstringFehlergrund, wenn status Failed ist
inputobjectUrsprüngliche Eingabeparameter, die für diese Aufgabe eingereicht wurden
input.imageUrlstringAusgangsraumbild-URL
input.promptstringBenutzer-Prompt (falls bereitgestellt)
input.indoorTypeIdstringVerwendete Raumtyp-Voreinstellung (falls bereitgestellt)
input.indoorStyleIdstringVerwendete Innenstilauswahl (falls bereitgestellt)
input.indoorElemIdstringVerwendete Raumelement-Voreinstellung (falls bereitgestellt). Kann mehrere durch Komma getrennte IDs enthalten
outputobjectGenerierungsergebnis (nur verfügbar, wenn status Success ist)
output.resultUrlstringURL des generierten Ergebnisbildes der virtuellen Raumausstattung
output.widthintegerAusgabebildbreite in Pixeln
output.heightintegerAusgabebildhöhe in Pixeln

📊 Aufgabenstatus#

StatusBedeutung
UnprocessedAufgabe wurde erstellt und wartet in der Warteschlange
ProcessingAufgabe wird derzeit ausgeführt
SuccessAufgabe erfolgreich abgeschlossen
FailedAufgabe fehlgeschlagen und keine Ausgabe erzeugt

Alle 3-5 Sekunden abfragen. Siehe API Aufgabenlimit.


❌ Fehlerantworten#

Alle Fehlerantworten haben dieselbe JSON-Struktur:

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

Fehlercode-Referenz#

CodeNameBeschreibungEmpfohlene Maßnahme
1001FAILEDAnfrage fehlgeschlagen (generischer Fehler)Überprüfen Sie das message-Feld für spezifische Details
1003INTERNAL_ERRORInterner ServerfehlerWiederholen Sie nach kurzer Verzögerung; wenden Sie sich an den Support, falls es anhält
1011PARAM_ERRORAnforderungsparameterfehler (z.B. fehlendes imageUrl)Stellen Sie sicher, dass imageUrl bereitgestellt wird und eine gültige URL ist
5002API_KEY_INVALIDUngültiger oder fehlender API KeyStellen Sie sicher, dass der APIKEY Header vorhanden und korrekt ist
9010SCAN_TEXT_ERRORPrompt bestand Inhaltsprüfung nichtÜberarbeiten Sie den Prompt, um sensible oder verbotene Inhalte zu entfernen
9038PROHIBITED_CONTENTGeneriertes Ausgangsbild enthält verbotene InhaltePassen Sie Prompt/Stil/Eingaben an und wiederholen Sie
9051COINS_NOT_ENOUGHUnzureichende GuthabeneinheitenLaden Sie Guthabeneinheiten auf und wiederholen Sie

📄 Für vollständige gemeinsame Fehlerdefinitionen siehe Fehlercode-Referenz.