POST
javascript
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); } })();
RESPONSE
image/jpeg
HTTP Response Codes
200 - OKImage Generated
401 - UnauthorizedUser authentication failed
404 - Not FoundThe requested URL does not exist
405 - Method Not AllowedThe requested HTTP method is not allowed
406 - Not AcceptableNot enough credits
500 - Server ErrorServer had some issue with processing

Attributes


promptstr *

Use the prompt to guide image creation. Detailed prompts for complexity; simple prompts for basic illustrations.


modestr ( default: base )

Controls output quality: 'hd' for high detail, 'fast' for quicker results.


aspect_ratioenum:str ( default: 1:1 )

Determines image shape. Use 1:1 for icons or 16:9 for wide formats.

Allowed values:


seedint ( default: 12345 )

Use a seed to replicate images. Choose any number between 1-999999.

min : 1,

max : 999999


negative_promptstr ( default: dark colors )

Exclude specific elements using negative prompts. Helpful for refining and controlling outputs.


steps_numint ( default: 30 )

Define iteration steps for refinement. More steps offer polished images but are slower.

min : 20,

max : 50


text_guidance_scalefloat ( default: 5 )

Adjust how closely the image follows the prompt. Higher numbers mean stricter adherence.

min : 1,

max : 10


mediumenum:str ( default: art )

Selects image type: 'art' for illustrations or 'photography' for realistic looks.

Allowed values:


prompt_enhancementboolean ( default: 1 )

Enables more creative versions. Useful for generating diverse options.


enhance_imageboolean ( default: 1 )

Improves texture and clarity. Ideal for high-detail image needs.


prompt_content_moderationboolean ( default: true )

Ensures prompt complies with standards. Keep enabled for all standard applications.


content_moderationboolean ( default: 1 )

Moderates all inputs/outputs for compliance. Recommended for safe usage.


ip_signalboolean ( default: 1 )

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 Vector Graphics Model

What is Bria Vision?

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:

  • Text-to-Image (base, fast, HD) for photo-realistic or illustrative assets
  • Text-to-Vector (base, fast) for clean, editable SVG-style icons, logos, and illustrations

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.

Key Features

  • Dual Pipelines: Generate high-quality raster images (text-to-image) or crisp vector outputs (text-to-vector)
  • Mode Selection:
    • base – Balanced quality & speed
    • fast – Quick iterations and mockups
    • hd – Ultra-detailed, production-ready visuals
  • Advanced Conditioning: Support for ControlNets (edges, depth) and Image Prompt Adapters (style transfer, recoloring)
  • Custom Resolutions & Aspect Ratios: Choose from presets like 1:1, 16:9, 4:3, or custom values for social media, presentations, and UI assets
  • Deterministic Seeds: Reproduce or slightly vary outputs using seed values (1–999999)
  • Negative Prompting: Exclude unwanted elements (e.g., “no dark colors”) for tighter composition control

Best Use Cases

  • Logo & Icon Design: Generate sharp vector graphics for branding and UI kits
  • Marketing & Social Media: Create HD visuals in 16:9 or custom aspect ratios for ads and posts
  • Illustrations & Concept Art: Produce stylized art or photo-realistic scenes with advanced text guidance
  • Prototyping & Mockups: Rapidly iterate UI components, stickers, and banners using the fast mode
  • Scalable Asset Libraries: Build large collections of consistent imagery for websites, apps, and products

Prompt Tips and Output Quality

  1. Craft Detailed Prompts: Describe composition, lighting, and style. E.g., “A minimalist vector icon of a fox, flat colors, 1:1 ratio.”
  2. Choose the Right Mode: Use fast for drafts, base for balanced renders, and hd for final assets.
  3. Aspect Ratio: Select 1:1 for icons, 16:9 for banners, or customize via the dropdown.
  4. Seed Control: Set a seed to reproduce results; tweak by ±1 for variations.
  5. Negative Prompts: Filter out unwanted elements—e.g., “no text overlays.”
  6. Guidance Scale & Steps: Increase text_guidance_scale (1–10) for strict adherence; set steps_num (20–50) for smoother details.
  7. Enhancements & Moderation: Toggle Enhance Image for clarity; keep Prompt Content Moderation enabled for compliance.

FAQs

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.