Bria FIBO 1.5 Serverless API

Generate photorealistic images with structured JSON prompt control.

PlaygroundAPI
Pricing
~32.35s
POST /v2/bria-fibo-generate · submit + poll
 1# pip install "segmind>=1.1.0"
 2# export SEGMIND_API_KEY="YOUR_API_KEY"
 3import segmind
 4
 5# Async (v2): submit to the queue and block until COMPLETED.
 6# run() returns the final result dict (600s deadline, 1.0s poll by default).
 7result = segmind.run(
 8    "bria-fibo-generate",
 9    prompt="A photorealistic close-up portrait of an elderly fisherman with a weathered, deeply lined face and warm brown eyes, a salt-and-pepper beard flecked with fine sea spray, wearing a bright yellow oilskin raincoat, standing at a misty harbour at golden hour, soft natural rim light, ultra-detailed skin texture and pores, sharp catchlights, shot on an 85mm lens with shallow depth of field",
10    resolution="4MP",
11    aspect_ratio="3:4",
12    seed=123456,
13    output_type="png",
14)
15print(result["status"])                      # COMPLETED
16print(result.get("output"))                  # model output (e.g. media URL)
17print(result["metrics"]["inference_time"])   # server compute seconds
18
19# --- Or submit + poll manually (track request_id, control the cadence) ---
20from segmind import SegmindClient, InferenceFailed, InferenceTimeout
21
22client = SegmindClient()                      # reads SEGMIND_API_KEY
23payload = {
24    "prompt": "A photorealistic close-up portrait of an elderly fisherman with a weathered, deeply lined face and warm brown eyes, a salt-and-pepper beard flecked with fine sea spray, wearing a bright yellow oilskin raincoat, standing at a misty harbour at golden hour, soft natural rim light, ultra-detailed skin texture and pores, sharp catchlights, shot on an 85mm lens with shallow depth of field",
25    "resolution": "4MP",
26    "aspect_ratio": "3:4",
27    "seed": 123456,
28    "output_type": "png",
29}
30job = client.submit_async("bria-fibo-generate", **payload)
31print(job.request_id)                         # available immediately
32try:
33    result = job.wait(timeout=600, interval=1.0)
34except InferenceTimeout as e:
35    print("still running:", e.request_id)
36except InferenceFailed as e:
37    print("failed:", e.detail)

API Endpoint

POSThttps://api.segmind.com/v1/bria-fibo-generate

Parameters

promptrequired
string

Text instruction for the image. Used alone, as a refinement over a reference image, or to refine a structured prompt.

aspect_ratiooptional
string

Proportions of the generated image.

Default: "16:9"
Allowed values :
"1:1""2:3""3:2""3:4""4:3""4:5""5:4""9:16""16:9"
image_urlsoptional
string (uri)

Optional reference image to inspire the generation (single image). JPEG, PNG or WEBP.

ip_signaloptional
boolean

Return a warning when the prompt may contain IP-protected content.

Default: false
output_typeoptional
string
Default: "png"
Allowed values :
PNG→"png"
JPEG→"jpeg"
prompt_content_moderationoptional
boolean

Reject the request (422) when the text prompt fails content moderation.

Default: true
resolutionoptional
string

4MP improves fine detail, especially for photorealism, but adds ~30s latency.

Default: "1MP"
Allowed values :
1MP (fast)→"1MP"
4MP (high detail)→"4MP"
seedoptional
integer

Seed for deterministic generation. Combine with a structured prompt to recreate an image exactly.

Default: 123456Range: 0 - 2147483647
structured_promptoptional
string (json)

JSON structured prompt from a previous generation (or the structured-prompt model) for precise refinement or exact recreation. Cannot be combined with a reference image.

style_idoptional
string

Optional named style preset; rewrites the prompt in that style before generation. Only for prompt-based generation.

Allowed values :
Photoreal→"photoreal"
visual_input_content_moderationoptional
boolean

Reject the request (422) when an input image fails content moderation.

Default: true
visual_output_content_moderationoptional
boolean

Reject the request (422) when the generated image fails content moderation.

Default: true

Response Type

Returns: Text/JSON

Asynchronous requests (v2)

Use Async for video, long-running (>~60s), or high-concurrency workloads; Sync is simplest for fast image & LLM calls. Async submits a request and you poll it to completion.

  1. 1
    POST /v2/bria-fibo-generate

    Submit — returns request_id, status_url, response_url

  2. 2
    GET /v2/requests/{id}/status

    Poll — until COMPLETED or FAILED

  3. 3
    GET /v2/requests/{id}

    Result — final response body

Status states

QUEUED— Accepted, waiting for a worker
PROCESSING— Running on a worker
COMPLETED— Done — result body is ready
FAILED— Errored (incl. content/RAI blocks)
  • A FAILED request is served as HTTP 422 — the body still carries the error detail.
  • An unknown or expired request_id returns HTTP 404.
  • Results are retained for 1 hour, then expire.
  • Content / RAI blocks surface as FAILED, not a separate state.
  • Track completion by polling the status endpoint.

Common Error Codes

The API returns standard HTTP status codes. Detailed error messages are provided in the response body.

400

Bad Request

Invalid parameters or request format

401

Unauthorized

Missing or invalid API key

403

Forbidden

Insufficient permissions

404

Not Found

Model or endpoint not found

406

Insufficient Credits

Not enough credits to process request

429

Rate Limited

Too many requests

500

Server Error

Internal server error

502

Bad Gateway

Service temporarily unavailable

504

Timeout

Request timed out