Endpoints that are part of BRIA API version 2.
- Relight Image
Overview
Bria's Image Editing API equips builders with a comprehensive suite of tools for manipulating and enhancing images, ranging from open-ended textual edits to specialized, task-specific operations.
General Image Editing (FIBO Edit)
Powered by the FIBO models family, our newest endpoints enable open-ended editing using natural language instructions. This allows for:
- Global Edits: Modify the style, lighting, or atmosphere of an entire image via text prompts.
- Localized Edits: Use native masking support to precisely alter specific regions while preserving the rest of the image.
- Structured Control: Convert text instructions into structured JSON for deterministic and auditable results.
Specialized Capabilities
For focused, high-volume tasks, the API provides optimized endpoints for specific editing capabilities:
- Background Operations: Removal, replacement, and blur.
- Content Manipulation: Eraser (object removal) and generative fill.
- Image Transformation: Expansion (outpainting), resolution increase (upscaling), and automatic cropping.
- Object & Person Tools: Person modification and automatic mask generation.
Asynchronous Requests and the Status Service Bria API v2 endpoints process requests asynchronously by default. When you make an asynchronous request, the API immediately returns a request_id and a status_url instead of the final result. Use the Status Service to track the request's progress until it reaches a completed state.
See the full guide at Status Service Documentation for complete details and usage examples.
Request
Description
Transform the artistic style of an image. Accepts either a preset Style ID or a custom description.
Supported Enum IDs:
- render_3d
- cubism
- oil_painting
- anime
- cartoon
- coloring_book
- retro_ad
- pop_art_halftone
- vector_art
- story_board
- art_nouveau
- cross_etching
- wood_cut
Example: Style: "oil_painting"
| Input Image | Output Image |
|---|---|
![]() | ![]() |
The source image to be handled by the API.
Supported input types:
- Base64-encoded string - URL pointing to an image file that is publicly accessible and available at the time of processing.
Accepted formats: JPEG, JPG, PNG, WEBP.
- https://engine.prod.bria-api.com/v2/image/edit/restyle
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://engine.prod.bria-api.com/v2/image/edit/restyle \
-H 'Content-Type: application/json' \
-H 'api_token: string' \
-d '{
"image": "string",
"style": "three_d_render"
}'{ "result": { "image_url": "string", "seed": 0, "structured_instruction": "string" }, "request_id": "string", "warning": "string" }
The source image to be handled by the API.
Supported input types:
- Base64-encoded string - URL pointing to an image file that is publicly accessible and available at the time of processing.
Accepted formats: JPEG, JPG, PNG, WEBP.
Direction (e.g., "front", "side", "top-down").
- https://engine.prod.bria-api.com/v2/image/edit/relight
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://engine.prod.bria-api.com/v2/image/edit/relight \
-H 'Content-Type: application/json' \
-H 'api_token: string' \
-d '{
"image": "string",
"light_direction": "front",
"light_type": "midday"
}'{ "result": { "image_url": "string", "seed": 0, "structured_instruction": "string" }, "request_id": "string", "warning": "string" }
Request
Description
The Eraser Route enables the removal of elements or specific areas from a given image.
You can define the area to be removed by providing a mask that outlines the region to be erased. There are two main ways recommended to generate these masks:
Masks can be created by allowing users to draw directly on the image with a brush, for example. To access the SDK that demonstrates how to implement a brush feature in your interface, please refer to the following link.
By using the
/objects/mask_generatorroute, which will generate all the possible masks for an image.
Output Characteristics
- The modified image is returned at the original resolution, preserving full visual quality without any automatic resizing or downscaling.
- All areas outside the provided mask remain completely unchanged, ensuring pixel-perfect preservation of unedited regions.
The source image to be handled by the API.
Supported input types:
- Base64-encoded string
- URL pointing to an image file that is publicly accessible and available at the time of processing.
Accepted formats: JPEG, JPG, PNG, WEBP.
The binary mask image that defines the region where object generation will occur.
Mask Requirements
- The region to generate content must have a pixel value of 255 (white).
- All other areas must have a pixel value of 0 (black).
- The mask must have the same aspect ratio as the input image.
Supported Input Types
- Base64-encoded string – provide the mask data directly in the request.
- URL – provide a publicly accessible URL to the mask image.
Accepted formats: JPEG, JPG, PNG, WEBP.
Ensure that any provided URL is publicly accessible at the time of the request.
Specifies how the input mask was created.
manual(default) – Use when the mask was generated by a user, for example, using a brush tool.automatic– Use when the mask was generated by an algorithm, such as SAM or other automated segmentation methods.
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.
Specifies the response mode.
- When
false(default), the request is processed asynchronously: the API immediately returns a status URL to track progress. - When
true, the request is processed synchronously: the API hold the connection open until the proccess is complete and then returns the final image URL in the response.
When enabled, applies content moderation to input visual.
Expected behavior:
- Processing stops if the image fails moderation.
- Returns a 422 error with details about which parameter failed.
- https://engine.prod.bria-api.com/v2/image/edit/erase
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://engine.prod.bria-api.com/v2/image/edit/erase \
-H 'Content-Type: application/json' \
-H 'api_token: string' \
-d '{
"image": "example",
"mask": "example"
}'{ "result": { "image_url": "string" }, "request_id": "string" }
.png)


.png)