POST
javascript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 const axios = require('axios'); const api_key = "YOUR API-KEY"; const url = "https://api.segmind.com/v1/bria-reimagine"; const data = { "structure_image_url": "https://segmind-resources.s3.amazonaws.com/input/a2fd894f-6e14-4a8c-9125-124a5dddddcd-dd2c8055-316b-4bab-8d2b-00738cd94a67.png", "structure_ref_influence": 0.75, "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", "fast": true, "seed": 42, "enhance_image": false, "prompt_content_moderation": true, "content_moderation": false, "ip_signal": false, "include_generation_prefix": true, "steps_num": 12 }; (async function() { try { const response = await axios.post(url, data, { headers: { 'x-api-key': api_key } }); console.log(response.data); } catch (error) { console.error('Error:', error.response.data); } })();
RESPONSE
image/jpeg
HTTP Response Codes
200 - OKImage Generated
401 - UnauthorizedUser authentication failed
404 - Not FoundThe requested URL does not exist
405 - Method Not AllowedThe requested HTTP method is not allowed
406 - Not AcceptableNot enough credits
500 - Server ErrorServer had some issue with processing

Attributes


structure_image_urlstr ( default: https://segmind-resources.s3.amazonaws.com/input/a2fd894f-6e14-4a8c-9125-124a5dddddcd-dd2c8055-316b-4bab-8d2b-00738cd94a67.png )

Provides a URL for a reference image. Use detailed images for complex compositions.


structure_ref_influencefloat ( default: 0.75 )

Sets influence of reference image. Increase for precise adherence.

min : 0,

max : 1


promptstr *

Input text for desired image. Descriptive prompts yield detailed outputs.


fastboolean ( default: true )

Enables speed over detail. Use for quick results.


seedint ( default: 42 )

Sets image seed for reproducibility. Useful for recreating identical images.


enhance_imageboolean ( default: 1 )

Enhances image details. Enable for high-quality outputs.


prompt_content_moderationboolean ( default: true )

Moderates prompt content for safety. Disable for unmoderated input.


content_moderationboolean ( default: 1 )

Enforces image content guidelines. Disable for unrestricted creation.


ip_signalboolean ( default: 1 )

Detects potential IP issues. Useful in professional settings.


include_generation_prefixboolean ( default: true )

Adds model generation prefix. Enable for consistency with standards.


steps_numint ( default: 12 )

Sets refinement iterations. Higher values increase detail.

min : 4,

max : 50

To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.

# Bria AI Reimagine Model

## What is Bria AI Reimagine?
Bria AI Reimagine is an advanced text-to-image generation model in the Bria AI suite that lets you preserve a source layout while applying new styles and visual treatments. Unlike Base, Fast, or HD variants that focus on speed or fidelity, Reimagine uses a structure reference image (via ControlNet) to guide composition, depth, and edges so you get consistency in scene structure with full creative flexibility on texture, color, and lighting.

## Key Features
- **Structure Reference Control**  
  – Use `structure_image_url` or `structure_image_file` to anchor your composition  
  – `structure_ref_influence` slider (0–1) controls adherence to the reference  
- **ControlNet Guidance Methods**  
  – Edge detection, depth maps, recoloring, color grids for fine-grained control  
- **Speed vs. Quality Modes**  
  – Fast Mode (boolean): prioritize throughput for quick iterations  
  – HD Mode: maximize detail with higher-resolution output  
- **Reproducibility & Refinement**  
  – `seed` parameter ensures identical results across runs  
  – `steps_num` (4–50) sets diffusion iterations for more or less detail  
- **Optional Enhancements & Safety**  
  – `enhance_image`: boost clarity and sharpness  
  – `prompt_content_moderation` & `content_moderation` toggles enforce brand and safety policies  
  – `ip_signal` detection for potential copyright issues  

## Best Use Cases
- **Creative Storyboarding**: Maintain camera angles and scene blocks while iterating on color and style.  
- **Product Mockups & UI Layouts**: Preserve layout grids or wireframes and restyle for different themes.  
- **Illustration & Concept Art**: Generate consistent character or environment sketches with unique artistic treatments.  
- **Marketing & Social Media Assets**: Produce templated visuals that align across campaigns with varied moods.  

## Prompt Tips and Output Quality
- **Be Descriptive**: Detailed prompts yield richer textures and more accurate scene elements.  
- **High-Resolution References**: Supply clear structure images to avoid artifacts in complex compositions.  
- **Adjust Influence**:  
  - Lower `structure_ref_influence` (~0.3–0.5) for looser interpretation  
  - Higher values (>0.8) for strict adherence to the reference  
- **Tweak Refinement**: Increase `steps_num` (20–30) for ultra-fine details; lower it (8–12) for rough drafts.  
- **Seed Consistency**: Use the same `seed` to reproduce previous outputs exactly, perfect for A/B testing.  
- **Moderation Settings**: Toggle off moderation flags if you require unfiltered creative exploration.  

## FAQs

**Q: How do I maintain the original layout of my reference image?**  
A: Upload a clear base image via `structure_image_file` or URL and set `structure_ref_influence` high (0.75–1.0).

**Q: Can I speed up rendering without sacrificing all detail?**  
A: Enable `fast` mode for quicker drafts, then rerun in HD mode or bump up `steps_num` for final versions.

**Q: What’s the default seed and steps?**  
A: By default, `seed` is 42 and `steps_num` is 12. Adjust both for reproducibility and quality control.

**Q: How can I enforce brand-safe outputs?**  
A: Turn on `prompt_content_moderation` and `content_moderation` to filter generated images against unsafe or IP-sensitive content.

**Q: Is custom color control supported?**  
A: Yes—combine ControlNet color grid guidance with descriptive prompts for consistent color theming.