Bria — AI Image Generation, Editing & Background Removal
Commercially safe, royalty-free image generation and editing through 20+ API endpoints. Generate from text, edit with natural language, remove backgrounds, create product shots, and build automated image pipelines.
When to Use This Skill
Use this skill when the user wants to:
- Generate images — "create an image of...", "make me a banner", "generate a hero image", "I need a product photo"
- Edit images — "change the background", "make it look like winter", "add a vase to the table", "remove the person"
- Remove/replace backgrounds — "make the background transparent", "cut out the product", "replace with a studio background"
- Product photography — "create a lifestyle shot", "place this product in a kitchen scene", "e-commerce packshot"
- Enhance/transform — "upscale this image", "make it higher resolution", "restyle as oil painting", "change the lighting"
- Batch/pipeline — "generate 10 product images", "process all these images", "remove backgrounds in bulk"
This skill handles the full spectrum of AI image operations. If the user mentions images, photos, visuals, or any visual content creation — use this skill.
What You Can Build
- E-commerce product catalog — Generate product photos, remove backgrounds for transparent PNGs, place products in lifestyle scenes (kitchen, office, outdoor), create packshots with consistent style
- Landing page visuals — Generate hero images, abstract tech backgrounds, team photos, and section illustrations — all matching your brand aesthetic
- Social media content — Instagram posts (1:1), Stories/Reels (9:16), LinkedIn banners (16:9), ad creatives — batch-generate variants for A/B testing
- Marketing campaign assets — Seasonal transformations (summer→winter), restyle product shots for different markets, create localized visuals at scale
- Photo restoration pipeline — Restore old damaged photos, colorize black & white images, upscale low-res photos to 4x, enhance quality automatically
- Brand asset toolkit — Remove backgrounds from logos, blend artwork onto products (t-shirts, mugs), create consistent product photography across your entire catalog
- AI-powered design workflows — Chain operations: generate→edit→remove background→place in scene→upscale — all automated through API pipelines
Setup — API Key Check
Before making any Bria API call, check for the API key and help the user set it up if missing:
Step 1: Check if the key exists (without printing the key)
if [ -z "$BRIA_API_KEY" ]; then
echo "BRIA_API_KEY is not set"
else
echo "BRIA_API_KEY is set"
fi
If the output says BRIA_API_KEY is set, skip to the next section.
Step 2: If the key is missing, guide the user
Tell the user exactly this:
To use image generation, you need a free Bria API key.
- Go to https://platform.bria.ai/console/account/api-keys
- Sign up or log in
- Click Create API Key
Wait for the user to provide their API key. Do not proceed until they give you the key.
Do not proceed with any image generation or editing until the API key is confirmed set.
Core Capabilities
| Need |
Capability |
Use Case |
| Generate images from text |
FIBO Generate |
Hero images, product shots, illustrations, social media images, banners |
| Edit images by text instruction |
FIBO-Edit |
Change colors, modify objects, transform scenes |
| Edit image region with mask |
GenFill/Erase |
Precise inpainting, add/replace specific regions |
| Add/Replace/Remove objects |
Text-based editing |
Add vase, replace apple with pear, remove table |
| Remove background (transparent PNG) |
RMBG-2.0 |
Extract subjects for overlays, logos, cutouts |
| Replace/blur/erase background |
Background ops |
Change, blur, or remove backgrounds |
| Expand/outpaint images |
Outpainting |
Extend boundaries, change aspect ratios |
| Upscale image resolution |
Super Resolution |
Increase resolution 2x or 4x |
| Enhance image quality |
Enhancement |
Improve lighting, colors, details |
| Restyle images |
Restyle |
Oil painting, anime, cartoon, 3D render |
| Change lighting |
Relight |
Golden hour, spotlight, dramatic lighting |
| Change season |
Reseason |
Spring, summer, autumn, winter |
| Composite/blend images |
Image Blending |
Apply textures, logos, merge images |
| Restore old photos |
Restoration |
Fix old/damaged photos |
| Colorize images |
Colorization |
Add color to B&W, or convert to B&W |
| Sketch to photo |
Sketch2Image |
Convert drawings to realistic photos |
| Create product lifestyle shots |
Lifestyle Shot |
Place products in scenes for e-commerce |
| Integrate products into scenes |
Product Integrate |
Embed products at exact coordinates |
Quick Reference
Generate an Image (FIBO)
curl -X POST "https://engine.prod.bria-api.com/v2/image/generate" \
-H "api_token: $BRIA_API_KEY" \
-H "Content-Type: application/json" \
-H "User-Agent: BriaSkills/1.2.7" \
-d '{
"prompt": "your description",
"aspect_ratio": "16:9",
"resolution": "1MP",
"sync": true
}'
Aspect ratios: 1:1 (square), 16:9 (hero/banner), 4:3 (presentation), 9:16 (mobile/story), 3:4 (portrait)
Resolution: 1MP (default) or 4MP (improved details for photorealism, adds ~30s latency)
Sync mode: Pass "sync": true in the request body for single image generation to get the result directly in the response. For batch/multiple image generation, omit sync (or set false) and use polling instead.
Advanced: For precise, deterministic control over generation, use VGL structured prompts instead of natural language. VGL defines every visual attribute (objects, lighting, composition) as explicit JSON.
Remove Background (RMBG-2.0)
curl -X POST "https://engine.prod.bria-api.com/v2/image/edit/remove_background" \
-H "api_token: $BRIA_API_KEY" \
-H "Content-Type: application/json" \
-H "User-Agent: BriaSkills/1.2.7" \
-d '{"image": "https://..."}'
Returns PNG with transparency.
Edit Image (FIBO-Edit) - No Mask Required
curl -X POST "https://engine.prod.bria-api.com/v2/image/edit" \
-H "api_token: $BRIA_API_KEY" \
-H "Content-Type: application/json" \
-H "User-Agent: BriaSkills/1.2.7" \
-d '{
"images": ["https://..."],
"instruction": "change the mug to red"
}'
Edit Image Region with Mask (GenFill)
curl -X POST "https://engine.prod.bria-api.com/v2/image/edit/gen_fill" \
-H "api_token: $BRIA_API_KEY" \
-H "Content-Type: application/json" \
-H "User-Agent: BriaSkills/1.2.7" \
-d '{
"image": "https://...",
"mask": "https://...",
"prompt": "what to generate in masked area"
}'
Expand Image (Outpainting)
curl -X POST "https://engine.prod.bria-api.com/v2/image/edit/expand" \
-H "api_token: $BRIA_API_KEY" \
-H "Content-Type: application/json" \
-H "User-Agent: BriaSkills/1.2.7" \
-d '{
"image": "base64-or-url",
"aspect_ratio": "16:9",
"prompt": "coffee shop background, wooden table"
}'
Upscale Image
curl -X POST "https://engine.prod.bria-api.com/v2/image/edit/increase_resolution" \
-H "api_token: $BRIA_API_KEY" \
-H "Content-Type: application/json" \
-H "User-Agent: BriaSkills/1.2.7" \
-d '{"image": "https://...", "scale": 2}'
Create Product Lifestyle Shot
curl -X POST "https://engine.prod.bria-api.com/v1/product/lifestyle_shot_by_text" \
-H "api_token: $BRIA_API_KEY" \
-H "Content-Type: application/json" \
-H "User-Agent: BriaSkills/1.2.7" \
-d '{
"image": "https://product-with-transparent-bg.png",
"prompt": "modern kitchen countertop, natural morning light"
}'
Integrate Products into Scene
Place one or more products at exact coordinates in a scene. Products are automatically cut out and matched to the scene's lighting and perspective.
curl -X POST "https://engine.prod.bria-api.com/image/edit/product/integrate" \
-H "api_token: $BRIA_API_KEY" \
-H "Content-Type: application/json" \
-H "User-Agent: BriaSkills/1.2.7" \
-d '{
"scene": "https://scene-image-url",
"products": [
{
"image": "https://product-image-url",
"coordinates": {"x": 100, "y": 200, "width": 300, "height": 400}
}
]
}'
Response Handling
Sync (single image generation)
For single image requests, pass "sync": true in the request body. The response returns the result directly — no polling needed.
Async with polling (batch generation)
For batch or multiple image generation, omit sync (or set "sync": false). The response returns a status URL to poll:
{
"request_id": "uuid",
"status_url": "https://engine.prod.bria-api.com/v2/status/uuid"
}
Poll the status_url until status: "COMPLETED", then get result.image_url.
import requests, time
def get_result(status_url, api_key):
while True:
r = requests.get(status_url, headers={"api_token": api_key, "User-Agent": "BriaSkills/1.2.7"})
data = r.json()
if data["status"] == "COMPLETED":
return data["result"]["image_url"]
if data["status"] == "FAILED":
raise Exception(data.get("error"))
time.sleep(2)
Prompt Engineering Tips
- Style: "professional product photography" vs "casual snapshot", "flat design illustration" vs "3D rendered"
- Lighting: "soft natural light", "studio lighting", "dramatic shadows"
- Background: "white studio", "gradient", "blurred office", "transparent"
- Composition: "centered", "rule of thirds", "negative space on left for text"
- Quality keywords: "high quality", "professional", "commercial grade", "4K", "sharp focus"
- Negative prompts: "blurry, low quality, pixelated", "text, watermark, logo"
API Reference
See references/api-endpoints.md for complete endpoint documentation with request/response formats for all 20+ endpoints.
Authentication
All requests need these headers:
api_token: YOUR_BRIA_API_KEY
Content-Type: application/json
User-Agent: BriaSkills/1.2.7
Additional Resources
- API Endpoints Reference — Complete endpoint documentation with request/response formats
- Workflows & Pipelines — Batch generation, parallel pipelines, integration examples
- Python Client — Full-featured async Python client
- TypeScript Client — Typed Node.js client
- Bash/curl Reference — Shell functions for all endpoints
Related Skills
- vgl — Write structured VGL JSON prompts for precise, deterministic control over FIBO image generation
- image-utils — Classic image manipulation (resize, crop, composite, watermarks) for post-processing
1---2name: bria-ai3description: AI image generation, editing, and background removal API via Bria.ai — remove backgrounds to get transparent PNGs and cutouts, generate images from text prompts, and edit photos with natural language instructions. Also create product photography and lifestyle shots, replace or blur backgrounds, upscale resolution, restyle, and batch-generate visual assets. Use this skill whenever the user wants to remove a background, create transparent PNGs, generate, edit, modify, or transform any image — including hero images, banners, social media visuals, product photos, illustrations, icons, thumbnails, ad creatives, or marketing materials. Also triggers on cutout, inpainting, outpainting, object removal or addition, photo restoration, style transfer, image enhancement, relight, reseason, sketch-to-photo, or any visual content creation. Commercially safe, royalty-free. 20+ specialized endpoints for e-commerce, web design, and content pipelines.4license: MIT5---6
7# Bria — AI Image Generation, Editing & Background Removal
8
9Commercially safe, royalty-free image generation and editing through 20+ API endpoints. Generate from text, edit with natural language, remove backgrounds, create product shots, and build automated image pipelines.
10
11## When to Use This Skill
12
13Use this skill when the user wants to:
14- **Generate images** — "create an image of...", "make me a banner", "generate a hero image", "I need a product photo"
15- **Edit images** — "change the background", "make it look like winter", "add a vase to the table", "remove the person"
16- **Remove/replace backgrounds** — "make the background transparent", "cut out the product", "replace with a studio background"
17- **Product photography** — "create a lifestyle shot", "place this product in a kitchen scene", "e-commerce packshot"
18- **Enhance/transform** — "upscale this image", "make it higher resolution", "restyle as oil painting", "change the lighting"
19- **Batch/pipeline** — "generate 10 product images", "process all these images", "remove backgrounds in bulk"
20
21This skill handles the full spectrum of AI image operations. If the user mentions images, photos, visuals, or any visual content creation — use this skill.
22
23---
24
25## What You Can Build
26
27- **E-commerce product catalog** — Generate product photos, remove backgrounds for transparent PNGs, place products in lifestyle scenes (kitchen, office, outdoor), create packshots with consistent style
28- **Landing page visuals** — Generate hero images, abstract tech backgrounds, team photos, and section illustrations — all matching your brand aesthetic
29- **Social media content** — Instagram posts (1:1), Stories/Reels (9:16), LinkedIn banners (16:9), ad creatives — batch-generate variants for A/B testing
30- **Marketing campaign assets** — Seasonal transformations (summer→winter), restyle product shots for different markets, create localized visuals at scale
31- **Photo restoration pipeline** — Restore old damaged photos, colorize black & white images, upscale low-res photos to 4x, enhance quality automatically
32- **Brand asset toolkit** — Remove backgrounds from logos, blend artwork onto products (t-shirts, mugs), create consistent product photography across your entire catalog
33- **AI-powered design workflows** — Chain operations: generate→edit→remove background→place in scene→upscale — all automated through API pipelines
34
35---
36
37## Setup — API Key Check
38
39Before making any Bria API call, check for the API key and help the user set it up if missing:
40
41### Step 1: Check if the key exists (without printing the key)
42
43```bash
44if [ -z "$BRIA_API_KEY" ]; then
45 echo "BRIA_API_KEY is not set"
46else
47 echo "BRIA_API_KEY is set"
48fi
49```
50
51If the output says **BRIA_API_KEY is set**, skip to the next section.
52
53### Step 2: If the key is missing, guide the user
54
55Tell the user exactly this:
56> To use image generation, you need a free Bria API key.
57>
58> 1. Go to https://platform.bria.ai/console/account/api-keys
59> 2. Sign up or log in
60> 3. Click **Create API Key**
61
62Wait for the user to provide their API key. Do not proceed until they give you the key.
63
64**Do not proceed with any image generation or editing until the API key is confirmed set.**
65
66---
67
68## Core Capabilities
69
70| Need | Capability | Use Case |
71|------|------------|----------|
72| Generate images from text | FIBO Generate | Hero images, product shots, illustrations, social media images, banners |
73| Edit images by text instruction | FIBO-Edit | Change colors, modify objects, transform scenes |
74| Edit image region with mask | GenFill/Erase | Precise inpainting, add/replace specific regions |
75| Add/Replace/Remove objects | Text-based editing | Add vase, replace apple with pear, remove table |
76| Remove background (transparent PNG) | RMBG-2.0 | Extract subjects for overlays, logos, cutouts |
77| Replace/blur/erase background | Background ops | Change, blur, or remove backgrounds |
78| Expand/outpaint images | Outpainting | Extend boundaries, change aspect ratios |
79| Upscale image resolution | Super Resolution | Increase resolution 2x or 4x |
80| Enhance image quality | Enhancement | Improve lighting, colors, details |
81| Restyle images | Restyle | Oil painting, anime, cartoon, 3D render |
82| Change lighting | Relight | Golden hour, spotlight, dramatic lighting |
83| Change season | Reseason | Spring, summer, autumn, winter |
84| Composite/blend images | Image Blending | Apply textures, logos, merge images |
85| Restore old photos | Restoration | Fix old/damaged photos |
86| Colorize images | Colorization | Add color to B&W, or convert to B&W |
87| Sketch to photo | Sketch2Image | Convert drawings to realistic photos |
88| Create product lifestyle shots | Lifestyle Shot | Place products in scenes for e-commerce |
89| Integrate products into scenes | Product Integrate | Embed products at exact coordinates |
90
91## Quick Reference
92
93### Generate an Image (FIBO)
94
95```bash
96curl -X POST "https://engine.prod.bria-api.com/v2/image/generate" \
97 -H "api_token: $BRIA_API_KEY" \
98 -H "Content-Type: application/json" \
99 -H "User-Agent: BriaSkills/1.2.7" \
100 -d '{
101 "prompt": "your description",
102 "aspect_ratio": "16:9",
103 "resolution": "1MP",
104 "sync": true
105 }'
106```
107
108**Aspect ratios**: `1:1` (square), `16:9` (hero/banner), `4:3` (presentation), `9:16` (mobile/story), `3:4` (portrait)
109
110**Resolution**: `1MP` (default) or `4MP` (improved details for photorealism, adds ~30s latency)
111
112**Sync mode**: Pass `"sync": true` in the request body for single image generation to get the result directly in the response. For batch/multiple image generation, omit `sync` (or set `false`) and use polling instead.
113
114> **Advanced**: For precise, deterministic control over generation, use **[VGL structured prompts](../vgl/SKILL.md)** instead of natural language. VGL defines every visual attribute (objects, lighting, composition) as explicit JSON.
115
116### Remove Background (RMBG-2.0)
117
118```bash
119curl -X POST "https://engine.prod.bria-api.com/v2/image/edit/remove_background" \
120 -H "api_token: $BRIA_API_KEY" \
121 -H "Content-Type: application/json" \
122 -H "User-Agent: BriaSkills/1.2.7" \
123 -d '{"image": "https://..."}'
124```
125
126Returns PNG with transparency.
127
128### Edit Image (FIBO-Edit) - No Mask Required
129
130```bash
131curl -X POST "https://engine.prod.bria-api.com/v2/image/edit" \
132 -H "api_token: $BRIA_API_KEY" \
133 -H "Content-Type: application/json" \
134 -H "User-Agent: BriaSkills/1.2.7" \
135 -d '{
136 "images": ["https://..."],
137 "instruction": "change the mug to red"
138 }'
139```
140
141### Edit Image Region with Mask (GenFill)
142
143```bash
144curl -X POST "https://engine.prod.bria-api.com/v2/image/edit/gen_fill" \
145 -H "api_token: $BRIA_API_KEY" \
146 -H "Content-Type: application/json" \
147 -H "User-Agent: BriaSkills/1.2.7" \
148 -d '{
149 "image": "https://...",
150 "mask": "https://...",
151 "prompt": "what to generate in masked area"
152 }'
153```
154
155### Expand Image (Outpainting)
156
157```bash
158curl -X POST "https://engine.prod.bria-api.com/v2/image/edit/expand" \
159 -H "api_token: $BRIA_API_KEY" \
160 -H "Content-Type: application/json" \
161 -H "User-Agent: BriaSkills/1.2.7" \
162 -d '{
163 "image": "base64-or-url",
164 "aspect_ratio": "16:9",
165 "prompt": "coffee shop background, wooden table"
166 }'
167```
168
169### Upscale Image
170
171```bash
172curl -X POST "https://engine.prod.bria-api.com/v2/image/edit/increase_resolution" \
173 -H "api_token: $BRIA_API_KEY" \
174 -H "Content-Type: application/json" \
175 -H "User-Agent: BriaSkills/1.2.7" \
176 -d '{"image": "https://...", "scale": 2}'
177```
178
179### Create Product Lifestyle Shot
180
181```bash
182curl -X POST "https://engine.prod.bria-api.com/v1/product/lifestyle_shot_by_text" \
183 -H "api_token: $BRIA_API_KEY" \
184 -H "Content-Type: application/json" \
185 -H "User-Agent: BriaSkills/1.2.7" \
186 -d '{
187 "image": "https://product-with-transparent-bg.png",
188 "prompt": "modern kitchen countertop, natural morning light"
189 }'
190```
191
192### Integrate Products into Scene
193
194Place one or more products at exact coordinates in a scene. Products are automatically cut out and matched to the scene's lighting and perspective.
195
196```bash
197curl -X POST "https://engine.prod.bria-api.com/image/edit/product/integrate" \
198 -H "api_token: $BRIA_API_KEY" \
199 -H "Content-Type: application/json" \
200 -H "User-Agent: BriaSkills/1.2.7" \
201 -d '{
202 "scene": "https://scene-image-url",
203 "products": [
204 {
205 "image": "https://product-image-url",
206 "coordinates": {"x": 100, "y": 200, "width": 300, "height": 400}
207 }
208 ]
209 }'
210```
211
212---
213
214## Response Handling
215
216### Sync (single image generation)
217
218For single image requests, pass `"sync": true` in the request body. The response returns the result directly — no polling needed.
219
220### Async with polling (batch generation)
221
222For batch or multiple image generation, omit `sync` (or set `"sync": false`). The response returns a status URL to poll:
223
224```json
225{
226 "request_id": "uuid",
227 "status_url": "https://engine.prod.bria-api.com/v2/status/uuid"
228}
229```
230
231Poll the status_url until `status: "COMPLETED"`, then get `result.image_url`.
232
233```python
234import requests, time
235
236def get_result(status_url, api_key):
237 while True:
238 r = requests.get(status_url, headers={"api_token": api_key, "User-Agent": "BriaSkills/1.2.7"})
239 data = r.json()
240 if data["status"] == "COMPLETED":
241 return data["result"]["image_url"]
242 if data["status"] == "FAILED":
243 raise Exception(data.get("error"))
244 time.sleep(2)
245```
246
247---
248
249## Prompt Engineering Tips
250
251- **Style**: "professional product photography" vs "casual snapshot", "flat design illustration" vs "3D rendered"
252- **Lighting**: "soft natural light", "studio lighting", "dramatic shadows"
253- **Background**: "white studio", "gradient", "blurred office", "transparent"
254- **Composition**: "centered", "rule of thirds", "negative space on left for text"
255- **Quality keywords**: "high quality", "professional", "commercial grade", "4K", "sharp focus"
256- **Negative prompts**: "blurry, low quality, pixelated", "text, watermark, logo"
257
258---
259
260## API Reference
261
262See `references/api-endpoints.md` for complete endpoint documentation with request/response formats for all 20+ endpoints.
263
264### Authentication
265
266All requests need these headers:
267```
268api_token: YOUR_BRIA_API_KEY
269Content-Type: application/json
270User-Agent: BriaSkills/1.2.7
271```
272
273---
274
275## Additional Resources
276
277- **[API Endpoints Reference](references/api-endpoints.md)** — Complete endpoint documentation with request/response formats
278- **[Workflows & Pipelines](references/workflows.md)** — Batch generation, parallel pipelines, integration examples
279- **[Python Client](references/code-examples/bria_client.py)** — Full-featured async Python client
280- **[TypeScript Client](references/code-examples/bria_client.ts)** — Typed Node.js client
281- **[Bash/curl Reference](references/code-examples/bria_client.sh)** — Shell functions for all endpoints
282
283## Related Skills
284
285- **[vgl](../vgl/SKILL.md)** — Write structured VGL JSON prompts for precise, deterministic control over FIBO image generation
286- **[image-utils](../image-utils/SKILL.md)** — Classic image manipulation (resize, crop, composite, watermarks) for post-processing