# Bria Upscale Exact

> Bria Upscale Exact increases image resolution while preserving original content, facial features, text, and colors. It recovers structure and detail from low-resolution and compressed images.


## Overview

- **Endpoint**: `https://fal.run/bria/upscale/image/exact`
- **Model ID**: `bria/upscale/image/exact`
- **Category**: image-to-image
- **Kind**: inference
**Tags**: upscale, super-resolution, image enhancement, detail preservation, image-to-image



## Pricing

Your request will cost $0.08 for output images up to 24 MP, $0.16 for outputs above 24 MP and up to 48 MP, and $0.24 for outputs above 48 MP and up to 72 MP.

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:


- **`image_url`** (`string`, _required_):
  The image to upscale (file or URL): at least 256 px a side and up to 16.8 megapixels. Very long, narrow images, from about 14:1, can be refused when their tiles would be longer than the model draws in one pass.
  - Examples: "https://bria-test-images.s3.amazonaws.com/increase_res/playground/sample_input_1000x1250.png"

- **`upscale_factor`** (`float`, _optional_):
  How many times larger each side gets, from 1 to 4: 2 doubles the width and height. Leave it empty for about 4K: about 16.8 megapixels from images up to 3.8 megapixels, 2x from larger ones. Empty is not 2x: a 512 x 512 image comes back at 4096 x 4096, 8x larger; set 2 to double it. A result past 70 megapixels, or past what the model draws for a soft image, is lowered to fit.
  - Range: `1` to `4`

- **`input_sharpness`** (`float`, _optional_):
  How sharp the image really is, as its real resolution relative to its size: 1 for a sharp image, 0.5 for one enlarged 2x before it got here. Lower values make the model draw more of the detail itself, and the default size counts from the real resolution. Default value: `1`
  - Default: `1`

- **`seed`** (`integer`, _optional_):
  The start noise's seed. Seeds differ in fine detail only.
  - Default: `0`
  - Range: `0` to `4294967295`

- **`preserve_alpha`** (`boolean`, _optional_):
  Re-attach the image's transparency, resized to the result. Default value: `true`
  - Default: `true`

- **`output_format`** (`Enum`, _optional_):
  png or jpeg. Leave it empty to keep the image's format: a JPEG comes back as a JPEG, anything else as a PNG. A JPEG has no transparency, so jpeg returns the image as preserve_alpha false does.
  - Options: `"png"`, `"jpeg"`

- **`sync_mode`** (`boolean`, _optional_):
  Return the image inline instead of as a URL.
  - Default: `false`



**Required Parameters Example**:

```json
{
  "image_url": "https://bria-test-images.s3.amazonaws.com/increase_res/playground/sample_input_1000x1250.png"
}
```

**Full Example**:

```json
{
  "image_url": "https://bria-test-images.s3.amazonaws.com/increase_res/playground/sample_input_1000x1250.png",
  "input_sharpness": 1,
  "preserve_alpha": true
}
```


### Output Schema

The API returns the following output format:

- **`image`** (`Image`, _required_):
  The upscaled image, a PNG or a JPEG (see output_format).



**Example Response**:

```json
{
  "image": {
    "url": "",
    "content_type": "image/png",
    "file_name": "z9RV14K95DvU.png",
    "file_size": 4404019,
    "width": 1024,
    "height": 1024
  }
}
```


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/bria/upscale/image/exact \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "image_url": "https://bria-test-images.s3.amazonaws.com/increase_res/playground/sample_input_1000x1250.png"
   }'
```

### 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/upscale/image/exact",
    arguments={
        "image_url": "https://bria-test-images.s3.amazonaws.com/increase_res/playground/sample_input_1000x1250.png"
    },
    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/upscale/image/exact", {
  input: {
    image_url: "https://bria-test-images.s3.amazonaws.com/increase_res/playground/sample_input_1000x1250.png"
  },
  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);
```


## Deploy your own model

To run your own weights, a fine-tune or a custom pipeline on the GPUs that serve this API, deploy it on fal Serverless. GPUs from H100 (80GB) to B300 (288GB), billed per second; an H100 is $4.50/h list, as low as $2.49/h. Prices, GPU specs and deploy steps: [fal Serverless](https://fal.ai/serverless.md).

## Additional Resources

### Documentation

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

### fal.ai Platform

- [Platform Documentation](https://fal.ai/docs/documentation)
- [Python Client](https://fal.ai/docs/api-reference/client-libraries/python)
- [JavaScript Client](https://fal.ai/docs/api-reference/client-libraries/javascript)

### Other agent-readable surfaces

This file covers one model. To find anything else:

- [Platform overview](https://fal.ai/llms.txt): Entry points and representative endpoint IDs
- [Documentation index](https://fal.ai/docs/llms.txt): Every documentation page
- [Full documentation text](https://fal.ai/docs/llms-full.txt): The whole documentation inlined
- [Pricing](https://fal.ai/pricing.md): Model API and Serverless GPU prices
- [fal Serverless](https://fal.ai/serverless.md): Deploy your own models: GPU prices, specs and steps
- Any other model: `https://fal.ai/models/<endpoint-id>/llms.txt`
