API zur Gartengestaltung Dokumentation#
Basis-URL:
https://api.ideal.house
Version: v1
Aktualisiert: 2026-05-21
📖 Übersicht#
Die API zur Gartengestaltung verbessert oder gestaltet Außenanlagen anhand eines Ausgangsbilds neu. Sie unterstützt optionale Textvorgaben, Gartenstile, Landschaftselemente und Modellmodi.
Der Arbeitsablauf ist asynchron:
- Aufgabe erstellen — Senden Sie
imageUrlund optionale Parameter, dann erhalten Sie einetaskId. - Ergebnisse regelmäßig abfragen — Verwenden Sie
taskId, um Aufgabestatus und das generierte Bild abzurufen.
🔐 Authentifizierung#
| Kopfzeile | Wert |
|---|---|
APIKEY | your_api_key_here |
💰 Guthabenverbrauch#
[!WARNING] Guthabeneinheiten werden bei erfolgreicher Aufgabenerstellung abgezogen. Wenn die Aufgabe letztendlich fehlschlägt, werden abgezogene Guthabeneinheiten automatisch erstattet.
Unzureichende Guthabeneinheiten geben Fehlercode9051zurück. Siehe Referenz zum Guthabenverbrauch.
Modell (modelType) | Abgezogene Guthabeneinheiten |
|---|---|
Flash | 1 Guthabeneinheit |
Base | 3 Guthabeneinheiten |
Pro | 10 Guthabeneinheiten |
Wenn modelType nicht angegeben wird, wird standardmäßig Base verwendet.
🎨 Stileinstellungen#
Diese API unterstützt optionale Stilkonfigurationen, die vom API-Stilkonfiguration-Endpunkt zurückgegeben werden.
Verwenden:
GET /api/v1/style/landscaping/getStyles
| Stilgruppe | Anforderungsfeld | Beschreibung |
|---|---|---|
gardenStyle | sceneId | Garten- oder Landschaftsstiloption |
elements | sceneElementId | Landschaftselementoption. 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.
📌 API Endpunkte#
1. Aufgabe zur Gartengestaltung erstellen#
Endpunkt
POST /api/v1/landscaping/generate
Anforderungsheader
| Kopfzeile | Erforderlich | Beschreibung |
|---|---|---|
APIKEY | ✅ Ja | Ihr API Authentifizierungsschlüssel |
Content-Type | ✅ Ja | application/json |
Anforderungskörper
| Feld | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
imageUrl | string | ✅ Ja | URL des Ausgangsbilds der Außenanlage |
prompt | string | ❌ Optional | Textanleitung für das gewünschte Ergebnis |
sceneId | string | ❌ Optional | Gartengestaltungs-ID aus gardenStyle Stiloptionen |
sceneElementId | string | ❌ Optional | Landschaftselement-ID aus elements Stiloptionen. Unterstützt mehrere durch Komma getrennte IDs, z.B. id1,id2 |
modelType | string | ❌ Optional | Enum: Flash, Base, Pro. Standardmäßig Base |
Nur
imageUrlist erforderlich. Alle anderen Felder sind optional.
🖼️ Bildanforderungen: Alle Ausgangs- und Referenzbilder müssen JPG/JPEG, PNG oder WebP verwenden. 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. Bild-URLs müssen direkt vom API Server erreichbar sein.
📥 Anfragebeispiele#
cURL
curl -X POST "https://api.ideal.house/api/v1/landscaping/generate" \
-H "APIKEY: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"imageUrl": "https://example.com/backyard.jpg",
"prompt": "lush modern garden with clean stone paths",
"sceneId": "Landscape Design_Landscape Style_Mid-Century Modern Pool",
"sceneElementId": "Landscape Design_Scene Elements_Natural Elements_Flower,Landscape Design_Scene Elements_Natural Elements_Ground Cover",
"modelType": "Base"
}'
Java (OkHttp)
import okhttp3.*;
import java.io.IOException;
public class LandscapingApiExample {
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/backyard.jpg",
"prompt": "lush modern garden with clean stone paths",
"sceneId": "Landscape Design_Landscape Style_Mid-Century Modern Pool",
"sceneElementId": "Landscape Design_Scene Elements_Natural Elements_Flower,Landscape Design_Scene Elements_Natural Elements_Ground Cover",
"modelType": "Base"
}
""";
Request request = new Request.Builder()
.url(BASE_URL + "/api/v1/landscaping/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 = {
"imageUrl": "https://example.com/backyard.jpg",
"prompt": "lush modern garden with clean stone paths",
"sceneId": "Landscape Design_Landscape Style_Mid-Century Modern Pool",
"sceneElementId": "Landscape Design_Scene Elements_Natural Elements_Flower,Landscape Design_Scene Elements_Natural Elements_Ground Cover",
"modelType": "Base"
}
response = requests.post(
f"{BASE_URL}/api/v1/landscaping/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 createLandscapingTask() {
try {
const response = await axios.post(
`${BASE_URL}/api/v1/landscaping/generate`,
{
imageUrl: 'https://example.com/backyard.jpg',
prompt: 'lush modern garden with clean stone paths',
sceneId: 'Landscape Design_Landscape Style_Mid-Century Modern Pool',
sceneElementId: 'Landscape Design_Scene Elements_Natural Elements_Flower,Landscape Design_Scene Elements_Natural Elements_Ground Cover',
modelType: 'Base'
},
{
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);
}
}
createLandscapingTask();
📤 Antwort#
{
"code": 0,
"message": "success",
"data": 1234567890123456789
}
2. Aufgabenergebnis abrufen#
Endpunkt
GET /api/v1/landscaping/result
Anforderungsheader
| Kopfzeile | Erforderlich | Beschreibung |
|---|---|---|
APIKEY | ✅ Ja | Ihr API Authentifizierungsschlüssel |
Abfrageparameter
| Parameter | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
taskId | long | ✅ Ja | Vom Erstellungsendpunkt zurückgegebene Aufgaben-ID |
📥 Anfragebeispiele#
cURL
curl -X GET "https://api.ideal.house/api/v1/landscaping/result?taskId=1234567890123456789" \
-H "APIKEY: your_api_key_here"
Java (OkHttp)
import okhttp3.*;
import java.io.IOException;
public class LandscapingResultExample {
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/landscaping/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
while True:
response = requests.get(
f"{BASE_URL}/api/v1/landscaping/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)
const axios = require('axios');
const BASE_URL = 'https://api.ideal.house';
const API_KEY = 'your_api_key_here';
async function pollLandscapingResult(taskId) {
const headers = { APIKEY: API_KEY };
while (true) {
const response = await axios.get(
`${BASE_URL}/api/v1/landscaping/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));
}
}
pollLandscapingResult(1234567890123456789n);
📤 Antwortbeispiel#
{
"code": 0,
"message": "success",
"data": {
"id": 1234567890123456789,
"status": "Success",
"waitNumber": 0,
"percentage": 100,
"input": {
"imageUrl": "https://example.com/backyard.jpg",
"prompt": "lush modern garden with clean stone paths",
"sceneId": "Landscape Design_Landscape Style_Mid-Century Modern Pool",
"sceneElementId": "Landscape Design_Scene Elements_Natural Elements_Flower,Landscape Design_Scene Elements_Natural Elements_Ground Cover",
"modelType": "Base"
},
"output": {
"resultUrl": "https://cdn.ideal.house/output/landscaping_result.jpg",
"width": 1024,
"height": 1024
}
}
}
Antwort (Aufgabe in Bearbeitung / in Warteschlange)
{
"code": 0,
"message": "success",
"data": {
"id": 1234567890123456789,
"status": "Processing",
"waitNumber": 1,
"percentage": 45,
"input": {
"imageUrl": "https://example.com/backyard.jpg",
"modelType": "Base"
},
"output": null
}
}
Antwort (Aufgabe fehlgeschlagen)
{
"code": 0,
"message": "success",
"data": {
"id": 1234567890123456789,
"status": "Failed",
"waitNumber": 0,
"percentage": 0,
"input": {
"imageUrl": "https://example.com/backyard.jpg",
"modelType": "Base"
},
"output": null
}
}
📊 Aufgabenstatus#
| Status | Beschreibung |
|---|---|
Unprocessed | Aufgabe wurde erstellt und wartet in der Warteschlange |
Processing | Aufgabe wird derzeit ausgeführt |
Success | Aufgabe erfolgreich abgeschlossen |
Failed | Aufgabe fehlgeschlagen und keine Ausgabe erzeugt |
Alle 3-5 Sekunden abfragen. Siehe API Aufgabenlimit.
❌ Fehlerantworten#
| Code | Name | Beschreibung |
|---|---|---|
1011 | PARAM_ERROR | Anforderungsparameterfehler |
5002 | API_KEY_INVALID | Ungültiger oder fehlender API Schlüssel |
9010 | SCAN_TEXT_ERROR | Prompt bestand Inhaltsüberprüfung nicht |
9038 | PROHIBITED_CONTENT | Generiertes Bild enthält verbotene Inhalte |
9051 | COINS_NOT_ENOUGH | Unzureichende Guthabeneinheiten |
Für vollständige gemeinsame Fehlerdefinitionen siehe Fehlercode-Referenz.