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
const axios = require('axios');
const api_key = "YOUR API-KEY";
const url = "https://api.segmind.com/v1/bria-text-to-vector-graphics";
const 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
};
(async function() {
try {
const response = await axios.post(url, data, { headers: { 'x-api-key': api_key } });
console.log(response.data);
} catch (error) {
console.error('Error:', error.response.data);
}
})();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.
Bria Vision is a next-generation generative AI model designed for creating both raster and scalable vector graphics from text prompts or reference images. Built for developers, designers, and product managers, this unified pipeline supports:
With advanced guidance methods like ControlNets and Image Prompt Adapters, Bria Vision offers fine-grained control over style, resolution, aspect ratio, and generation speed—ideal for commercial-grade asset production at scale.
Q: How do I generate editable vector graphics?
A: Select the text-to-vector pipeline and choose base or fast mode. Use detailed prompts like “minimalist icon” and pick 1:1 aspect ratio.
Q: Which mode yields the highest detail?
A: Use hd mode. It performs more diffusion steps and texture enhancements for production-quality outputs.
Q: Can I reuse the same image output?
A: Yes. Set the seed parameter (1–999999) to the same value to replicate results exactly.
Q: How do I control composition?
A: Combine aspect_ratio presets with negative_prompt fields (e.g., “no background clutter”) and adjust guidance_scale.
Q: Are there content moderation safeguards?
A: Bria Vision includes Prompt Content Moderation and Content Moderation checkboxes to ensure compliance with standard guidelines.