Skip to content

Generation

Routes for generating images and structured prompts using the Fibo architecture.

Generate Image

Request

Description

Generates a new image based on your inputs.

This all-in-one endpoint first translates your input (prompt and/or images) into a structured JSON prompt using a VLM bridge. It then internally uses that JSON to generate the final, deterministic image.

Use this endpoint for professional workflows that demand the highest-fidelity interpretation of your creative vision. The response includes both the final image_url and the structured_prompt (JSON).

For advanced, programmatic control, you can also pass in your own structured_prompt (e.g., from a previous response or the /v2/structured_prompt/generate endpoint) to bypass the internal VLM bridge. This allows for precise, auditable refinement or recreation of an image, or to generate multiple variations from the same structured prompt.


Input Combination Rules

The request body must include one of the following mutually exclusive combinations:

  • prompt (Generates a new image from text)
  • images (Generates a new image inspired by a reference image)
  • images + prompt (Generates a new image inspired by an image and guided by text)
  • structured_prompt (Recreates a previous image exactly with its seed, or refines it when you change part of the JSON)
  • structured_prompt + prompt (Refines a previous image using new text instructions, combined with a seed)

Examples

Use Case 1: Using a textual prompt

  • Input Prompt: An early-2000s fashion editorial photograph in the desert at dusk, shot on a digital camera with a wide-angle lens from a low angle, lit with a strong off-camera flash against the ambient sky. The full prompt is in the first request example.
  • Output Image: Fibo 2: a fashion editorial in the desert at dusk, from a text prompt
  • Output structured_prompt: The full structured JSON returned for this example is omitted here; the response carries it in full.

Use Case 2: Drawing inspiration from a reference image

  • Input Image: Reference image: two hands toasting green cocktails
  • Input Prompt: Two hands toasting with tall glasses of pink lemonade at a rooftop party at sunset, string lights in the background, playful and colorful
  • Output Image: Fibo 2: a pink lemonade toast on a rooftop, inspired by the reference

Use Case 3: Generating from a reference image alone

  • Input Image: Reference image: a woman in a red cap holding up a can beside a white convertible
  • Output Image: Fibo 2: a new image of the same scene, from the reference image alone

Use Case 4: Refining a previously generated image

Take the structured_prompt from a previous response, change only what you want changed, and send it back with the same seed.

  • Input Image (from Use Case 1, not part of the request): Use Case 1 output
  • Input structured_prompt: the one Use Case 1 returned, with the tank top changed from white to hot pink, and seed 5555.
  • Output Image: Fibo 2: the same photograph with a hot pink tank top

Use Case 5: New aspect ratios

Fibo 2 adds 12 ratios to the nine you know, up to 5:1 and 1:5. Two of them:

  • Input Prompt: A panoramic view of a neon-lit Tokyo street at night in the rain, glowing pink and cyan signs reflected in the wet asphalt, people crossing with clear umbrellas, aspect_ratio: "21:9"
  • Output Image: Fibo 2: a 21:9 panorama of a neon-lit Tokyo street in the rain
  • Input Prompt: Dozens of rainbow-striped hot air balloons rising into a deep blue morning sky above green rolling hills, one balloon close to the camera at the top, aspect_ratio: "10:16"
  • Output Image: Fibo 2: a 10:16 view of rainbow hot air balloons over green hills

Use Case 6: Photographic styles

Pass style with a text prompt to give the image one of four photographic looks: kodak_film, hard_flash, hazy_dreamy or rough_realism.

  • Input Prompt: a woman reading on a city bus, style: "kodak_film", seed 5555
  • Output Image: Fibo 2 with the Kodak film style: a woman reading on a city bus in warm film light
Security
api_token
Bodyapplication/json
promptstring

Text-based instruction. Can be used alone to create a new prompt, or as a refinement command with an images or structured_prompt.

imagesArray of strings, <= 1 items

Publicly available URL or Base64-encoded image. Currently supports a single image. Supported formats: JPEG, JPG, PNG, WEBP.

structured_promptstring

A string containing the structured prompt in JSON format. Use a structured_prompt from a previous generation's response or the /v2/structured_prompt/generate endpoint for precise refinement.

resolutionstring

Output image resolution. "4MP" improves image details, especially for photorealism, but will increase latency by 30 seconds. 4MP is supported only on the asynchronous path, so it must be requested with sync set to false (the default). A synchronous 4MP request returns 422.

Default:"1MP"
Enum:"1MP""4MP"
aspect_ratiostring

Image aspect ratio. This parameter is optional. 16:10, 10:16, 2:1, 1:2, 21:9, 9:21, 3:1, 1:3, 4:1, 1:4, 5:1 and 1:5 are rendered by Fibo 2 and return 422 on a request it doesn't serve (4MP, style_id, a refinement with both prompt and a structured prompt, or reference images without a prompt).

Default:"1:1"
Enum:"1:1""2:3""3:2""3:4""4:3""4:5""5:4""9:16""16:9""16:10"
stylestring

Photographic look for the generated image, rendered by Fibo 2 from a text prompt. This parameter is optional. Returns 422 with style_id, structured_prompt, images or 4MP resolution.

Enum:"kodak_film""hard_flash""hazy_dreamy""rough_realism"
seedinteger

Seed for deterministic generation. Uses a random seed if omitted. This parameter is optional.

syncboolean

Response mode. This parameter is optional.

  • false (default): Asynchronous. Returns 202 with a status_url to poll.
  • true: Synchronous. Holds the connection and returns 200 with the final result.
  • sync: true is not supported with a resolution of 4MP. 4MP is available on the asynchronous path only, and a synchronous 4MP request returns 422.
Default:false
webhook_urlstring, (uri)

Optional URL for receiving the result via webhook when the async job completes. See webhooks.

output_typestring

The desired output format

Default:"png"
Enum:"png""jpeg"
ip_signalboolean

If true, returns a warning for potential IP content in the prompt parameter. This parameter is optional.

Default:false
prompt_content_moderationboolean

If true, returns 422 on input prompt moderation failure in the prompt parameter. This parameter is optional.

Default:true
visual_input_content_moderationboolean

If true, returns 422 on visual input moderation failure. This parameter is optional.

Default:true
visual_output_content_moderationboolean

If true, returns 422 on visual output moderation failure. This parameter is optional.

Default:true
POST
/image/generate
from bria_client import BriaSyncClient

client = BriaSyncClient()  # reads BRIA_API_TOKEN

response = client.run(
    endpoint="image/generate",
    payload={
        "prompt": "a woman reading on a city bus",
        "style": "kodak_film",
        "seed": 5555,
    },
)
print(response.result.image_url)

Responses

Successful operation (Synchronous Success)

Bodyapplication/json
resultobjectrequired
request_idstringrequired
warningstring

Returned only when ip_signal = true and the prompt field included IP content.

Response
{ "result": { "image_url": "string", "seed": 0, "structured_prompt": "string" }, "request_id": "string", "warning": "string" }