# Reimagine

> Reimagine uses a structure reference for generating new images while preserving the structure of an input image, guided by text prompts.
Perfect for transforming sketches, illustrations, or photos into new illustrations. Trained exclusively on licensed data


## Overview

- **Endpoint**: `https://fal.run/bria/reimagine/3.2`
- **Model ID**: `bria/reimagine/3.2`
- **Category**: image-to-image
- **Kind**: inference
**Tags**: bria



## Pricing

- **Price**: $0.04 per images

For more details, see [fal.ai pricing](https://fal.ai/pricing).

## API Information

This model can be used via our HTTP API or more conveniently via our client libraries.
See the input and output schema below, as well as the usage examples.


### Input Schema

The API accepts the following input parameters:


- **`prompt`** (`string`, _required_):
  Prompt for image generation.
  - Examples: "Delicate, watercolor-style letters infused with shades of blue and green, accompanied by artistic, blooming flowers that blend harmoniously into a light background, giving a serene and artistic touch."

- **`num_inference_steps`** (`integer`, _optional_):
  Number of inference steps. Default value: `30`
  - Default: `30`
  - Range: `20` to `50`

- **`seed`** (`integer`, _optional_):
  Random seed for reproducibility. Default value: `5555`
  - Default: `5555`

- **`aspect_ratio`** (`AspectRatioEnum`, _optional_):
  Aspect ratio. Options: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9 Default value: `"1:1"`
  - Default: `"1:1"`
  - Options: `"1:1"`, `"2:3"`, `"3:2"`, `"3:4"`, `"4:3"`, `"4:5"`, `"5:4"`, `"9:16"`, `"16:9"`

- **`negative_prompt`** (`string`, _optional_):
  Negative prompt for image generation. Default value: `"Logo,Watermark,Ugly,Morbid,Extra fingers,Poorly drawn hands,Mutation,Blurry,Extra limbs,Gross proportions,Missing arms,Mutated hands,Long neck,Duplicate,Mutilated,Mutilated hands,Poorly drawn face,Deformed,Bad anatomy,Cloned face,Malformed limbs,Missing legs,Too many fingers"`
  - Default: `"Logo,Watermark,Ugly,Morbid,Extra fingers,Poorly drawn hands,Mutation,Blurry,Extra limbs,Gross proportions,Missing arms,Mutated hands,Long neck,Duplicate,Mutilated,Mutilated hands,Poorly drawn face,Deformed,Bad anatomy,Cloned face,Malformed limbs,Missing legs,Too many fingers"`

- **`guidance_scale`** (`float`, _optional_):
  Guidance scale for text. Default value: `5`
  - Default: `5`
  - Range: `1` to `10`

- **`truncate_prompt`** (`boolean`, _optional_):
  Whether to truncate the prompt. Default value: `true`
  - Default: `true`

- **`prompt_enhancer`** (`boolean`, _optional_):
  Whether to improve the prompt. Default value: `true`
  - Default: `true`

- **`sync_mode`** (`boolean`, _optional_):
  If true, returns the image directly in the response (increases latency).
  - Default: `false`

- **`depth_image_url`** (`string`, _optional_):
  Depth control image (file or URL). Default value: `""`
  - Default: `""`
  - Examples: "https://bria-image-repository.s3.us-east-1.amazonaws.com/BRIA+(1).png"

- **`depth_scale`** (`float`, _optional_):
  Depth control strength (0.0 to 1.0). Default value: `0.5`
  - Default: `0.5`
  - Range: `0` to `1`

- **`depth_preprocess`** (`boolean`, _optional_):
  Depth image preprocess. Default value: `true`
  - Default: `true`

- **`canny_image_url`** (`string`, _optional_):
  Canny edge control image (file or URL). Default value: `""`
  - Default: `""`
  - Examples: "https://bria-image-repository.s3.us-east-1.amazonaws.com/BRIA+(1).png"

- **`canny_preprocess`** (`boolean`, _optional_):
  Canny image preprocess. Default value: `true`
  - Default: `true`

- **`canny_scale`** (`float`, _optional_):
  Canny edge control strength (0.0 to 1.0). Default value: `0.5`
  - Default: `0.5`
  - Range: `0` to `1`



**Required Parameters Example**:

```json
{
  "prompt": "Delicate, watercolor-style letters infused with shades of blue and green, accompanied by artistic, blooming flowers that blend harmoniously into a light background, giving a serene and artistic touch."
}
```

**Full Example**:

```json
{
  "prompt": "Delicate, watercolor-style letters infused with shades of blue and green, accompanied by artistic, blooming flowers that blend harmoniously into a light background, giving a serene and artistic touch.",
  "num_inference_steps": 30,
  "seed": 5555,
  "aspect_ratio": "1:1",
  "negative_prompt": "Logo,Watermark,Ugly,Morbid,Extra fingers,Poorly drawn hands,Mutation,Blurry,Extra limbs,Gross proportions,Missing arms,Mutated hands,Long neck,Duplicate,Mutilated,Mutilated hands,Poorly drawn face,Deformed,Bad anatomy,Cloned face,Malformed limbs,Missing legs,Too many fingers",
  "guidance_scale": 5,
  "truncate_prompt": true,
  "prompt_enhancer": true,
  "depth_image_url": "https://bria-image-repository.s3.us-east-1.amazonaws.com/BRIA+(1).png",
  "depth_scale": 0.5,
  "depth_preprocess": true,
  "canny_image_url": "https://bria-image-repository.s3.us-east-1.amazonaws.com/BRIA+(1).png",
  "canny_preprocess": true,
  "canny_scale": 0.5
}
```


### Output Schema

The API returns the following output format:




## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/bria/reimagine/3.2 \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "prompt": "Delicate, watercolor-style letters infused with shades of blue and green, accompanied by artistic, blooming flowers that blend harmoniously into a light background, giving a serene and artistic touch."
   }'
```

### Python

Ensure you have the Python client installed:

```bash
pip install fal-client
```

Then use the API client to make requests:

```python
import fal_client

def on_queue_update(update):
    if isinstance(update, fal_client.InProgress):
        for log in update.logs:
           print(log["message"])

result = fal_client.subscribe(
    "bria/reimagine/3.2",
    arguments={
        "prompt": "Delicate, watercolor-style letters infused with shades of blue and green, accompanied by artistic, blooming flowers that blend harmoniously into a light background, giving a serene and artistic touch."
    },
    with_logs=True,
    on_queue_update=on_queue_update,
)
print(result)
```

### JavaScript

Ensure you have the JavaScript client installed:

```bash
npm install --save @fal-ai/client
```

Then use the API client to make requests:

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

const result = await fal.subscribe("bria/reimagine/3.2", {
  input: {
    prompt: "Delicate, watercolor-style letters infused with shades of blue and green, accompanied by artistic, blooming flowers that blend harmoniously into a light background, giving a serene and artistic touch."
  },
  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);
```


## Additional Resources

### Documentation

- [Model Playground](https://fal.ai/models/bria/reimagine/3.2)
- [API Documentation](https://fal.ai/models/bria/reimagine/3.2/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=bria/reimagine/3.2)

### fal.ai Platform

- [Platform Documentation](https://docs.fal.ai)
- [Python Client](https://docs.fal.ai/clients/python)
- [JavaScript Client](https://docs.fal.ai/clients/javascript)
