# Fibo Mashup

> Combine three images to create an amazing mashup image with Bria's FIBO model.


## Overview

- **Endpoint**: `https://fal.run/bria/fibo-mashup`
- **Model ID**: `bria/fibo-mashup`
- **Category**: image-to-image
- **Kind**: inference
**Tags**: bria, fibo, image-to-image



## Pricing

Requests will cost **$0.02** per image

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:


- **`subject_image_url`** (`string`, _required_):
  URL of the image containing the main subject.
  - Examples: "https://huggingface.co/spaces/galdavidi/FIBO-Mashup/resolve/main/assets/subject.jpg"

- **`scene_image_url`** (`string`, _required_):
  URL of the image describing the target scene or environment.
  - Examples: "https://huggingface.co/spaces/galdavidi/FIBO-Mashup/resolve/main/assets/scene.jpg"

- **`style_image_url`** (`string`, _required_):
  URL of the image representing the visual style to apply.
  - Examples: "https://huggingface.co/spaces/galdavidi/FIBO-Mashup/resolve/main/assets/style.png"

- **`return_structured_prompt`** (`boolean`, _optional_):
  Set to true to include the merged structured prompt in the response.
  - Default: `false`

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



**Required Parameters Example**:

```json
{
  "subject_image_url": "https://huggingface.co/spaces/galdavidi/FIBO-Mashup/resolve/main/assets/subject.jpg",
  "scene_image_url": "https://huggingface.co/spaces/galdavidi/FIBO-Mashup/resolve/main/assets/scene.jpg",
  "style_image_url": "https://huggingface.co/spaces/galdavidi/FIBO-Mashup/resolve/main/assets/style.png"
}
```


### Output Schema

The API returns the following output format:

- **`image`** (`Image`, _required_):
  Generated image that combines subject, scene, and style.

- **`structured_prompt`** (`object`, _optional_):
  Structured prompt used for image generation. Present only when requested.



**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/fibo-mashup \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "subject_image_url": "https://huggingface.co/spaces/galdavidi/FIBO-Mashup/resolve/main/assets/subject.jpg",
     "scene_image_url": "https://huggingface.co/spaces/galdavidi/FIBO-Mashup/resolve/main/assets/scene.jpg",
     "style_image_url": "https://huggingface.co/spaces/galdavidi/FIBO-Mashup/resolve/main/assets/style.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/fibo-mashup",
    arguments={
        "subject_image_url": "https://huggingface.co/spaces/galdavidi/FIBO-Mashup/resolve/main/assets/subject.jpg",
        "scene_image_url": "https://huggingface.co/spaces/galdavidi/FIBO-Mashup/resolve/main/assets/scene.jpg",
        "style_image_url": "https://huggingface.co/spaces/galdavidi/FIBO-Mashup/resolve/main/assets/style.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/fibo-mashup", {
  input: {
    subject_image_url: "https://huggingface.co/spaces/galdavidi/FIBO-Mashup/resolve/main/assets/subject.jpg",
    scene_image_url: "https://huggingface.co/spaces/galdavidi/FIBO-Mashup/resolve/main/assets/scene.jpg",
    style_image_url: "https://huggingface.co/spaces/galdavidi/FIBO-Mashup/resolve/main/assets/style.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);
```


## Additional Resources

### Documentation

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

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