Bria FIBO 1.5 Serverless API
Generate photorealistic images with structured JSON prompt control.
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) 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
https://api.segmind.com/v1/bria-fibo-generateParameters
promptrequiredstringText instruction for the image. Used alone, as a refinement over a reference image, or to refine a structured prompt.
aspect_ratiooptionalstringProportions of the generated image.
"16:9""1:1""2:3""3:2""3:4""4:3""4:5""5:4""9:16""16:9"image_urlsoptionalstring (uri)Optional reference image to inspire the generation (single image). JPEG, PNG or WEBP.
ip_signaloptionalbooleanReturn a warning when the prompt may contain IP-protected content.
falseoutput_typeoptionalstring"png""png""jpeg"prompt_content_moderationoptionalbooleanReject the request (422) when the text prompt fails content moderation.
trueresolutionoptionalstring4MP improves fine detail, especially for photorealism, but adds ~30s latency.
"1MP""1MP""4MP"seedoptionalintegerSeed for deterministic generation. Combine with a structured prompt to recreate an image exactly.
123456Range: 0 - 2147483647structured_promptoptionalstring (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_idoptionalstringOptional named style preset; rewrites the prompt in that style before generation. Only for prompt-based generation.
"photoreal"visual_input_content_moderationoptionalbooleanReject the request (422) when an input image fails content moderation.
truevisual_output_content_moderationoptionalbooleanReject the request (422) when the generated image fails content moderation.
trueResponse 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
POST /v2/bria-fibo-generateSubmit — returns request_id, status_url, response_url
- 2
GET /v2/requests/{id}/statusPoll — until COMPLETED or FAILED
- 3
GET /v2/requests/{id}Result — final response body
Status states
- 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.
Bad Request
Invalid parameters or request format
Unauthorized
Missing or invalid API key
Forbidden
Insufficient permissions
Not Found
Model or endpoint not found
Insufficient Credits
Not enough credits to process request
Rate Limited
Too many requests
Server Error
Internal server error
Bad Gateway
Service temporarily unavailable
Timeout
Request timed out