---
title: "Generate Vector Graphics - Fast (Beta)"
method: POST
path: "/text-to-vector/fast/{model_version}"
tags: ["Image Generation"]
---

# Generate Vector Graphics - Fast (Beta)

`POST /text-to-vector/fast/{model_version}`

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

<img src="https://i.ibb.co/DG73T97/bird-icon-1.png" width="200" height="200"/> <img src="https://i.ibb.co/WcySnrr/bird-icon-3.png" width="200" height="200"/> <img src="https://i.ibb.co/hsLcs04/bird-icon-2.png" width="200" height="200"/> <img src="https://i.ibb.co/6R99kxp/bird-icon-4.png" width="200" height="200"/>

### 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.


  **ControlNets**:


  A set of methods that allow conditioning the model on additional inputs, providing detailed control over image generation.
  
  - **controlnet_canny**: Uses edge information from the input image to guide generation based on structural outlines.
  - **controlnet_depth**: Derives depth information to influence spatial arrangement in the generated image.
  - **controlnet_recoloring**: Uses a grayscale version of the input image to guide recoloring while preserving geometry.
  - **controlnet_color_grid**: Extracts a 16x16 color grid from the input image to guide the color scheme of the generated image.



**Using ControlNets**  
You can specify up to four ControlNet 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:
<table>
  <tr>
    <th>Guidance Method</th>
    <th>Prompt</th>
    <th>Scale</th>
    <th style="width: 150px;">Input Image</th>
    <th style="width: 150px;">Guidance Image</th>
    <th style="width: 150px;">Output Image</th>
  </tr>
  <tr>
    <td>ControlNet Canny</td>
    <td>An exotic colorful shell on the beach</td>
    <td>1.0</td>
    <td style="width: 150px;"><img src="https://bria-datasets.s3.amazonaws.com/api_doc/cns/canny_input.jpg" alt="Input Image" style="width: 150px; height: 150px; object-fit: contain;"></td>
    <td style="width: 150px;"><img src="https://bria-datasets.s3.amazonaws.com/api_doc/cns/canny_map.png" alt="Guidance Image" style="width: 150px; height: 150px; object-fit: contain;"></td>
    <td style="width: 150px;"><img src="https://bria-datasets.s3.amazonaws.com/api_doc/cns/canny_output.png" alt="Output Image" style="width: 150px; height: 150px; object-fit: contain;"></td>
  </tr>
  <tr>
    <td>ControlNet Depth</td>
    <td>A dog, exploring an alien planet</td>
    <td>0.8</td>
    <td style="width: 150px;"><img src="https://bria-datasets.s3.amazonaws.com/api_doc/cns/depth_input.jpg" alt="Input Image" style="width: 150px; height: 150px; object-fit: contain;"></td>
    <td style="width: 150px;"><img src="https://bria-datasets.s3.amazonaws.com/api_doc/cns/depth_map.webp" alt="Guidance Image" style="width: 150px; height: 150px; object-fit: contain;"></td>
    <td style="width: 150px;"><img src="https://bria-datasets.s3.amazonaws.com/api_doc/cns/depth_output.png" alt="Output Image" style="width: 150px; height: 150px; object-fit: contain;"></td>
  </tr>
  <tr>
    <td>ControlNet Recoloring</td>
    <td>A vibrant photo of a woman</td>
    <td>1.00</td>
    <td style="width: 150px;"><img src="https://bria-datasets.s3.amazonaws.com/api_doc/cns/recoloring_input.png" alt="Input Image" style="width: 150px; height: 150px; object-fit: contain;"></td>
    <td style="width: 150px;"><img src="https://bria-datasets.s3.amazonaws.com/api_doc/cns/recoloring_map.webp" alt="Guidance Image" style="width: 150px; height: 150px; object-fit: contain;"></td>
    <td style="width: 150px;"><img src="https://bria-datasets.s3.amazonaws.com/api_doc/cns/recoloring_output.png" alt="Output Image" style="width: 150px; height: 150px; object-fit: contain;"></td>
  </tr>
  <tr>
    <td>ControlNet Color Grid</td>
    <td>A dynamic fantasy illustration of an erupting volcano</td>
    <td>0.7</td>
    <td style="width: 150px;"><img src="https://bria-datasets.s3.amazonaws.com/api_doc/cns/colorgrid_input.png" alt="Input Image" style="width: 150px; height: 150px; object-fit: contain;"></td>
    <td style="width: 150px;"><img src="https://bria-datasets.s3.amazonaws.com/api_doc/cns/colorgrid_map.png" alt="Guidance Image" style="width: 150px; height: 150px; object-fit: contain;"></td>
    <td style="width: 150px;"><img src="https://bria-datasets.s3.amazonaws.com/api_doc/cns/colorgrid_output.png" alt="Output Image" style="width: 150px; height: 150px; object-fit: contain;"></td>
  </tr>
</table>

To use **ControlNets** 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
**IP_adapter**: 

  Guides the model based on the input image and its associated style. This method offers two modes:
  - **regular**: Uses the full input image to condition the model, influencing both content and style.
  - **style_only**: Focuses only on the style of the input image, allowing the model to generate images based on the provided aesthetic without altering the content.

**Using IP-Adapter**   <table>
  <tr>
    <th>Guidance Method</th>
    <th>Prompt</th>
    <th>Mode</th>
    <th>Scale</th>
    <th style="width: 150px;">Guidance Image</th>
    <th style="width: 150px;">Output Image</th>
  </tr>
  <tr>
    <td>IP-adapter</td>
    <td>A drawing of a lion laid on a table.</td>
    <td>regular</td>
    <td>0.85</td>
    <td style="width: 150px;"><img src="https://images.pexels.com/photos/3246665/pexels-photo-3246665.png?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2" alt="Input Image" style="width: 150px; height: 150px; object-fit: contain;"></td>
    <td style="width: 150px;"><img src="https://bria-datasets.s3.us-east-1.amazonaws.com/temp_exp_or/image.png" alt="Output Image" style="width: 150px; height: 150px; object-fit: contain;"></td>
  </tr>
  <tr>
    <td>IP-adapter</td>
    <td>A drawing of a bird.</td>
    <td>style</td>
    <td>1</td>
    <td style="width: 150px;"><img src="https://bria-datasets.s3.us-east-1.amazonaws.com/temp_exp_or/photo-1575995872537-3793d29d972c.avif" alt="Input Image" style="width: 150px; height: 150px; object-fit: contain;"></td>
    <td style="width: 150px;"><img src="https://bria-datasets.s3.us-east-1.amazonaws.com/temp_exp_or/seed_627499055.png" alt="Output Image" style="width: 150px; height: 150px; object-fit: contain;"></td>
  </tr>
</table>

## Path parameters

- `model_version` '2.3', required

## Headers

- `api_token` string, required

## Request body

- object
  - `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 — How many images you would like to generate. When using any Guidance Method, please use the value 1.
  - `aspect_ratio` '1:1' | '2:3' | '3:2' | '3:4' | '4:3' | '4:5' | '5:4' | '9:16' | '16:9' — The aspect ratio of the image.
  - `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.
  - `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 — The number of iterations the model goes through to refine the generated image. This parameter is optional.
  - `guidance_method_1` 'controlnet_canny' | 'controlnet_depth' | 'controlnet_recoloring' | 'controlnet_color_grid' — 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.
  - `guidance_method_1_scale` number, float — 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` 'controlnet_canny' | 'controlnet_depth' | 'controlnet_recoloring' | 'controlnet_color_grid' — 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.
  - `guidance_method_2_scale` number, float — 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.
  - `image_prompt_mode` 'regular' | 'style_only' — The mode to apply to the image guidance. - `regular`: Uses both content and style from the provided image for the generation. - `style_only`: Uses only the style from the provided image.
  - `image_prompt_file` string — The image file to be used as guidance for the IP-Adapter, in base64 format. Accepted formats are jpeg, jpg, png, webp. Maximum file size 12MB.
  - `image_prompt_urls` string[] — A list of URLs of images that should be used as guidance for the IP-Adapter. Accepted formats are jpeg, jpg, png, webp. The URLs should point to accessible, publicly available images.
  - `image_prompt_scale` number, float — The impact of the provided image on the generated results. A value between 0.0 (no impact) and 1.0 (full impact).

## Response `200`

Successful operation.

- object
  - `results` 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.
- `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.

---

[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/versions/2768230345a5/schema)
