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

# Targeted Element

> Transform a specific element of an image

# Targeted Element

Modify a specific element of your image while preserving the rest of the composition intact.

## How It Works

Our AI transforms targeted elements by:

* Precisely isolating the area to modify
* Replacing the selected element according to your instructions
* Harmoniously integrating the new element
* Preserving lighting and perspective

## Use Cases

* Changing wall or floor colors
* Replacing specific furniture
* Modifying finishes or materials
* Testing variations of decorative elements

## API

Integrate this feature into your applications:

```bash theme={null}
curl --request POST \
--url 'https://iacrea.com/api/one_element/generate' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
  "user_id": "your-user-id",
  "image_url": "https://example.com/image.jpg",
  "element": "WALL"
}'
```

### Generate a Variation

You can also create variations from a previous modification:

```bash theme={null}
curl --request POST \
--url 'https://iacrea.com/api/one_element/generate-variation' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
  "user_id": "your-user-id",
  "generation_id": "previous-generation-id",
  "room_type": "FLOOR"
}'
```

### Retrieve Results

Get the results of a generation:

```bash theme={null}
curl --request POST \
--url 'https://iacrea.com/api/one_element/get' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
  "user_id": "your-user-id",
  "generation_id": "your-generation-id"
}'
```

## Tips

* Use predefined values for the element to modify (WALL, FLOOR, etc.)
* For complex transformations, try different variations
* Well-defined and distinct elements give the best results
* Try different element types if the initial result is not satisfactory
