Bria Reimagine API
Bria AI Reimagine transforms reference images into detailed, styled visuals with creative flexibility.
POST /v2/bria-reimagine · 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-reimagine",
9 structure_image_url="https://segmind-resources.s3.amazonaws.com/input/a2fd894f-6e14-4a8c-9125-124a5dddddcd-dd2c8055-316b-4bab-8d2b-00738cd94a67.png",
10 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",
11 fast=True,
12 seed=42,
13 enhance_image=False,
14 prompt_content_moderation=True,
15 content_moderation=False,
16 ip_signal=False,
17 include_generation_prefix=True,
18 steps_num=12,
19)
20print(result["status"]) # COMPLETED
21print(result.get("output")) # model output (e.g. media URL)
22print(result["metrics"]["inference_time"]) # server compute seconds
23
24# --- Or submit + poll manually (track request_id, control the cadence) ---
25from segmind import SegmindClient, InferenceFailed, InferenceTimeout
26
27client = SegmindClient() # reads SEGMIND_API_KEY
28payload = {
29 "structure_image_url": "https://segmind-resources.s3.amazonaws.com/input/a2fd894f-6e14-4a8c-9125-124a5dddddcd-dd2c8055-316b-4bab-8d2b-00738cd94a67.png",
30 "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",
31 "fast": True,
32 "seed": 42,
33 "enhance_image": False,
34 "prompt_content_moderation": True,
35 "content_moderation": False,
36 "ip_signal": False,
37 "include_generation_prefix": True,
38 "steps_num": 12,
39}
40job = client.submit_async("bria-reimagine", **payload)
41print(job.request_id) # available immediately
42try:
43 result = job.wait(timeout=600, interval=1.0)
44except InferenceTimeout as e:
45 print("still running:", e.request_id)
46except InferenceFailed as e:
47 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-reimagine",
9 structure_image_url="https://segmind-resources.s3.amazonaws.com/input/a2fd894f-6e14-4a8c-9125-124a5dddddcd-dd2c8055-316b-4bab-8d2b-00738cd94a67.png",
10 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",
11 fast=True,
12 seed=42,
13 enhance_image=False,
14 prompt_content_moderation=True,
15 content_moderation=False,
16 ip_signal=False,
17 include_generation_prefix=True,
18 steps_num=12,
19)
20print(result["status"]) # COMPLETED
21print(result.get("output")) # model output (e.g. media URL)
22print(result["metrics"]["inference_time"]) # server compute seconds
23
24# --- Or submit + poll manually (track request_id, control the cadence) ---
25from segmind import SegmindClient, InferenceFailed, InferenceTimeout
26
27client = SegmindClient() # reads SEGMIND_API_KEY
28payload = {
29 "structure_image_url": "https://segmind-resources.s3.amazonaws.com/input/a2fd894f-6e14-4a8c-9125-124a5dddddcd-dd2c8055-316b-4bab-8d2b-00738cd94a67.png",
30 "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",
31 "fast": True,
32 "seed": 42,
33 "enhance_image": False,
34 "prompt_content_moderation": True,
35 "content_moderation": False,
36 "ip_signal": False,
37 "include_generation_prefix": True,
38 "steps_num": 12,
39}
40job = client.submit_async("bria-reimagine", **payload)
41print(job.request_id) # available immediately
42try:
43 result = job.wait(timeout=600, interval=1.0)
44except InferenceTimeout as e:
45 print("still running:", e.request_id)
46except InferenceFailed as e:
47 print("failed:", e.detail)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
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-reimagineSubmit — 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