# Bria

> Generate images and edit backgrounds, objects, composition, and resolution.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/bria

## Actions

### Add an object by description

Add an object by description.

**Inputs**

- Image (`image`, text, required): Upload a JPEG, PNG, or WebP image, or enter its public URL.
- Instruction (`instruction`, text, required): Natural language command.

**Outputs**

- `data` (object): The response from Bria.

**Example output**

```json
{
  "data": {
    "request_id": "example",
    "status_url": "example"
  }
}
```

### Blur an image background

Blur an image background.

**Inputs**

- Image (`image`, text, required): Upload a JPEG, PNG, or WebP image, or enter its public URL.
- Preserve alpha (`preserve_alpha`, true/false): Controls whether the alpha channel values from the input image are retained in the output, if the input includes an alpha channel. - When true: The output image maintains the original transparency of fully and partially transparent pixels. - When false: The output image is fully opaque. - Has no effect if the input image does not include an alpha channel.

**Outputs**

- `data` (object): The response from Bria.

**Example output**

```json
{
  "data": {
    "request_id": "example",
    "status_url": "example"
  }
}
```

### Change the season in an image

Change the season in an image.

**Inputs**

- Image (`image`, text, required): Upload a JPEG, PNG, or WebP image, or enter its public URL.
- Season (`season`, text, required): Desired season (Enum or Custom Text). One of: `spring`, `summer`, `autumn`, `winter`.

**Outputs**

- `data` (object): The response from Bria.

**Example output**

```json
{
  "data": {
    "request_id": "example",
    "status_url": "example"
  }
}
```

### Enhance an image

Enhance an image.

**Inputs**

- Image (`image`, text, required): Upload a JPEG, PNG, or WebP image, or enter its public URL.
- Seed (`seed`, number): Optional seed for controlling generation randomness. You can recreate the same result in the future by using the same seed with the same input parameters.
- Preserve alpha (`preserve_alpha`, true/false): Controls whether the alpha channel values from the input image are retained in the output, if the input includes an alpha channel.

**Outputs**

- `data` (object): The response from Bria.

**Example output**

```json
{
  "data": {
    "request_id": "example",
    "status_url": "example"
  }
}
```

### Erase an object by name

Erase an object by name.

**Inputs**

- Image (`image`, text, required): Upload a JPEG, PNG, or WebP image, or enter its public URL.
- Object name (`object_name`, text, required): The name of the object to remove (e.g., "the lamp").

**Outputs**

- `data` (object): The response from Bria.

**Example output**

```json
{
  "data": {
    "request_id": "example",
    "status_url": "example"
  }
}
```

### Expand an image

Expand an image.

**Inputs**

- Image (`image`, text, required): Upload a JPEG, PNG, or WebP image, or enter its public URL.
- Aspect ratio (`aspect_ratio`, text): Aspect ratio.
- Prompt (`prompt`, text): Optional text prompt to guide the image expansion. If not provided or left empty, a prompt will be automatically generated as part of the service based on the input image. Currently, Bria supports prompts in English only and does not support special characters.
- Seed (`seed`, number): You can choose whether you want your generated expension to be random or predictable. You can recreate the same result in the future by using the seed value of a result from the response. You can exclude this parameter if you are not interested in recreating your results. This parameter is optional.
- Preserve alpha (`preserve_alpha`, true/false): Controls whether the alpha channel values from the input image are retained in the output, if the input includes an alpha channel. - When true: The output image maintains the original transparency of fully and partially transparent pixels. - When false: The output image is fully opaque. - Has no effect if the input image does not include an alpha channel.

**Outputs**

- `data` (object): The response from Bria.

**Example output**

```json
{
  "data": {
    "request_id": "example",
    "status_url": "example"
  }
}
```

### Generate a structured prompt

Generate a structured prompt.

**Inputs**

- Prompt (`prompt`, text): Text-based instruction. Can be used alone to create a new prompt, or as a refinement command with an `images` or `structured_prompt`.
- Structured prompt (`structured_prompt`, text): A string containing the structured prompt in JSON format. Use a `structured_prompt` from a previous generation's response.
- Seed (`seed`, number): Seed for deterministic generation. Uses a random seed if omitted. This parameter is optional.

**Outputs**

- `data` (object): The response from Bria.

**Example output**

```json
{
  "data": {
    "request_id": "example",
    "status_url": "example"
  }
}
```

### Generate a structured prompt with Fibo Lite

Generate a structured prompt with Fibo Lite.

**Inputs**

- Prompt (`prompt`, text): Text-based instruction. Can be used alone to create a new prompt, or as a refinement command with an `images` or `structured_prompt`.
- Structured prompt (`structured_prompt`, text): A string containing the structured prompt in JSON format. Use a `structured_prompt` from a previous generation's response.
- Seed (`seed`, number): Seed for deterministic generation. Uses a random seed if omitted. This parameter is optional.

**Outputs**

- `data` (object): The response from Bria.

**Example output**

```json
{
  "data": {
    "request_id": "example",
    "status_url": "example"
  }
}
```

### Generate an image

Generate an image.

**Inputs**

- Prompt (`prompt`, text): Text-based instruction. Can be used alone to create a new prompt, or as a refinement command with an `images` or `structured_prompt`.
- Structured prompt (`structured_prompt`, text): A string containing the structured prompt in JSON format. Use a `structured_prompt` from a previous generation's response or the `/v2/structured_prompt/generate` endpoint for precise refinement.
- Resolution (`resolution`, text): Output image resolution. "4MP" improves image details, especially for photorealism, but will increase latency by 30 seconds. 4MP is supported only on the asynchronous path, so it must be requested with sync set to false (the default). A synchronous 4MP request returns 422. One of: `1MP`, `4MP`.
- Aspect ratio (`aspect_ratio`, text): Image aspect ratio. This parameter is optional. 16:10, 10:16, 2:1, 1:2, 21:9, 9:21, 3:1, 1:3, 4:1, 1:4, 5:1 and 1:5 are rendered by Fibo 2 and return 422 on a request it doesn't serve (4MP, `style_id`, a refinement with both `prompt` and a structured prompt, or reference images without a prompt). One of: `1:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, `16:10`, and 11 more.
- Seed (`seed`, number): Seed for deterministic generation. Uses a random seed if omitted. This parameter is optional.

**Outputs**

- `data` (object): The response from Bria.

**Example output**

```json
{
  "data": {
    "request_id": "example",
    "status_url": "example"
  }
}
```

### Generate an image with Fibo Lite

Generate an image with Fibo Lite.

**Inputs**

- Prompt (`prompt`, text): Text-based instruction. Can be used alone to create a new prompt, or as a refinement command with an `images` or `structured_prompt`.
- Structured prompt (`structured_prompt`, text): A string containing the structured prompt in JSON format. Use a `structured_prompt` from a previous generation's response or the `/v2/structured_prompt/generate/lite` endpoint for precise refinement.
- Aspect ratio (`aspect_ratio`, text): Image aspect ratio. This parameter is optional. One of: `1:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`.
- Seed (`seed`, number): Seed for deterministic generation. Uses a random seed if omitted. This parameter is optional.

**Outputs**

- `data` (object): The response from Bria.

**Example output**

```json
{
  "data": {
    "request_id": "example",
    "status_url": "example"
  }
}
```

### Get an image job

Get an image job.

**Inputs**

- Request ID (`request_id`, text, required): Unique identifier of the request.

**Outputs**

- `data` (object): The response from Bria.

**Example output**

```json
{
  "data": {
    "error": {},
    "request_id": "example",
    "result": {},
    "status": "example"
  }
}
```

### Recolor an image

Recolor an image.

**Inputs**

- Image (`image`, text, required): Upload a JPEG, PNG, or WebP image, or enter its public URL.
- Color (`color`, text, required): The restoration/color style ID. One of: `color_contemporary` (Color contemporary), `color_vivid` (Color vivid), `black_and_white` (Black and white), `sepia_vintage` (Sepia vintage).

**Outputs**

- `data` (object): The response from Bria.

**Example output**

```json
{
  "data": {
    "request_id": "example",
    "status_url": "example"
  }
}
```

### Relight an image

Relight an image.

**Inputs**

- Image (`image`, text, required): Upload a JPEG, PNG, or WebP image, or enter its public URL.
- Light type (`light_type`, text, required): Type (e.g., "sunset", "studio", "neon"). One of: `midday`, `blue hour light`, `low-angle sunlight`, `sunrise light`, `spotlight on subject, keep background settings`, `overcast light`, `soft overcast daylight lighting`, `cloud-filtered lighting`, `fog-diffused lighting`, `moonlight lighting`, and 3 more.

**Outputs**

- `data` (object): The response from Bria.

**Example output**

```json
{
  "data": {
    "request_id": "example",
    "status_url": "example"
  }
}
```

### Remove an image background

Remove an image background.

**Inputs**

- Image (`image`, text, required): Upload a JPEG, PNG, or WebP image, or enter its public URL.
- Prompt (`prompt`, text): Prompt.
- Preserve alpha (`preserve_alpha`, true/false): Preserve alpha.

**Outputs**

- `data` (object): The response from Bria.

**Example output**

```json
{
  "data": {
    "request_id": "example",
    "status_url": "example"
  }
}
```

### Replace an image background

Replace an image background.

**Inputs**

- Image (`image`, text, required): Upload a JPEG, PNG, or WebP image, or enter its public URL.
- Mode (`mode`, text): Mode. One of: `base`, `high_control` (High control), `fast`, `fibo2`.
- Prompt (`prompt`, text): Text description of the new scene or background for the provided image. Use English, without special characters. Aim for about 50 to 60 words for base or fast mode, or about 90 to 110 words for high control or Fibo 2.
- Refine prompt (`refine_prompt`, true/false): When `true`, an LLM rewrites `prompt` into a more detailed scene description, using the product in the image as context, and the background is generated from the rewritten prompt. The rewritten prompt is returned as `refined_prompt`. Applies in every mode, `fibo2` included. Ignored when `ref_images` is sent.
- Seed (`seed`, number): You can choose whether you want your generated results to be random or predictable. You can recreate the same result in the future by using the seed value of a result from the response. You can exclude this parameter if you are not interested in recreating your results. This parameter is optional.

**Outputs**

- `data` (object): The response from Bria.

**Example output**

```json
{
  "data": {
    "request_id": "example",
    "status_url": "example"
  }
}
```

### Replace an object by description

Replace an object by description.

**Inputs**

- Image (`image`, text, required): Upload a JPEG, PNG, or WebP image, or enter its public URL.
- Instruction (`instruction`, text, required): Natural language command.

**Outputs**

- `data` (object): The response from Bria.

**Example output**

```json
{
  "data": {
    "request_id": "example",
    "status_url": "example"
  }
}
```

### Restore an image

Restore an image.

**Inputs**

- Image (`image`, text, required): Upload a JPEG, PNG, or WebP image, or enter its public URL.

**Outputs**

- `data` (object): The response from Bria.

**Example output**

```json
{
  "data": {
    "request_id": "example",
    "status_url": "example"
  }
}
```

### Restyle an image

Restyle an image.

**Inputs**

- Image (`image`, text, required): Upload a JPEG, PNG, or WebP image, or enter its public URL.
- Style (`style`, text, required): Style Enum OR custom free text description. One of: `render_3d` (Render 3d), `cubism`, `oil_painting` (Oil painting), `anime`, `cartoon`, `coloring_book` (Coloring book), `retro_ad` (Retro ad), `pop_art_halftone` (Pop art halftone), `vector_art` (Vector art), `story_board` (Story board), and 3 more.

**Outputs**

- `data` (object): The response from Bria.

**Example output**

```json
{
  "data": {
    "request_id": "example",
    "status_url": "example"
  }
}
```

### Rewrite text in an image

Rewrite text in an image.

**Inputs**

- Image (`image`, text, required): Upload a JPEG, PNG, or WebP image, or enter its public URL.
- New text (`new_text`, text, required): The new string to appear in the image.

**Outputs**

- `data` (object): The response from Bria.

**Example output**

```json
{
  "data": {
    "request_id": "example",
    "status_url": "example"
  }
}
```

### Update a structured prompt from edits

Update a structured prompt from edits.

**Inputs**

- Structured prompt (`structured_prompt`, text, required): A string containing the original structured prompt in JSON format.
- User adjusted structured prompt (`user_adjusted_structured_prompt`, text, required): A string containing the manually modified structured prompt in JSON format.
- Seed (`seed`, number): Seed for deterministic generation. Uses a random seed if omitted.

**Outputs**

- `data` (object): The response from Bria.

**Example output**

```json
{
  "data": {
    "request_id": "example",
    "status_url": "example"
  }
}
```
