Bria Vector Graphics
Bria Vision enables high-quality text-to-image and text-to-vector graphic generation for versatile commercial use.
API
If you're looking for an API, you can choose from your desired programming language.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import requests
import base64
# Use this function to convert an image file from the filesystem to base64
def image_file_to_base64(image_path):
with open(image_path, 'rb') as f:
image_data = f.read()
return base64.b64encode(image_data).decode('utf-8')
# Use this function to fetch an image from a URL and convert it to base64
def image_url_to_base64(image_url):
response = requests.get(image_url)
image_data = response.content
return base64.b64encode(image_data).decode('utf-8')
# Use this function to convert a list of image URLs to base64
def image_urls_to_base64(image_urls):
return [image_url_to_base64(url) for url in image_urls]
api_key = "YOUR_API_KEY"
url = "https://api.segmind.com/v1/bria-text-to-vector-graphics"
# Request payload
data = {
"prompt": "A playful cartoon kitten, sitting with a tiny ball of yarn, in a clean, minimalistic vector illustration style, suitable for icons, stickers, and scalable graphics.",
"mode": "base",
"aspect_ratio": "1:1",
"seed": 12345,
"negative_prompt": "dark colors",
"steps_num": 30,
"text_guidance_scale": 5,
"medium": "art",
"prompt_enhancement": False,
"enhance_image": False,
"prompt_content_moderation": True,
"content_moderation": False,
"ip_signal": False
}
headers = {'x-api-key': api_key}
response = requests.post(url, json=data, headers=headers)
print(response.content) # The response is the generated image
Attributes
Use the prompt to guide image creation. Detailed prompts for complexity; simple prompts for basic illustrations.
Controls output quality: 'hd' for high detail, 'fast' for quicker results.
Determines image shape. Use 1:1 for icons or 16:9 for wide formats.
Allowed values:
Use a seed to replicate images. Choose any number between 1-999999.
min : 1,
max : 999999
Exclude specific elements using negative prompts. Helpful for refining and controlling outputs.
Define iteration steps for refinement. More steps offer polished images but are slower.
min : 20,
max : 50
Adjust how closely the image follows the prompt. Higher numbers mean stricter adherence.
min : 1,
max : 10
Selects image type: 'art' for illustrations or 'photography' for realistic looks.
Allowed values:
Enables more creative versions. Useful for generating diverse options.
Improves texture and clarity. Ideal for high-detail image needs.
Ensures prompt complies with standards. Keep enabled for all standard applications.
Moderates all inputs/outputs for compliance. Recommended for safe usage.
Flags prompts likely to have IP concerns, useful for sensitive projects.
To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.
Resources to get you started
Everything you need to know to get the most out of Bria Vector Graphics
# Bria Vector Graphics Guide
Bria Vision unifies raster and vector generation in one pipeline. Follow these best practices to craft sharp, production-ready assets at scale.
## 1. Crafting Your Prompt
- Be specific: mention subject, style, color palette and composition.
- Example: “Minimalist vector icon of a fox, flat orange tones, 1:1 ratio, no gradients.”
## 2. Mode Selection
- **fast** – Quick drafts and concept iterations (low latency).
- **base** – Balanced quality and speed (default for most tasks).
- **hd** – Ultra-detailed, production-ready renders (higher compute).
## 3. Aspect Ratio & Resolution
- Icons & logos: `1:1` or `4:5`
- Banners & social media: `16:9` or `9:16`
- Custom layouts: choose from `2:3`, `3:4`, etc.
## 4. Seed & Variation
- Use `seed` (1–999999) to reproduce an output exactly.
- Tweak seed by ±1 for subtle variations without rewriting the prompt.
## 5. Diffusion Steps & Guidance
- **steps_num** (20–50): 20–30 for drafts; 40–50 for fine detail.
- **text_guidance_scale** (1–10): 4–6 for creative latitude; 7–10 for strict adherence.
## 6. Medium & Enhancements
- **medium**:
- `art` for illustrations and icons
- `photography` for realistic scenes
- **prompt_enhancement**: toggle on to explore creative alternatives.
- **enhance_image**: enable in `hd` for extra clarity, texture and sharpening.
## 7. Negative Prompting
Exclude unwanted elements:
```txt
no text overlays, no dark shadows, no background clutter
8. Use-Case Recipes
Vector Icon (Logo/UI)
- •mode:
base
- •aspect_ratio:
1:1
- •steps_num: 30
- •text_guidance_scale: 8
- •medium:
art
- •prompt_enhancement: false
- •enhance_image: false
Social Media Banner
- •mode:
hd
- •aspect_ratio:
16:9
- •steps_num: 45
- •text_guidance_scale: 7
- •medium:
art
- •enhance_image: true
Concept Illustration
- •mode:
hd
- •aspect_ratio:
4:3
- •steps_num: 50
- •text_guidance_scale: 9
- •medium:
photography
- •prompt_enhancement: true
Rapid UI Mockup
- •mode:
fast
- •aspect_ratio:
3:4
- •steps_num: 20
- •text_guidance_scale: 5
- •medium:
art
- •prompt_enhancement: false
By mixing these parameters, you can accelerate ideation, maintain brand consistency, and scale high-quality asset production with Bria Vision. Experiment, iterate, and refine!```
Other Popular Models
Discover other models you might be interested in.
sdxl-controlnet
SDXL ControlNet gives unprecedented control over text-to-image generation. SDXL ControlNet models Introduces the concept of conditioning inputs, which provide additional information to guide the image generation process

fooocus
Fooocus enables high-quality image generation effortlessly, combining the best of Stable Diffusion and Midjourney.

faceswap-v2
Take a picture/gif and replace the face in it with a face of your choice. You only need one image of the desired face. No dataset, no training

sdxl1.0-txt2img
The SDXL model is the official upgrade to the v1.5 model. The model is released as open-source software
