> ## 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.

# 3D Plan API

> API documentation for the generation service from a 3D plan

# 3D Plan API

The 3D Plan service allows you to generate a realistic visualization of a space from a 3D plan. Ideal for visualizing real estate projects before construction.

## Generate a renovation from a plan

**POST /api/plan/v2/generate**

This endpoint allows you to generate a realistic visual representation from a plan. As generation can take several minutes to execute, the result is not immediately available.

To get the final result, you must either provide a webhook URL or regularly query the retrieval API.

### Request Parameters

**user\_id** `string` *required*

The unique user identifier (UUID) that you can retrieve from your Developer Space

**image\_url** `string` *required*

URL of the plan image to transform (format: jpg, png)

**theme** `string` *required*

Theme of your new renovation. Values depend on the selected room type.
Examples: "MODERN", "SCANDINAVIAN", "LUXURIOUS", etc.

**webhook** `string`

The URL we call once the generation is complete

**style\_image\_url** `string`

URL of the style image to apply style base on this image (format: jpg, png)

### Response

**generation\_id** `string`

The unique generation identifier (UUID) to use with the retrieval API

**remaining\_photos** `number`

The number of photos remaining after this generation

**project\_id** `string`

The unique project identifier (UUID)

### Request Example

```bash theme={null}
curl --request POST \
--url 'https://iacrea.com/api/plan/v2/generate' \
--header x-api-key:API_KEY \
--header 'Content-Type: application/json' \
--data '{
  "user_id": "uuid",
  "image_url": "https://my-image-url.jpg",
  "theme": "MODERN",
  "room_type": "LIVING_ROOM"
}'
```

### Response Example

```json theme={null}
{
  "generation_id": "uuid",
  "remaining_photos": 100,
  "project_id": "uuid"
}
```

## Generate a variation from a plan

**POST /api/plan/v2/generate-variation**

This endpoint allows you to generate a variation from a previous plan generation result. As generation can take several minutes, the result is not immediately available.

### Request Parameters

**user\_id** `string` *required*

The unique user identifier (UUID) that you can retrieve from your Developer Space

**generation\_id** `string` *required*

The unique identifier of the previous generation you want to create a variation of

**theme** `string` *required*

Theme of your new renovation

**room\_type** `string` *required*

Your room type

### Response

**generation\_id** `string`

The unique identifier of the new generation (UUID) to use with the retrieval API

**remaining\_photos** `number`

The number of photos remaining after this generation

### Request Example

```bash theme={null}
curl --request POST \
--url 'https://iacrea.com/api/plan/v2/generate-variation' \
--header x-api-key:API_KEY \
--header 'Content-Type: application/json' \
--data '{
  "user_id": "uuid",
  "generation_id": "uuid",
  "theme": "MODERN",
  "room_type": "LIVING_ROOM"
}'
```

### Response Example

```json theme={null}
{
  "generation_id": "uuid",
  "remaining_photos": 100
}
```

## Retrieve a renovation generated from a plan

**POST /api/plan/v2/get**

This endpoint allows you to obtain the result of a previously performed generation. It lets you know the status of your generation and retrieve the URL of your generated images.

**Important note:** In case of "FAILED" status, your photos are automatically refunded.

### Request Parameters

**user\_id** `string` *required*

The unique user identifier (UUID) that you can retrieve from your Developer Space

**generation\_id** `string` *required*

The unique generation identifier (UUID) returned by the generation API

### Response

**status** `string`

The generation status: "STARTING", "PROCESSING", "SUCCEEDED", "FAILED"

**urls** `array`

An array containing the URLs of generated images (present only if status="SUCCEEDED")

**variationNumber** `number`

The number of variations already performed on this project

### Request Example

```bash theme={null}
curl --request POST \
--url 'https://iacrea.com/api/plan/v2/get' \
--header x-api-key:API_KEY \
--header 'Content-Type: application/json' \
--data '{
  "user_id": "uuid",
  "generation_id": "uuid"
}'
```

### Response Example

```json theme={null}
{
  "status": "SUCCEEDED",
  "urls": ["https://generated-image-url"],
  "variationNumber": 2
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.