v1

latestOpenAPI 3.0.02026-07-13650400.5 KB
Image Generation

Reimagine

Description The /reimagine endpoint in Bria’s API allows guiding image generation not just with prompts but also by using an input image. This feature retains the original structure and depth of the input while incorporating new materials, colors, and textures to create fresh visuals.

Key Benefits

  • Simplified Structure Guidance: Use a reference image to replicate its outline and depth, reducing the need for complex prompts and minimizing trial and error.

  • Versatile Input/Output Pairings:

    • Convert illustrations, sketches, or photos into new illustrative outputs.
    • Transform photos into variations that maintain the original layout.
  • Adjustable Structure Influence: Control how much the input image's structure impacts the output on a scale from 0 to 1, allowing for diverse creative results.

  • Aspect Ratio Preservation: Ensures the output maintains the reference image's aspect ratio for layout consistency. The output resolution is approximately 1 megapixel.

  • Seamless Integration with Tailored Generation: Combine structural references with tailored models to include unique IP characteristics in the generated outputs. At the moment, tailored models trained using the 'Max' training version, are not supported in this endpoint.

Potential Use Cases

Enhanced Creative Control for Platforms & Editing Tools

Empower creative platforms and editing tools with advanced levels of control and flexibility for generating visual content.

  • Maintain Spatial Consistency

    Structure reference image

    <img src="https://bria-datasets.s3.us-east-1.amazonaws.com/api_doc/reimagine/Untitled+design+(10)+(1).png" width="200" height="200"/>

    Generated Visual (combined into a gif)

    <img src="https://bria-datasets.s3.us-east-1.amazonaws.com/api_doc/reimagine/ezgif-3-6a1c2d26ed+(1).gif" width="200" height="200"/>
  • Convert Sketches to Illustrations

    Structure reference image

    <img src="https://bria-datasets.s3.us-east-1.amazonaws.com/api_doc/reimagine/iStock-1507967542+(1).jpg" height="200"/>

    prompt: A watercolor painting of a lively urban street featuring a red vintage car parked in front of multi-story buildings, where soft, fluid brushstrokes capture the subtle gradients in the building facades, with warm earth tones blending into cool blues and grays for the shadows, giving the scene a nostalgic and dreamy atmosphere.

    structure_ref_influence: 0.75

    Generated Visual

    <img src="https://bria-datasets.s3.us-east-1.amazonaws.com/api_doc/reimagine/A_watercolor_painting_of_a_lively_urban_street_featuring_a_red_vintage_car_parke_undefined+(2).png" height="200"/>
  • Generate Diverse Variations

    Structure reference image

    <img src="https://bria-datasets.s3.us-east-1.amazonaws.com/api_doc/reimagine/cute-scottish-straight-kitten-playing-with-balls-o-2023-11-27-05-13-57-utc+(1)+(1).jpg" height="200"/>

    prompt: A ginger kitten sits on a textured beige surface, surrounded by soft balls of yarn.

    structure_ref_influence: 0.75

    Generated Visual

    <img src="https://bria-datasets.s3.us-east-1.amazonaws.com/api_doc/reimagine/seed_1405021285.png" height="200"/>
  • Stylize Typography and Logos

    Structure reference image

    <img src="https://bria-datasets.s3.us-east-1.amazonaws.com/api_doc/reimagine/BRIA+(1)+(1).png" width="200" height="200"/>

    prompt: curled orange peel.

    structure_ref_influence: 0.1

    Generated Visual

    <img src="https://bria-datasets.s3.us-east-1.amazonaws.com/api_doc/reimagine/curled_orange_peel_undefined+(1).png" width="200" height="200"/>

Interoperability with Tailored Generation

  • Reskin Gaming Assets: Maintain the structure and detail of assets while updating textures and colors for fresh looks without altering the original shape or layout.

  • Iterate on Gaming Asset Designs: Simplifies design iteration for gaming assets, enabling rapid exploration and refinement.

  • Customize Marketing Assets: Transform marketing visuals while preserving their composition, adding new styles and elements with structural guidance.

  • Adapt User-Generated Content: Repurpose user-generated content for marketing campaigns, making it fit seamlessly with brand aesthetics.

For practical tips, view our guide here.

post/reimagine

Headers

api_tokenstring required

Request body

structure_image_urlstring

A publicly available URL of the structure reference image. If both structure_image_url and structure_image_file are provided, structure_image_url will be used. Accepted formats are jpeg, jpg, png, webp. Maximum file size 12MB.

structure_image_filestring

The image file containing the structure reference, in base64 format. This parameter is used if structure_image_url is not provided. Accepted formats are jpeg, jpg, png, webp. Maximum file size 12MB.

structure_ref_influencenumber float

The influence of the structure reference on the generated image. This parameter is optional. Higher value means more adherence to the reference structure.

promptstring

The text prompt describing the desired output image.

num_resultsinteger

How many images you would like to generate. This parameter is optional. When fast=false, only num_results=1 is supported.

syncboolean

Determines the response mode. When true, responses are synchronous. With false, responses are asynchronous, immediately providing URLs for images that are generated in the background. Use polling for the URLs to retrieve images once ready. This parameter is optional. When fast=false, it is reomcmned to use sync=false.

fastboolean

Determines the generation mode. When true, the generation will utilize the fast mode which provides the best balance between speed and quality. When false, the regular mode will be utilized.

seedinteger

You can choose whether you want your generated result to be random or predictable. You can recreate the same result in the future by using the seed value of a result from the response with the prompt and other parameters. This parameter is optional.

tailored_model_idstring

The ID of the tailored model to use for generation. This parameter is optional. At the moment, tailored models trained using the 'Max' training version, are not supported in this endpoint.

tailored_model_influencenumber float

The influence of the tailored model on the generation. Only relevant if tailored_model_id is provided. This parameter is optional. Higher value gives more weight to the tailored model.

include_generation_prefixboolean

This is relevant only when a tailored model is being used. When true, the model's generation prefix is automatically prepended to your prompt to maintain consistency with the training data, while false allows you to override the training prefix and write the complete prompt yourself, including any preferred prefix text.

steps_numinteger

The number of iterations the model goes through to refine the generated image. This parameter is optional. When fast=false, the default value is 30, the minimum is 20 and the maximum is 50.

Response

Successful operation.