Ideal House
सामग्री पर जाएं

दस्तावेज़ीकरण API लैंडस्केपिंग#

मूल URL: https://api.ideal.house
संस्करण: v1
अपडेट किया गया: 2026-05-21


📖 अवलोकन#

लैंडस्केपिंग API स्रोत इमेज से बाहरी लैंडस्केप क्षेत्रों को बेहतर बनाती है या पुनर्नवीनीकरण करती है। इसमें वैकल्पिक टेक्स्ट गाइडेंस, गार्डन स्टाइल विकल्प, लैंडस्केप एलिमेंट, और मॉडल मोड का समर्थन है।

वर्कफ्लो असिंक्रोनस है:

  1. टास्क बनाएंimageUrl और वैकल्पिक पैरामीटर सबमिट करें, फिर एक taskId प्राप्त करें।
  2. परिणामों के लिए पोल करें — टास्क स्थिति और जनरेटेड इमेज प्राप्त करने के लिए taskId का उपयोग करें।

🔐 प्रमाणीकरण#

हेडरमान
APIKEYyour_api_key_here

💰 क्रेडिट विलोपन#

[!WARNING] टास्क सफलतापूर्वक बनाए जाने पर क्रेडिट काटे जाते हैं। यदि टास्क अंततः विफल होता है, तो काटे गए क्रेडिट अपने आप वापस कर दिए जाएँगे
अपर्याप्त क्रेडिट त्रुटि कोड 9051 लौटाएंगे। देखें क्रेडिट विलोपन संदर्भ

मॉडल (modelType)विलोपित क्रेडिट
Flash1 क्रेडिट
Base3 क्रेडिट
Pro10 क्रेडिट

यदि modelType प्रदान नहीं किया गया है, तो Base डिफ़ॉल्ट रूप से उपयोग किया जाता है।


🎨 स्टाइल विकल्प#

यह API वैकल्पिक स्टाइल पैरामीटरों का समर्थन करता है जो API स्टाइल कॉन्फ़िग एंडपॉइंट द्वारा लौटते हैं।

उपयोग करें:

सादा पाठ
GET /api/v1/style/landscaping/getStyles
स्टाइल समूहरिक्वेस्ट फ़ील्डविवरण
gardenStylesceneIdगार्डन या लैंडस्केप स्टाइल विकल्प
elementssceneElementIdलैंडस्केप तत्व विकल्प। विराम से जुड़े कई विकल्प आईडी का समर्थन करता है, उदाहरण के लिए id1,id2

प्रत्येक विकल्प में name, id, और url शामिल है। संबंधित रिक्वेस्ट फ़ील्ड में विकल्प id पास करें।


📌 API एंडपॉइंट#

1. लैंडस्केपिंग टास्क बनाएं#

एंडपॉइंट

सादा पाठ
POST /api/v1/landscaping/generate

रिक्वेस्ट हेडर

हेडरआवश्यकविवरण
APIKEY✅ हाँआपका API प्रमाणीकरण कुंजी
Content-Type✅ हाँapplication/json

रिक्वेस्ट बॉडी

फ़ील्डप्रकारआवश्यकविवरण
imageUrlstring✅ हाँस्रोत लैंडस्केप इमेज का URL
promptstring❌ वैकल्पिकवांछित परिणाम के लिए टेक्स्ट गाइडेंस
sceneIdstring❌ वैकल्पिकgardenStyle शैली विकल्पों से बगीचे की शैली आईडी
sceneElementIdstring❌ वैकल्पिकelements शैली विकल्पों से लैंडस्केप तत्व आईडी। विराम से जुड़े कई आईडी का समर्थन करता है, उदाहरण के लिए id1,id2
modelTypestring❌ वैकल्पिकसूची: Flash, Base, Pro। डिफ़ॉल्ट रूप से Base

केवल 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/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)
java
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)
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/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)
javascript
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();

📤 रिस्पॉन्स#

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

2. टास्क परिणाम प्राप्त करें#

एंडपॉइंट

सादा पाठ
GET /api/v1/landscaping/result

रिक्वेस्ट हेडर

हेडरआवश्यकविवरण
APIKEY✅ हाँआपका API प्रमाणीकरण कुंजी

क्वरी पैरामीटर

पैरामीटरप्रकारआवश्यकविवरण
taskIdlong✅ आवश्यकक्रिएट एंडपॉइंट द्वारा लौटाया गया टास्क आईडी

📥 रिक्वेस्ट उदाहरण#

cURL
bash
curl -X GET "https://api.ideal.house/api/v1/landscaping/result?taskId=1234567890123456789" \
  -H "APIKEY: your_api_key_here"
Java (OkHttp)
java
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)
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/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)
javascript
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);

📤 रिस्पॉन्स उदाहरण#

json
{
  "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
    }
  }
}

रिस्पॉन्स (टास्क प्रोसेसिंग / कतार में)

json
{
  "code": 0,
  "message": "success",
  "data": {
    "id": 1234567890123456789,
    "status": "Processing",
    "waitNumber": 1,
    "percentage": 45,
    "input": {
      "imageUrl": "https://example.com/backyard.jpg",
      "modelType": "Base"
    },
    "output": null
  }
}

रिस्पॉन्स (टास्क विफल)

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

📊 टास्क स्थिति#

स्थितिविवरण
Unprocessedटास्क बनाया गया है और कतार में प्रतीक्षा कर रहा है
Processingटास्क वर्तमान में चल रहा है
Successटास्क सफलतापूर्वक पूर्ण हुआ
Failedटास्क विफल हुआ और कोई आउटपुट नहीं बना

हर 3-5 सेकंड पर पोल करें। देखें API टास्क सीमा


❌ त्रुटि रिस्पॉन्स#

कोडनामविवरण
1011PARAM_ERRORरिक्वेस्ट पैरामीटर त्रुटि
5002API_KEY_INVALIDअमान्य या अनुपस्थित API कुंजी
9010SCAN_TEXT_ERRORप्रॉम्प्ट ने कंटेंट समीक्षा में विफलता दर्ज की
9038PROHIBITED_CONTENTजनरेटेड इमेज में प्रतिबंधित कंटेंट शामिल है
9051COINS_NOT_ENOUGHअपर्याप्त क्रेडिट

संपूर्ण सामान्य त्रुटि परिभाषाओं के लिए, देखें त्रुटि कोड संदर्भ