Bria Fibo Structured Prompt Serverless API
Bria FIBO converts complex or nuanced inputs into structured JSON prompts with superior accuracy, returning only the JSON string for seamless visual generation.
1import requests
2import json
3
4url = "https://api.segmind.com/v1/bria-fibo-generate-structured-prompt"
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 "seed": 12345,
13 "ip_signal": false,
14 "prompt_content_moderation": true,
15 "visual_input_content_moderation": true
16}
17
18response = requests.post(url, headers=headers, json=data)
19
20if response.status_code == 200:
21 result = response.json()
22 print(json.dumps(result, indent=2))
23else:
24 print(f"Error: {response.status_code}")
25 print(response.text) 1import requests
2import json
3
4url = "https://api.segmind.com/v1/bria-fibo-generate-structured-prompt"
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 "seed": 12345,
13 "ip_signal": false,
14 "prompt_content_moderation": true,
15 "visual_input_content_moderation": true
16}
17
18response = requests.post(url, headers=headers, json=data)
19
20if response.status_code == 200:
21 result = response.json()
22 print(json.dumps(result, indent=2))
23else:
24 print(f"Error: {response.status_code}")
25 print(response.text)API Endpoint
https://api.segmind.com/v1/bria-fibo-generate-structured-promptParameters
image_urlsrequiredstring[]Provide URLs of images for reference. Example: 'https://example.com/sample.jpg'.
promptrequiredstringSpecify the scene or concept. Use detailed descriptions like 'A futuristic city skyline.'
ip_signaloptionalbooleanAlerts for potential IP conflicts. Set 'true' for notifications.
falseprompt_content_moderationoptionalbooleanFlag inappropriate text prompts. Activate to ensure safe content.
trueseedoptionalintegerUse a seed for repeatability. Example: 123 for deterministic output.
12345Range: 1 - 999999999structured_promptoptionalstringA string containing the structured prompt in JSON format. Use a structured_prompt from a previous generation's response.
nullvisual_input_content_moderationoptionalbooleanFlag inappropriate visuals. Activate for safe visual inputs.
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