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 the state-of-the-art Gemini 2.5 Flash 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, combined with a seed)
  • 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: photorealistic, high resolution rendering, balloon of lettering, "HAPPY NEW YEAR 2026", used color is Pantone Bran, Crocus, Deja vu blue, perfect composition and alignment, natural light set, white backdrop, ultra realistic, rich detail
  • Output Image: Example of text-to-image output
  • 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: Example of reference image input
  • Input Prompt: a ring inspired by the image
  • Output Image: Example of image-to-image output
  • Output structured_prompt: The full structured JSON returned for this example is omitted here; the response carries it in full.

Use Case 3: Refining a previously generated image

  • Input Image (from previous response - shouldn't be part of the refine request): Example of input image

  • Input structured_prompt (from previous response - should be part of the refine request, toegther with the seed of the visual result): The full structured JSON returned for this example is omitted here; the response carries it in full.

  • Input Refinement Prompt: add sunlight

  • Output Image: Example of refinement output

  • Output structured_prompt (refined): The full structured JSON returned for this example is omitted here; the response carries it in full.

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.

Default:"1:1"
Enum:"1:1""2:3""3:2""3:4""4:3""4:5""5:4""9:16""16:9"
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={
        "images": [
            "https://bria-datasets.s3.us-east-1.amazonaws.com/api_doc/fibo/ref_1.jpg",
        ],
    },
)
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" }