Bria Vector Graphics Serverless API

Bria Vision enables high-quality text-to-image and text-to-vector graphic generation for versatile commercial use.

~17.92s
$0.04 per generation
 1import requests
 2import json
 3
 4url = "https://api.segmind.com/v1/bria-text-to-vector-graphics"
 5headers = {
 6    "x-api-key": "YOUR_API_KEY",
 7    "Content-Type": "application/json"
 8}
 9
10data = {
11    "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.",
12    "mode": "base",
13    "aspect_ratio": "1:1",
14    "seed": 12345,
15    "negative_prompt": "dark colors",
16    "steps_num": 30,
17    "medium": "art",
18    "prompt_enhancement": false,
19    "enhance_image": false,
20    "prompt_content_moderation": true,
21    "content_moderation": false,
22    "ip_signal": false
23}
24
25response = requests.post(url, headers=headers, json=data)
26
27if response.status_code == 200:
28    result = response.json()
29    print(json.dumps(result, indent=2))
30else:
31    print(f"Error: {response.status_code}")
32    print(response.text)

API Endpoint

POSThttps://api.segmind.com/v1/bria-text-to-vector-graphics

Parameters

promptrequired
string

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

Default: "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."
aspect_ratiooptional
string

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

Default: "1:1"
Allowed values :
"1:1""2:3""3:2""3:4""4:3""4:5""5:4""9:16""16:9"
content_moderationoptional
boolean

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

Default: false
enhance_imageoptional
boolean

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

Default: false
ip_signaloptional
boolean

Flags prompts likely to have IP concerns, useful for sensitive projects.

Default: false
mediumoptional
string

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

Default: "art"
Allowed values :
"photography""art"
modeoptional
string

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

Default: "base"
negative_promptoptional
string

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

Default: "dark colors"
prompt_content_moderationoptional
boolean

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

Default: true
prompt_enhancementoptional
boolean

Enables more creative versions. Useful for generating diverse options.

Default: false
seedoptional
integer

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

Default: 12345Range: 1 - 999999
steps_numoptional
integer

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

Default: 30Range: 20 - 50
text_guidance_scaleoptional
float

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

Default: 5Range: 1 - 10

Response Type

Returns: Text/JSON

Common Error Codes

The API returns standard HTTP status codes. Detailed error messages are provided in the response body.

400

Bad Request

Invalid parameters or request format

401

Unauthorized

Missing or invalid API key

403

Forbidden

Insufficient permissions

404

Not Found

Model or endpoint not found

406

Insufficient Credits

Not enough credits to process request

429

Rate Limited

Too many requests

500

Server Error

Internal server error

502

Bad Gateway

Service temporarily unavailable

504

Timeout

Request timed out