> ## Documentation Index
> Fetch the complete documentation index at: https://docs.iacrea.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Furnishing API

> API documentation for the space furnishing service

# Furnishing API

The furnishing service allows you to virtually furnish empty spaces or replace existing furniture in your images.

## Generate a furnishing

<ParamField path="POST /api/furnish/v4/generate" />

### Request Parameters

<ParamField body="user_id" type="string" required>
  The unique user identifier (UUID)
</ParamField>

<ParamField body="image_url" type="string" required>
  URL of the space image to furnish
</ParamField>

<ParamField body="theme" type="string" required>
  The desired furnishing theme. Accepted values: MODERN, SCANDINAVIAN, COASTAL,
  FARMHOUSE, LUXURY, AMERICAN.
</ParamField>

<ParamField body="room_type" type="string" required>
  The type of room to furnish. Accepted values: LIVING\_ROOM, BEDROOM, DINING,
  HOME\_OFFICE, KIDS, OUTDOOR.
</ParamField>

<ParamField body="generation_mode" type="string">
  The generation mode (optional). Accepted values: "creative" (default),
  "realist". - "creative": Creative furnishing - "realist": Realistic furnishing
</ParamField>

<ParamField body="prompt" type="string">
  Custom prompt for furnishing (optional).
</ParamField>

<ParamField body="webhook" type="string">
  Webhook URL for notifications (optional)
</ParamField>

### Available values for room\_type

The following values are accepted for the `room_type` parameter:

* `LIVING_ROOM` - Living room
* `BEDROOM` - Bedroom
* `DINING` - Dining room
* `HOME_OFFICE` - Home office
* `KIDS` - Kids room
* `OUTDOOR` - Outdoor space

### Available values for theme

The following values are accepted for the `theme` parameter:

* `MODERN` - Modern style
* `SCANDINAVIAN` - Scandinavian style
* `COASTAL` - Coastal style
* `FARMHOUSE` - Farmhouse style
* `LUXURY` - Luxury style
* `AMERICAN` - American style

### Response

<ResponseField name="generation_id" type="string">
  The unique generation identifier (UUID)
</ResponseField>

<ResponseField name="remaining_photos" type="number">
  The number of photo credits remaining for the user
</ResponseField>

<ResponseField name="project_id" type="string">
  The unique project identifier (UUID)
</ResponseField>

### Request Example

```bash theme={null}
curl -X POST https://api.iacrea.ai/api/furnish/v4/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "user_id": "123e4567-e89b-12d3-a456-426614174000",
    "image_url": "https://example.com/empty-space.jpg",
    "theme": "MODERN",
    "room_type": "LIVING_ROOM"
  }'
```

### Response Example

```json theme={null}
{
  "generation_id": "123e4567-e89b-12d3-a456-426614174001",
  "remaining_photos": 7,
  "project_id": "123e4567-e89b-12d3-a456-426614174002"
}
```

## Generate a variation

<ParamField path="POST /api/furnish/v4/generate-variation" />

This API allows you to generate variations from a previous result.

### Request Parameters

<ParamField body="user_id" type="string" required>
  The unique user identifier (UUID)
</ParamField>

<ParamField body="generation_id" type="string" required>
  The identifier of the previous generation you want to create a variation of
</ParamField>

<ParamField body="theme" type="string" required>
  The desired furnishing theme. Accepted values: MODERN, SCANDINAVIAN, COASTAL,
  FARMHOUSE, LUXURY, AMERICAN.
</ParamField>

<ParamField body="room_type" type="string" required>
  The type of room to furnish. Accepted values: LIVING\_ROOM, BEDROOM, DINING,
  HOME\_OFFICE, KIDS, OUTDOOR.
</ParamField>

<ParamField body="generation_mode" type="string">
  The generation mode (optional). Accepted values: "creative" (default),
  "realist". - "creative": Creative furnishing - "realist": Realistic furnishing
</ParamField>

<ParamField body="prompt" type="string">
  Custom prompt for furnishing (optional).
</ParamField>

<ParamField body="webhook" type="string">
  Webhook URL for notifications (optional)
</ParamField>

### Response

<ResponseField name="generation_id" type="string">
  The unique identifier of the new generation (UUID)
</ResponseField>

### Request Example

```bash theme={null}
curl -X POST https://api.iacrea.ai/api/furnish/v4/generate-variation \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "user_id": "123e4567-e89b-12d3-a456-426614174000",
    "generation_id": "123e4567-e89b-12d3-a456-426614174001",
    "theme": "SCANDINAVIAN",
    "room_type": "LIVING_ROOM"
  }'
```

### Response Example

```json theme={null}
{
  "generation_id": "123e4567-e89b-12d3-a456-426614174003"
}
```

## Retrieve a furnishing

<ParamField path="POST /api/furnish/v4/get" />

### Request Parameters

<ParamField body="user_id" type="string" required>
  The unique user identifier (UUID)
</ParamField>

<ParamField body="generation_id" type="string" required>
  The unique generation identifier (UUID) returned by the
  `/api/furnish/v4/generate` or `/api/furnish/v4/generate-variation` endpoint
</ParamField>

### Response

The endpoint returns the generation status and the URLs of the resulting images when processing is complete.

<ResponseField name="status" type="string">
  Generation status: "starting", "in\_progress", "succeeded", "failed"
</ResponseField>

<ResponseField name="urls" type="array">
  URLs of the furnished images (only present if status="succeeded")
</ResponseField>

<ResponseField name="variationNumber" type="number">
  Variation number (optional)
</ResponseField>

### Request Example

```bash theme={null}
curl -X POST https://api.iacrea.ai/api/furnish/v4/get \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "user_id": "123e4567-e89b-12d3-a456-426614174000",
    "generation_id": "123e4567-e89b-12d3-a456-426614174001"
  }'
```

### Response Example

```json theme={null}
{
  "status": "succeeded",
  "urls": ["https://example.com/furnished-space.jpg"]
}
```
