Skip to main content
POST
cURL

개요

텍스트 프롬프트(Prompt)로부터 고품질의 편집 가능한 벡터 그래픽 에셋을 생성합니다. Bria의 독점 text-to-image 파운데이션 모델을 사용해 확장 가능한 아이콘, 로고, 일러스트레이션을 만드는 데 적합합니다.
이 인터페이스는 https://engine.prod.bria-api.com/v1/text-to-vector/base/3.2와 동일합니다.자세한 내용은 Bria 공식 문서를 참조하세요.

사용 시점

최종 에셋이 아이콘, 간단한 일러스트레이션, 로고, 레이아웃 그래픽처럼 편집 가능하거나 확장 가능해야 하는 경우 이 엔드포인트를 사용하세요. 사실적인 디테일이나 복잡한 텍스처가 필요하다면 대신 래스터 이미지 생성을 사용하세요.

첫 번째 요청

객체, 스타일, 의도된 용도를 설명하는 짧은 프롬프트(Prompt)로 시작하세요. 첫 번째 요청은 단순하게 유지하고, 벡터 출력이 사용 가능함을 확인한 뒤 브랜드, 색상, 구도 제약을 추가하세요.

응답 읽기

응답은 API playground를 통해 벡터 출력 필드를 반환합니다. 워크플로에 장기 저장이나 이후 편집이 필요하다면 반환된 에셋을 즉시 저장하세요.

인증

Authorization
string
header
필수

Bearer token authentication. Use your CometAPI key.

헤더

Content-Type
string

본문

application/json
prompt
string
기본값:A flat vector illustration of a sailboat at sunset
필수

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

guidance_method_2_scale
integer
기본값:1
필수

The impact of the guidance.

Default 1

num_results
integer

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

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. Default false

aspect_ratio
string

The aspect ratio of the image.

Default "1:1"

Enum "1:1" "2:3" "3:2" "3:4" "4:3" "4:5" "5:4" "9:16" "16:9"

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

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

text_guidance_scale
integer

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

prompt_content_moderation
boolean

When enabled (default: true), the input prompt is scanned for NSFW or ethically restricted terms before image generation. If the prompt violates Bria's ethical guidelines, the request will be rejected with a 408 error. Default true

content_moderation
boolean

When enabled, applies content moderation to both input visuals and generated outputs.

For input images:

  • Processing stops at the first image that fails moderation
  • Returns a 422 error with details about which parameter failed

For synchronous requests (sync=true):

  • If all generated images fail moderation, returns a 422 error
  • If some images pass and others fail, returns a 200 response with successful generations and "blocked" objects for failed ones

For asynchronous requests (sync=false):

  • Failed images are replaced with zero-byte files at their placeholder URLs
  • Successful images are stored at their original placeholder URLs

Default false

ip_signal
boolean

Flags prompts with potential IP content. If detected, a warning will be included in the response.

Default false

guidance_method_1
string

Which guidance type you would like to include in the generation. Up to 2 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
integer

The impact of the guidance.

Default 1

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 2 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_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
string
  • regular: Uses the image’s content, style elements, and color palette to guide generation.
  • style_only: Uses the image’s high-level style elements and color palette to influence the generated output. The support for image prompt is currently available only when model_version="2.3".

Default "regular"

Enum "regular" "style_only"

image_prompt_file
string

The image file to be used as guidance, in base64 format. Accepted formats are jpeg, jpg, png, webp. The support for image prompt is currently available only when model_version="2.3". Maximum file size 12MB. This image can be of any aspect ratio, even when it's not alligned with the one defined in the parameter 'aspect_ratio' or by visuals provided to the ControlNets.

image_prompt_urls
string[]

A list of URLs of images that should be used as guidance. The images can be of different aspect ratios. Accepted formats are jpeg, jpg, png, webp. The URLs should point to accessible, publicly available images. The support for image prompt is currently available only when model_version="2.3".

url

image_prompt_scale
integer

The impact of the provided image on the generated results. A value between 0.0 (no impact) and 1.0 (full impact). Default 1

응답

200 - application/json

Success

The response is of type object.