Bria Reimagine Serverless API
Bria AI Reimagine transforms reference images into detailed, styled visuals with creative flexibility.
1import requests
2import json
3
4url = "https://api.segmind.com/v1/bria-reimagine"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "structure_image_url": "https://segmind-resources.s3.amazonaws.com/input/a2fd894f-6e14-4a8c-9125-124a5dddddcd-dd2c8055-316b-4bab-8d2b-00738cd94a67.png",
12 "prompt": "A vibrant autumn-themed coffee shop interior, with orange and red leaves visible through the windows, cozy lighting enhanced with golden hues, and the pastries decorated for fall, maintaining the original layout and perspective from the reference image",
13 "fast": true,
14 "seed": 42,
15 "enhance_image": false,
16 "prompt_content_moderation": true,
17 "content_moderation": false,
18 "ip_signal": false,
19 "include_generation_prefix": true,
20 "steps_num": 12
21}
22
23response = requests.post(url, headers=headers, json=data)
24
25if response.status_code == 200:
26 result = response.json()
27 print(json.dumps(result, indent=2))
28else:
29 print(f"Error: {response.status_code}")
30 print(response.text) 1import requests
2import json
3
4url = "https://api.segmind.com/v1/bria-reimagine"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "structure_image_url": "https://segmind-resources.s3.amazonaws.com/input/a2fd894f-6e14-4a8c-9125-124a5dddddcd-dd2c8055-316b-4bab-8d2b-00738cd94a67.png",
12 "prompt": "A vibrant autumn-themed coffee shop interior, with orange and red leaves visible through the windows, cozy lighting enhanced with golden hues, and the pastries decorated for fall, maintaining the original layout and perspective from the reference image",
13 "fast": true,
14 "seed": 42,
15 "enhance_image": false,
16 "prompt_content_moderation": true,
17 "content_moderation": false,
18 "ip_signal": false,
19 "include_generation_prefix": true,
20 "steps_num": 12
21}
22
23response = requests.post(url, headers=headers, json=data)
24
25if response.status_code == 200:
26 result = response.json()
27 print(json.dumps(result, indent=2))
28else:
29 print(f"Error: {response.status_code}")
30 print(response.text)API Endpoint
https://api.segmind.com/v1/bria-reimagineParameters
promptrequiredstringInput text for desired image. Descriptive prompts yield detailed outputs.
"A vibrant autumn-themed coffee shop interior, with orange and red leaves visible through the windows, cozy lighting enhanced with golden hues, and the pastries decorated for fall, maintaining the original layout and perspective from the reference image"content_moderationoptionalbooleanEnforces image content guidelines. Disable for unrestricted creation.
falseenhance_imageoptionalbooleanEnhances image details. Enable for high-quality outputs.
falsefastoptionalbooleanEnables speed over detail. Use for quick results.
trueinclude_generation_prefixoptionalbooleanAdds model generation prefix. Enable for consistency with standards.
trueip_signaloptionalbooleanDetects potential IP issues. Useful in professional settings.
falseprompt_content_moderationoptionalbooleanModerates prompt content for safety. Disable for unmoderated input.
trueseedoptionalintegerSets image seed for reproducibility. Useful for recreating identical images.
42steps_numoptionalintegerSets refinement iterations. Higher values increase detail.
12Range: 4 - 50structure_image_urloptionalstring (uri)Provides a URL for a reference image. Use detailed images for complex compositions.
"https://segmind-resources.s3.amazonaws.com/input/a2fd894f-6e14-4a8c-9125-124a5dddddcd-dd2c8055-316b-4bab-8d2b-00738cd94a67.png"structure_ref_influenceoptionalfloatSets influence of reference image. Increase for precise adherence.
0.75Range: 0 - 1Response Type
Returns: Image
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