---
title: "Reimagine"
method: POST
path: "/reimagine"
tags: ["Image Generation"]
---

# Reimagine

`POST /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](https://www.notion.so/134ba153467980a28d25de394f651c4a?pvs=21).**

## Headers

- `api_token` string, required

## Request body

- object
  - `structure_image_url` string — 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_file` string — 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_influence` number, float — The influence of the structure reference on the generated image. This parameter is optional. Higher value means more adherence to the reference structure.
  - `prompt` string — The text prompt describing the desired output image.
  - `num_results` integer — How many images you would like to generate. This parameter is optional. When fast=false, only num_results=1 is supported.
  - `sync` boolean — 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.
  - `fast` boolean — 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.
  - `seed` integer — 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_id` string — 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_influence` number, 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_prefix` boolean — 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_num` integer — 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 `200`

Successful operation.

- object
  - `result` object[] — there are multiple objects in this array (based on the amount specified in num_results) and each object represents a single image.
    - `seed` integer — If you want to recreate the result again, you should use in the request the prompt and the seed of the response.
    - `urls` string — This is the URL where the generated image can be found. Bria recognizes offensive and inappropriate images. The URL will lead to a 0-byte file if an image like that is generated. It will take a few seconds for the image to become available via this URL if sync=false.

## Other responses

- `400` — Bad request.
- `403` — Forbidden. Insufficient permissions to access the image URL.
- `405` — Method not allowed.
- `415` — Unsupported Media Type. Invalid file type. Supported file types are jpeg, jpg, png, webp.
- `422` — Unprocessable Entity. The URL does not point to a valid image or is inaccessible.
- `429` — Request limit exceeded. Your account has reached its maximum allowed requests. Please upgrade your plan or try again later.
- `500` — Internal server error.

---

[API](https://skmtc.net/bria-ai/apis/the-bria-api.md) · [All operations](https://skmtc.net/bria-ai/apis/the-bria-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bria-ai/the-bria-api/revisions/2768230345a5/schema)
