Moqapi
InteriorDecoratorAI API
E-ba le moralo oa AI kahare ho li-apps tsa hau. E-ba le liphetoho tsa ntloana ka ho sebelisa li-programme.
Ho qala
Ho sebelisa API, o hloka token ea API. Fumana token ea hau ho tloha ho leqephe la ak'haonte ea hau.
Lipotso tsohle tsa API li hloka ho phetheloa ka ho sebelisa sehlooho sa ho phethela.
Bopaki
Authorization: Token YOUR_API_TOKEN
E_ba le phetoho
POST /api/conversion/
Kopitsa setšoantšo'me u bonts'e mofuta oa ntloana le setaele ho etsa moralo.
Mohlala oa cURL
curl -X POST https://api.interiordecoratorai.com/interior/ \ -F "files=@room.jpg" \ -F "uuid=$(uuidgen)" \ -F "room_type=living_room" \ -F "style=modern" \ -F "space=interior"
Mohlala oa Python
import requests
import uuid
api_domain = "https://api.interiordecoratorai.com"
conversion_uuid = str(uuid.uuid4())
# Upload image for processing
with open("room.jpg", "rb") as f:
response = requests.post(
f"{api_domain}/interior/",
files={"files": f},
data={
"uuid": conversion_uuid,
"room_type": "living_room",
"style": "modern",
"space": "interior",
}
)
# Poll for results
result = requests.post(
f"{api_domain}/results/",
json={"conversion": conversion_uuid}
)
print(result.json())
Tsebisa litlaleho
POST https://api.interiordecoratorai.com/results/
Likarabo
{
"finished": true,
"files": [
{
"url": "/results/abc123.jpg",
"original": "/originals/abc123.jpg",
"thumbnail": "/thumbs/abc123.jpg"
}
]
}
Liparametara
| Parameter | _Tš'oara | E hlokahala | Bophara: |
|---|---|---|---|
files | File | Ha ho joalo | Faele ea setšoantšo (JPG, PNG) |
uuid | Sehlooho | Ha ho joalo | Setsebiso se khethehileng sa ho latela |
room_type | Sehlooho | Ha ho joalo | e.g., living_room, bedroom, kitchen |
style | Sehlooho | Ha ho joalo | e.g., modern, scandinavian, industrial |
space | Sehlooho | Ha ho joalo | "interior" or "exterior" |
renders | Integer | Ha ho joalo | Likarolo tsa liphetoho (1-4, Pro feela) |
upscale | Boole | Ha ho joalo | Ho phahamisa ho 4K (Pro feela) |