Ai Home Image to Image

half-moon-ai/ai-home/edit
AI Home Edit transforms your home interior and exterior photos with realistic, prompt-based edits
Inference
Commercial use

About

🎨 General Image Editing - Flexible AI-powered image modifications

Apply a wide range of edits to images including: • Color adjustments (brightness, contrast, saturation) • Object additions/removals (add/remove furniture, decor) • Style transformations (change art style, apply filters) • Background modifications (replace or enhance backgrounds)

Perfect for: Photo retouching, creative image manipulation, design concepts

⚡ Versatile editing capabilities for diverse use cases 🎯 Customizable prompts for precise control over edits

1. Calling the API#

Install the client#

The client provides a convenient way to interact with the model API.

npm install --save @fal-ai/client

Setup your API Key#

Set FAL_KEY as an environment variable in your runtime.

export FAL_KEY="YOUR_API_KEY"

Submit a request#

The client API handles the API submit protocol. It will handle the request status updates and return the result when the request is completed.

import { fal } from "@fal-ai/client";

const result = await fal.subscribe("half-moon-ai/ai-home/edit", {
  input: {
    input_image_url: "https://v3.fal.media/files/kangaroo/BLwbXwxQI_MNwUF-P6ITl_zen_living_room_input.jpg",
    editing_type: "both",
    architecture_type: "living room-interior",
    style: "rustic-interior",
    color_palette: "golden beige"
  },
  logs: true,
  onQueueUpdate: (update) => {
    if (update.status === "IN_PROGRESS") {
      update.logs.map((log) => log.message).forEach(console.log);
    }
  },
});
console.log(result.data);
console.log(result.requestId);

2. Authentication#

The API uses an API Key for authentication. It is recommended you set the FAL_KEY environment variable in your runtime when possible.

API Key#

In case your app is running in an environment where you cannot set environment variables, you can set the API Key manually as a client configuration.
import { fal } from "@fal-ai/client";

fal.config({
  credentials: "YOUR_FAL_KEY"
});

3. Queue#

Submit a request#

The client API provides a convenient way to submit requests to the model.

import { fal } from "@fal-ai/client";

const { request_id } = await fal.queue.submit("half-moon-ai/ai-home/edit", {
  input: {
    input_image_url: "https://v3.fal.media/files/kangaroo/BLwbXwxQI_MNwUF-P6ITl_zen_living_room_input.jpg",
    editing_type: "both",
    architecture_type: "living room-interior",
    style: "rustic-interior",
    color_palette: "golden beige"
  },
  webhookUrl: "https://optional.webhook.url/for/results",
});

Fetch request status#

You can fetch the status of a request to check if it is completed or still in progress.

import { fal } from "@fal-ai/client";

const status = await fal.queue.status("half-moon-ai/ai-home/edit", {
  requestId: "764cabcf-b745-4b3e-ae38-1200304cf45b",
  logs: true,
});

Get the result#

Once the request is completed, you can fetch the result. See the Output Schema for the expected result format.

import { fal } from "@fal-ai/client";

const result = await fal.queue.result("half-moon-ai/ai-home/edit", {
  requestId: "764cabcf-b745-4b3e-ae38-1200304cf45b"
});
console.log(result.data);
console.log(result.requestId);

4. Files#

Some attributes in the API accept file URLs as input. Whenever that's the case you can pass your own URL or a Base64 data URI.

Data URI (base64)#

You can pass a Base64 data URI as a file input. The API will handle the file decoding for you. Keep in mind that for large files, this alternative although convenient can impact the request performance.

Hosted files (URL)#

You can also pass your own URLs as long as they are publicly accessible. Be aware that some hosts might block cross-site requests, rate-limit, or consider the request as a bot.

Uploading files#

We provide a convenient file storage that allows you to upload files and use them in your requests. You can upload files using the client API and use the returned URL in your requests.

import { fal } from "@fal-ai/client";

const file = new File(["Hello, World!"], "hello.txt", { type: "text/plain" });
const url = await fal.storage.upload(file);

Read more about file handling in our file upload guide.

5. Schema#

Input#

input_image_url string* required

URL of the image to do architectural editing

editing_type EditingTypeEnum* required

Type of editing. Structural editing only edits structural elements such as windows, walls etc. Virtual staging edits your furniture. Both do full editing including structural and furniture

Possible enum values: structural editing, virtual staging, both

architecture_type ArchitectureTypeEnum* required

Type of architecture for appropriate furniture selection

Possible enum values: living room-interior, bedroom-interior, kitchen-interior, dining room-interior, bathroom-interior, laundry room-interior, home office-interior, study room-interior, dorm room-interior, coffee shop-interior, gaming room-interior, restaurant-interior, office-interior, attic-interior, toilet-interior, other-interior, house-exterior, villa-exterior, backyard-exterior, courtyard-exterior, ranch-exterior, office exterior, retail-exterior, tower-exterior, apartment-exterior, school-exterior, museum-exterior, commercial-exterior, residential-exterior, other-exterior

style StyleEnum* required

Style for furniture and decor

Possible enum values: minimalistic-interior, farmhouse-interior, luxury-interior, modern-interior, zen-interior, mid century-interior, airbnb-interior, cozy-interior, rustic-interior, christmas-interior, bohemian-interior, tropical-interior, industrial-interior, japanese-interior, vintage-interior, loft-interior, halloween-interior, soho-interior, baroque-interior, kids room-interior, girls room-interior, boys room-interior, scandinavian-interior, french country-interior, mediterranean-interior, cyberpunk-interior, hot pink-interior, biophilic-interior, ancient egypt-interior, pixel-interior, art deco-interior, modern-exterior, minimalistic-exterior, farmhouse-exterior, cozy-exterior, luxury-exterior, colonial-exterior, zen-exterior, asian-exterior, creepy-exterior, airstone-exterior, ancient greek-exterior, art deco-exterior, brutalist-exterior, christmas lights-exterior, contemporary-exterior, cottage-exterior, dutch colonial-exterior, federal colonial-exterior, fire-exterior, french provincial-exterior, full glass-exterior, georgian colonial-exterior, gothic-exterior, greek revival-exterior, ice-exterior, italianate-exterior, mediterranean-exterior, midcentury-exterior, middle eastern-exterior, minecraft-exterior, morocco-exterior, neoclassical-exterior, spanish-exterior, tudor-exterior, underwater-exterior, winter-exterior, yard lighting-exterior

color_palette ColorPaletteEnum* required

Color palette for furniture and decor

Possible enum values: surprise me, golden beige, refined blues, dusky elegance, emerald charm, crimson luxury, golden sapphire, soft pastures, candy sky, peach meadow, muted sands, ocean breeze, frosted pastels, spring bloom, gentle horizon, seaside breeze, azure coast, golden shore, mediterranean gem, ocean serenity, serene blush, muted horizon, pastel shores, dusky calm, woodland retreat, meadow glow, forest canopy, riverbank calm, earthy tones, earthy neutrals, arctic mist, aqua drift, blush bloom, coral haze, retro rust, autumn glow, rustic charm, vintage sage, faded plum, electric lime, violet pulse, neon sorbet, aqua glow, fluorescent sunset, lavender bloom, petal fresh, meadow light, sunny pastures, frosted mauve, snowy hearth, icy blues, winter twilight, earthy hues, stone balance, neutral sands, slate shades

additional_elements string

Additional elements to include in the options above (e.g., plants, lighting) Default value: ""

custom_prompt string

Custom prompt for architectural editing, it overrides above options when used Default value: ""

output_format OutputFormatEnum

The format of the generated image. Choose from: 'jpeg' or 'png'. Default value: "jpeg"

Possible enum values: jpeg, png

{
  "input_image_url": "https://v3.fal.media/files/kangaroo/BLwbXwxQI_MNwUF-P6ITl_zen_living_room_input.jpg",
  "editing_type": "both",
  "architecture_type": "living room-interior",
  "style": "rustic-interior",
  "color_palette": "golden beige",
  "custom_prompt": "",
  "output_format": "jpeg"
}

Output#

image Image* required

Generated image

status string* required

Status message with processing details

{
  "image": {
    "content_type": "image/jpeg",
    "url": "https://v3b.fal.media/files/b/monkey/DjC7In1m3u5B-XXDwFDP3_043cd0d5929a42a78f7d762c60bda00a.jpg"
  },
  "status": ""
}

Other types#

Image#

url string* required

The URL where the file can be downloaded from.

content_type string

The mime type of the file.

file_name string

The name of the file. It will be auto-generated if not provided.

file_size integer

The size of the file in bytes.

width integer

The width of the image in pixels.

height integer

The height of the image in pixels.

Related Models