> ## 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-generate-2.0

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

**Model ID**

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

**Calling method:** sync

# bria-fibo-generate-2.0 API Usage Guide

## Overview

**bria-fibo-generate-2.0** is BRIA's text-to-image generation model. It creates images from a text prompt, and can optionally be guided by a reference image or refined using a structured prompt returned from a previous generation.

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 Generation 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-generate-2.0",
    "payload": {
      "prompt": "A cinematic portrait of a lighthouse keeper at dusk, moody lighting.",
      "resolution": "1MP",
      "aspect_ratio": "3:2",
      "style_id": "photoreal",
      "output_type": "png"
    }
  }'
```

### Request Parameters

| Parameter | Type | Required | Description | Default | Constraints |
| - | - | - | - | - | - |
| `model` | string | Yes | Model identifier | - | Must be `"bria-fibo-generate-2.0"` |
| `payload.prompt` | string | No (see note) | Text describing the image to generate | null | Required unless `images` or `structured_prompt` is provided |
| `payload.images` | image | No | Reference image to guide generation (URL or Base64-encoded JPEG, PNG or WEBP) | - | Max 1 image |
| `payload.structured_prompt` | string | No | Structured prompt returned in a previous generation's response. Send it back, optionally with the same seed, to recreate or refine that result | - | - |
| `payload.resolution` | string (enum) | No | Output image quality | "1MP" | Options: "1MP" (standard), "4MP" (high detail) |
| `payload.aspect_ratio` | string (enum) | No | Aspect ratio of the generated image | "1:1" | Options: "1:1", "2:3", "3:2", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9" |
| `payload.style_id` | string (enum) | No | Preset visual style | - | Options: "photoreal"; applied only to text-only prompts (no reference image) |
| `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 generated image | "png" | Options: "png", "jpeg" |

Note: at least one of `prompt`, `images` or `structured_prompt` must be provided.

### Response

```json theme={null}
{
  "request_id": "3ac91fe2-4b6d-4a1e-9c2f-1d7e8a5b3c90",
  "model": "bria-fibo-generate-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/3ac91fe2-4b6d-4a1e-9c2f-1d7e8a5b3c90" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

### Response

```json theme={null}
{
  "request_id": "3ac91fe2-4b6d-4a1e-9c2f-1d7e8a5b3c90",
  "model": "bria-fibo-generate-2.0",
  "status": "success",
  "outcome": {
    "media_urls": [
      {
        "id": "0",
        "url": "https://storage.googleapis.com/gmi-generated-assets/bria_fibo_output_0.png"
      }
    ],
    "structured_prompt": "STRUCTURED_PROMPT_JSON_STRING",
    "seed": 482913
  }
}
```

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

## Request Status Values

| Status | Description |
| - | - |
| `queued` | Request is waiting in the queue |
| `processing` | Image is currently being generated |
| `success` | Image generation completed |
| `failed` | Generation 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.