Room AI

Landscape AI

1 tokenExterior

Generate landscape designs matched to location

Overview

Landscape AI generates outdoor landscape designs from photos or masks. It can transform a yard, garden, or outdoor area into a professionally landscaped space. Optionally, provide a city name and sun direction to get climate-appropriate plant recommendations and sun-conscious placement.

Image + mask input

Endpoint

POST /api/v1/generate
bash
curl -X POST https://roomai.com/api/v1/generate \
  -H "Authorization: Bearer rai_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"model": "landscape", ...}'

Parameters

ParameterTypeDescription
modelstring

Must be "landscape".

landscape
imagestring

URL of the outdoor area photo.

mask_imagestring

URL of a mask image highlighting the area to landscape. White areas are redesigned, black areas are preserved.

promptstring

Describe the desired landscape (e.g. "tropical garden with a stone path and water feature").

big_datastring

JSON string with location context: {"city": "Los Angeles", "sun": "South"}. Helps AI select climate-appropriate plants.

Sun directions: North, South, East, West
formatstring

Output format.

Default: "png"

png

Request Example

json
{
  "model": "landscape",
  "image": "https://example.com/backyard.jpg",
  "mask_image": "https://example.com/backyard-mask.png",
  "prompt": "Mediterranean garden with olive trees and lavender",
  "big_data": "{\"city\": \"Los Angeles\", \"sun\": \"South\"}"
}

Response

Success (200)

json
{
  "status": "success",
  "result": {
    "image_url": "https://storage.googleapis.com/...",
    "model": "landscape",
    "tokens_used": 1,
    "processing_time_ms": 4500
  }
}

Error

json
{
  "status": "error",
  "error": {
    "code": "INSUFFICIENT_TOKENS",
    "message": "Not enough tokens",
    "required": 1,
    "balance": 0
  }
}

Code Examples

cURL

bash
curl -X POST https://roomai.com/api/v1/generate \
  -H "Authorization: Bearer rai_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "landscape",
  "image": "https://example.com/backyard.jpg",
  "mask_image": "https://example.com/backyard-mask.png",
  "prompt": "Mediterranean garden with olive trees and lavender",
  "big_data": "{\"city\": \"Los Angeles\", \"sun\": \"South\"}"
}'

JavaScript / Node.js

javascript
const response = await fetch("https://roomai.com/api/v1/generate", {
  method: "POST",
  headers: {
    "Authorization": "Bearer rai_live_your_api_key",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
  "model": "landscape",
  "image": "https://example.com/backyard.jpg",
  "mask_image": "https://example.com/backyard-mask.png",
  "prompt": "Mediterranean garden with olive trees and lavender",
  "big_data": "{\"city\": \"Los Angeles\", \"sun\": \"South\"}"
}),
});

const data = await response.json();

if (data.status === "success") {
  console.log("Image URL:", data.result.image_url);
  console.log("Tokens used:", data.result.tokens_used);
} else {
  console.error("Error:", data.error.message);
}

Python

python
import requests

response = requests.post(
    "https://roomai.com/api/v1/generate",
    headers={
        "Authorization": "Bearer rai_live_your_api_key",
        "Content-Type": "application/json",
    },
    json={
  "model": "landscape",
  "image": "https://example.com/backyard.jpg",
  "mask_image": "https://example.com/backyard-mask.png",
  "prompt": "Mediterranean garden with olive trees and lavender",
  "big_data": "{\"city\": \"Los Angeles\", \"sun\": \"South\"}"
},
)

data = response.json()

if data["status"] == "success":
    print("Image URL:", data["result"]["image_url"])
    print("Tokens used:", data["result"]["tokens_used"])
else:
    print("Error:", data["error"]["message"])

Tips

  • 1Provide a mask image to control exactly which area gets landscaped — this prevents the AI from modifying the house or other structures.
  • 2Use "big_data" with your city name for climate-appropriate plant selections.
  • 3Specify sun direction so the AI places shade-loving plants in shadowed areas.
  • 4Combine with a descriptive prompt for specific landscape elements like pools, paths, or patios.