Bria Fibo Serverless API
Bria FIBO generates photorealistic images from structured prompts with exceptional accuracy and creative control.
1import requests
2import json
3
4url = "https://api.segmind.com/v1/bria-fibo-generate"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "prompt": "A moon-kissed rooftop garden in Paris, where strings of golden lights sway like fireflies above lavender and rosemary pots, the Eiffel Tower shimmering in the distance beyond a wrought-iron railing, and a soft breeze carries the quiet rustle of leaves and distant accordion notes into the starlit hush.",
12 "guidance_scale": 4,
13 "aspect_ratio": "1:1",
14 "steps_num": 40,
15 "seed": 123456,
16 "ip_signal": false,
17 "prompt_content_moderation": true,
18 "visual_input_content_moderation": true,
19 "visual_output_content_moderation": true
20}
21
22response = requests.post(url, headers=headers, json=data)
23
24if response.status_code == 200:
25 result = response.json()
26 print(json.dumps(result, indent=2))
27else:
28 print(f"Error: {response.status_code}")
29 print(response.text) 1import requests
2import json
3
4url = "https://api.segmind.com/v1/bria-fibo-generate"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "prompt": "A moon-kissed rooftop garden in Paris, where strings of golden lights sway like fireflies above lavender and rosemary pots, the Eiffel Tower shimmering in the distance beyond a wrought-iron railing, and a soft breeze carries the quiet rustle of leaves and distant accordion notes into the starlit hush.",
12 "guidance_scale": 4,
13 "aspect_ratio": "1:1",
14 "steps_num": 40,
15 "seed": 123456,
16 "ip_signal": false,
17 "prompt_content_moderation": true,
18 "visual_input_content_moderation": true,
19 "visual_output_content_moderation": true
20}
21
22response = requests.post(url, headers=headers, json=data)
23
24if response.status_code == 200:
25 result = response.json()
26 print(json.dumps(result, indent=2))
27else:
28 print(f"Error: {response.status_code}")
29 print(response.text)API Endpoint
https://api.segmind.com/v1/bria-fibo-generateParameters
promptrequiredstringMain instruction for the image creation. Example: 'A serene beach at dawn'.
aspect_ratiooptionalstringChoose image dimensions. 16:9 for widescreen visuals.
"16:9""1:1""2:3""3:2""3:4""4:3""4:5""5:4""9:16""16:9"guidance_scaleoptionalintegerControl prompt adherence. Higher for detailed images.
4Range: 3 - 5image_urlsoptionalstring[]URL of an input image. Use when refining existing images.
ip_signaloptionalbooleanWarns about potential IP conflicts. Set true to receive alerts.
falsenegative_promptoptionalstringExclude elements from image. Example: 'No shadows'.
prompt_content_moderationoptionalbooleanEnable to block inappropriate prompts.
trueseedoptionalintegerUse seed for repeatability. Random if omitted.
123456Range: 1 - 999999999steps_numoptionalintegerDiffusion step count. Set higher for smoother results.
40Range: 20 - 50structured_promptoptionalstring (json)A string containing the structured prompt in JSON format. Use a structured_prompt from a previous generation's response or the /v1/bria-fibo-generate endpoint for precise refinement.
visual_input_content_moderationoptionalbooleanActive when blocking inappropriate input images.
truevisual_output_content_moderationoptionalbooleanBlocks inappropriate image outputs. True if moderation needed.
trueResponse Type
Returns: Text/JSON
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