Description The /text-to-image/base Route empowers users to create stunning images directly from textual prompts. This pipeline allows for generating high-quality, photorealistic and artistic, images with a resolution of up to 1024x1024 pixels, supporting a variety of aspect ratios natively to accommodate diverse creative needs.
Examples:
prompt: A professional headshot of a CEO
This API supports various guidance methods to provide greater control over text-to-image generation. These methods condition the model on additional inputs derived from user-provided images, allowing for more precise and controlled image generation.
Importantly, users can provide any image they want as input. Our pipeline automatically transforms the input image according to the selected guidance method. For example, if you choose the depth guidance method, our pipeline will extract a depth map from your provided image and use it during the generation inference.
Currently, we support the following guidance methods:
Using Guidance Methods
You can specify up to four guidance methods in a single request. Each method requires an accompanying image and a scale parameter to determine its impact on the generation inference. The table below provides detailed information about each guidance method, with an example os use:
Guidance Method | Prompt | Scale | Input Image | Guidance Image | Output Image |
---|---|---|---|---|---|
ControlNet Canny | An exotic colorful shell on the beach | 1.0 | |||
ControlNet Depth | A dog, exploring an alien planet | 0.8 | |||
ControlNet Recoloring | A vibrant photo of a woman | 1.00 | |||
ControlNet Color Grid | A dynamic fantasy illustration of an erupting volcano | 0.7 |
Note: When using multiple guidance methods, all input images must have the same aspect ratio, which will determine the aspect ratio of the generated results. To use a guidance method, include the following parameters in your request:
guidance_method_X
: Specify the guidance method (where X is 1, 2, 3, or 4). If the paramter guidance_method_2 is used, so does guidance_method_1 has to be used, and so on. If you would like to use only one method, use the paratmer guidance_method_1guidance_method_X_scale
: Set the impact of the guidance (0.0 to 1.0)guidance_method_X_image_file
: Provide the base64-encoded input imageBy leveraging these guidance methods, you can achieve more precise control over the generated images, tailoring them to your specific needs and creative vision.
Successful operation.
Successful operation, a model version that is no longer available was requested. The request was redirected to the latest model version.
Bad request.
Forbidden. Insufficient permissions to access the image URL..
Method not allowed.
Unsupported Media Type. Invalid file type. Supported file types are jpeg, jpg, png, webp.
Unprocessable Entity. The URL does not point to a valid image or is inaccessible.
Internal server error.
Description
The /text-to-image/fast Route is optimized for speed, enabling rapid image creation without compromising quality. This model allows for generating high-quality, photorealistic and artistic, images with a resolution of up to 1024x1024 pixels, supporting a variety of aspect ratios natively to accommodate diverse creative needs. Ideal for applications requiring quick turnaround without sacrificing image fidelity.
Advanced Customization and Access:
Beyond the API, developers interested in deeper customization can access BRIA's models directly through Hugging Face. This alternative provides access to the underlying model source code, offering additional features such as ControlNets: Canny , Depth, and ReColoring. This option is ideal for developers seeking advanced control over the image generation process and those who wish to integrate cutting-edge AI directly into their workflows.
An example:
prompt: A portrait of a Beautiful and playful ethereal singer, art deco, fantasy, intricate art deco golden designs, elegant, highly detailed, sharp focus, blurry background, teal and orange shades
BRIA FAST model 2.3:
This API supports various guidance methods to provide greater control over text-to-image generation. These methods condition the model on additional inputs derived from user-provided images, allowing for more precise and controlled image generation.
Importantly, users can provide any image they want as input. Our pipeline automatically transforms the input image according to the selected guidance method. For example, if you choose the depth guidance method, our pipeline will extract a depth map from your provided image and use it during the generation inference.
Currently, we support the following guidance methods:
Using Guidance Methods
You can specify up to four guidance methods in a single request. Each method requires an accompanying image and a scale parameter to determine its impact on the generation inference. The table below provides detailed information about each guidance method, with an example os use:
Guidance Method | Prompt | Scale | Input Image | Guidance Image | Output Image |
---|---|---|---|---|---|
ControlNet Canny | An exotic colorful shell on the beach | 1.0 | |||
ControlNet Depth | A dog, exploring an alien planet | 0.8 | |||
ControlNet Recoloring | A vibrant photo of a woman | 1.00 | |||
ControlNet Color Grid | A dynamic fantasy illustration of an erupting volcano | 0.7 |
Note: When using multiple guidance methods, all input images must have the same aspect ratio, which will determine the aspect ratio of the generated results. To use a guidance method, include the following parameters in your request:
guidance_method_X
: Specify the guidance method (where X is 1, 2, 3, or 4). If the paramter guidance_method_2 is used, so does guidance_method_1 has to be used, and so on. If you would like to use only one method, use the paratmer guidance_method_1guidance_method_X_scale
: Set the impact of the guidance (0.0 to 1.0)guidance_method_X_image_file
: Provide the base64-encoded input imageBy leveraging these guidance methods, you can achieve more precise control over the generated images, tailoring them to your specific needs and creative vision.
Successful operation.
Bad request.
Forbidden. Insufficient permissions to access the image URL..
Method not allowed.
Unsupported Media Type. Invalid file type. Supported file types are jpeg, jpg, png, webp.
Unprocessable Entity. The URL does not point to a valid image or is inaccessible.
Internal server error.
Description
The /text-to-image/hd Route is branded for projects demanding the utmost in image detail and clarity. This model allows for generating high-quality, photorealistic and artistic, images with unparalleled resolution of 1920x1080 (1:1 1536x1536) pixel, supporting a variety of aspect ratios natively to accommodate diverse creative needs.
Advanced Customization and Access:
Beyond the API, developers interested in deeper customization can access BRIA's models directly through Hugging Face. This alternative provides access to the underlying model source code, offering additional features such as ControlNets: Canny , Depth, and ReColoring. This option is ideal for developers seeking advanced control over the image generation process and those who wish to integrate cutting-edge AI directly into their workflows.
Examples:
prompt: A photo of detailed short female blond hair viewed from behind, with rich texture and clearly visible individual strands that give depth and realism, and featuring subtle waves reflect light
BRIA HD model 2.2:
prompt: A portrait of a Beautiful and playful ethereal singer, art deco, fantasy, intricate art deco golden designs, elegant, highly detailed, sharp focus, blurry background, teal and orange shades
BRIA HD model 2.2:
Successful operation.
Bad request.
Method not allowed.
Internal server error.
The /reimagine endpoint enables to generate new images based on various types of reference images, guided by a text prompt. This powerful feature allows for the creation of images that incorporate elements from existing visuals, such as structure, style, or specific attributes.
Currently, the endpoint focuses on using the structure of a reference image to guide the generation process. This is particularly useful for creating gaming visuals, illustrations, and other artistic content that builds upon existing artwork or designs.
Future updates may expand the capabilities to include different types of references and combinations, enhancing the versatility and creative potential of the image generation process.
Successful operation.
Bad request.
Forbidden. Insufficient permissions to access the image URL.
Method not allowed.
Unsupported Media Type. Invalid file type. Supported file types are jpeg, jpg, png, webp.
Unprocessable Entity. The URL does not point to a valid image or is inaccessible.
Internal server error.
{- "results": [
]
}
Description
The /prompt_enhancer route is designed to boost users' creativity by transforming simple prompts into more detailed and vivid descriptions. This helps generate richer, more diverse images. (It is also available as a built-in flag in all of our /text-to-image routes, excluding branded generation.)
We recommend using this feature by offering users a range of prompts to choose from before generating an image, enabling them to explore creative ideas.
*Works best with short to medium prompts of up to approximately 50 words.
Examples:
original prompt: A cat
enhanced prompt: A black and white photograph of a sophisticated Siamese cat, sitting in a chair next to a large window, with the urban cityscape visible in the background
Successful operation.
Bad request.
Internal server error.
{- "results": {
- "prompt variations": "A close-up, detailed illustration of a fluffy white cat sitting on a windowsill, with its eyes wide open, surrounded by soft, warm light, and a few books scattered nearby"
}
}