> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gmicloud.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# bria-fibo-edit-2.0

> API usage guide for bria-fibo-edit-2.0.

**Model ID**

```bash theme={null}
bria-fibo-edit-2.0
```

**Calling method:** sync

# bria-fibo-edit-2.0 API Usage Guide

## Overview

**bria-fibo-edit-2.0** is BRIA's image editing model. It edits one to four source images based on a text instruction, and can optionally be constrained with a mask or refined using a structured instruction returned from a previous edit.

Requests are submitted to the request-queue API and results are retrieved via polling.

## Authentication

All API requests require authentication using an API key. Include your API key in the Authorization header:

```bash theme={null}
Authorization: Bearer YOUR_API_KEY
```

## Submit Edit Request

### Base URL

```
https://console.gmicloud.ai
```

### Endpoint

```
POST /api/v1/ie/requestqueue/apikey/requests
```

### Request Format

```bash theme={null}
curl -X POST "https://console.gmicloud.ai/api/v1/ie/requestqueue/apikey/requests" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "bria-fibo-edit-2.0",
    "payload": {
      "images": ["https://example.com/source_photo.jpg"],
      "instruction": "Make the sky blue and add soft clouds.",
      "aspect_ratio": "3:2",
      "output_type": "png"
    }
  }'
```

### Request Parameters

| Parameter | Type | Required | Description | Default | Constraints |
| - | - | - | - | - | - |
| `model` | string | Yes | Model identifier | - | Must be `"bria-fibo-edit-2.0"` |
| `payload.images` | array of images | Yes | Source or reference images to edit (URL or Base64-encoded JPEG, PNG or WEBP) | - | 1 to 4 images |
| `payload.instruction` | string | No (see note) | Text edit instruction, for example "make the sky blue" | null | Required unless `structured_instruction` is provided |
| `payload.structured_instruction` | string | No | Structured instruction returned in a previous edit's response. Send it back, optionally with the same seed, to recreate or refine that result | null | - |
| `payload.mask` | image | No | Black-and-white mask (URL or Base64). Black areas are kept, white areas are edited | null | Single source image only; must match its dimensions |
| `payload.aspect_ratio` | string (enum) | No | Aspect ratio of the output image. If unset, the first source image's ratio is used | null | Options: "1:1", "2:3", "3:2", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9" |
| `payload.seed` | integer | No | Seed for deterministic output. Leave unset for a random result; reuse a returned seed to reproduce it | null | - |
| `payload.output_type` | string (enum) | No | File format of the edited image | "png" | Options: "png", "jpeg" |

Note: at least one of `instruction` or `structured_instruction` must be provided.

### Response

```json theme={null}
{
  "request_id": "6d2e9a4f-8b1c-4e3d-9f2a-5c7b1e0d4a68",
  "model": "bria-fibo-edit-2.0",
  "status": "queued",
  "created_at": 1772184500
}
```

## Check Request Status

### Endpoint

```
GET /api/v1/ie/requestqueue/apikey/requests/{request_id}
```

### Example

```bash theme={null}
curl -X GET "https://console.gmicloud.ai/api/v1/ie/requestqueue/apikey/requests/6d2e9a4f-8b1c-4e3d-9f2a-5c7b1e0d4a68" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

### Response

```json theme={null}
{
  "request_id": "6d2e9a4f-8b1c-4e3d-9f2a-5c7b1e0d4a68",
  "model": "bria-fibo-edit-2.0",
  "status": "success",
  "outcome": {
    "media_urls": [
      {
        "id": "0",
        "url": "https://storage.googleapis.com/gmi-generated-assets/bria_fibo_edit_output_0.png"
      }
    ],
    "structured_instruction": "STRUCTURED_INSTRUCTION_JSON_STRING",
    "seed": 271394
  }
}
```

The `structured_instruction` value is a JSON-encoded string. Pass it back unchanged in `payload.structured_instruction` to refine this result.

## Request Status Values

| Status | Description |
| - | - |
| `queued` | Request is waiting in the queue |
| `processing` | Image is currently being edited |
| `success` | Image edit completed |
| `failed` | Edit failed (check logs for details) |
| `cancelled` | Request was manually cancelled |

## Pricing

* **Pricing Type**: Per image, flat rate
* **Price**: \$0.04 per image


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.