Image Generation

Generate Image - Base model

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

Guidance Methods

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:

  1. controlnet_canny: Extracts edge information from the input image to guide generation based on structural outlines.
  2. controlnet_depth: Derives depth information from the input image to influence spatial arrangement in generated images.
  3. controlnet_recoloring: Uses grayscale version of the input image to guide recoloring while preserving geometry.
  4. controlnet_color_grid: Extracts a 16x16 color grid from the input image to guide the overall color scheme of generated images.

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 Input Image Guidance Image Output Image
ControlNet Depth A dog, exploring an alien planet 0.8 Input Image Guidance Image Output Image
ControlNet Recoloring A vibrant photo of a woman 1.00 Input Image Guidance Image Output Image
ControlNet Color Grid A dynamic fantasy illustration of an erupting volcano 0.7 Input Image Guidance Image Output Image

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). 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_1
  • guidance_method_X_scale: Set the impact of the guidance (0.0 to 1.0)
  • guidance_method_X_image_file: Provide the base64-encoded input image

By leveraging these guidance methods, you can achieve more precise control over the generated images, tailoring them to your specific needs and creative vision.

Request
path Parameters
model_version
required
string

The model version you would like to use in the request.

Value: "2.3"
header Parameters
api_token
required
string
Request Body schema: application/json
required
prompt
string

The prompt you would like to use to generate images. Bria currently supports prompts in English only, excluding special characters.

num_results
integer [ 1 .. 4 ]
Default: 4

How many images you would like to generate. When using any Guidance Method, please use the value 1.

aspect_ratio
string
Default: "1:1"

The aspect ratio of the image. When a guidance method is being used, the aspect ratio is defined by the guidance image and this parameter is ignored.

Enum: "1:1" "2:3" "3:2" "3:4" "4:3" "4:5" "5:4" "9:16" "16:9"
sync
boolean
Default: false

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.

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, model type and model version. You can exclude this parameter if you are not interested in recreating your results. This parameter is optional.

negative_prompt
string

Specify here elements that you didn't ask in the prompt, but are being generated, and you would like to exclude. This parameter is optional. Bria currently supports prompts in English only.

steps_num
integer [ 20 .. 50 ]
Default: 30

The number of iterations the model goes through to refine the generated image. This parameter is optional.

text_guidance_scale
number <float> [ 1 .. 10 ]
Default: 5

Determines how closely the generated image should adhere to the input text description. This parameter is optional.

medium
string

Which medium should be included in your generated images. This parameter is optional.

Enum: "photography" "art"
prompt_enhancement
boolean
Default: false

When set to true, enhances the provided prompt by generating additional, more descriptive variations, resulting in more diverse and creative output images. Note that turning this flag on may result in a few additional seconds to the inference time. Built with Meta Llama 3.

guidance_method_1
string

Which guidance type you would like to include in the generation. Up to 4 guidance methods can be combined during a single inference. This parameter is optional.

Enum: "controlnet_canny" "controlnet_depth" "controlnet_recoloring" "controlnet_color_grid"
guidance_method_1_scale
number <float> [ 0 .. 1 ]
Default: 1

The impact of the guidance.

guidance_method_1_image_file
string

The image that should be used as guidance, in base64 format, with the method defined in guidance_method_1. Accepted formats are jpeg, jpg, png, webp. Maximum file size 12MB. If more then one guidance method is used, all guidance images must be of the same aspect ratio, and this will be the aspect ratio of the generated results. If guidance_method_1 is selected, an image must be provided.

guidance_method_2
string

Which guidance type you would like to include in the generation. Up to 4 guidance methods can be combined during a single inference. This parameter is optional.

Enum: "controlnet_canny" "controlnet_depth" "controlnet_recoloring" "controlnet_color_grid"
guidance_method_2_scale
number <float> [ 0 .. 1 ]
Default: 1

The impact of the guidance.

guidance_method_2_image_file
string

The image that should be used as guidance, in base64 format, with the method defined in guidance_method_2. Accepted formats are jpeg, jpg, png, webp. Maximum file size 12MB. If more then one guidance method is used, all guidance images must be of the same aspect ratio, and this will be the aspect ratio of the generated results. If guidance_method_1 is selected, an image must be provided.

Responses
200

Successful operation.

209

Successful operation, a model version that is no longer available was requested. The request was redirected to the latest model version.

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.

post/text-to-image/base/{model_version}
Request samples

Generate Image - fast model

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:

Guidance Methods

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:

  1. controlnet_canny: Extracts edge information from the input image to guide generation based on structural outlines.
  2. controlnet_depth: Derives depth information from the input image to influence spatial arrangement in generated images.
  3. controlnet_recoloring: Uses grayscale version of the input image to guide recoloring while preserving geometry.
  4. controlnet_color_grid: Extracts a 16x16 color grid from the input image to guide the overall color scheme of generated images.

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 Input Image Guidance Image Output Image
ControlNet Depth A dog, exploring an alien planet 0.8 Input Image Guidance Image Output Image
ControlNet Recoloring A vibrant photo of a woman 1.00 Input Image Guidance Image Output Image
ControlNet Color Grid A dynamic fantasy illustration of an erupting volcano 0.7 Input Image Guidance Image Output Image

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). 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_1
  • guidance_method_X_scale: Set the impact of the guidance (0.0 to 1.0)
  • guidance_method_X_image_file: Provide the base64-encoded input image

By leveraging these guidance methods, you can achieve more precise control over the generated images, tailoring them to your specific needs and creative vision.

Request
path Parameters
model_version
required
string

The model version you would like to use in the request.

Value: "2.3"
header Parameters
api_token
required
string
Request Body schema: application/json
required
prompt
string

The prompt you would like to use to generate images. Bria currently supports prompts in English only, excluding special characters.

num_results
integer [ 1 .. 4 ]
Default: 4

How many images you would like to generate.

aspect_ratio
string
Default: "1:1"

The aspect ratio of the image.

Enum: "1:1" "2:3" "3:2" "3:4" "4:3" "4:5" "5:4" "9:16" "16:9"
sync
boolean
Default: false

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.

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, model type and model version. You can exclude this parameter if you are not interested in recreating your results. This parameter is optional.

steps_num
integer [ 4 .. 10 ]
Default: 8

The number of iterations the model goes through to refine the generated image. This parameter is optional.

medium
string

Which medium should be included in your generated images. This parameter is optional.

Enum: "photography" "art"
prompt_enhancement
boolean
Default: false

When set to true, enhances the provided prompt by generating additional, more descriptive variations, resulting in more diverse and creative output images. Note that turning this flag on may result in a few additional seconds to the inference time.

guidance_method_1
string

Which guidance type you would like to include in the generation. Up to 4 guidance methods can be combined during a single inference. This parameter is optional.

Enum: "controlnet_canny" "controlnet_depth" "controlnet_recoloring" "controlnet_color_grid"
guidance_method_1_scale
number <float> [ 0 .. 1 ]
Default: 1

The impact of the guidance.

guidance_method_1_image_file
string

The image that should be used as guidance, in base64 format, with the method defined in guidance_method_1. Accepted formats are jpeg, jpg, png, webp. Maximum file size 12MB. If more then one guidance method is used, all guidance images must be of the same aspect ratio, and this will be the aspect ratio of the generated results. If guidance_method_1 is selected, an image must be provided.

guidance_method_2
string

Which guidance type you would like to include in the generation. Up to 4 guidance methods can be combined during a single inference. This parameter is optional.

Enum: "controlnet_canny" "controlnet_depth" "controlnet_recoloring" "controlnet_color_grid"
guidance_method_2_scale
number <float> [ 0 .. 1 ]
Default: 1

The impact of the guidance.

guidance_method_2_image_file
string

The image that should be used as guidance, in base64 format, with the method defined in guidance_method_2. Accepted formats are jpeg, jpg, png, webp. Maximum file size 12MB. If more then one guidance method is used, all guidance images must be of the same aspect ratio, and this will be the aspect ratio of the generated results. If guidance_method_1 is selected, an image must be provided.

Responses
200

Successful operation.

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.

post/text-to-image/fast/{model_version}
Request samples

Generate Image - HD model

Description

The /text-to-image/hd Route is dedicated 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:

Request
path Parameters
model_version
required
string

The model version you would like to use in the request.

Value: "2.2"
header Parameters
api_token
required
string
Request Body schema: application/json
required
prompt
string

The prompt you would like to use to generate images. Bria currently supports prompts in English only, excluding special characters.

num_results
integer [ 1 .. 4 ]
Default: 4

How many images you would like to generate.

aspect_ratio
string
Default: "1:1"

The aspect ratio of the image.

Enum: "1:1" "2:3" "3:2" "3:4" "4:3" "4:5" "5:4" "9:16" "16:9"
sync
boolean
Default: false

Determines the response mode. When true, responses are synchronous, and applicable to single-image requests. 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.

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, model type and model version. You can exclude this parameter if you are not interested in recreating your results. This parameter is optional.

negative_prompt
string

Specify here elements that you didn't ask in the prompt, but are being generated, and you would like to exclude. This parameter is optional. Bria currently supports prompts in English only.

steps_num
integer [ 20 .. 50 ]
Default: 30

The number of iterations the model goes through to refine the generated image. This parameter is optional.

text_guidance_scale
number <float> [ 1 .. 10 ]
Default: 5

Determines how closely the generated image should adhere to the input text description. This parameter is optional.

medium
string

Which medium should be included in your generated images. This parameter is optional.

Enum: "photography" "art"
prompt_enhancement
boolean
Default: false

When set to true, enhances the provided prompt by generating additional, more descriptive variations, resulting in more diverse and creative output images. Note that turning this flag on may result in a few additional seconds to the inference time.

Responses
200

Successful operation.

400

Bad request.

405

Method not allowed.

429

Request limit exceeded. Your account has reached its maximum allowed requests. Please upgrade your plan or try again later.

500

Internal server error.

post/text-to-image/hd/{model_version}
Request samples

Generate Image with Reference

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 endpoints to include unique IP characteristics in the generated outputs.

    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

    Generated Visual (combined into a gif)

  • Convert Sketches to Illustrations

    Structure reference image

    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

  • Generate Diverse Variations

    Structure reference image

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

    structure_ref_influence: 0.75

    Generated Visual

  • Stylize Typography and Logos

    Structure reference image

    prompt: curled orange peel.

    structure_ref_influence: 0.1

    Generated Visual

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.

Request
header Parameters
api_token
required
string
Request Body schema: application/json
required
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> [ 0 .. 1 ]
Default: 0.75

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 [ 1 .. 4 ]
Default: 4

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

sync
boolean
Default: true

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
Default: true

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. Both legacy (long, provided in the Bria console) and new (short, available via the 'Get Models' API) model ID formats are supported.

tailored_model_influence
number <float> [ 0 .. 1 ]
Default: 0.5

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.

steps_num
integer [ 4 .. 20 ]
Default: 12

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.

Responses
200

Successful operation.

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.

post/reimagine
Request samples

Prompt enhancement

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 tailored 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

Request
header Parameters
api_token
required
string
Request Body schema: application/json
required
prompt
string

The original prompt that to enhance.

Responses
200

Successful operation.

400

Bad request.

429

Request limit exceeded. Your account has reached its maximum allowed requests. Please upgrade your plan or try again later.

500

Internal server error.

post/prompt_enhancer
Request samples
Response samples
application/json
{
  • "results": {
    }
}

Generate Vector Graphics - Base (Beta)

Description

The /text-to-vector/base route offers the ability to generate high-quality, editable vector graphic assets from textual prompts at scale. This endpoint allows for generating quality vector graphics such as icons, logos, and other illustrations.

Examples:

prompt: A sticker of a cute kitten

prompt: A beautiful butterfly

On the left, a generated vector illustration. On the right, the same illustration after being re-colored in a vector editor

Guidance Methods

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:

  1. controlnet_canny: Extracts edge information from the input image to guide generation based on structural outlines.
  2. controlnet_depth: Derives depth information from the input image to influence spatial arrangement in generated images.
  3. controlnet_recoloring: Uses grayscale version of the input image to guide recoloring while preserving geometry.
  4. controlnet_color_grid: Extracts a 16x16 color grid from the input image to guide the overall color scheme of generated images.

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. 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). 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_1
  • guidance_method_X_scale: Set the impact of the guidance (0.0 to 1.0)
  • guidance_method_X_image_file: Provide the base64-encoded input image

By leveraging these guidance methods, you can achieve more precise control over the generated images, tailoring them to your specific needs and creative vision.

Request
path Parameters
model_version
required
string

The model version you would like to use in the request.

Value: "2.3"
header Parameters
api_token
required
string
Request Body schema: application/json
required
prompt
string

The prompt you would like to use to generate images. Bria currently supports prompts in English only, excluding special characters.

num_results
integer [ 1 .. 4 ]
Default: 4

How many images you would like to generate. When using any Guidance Method, please use the value 1.

aspect_ratio
string
Default: "1:1"

The aspect ratio of the image.

Enum: "1:1" "2:3" "3:2" "3:4" "4:3" "4:5" "5:4" "9:16" "16:9"
sync
boolean
Default: false

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.

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, model type and model version. You can exclude this parameter if you are not interested in recreating your results. This parameter is optional.

negative_prompt
string

Specify here elements that you didn't ask in the prompt, but are being generated, and you would like to exclude. This parameter is optional. Bria currently supports prompts in English only.

steps_num
integer [ 20 .. 50 ]
Default: 30

The number of iterations the model goes through to refine the generated image. This parameter is optional.

text_guidance_scale
number <float> [ 1 .. 10 ]
Default: 5

Determines how closely the generated image should adhere to the input text description. This parameter is optional.

guidance_method_1
string

Which guidance type you would like to include in the generation. Up to 4 guidance methods can be combined during a single inference. This parameter is optional.

Enum: "controlnet_canny" "controlnet_depth" "controlnet_recoloring" "controlnet_color_grid"
guidance_method_1_scale
number <float> [ 0 .. 1 ]
Default: 1

The impact of the guidance.

guidance_method_1_image_file
string

The image that should be used as guidance, in base64 format, with the method defined in guidance_method_1. Accepted formats are jpeg, jpg, png, webp. Maximum file size 12MB. If more then one guidance method is used, all guidance images must be of the same aspect ratio, and this will be the aspect ratio of the generated results. If guidance_method_1 is selected, an image must be provided.

guidance_method_2
string

Which guidance type you would like to include in the generation. Up to 4 guidance methods can be combined during a single inference. This parameter is optional.

Enum: "controlnet_canny" "controlnet_depth" "controlnet_recoloring" "controlnet_color_grid"
guidance_method_2_scale
number <float> [ 0 .. 1 ]
Default: 1

The impact of the guidance.

guidance_method_2_image_file
string

The image that should be used as guidance, in base64 format, with the method defined in guidance_method_2. Accepted formats are jpeg, jpg, png, webp. Maximum file size 12MB. If more then one guidance method is used, all guidance images must be of the same aspect ratio, and this will be the aspect ratio of the generated results. If guidance_method_1 is selected, an image must be provided.

Responses
200

Successful operation.

209

Successful operation, a model version that is no longer available was requested. The request was redirected to the latest model version.

400

Bad request.

405

Method not allowed.

429

Request limit exceeded. Your account has reached its maximum allowed requests. Please upgrade your plan or try again later.

500

Internal server error.

post/text-to-vector/base/{model_version}
Request samples

Generate Vector Graphics - Fast (Beta)

Description

The /text-to-vector/fast route is optimized for speed, enabling rapid vector graphics creation without compromising quality. This endpoint allows for generating high-quality vector graphics such as icons, logos, and other illustrations.

Examples:

prompt: An icon of a bird with a blue head and yellow beak against a solid background

Guidance Methods

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:

  1. controlnet_canny: Extracts edge information from the input image to guide generation based on structural outlines.
  2. controlnet_depth: Derives depth information from the input image to influence spatial arrangement in generated images.
  3. controlnet_recoloring: Uses grayscale version of the input image to guide recoloring while preserving geometry.
  4. controlnet_color_grid: Extracts a 16x16 color grid from the input image to guide the overall color scheme of generated images.

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. 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). 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_1
  • guidance_method_X_scale: Set the impact of the guidance (0.0 to 1.0)
  • guidance_method_X_image_file: Provide the base64-encoded input image

By leveraging these guidance methods, you can achieve more precise control over the generated images, tailoring them to your specific needs and creative vision.

Request
path Parameters
model_version
required
string

The model version you would like to use in the request.

Value: "2.3"
header Parameters
api_token
required
string
Request Body schema: application/json
required
prompt
string

The prompt you would like to use to generate images. Bria currently supports prompts in English only, excluding special characters.

num_results
integer [ 1 .. 4 ]
Default: 4

How many images you would like to generate.

aspect_ratio
string
Default: "1:1"

The aspect ratio of the image.

Enum: "1:1" "2:3" "3:2" "3:4" "4:3" "4:5" "5:4" "9:16" "16:9"
sync
boolean
Default: false

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.

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, model type and model version. You can exclude this parameter if you are not interested in recreating your results. This parameter is optional.

steps_num
integer [ 4 .. 10 ]
Default: 8

The number of iterations the model goes through to refine the generated image. This parameter is optional.

guidance_method_1
string

Which guidance type you would like to include in the generation. Up to 4 guidance methods can be combined during a single inference. This parameter is optional.

Enum: "controlnet_canny" "controlnet_depth" "controlnet_recoloring" "controlnet_color_grid"
guidance_method_1_scale
number <float> [ 0 .. 1 ]
Default: 1

The impact of the guidance.

guidance_method_1_image_file
string

The image that should be used as guidance, in base64 format, with the method defined in guidance_method_1. Accepted formats are jpeg, jpg, png, webp. Maximum file size 12MB. If more then one guidance method is used, all guidance images must be of the same aspect ratio, and this will be the aspect ratio of the generated results. If guidance_method_1 is selected, an image must be provided.

guidance_method_2
string

Which guidance type you would like to include in the generation. Up to 4 guidance methods can be combined during a single inference. This parameter is optional.

Enum: "controlnet_canny" "controlnet_depth" "controlnet_recoloring" "controlnet_color_grid"
guidance_method_2_scale
number <float> [ 0 .. 1 ]
Default: 1

The impact of the guidance.

guidance_method_2_image_file
string

The image that should be used as guidance, in base64 format, with the method defined in guidance_method_2. Accepted formats are jpeg, jpg, png, webp. Maximum file size 12MB. If more then one guidance method is used, all guidance images must be of the same aspect ratio, and this will be the aspect ratio of the generated results. If guidance_method_1 is selected, an image must be provided.

Responses
200

Successful operation.

400

Bad request.

405

Method not allowed.

429

Request limit exceeded. Your account has reached its maximum allowed requests. Please upgrade your plan or try again later.

500

Internal server error.

post/text-to-vector/fast/{model_version}
Request samples