{"slug":"bria-ai-2","title":"bria-ai","summary":"Bria.ai image API — generate from text prompts, edit with natural language, remove backgrounds for transparent PNGs, and create product lifestyle shots. Authenticates via OAuth device flow, caches credentials in ~/.bria/credentials, calls 20+ endpoints. Commercially safe, royalty","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-09-17T17:01:36.509022Z","repo":{"url":"https://github.com/Bria-AI/bria-skill","stars":68,"forks":6,"license":null,"updatedAt":"2026-09-20T09:13:38Z"},"bodyHtml":"<hr>\n<p>name: bria-ai\ndescription: &gt;\nBria.ai image API — generate from text prompts, edit with natural language,\nremove backgrounds for transparent PNGs, and create product lifestyle shots.\nAuthenticates via OAuth device flow, caches credentials in ~/.bria/credentials,\ncalls 20+ endpoints. Commercially safe, royalty-free.\nTriggers on: remove background, transparent PNG, cutout, generate image, create banner,\nedit photo, product photography, upscale, restyle, inpainting, outpainting,\nlifestyle shot, background replacement, object removal, photo restoration.\nlicense: MIT\nhomepage: <a href=\"https://bria.ai\">https://bria.ai</a>\nmetadata:\nauthor: Bria AI\nversion: \"1.3.7\"\nopenclaw:\nrequires:\nenv:\n- BRIA_API_KEY\nanyBins:\n- curl\nconfig:\n- ~/.bria/credentials\nprimaryEnv: BRIA_API_KEY\nhomepage: <a href=\"https://bria.ai\">https://bria.ai</a>\nemoji: \"\\U0001F5BC\"</p>\n<hr>\n<h1>Bria — AI Image Generation, Editing &amp; Background Removal</h1>\n<p>Commercially safe, royalty-free image generation and editing through 20+ API endpoints.</p>\n<p>For additional endpoint details, see the <a href=\"https://docs.bria.ai/llms.txt\">Bria API reference for agents</a>.</p>\n<h2>When to Use This Skill</h2>\n<ul>\n<li><strong>Generate images</strong> — \"create an image of...\", \"make me a banner\", \"generate a hero image\", \"I need a product photo\"</li>\n<li><strong>Edit images</strong> — \"change the background\", \"make it look like winter\", \"add a vase to the table\", \"remove the person\"</li>\n<li><strong>Remove/replace backgrounds</strong> — \"make the background transparent\", \"cut out the product\", \"replace with a studio background\"</li>\n<li><strong>Product photography</strong> — \"create a lifestyle shot\", \"place this product in a kitchen scene\", \"e-commerce packshot\"</li>\n<li><strong>Enhance/transform</strong> — \"upscale this image\", \"make it higher resolution\", \"restyle as oil painting\", \"change the lighting\"</li>\n</ul>\n<hr>\n<h2>Setup — Authentication</h2>\n<h3>Step 1: Check for existing credentials</h3>\n<pre><code>if [ -f ~/.bria/credentials ]; then\n  BRIA_ACCESS_TOKEN=$(grep '^access_token=' \"$HOME/.bria/credentials\" | cut -d= -f2-)\n  BRIA_API_KEY=$(grep '^api_token=' \"$HOME/.bria/credentials\" | cut -d= -f2-)\nfi\nif [ -z \"$BRIA_ACCESS_TOKEN\" ]; then\n  echo \"NO_CREDENTIALS\"\nelif [ -n \"$BRIA_API_KEY\" ]; then\n  echo \"READY\"\nelse\n  echo \"CREDENTIALS_FOUND\"\nfi\n</code></pre>\n<ul>\n<li><code>READY</code> → skip to making API calls</li>\n<li><code>CREDENTIALS_FOUND</code> → skip to Step 3</li>\n<li><code>NO_CREDENTIALS</code> → proceed to Step 2</li>\n</ul>\n<h3>Step 2: Authenticate via device flow</h3>\n<p>Source the auth helper and run <code>bria_auth</code>:</p>\n<pre><code>source ~/.agents/skills/bria-ai/references/code-examples/bria_auth.sh\nbria_auth\n</code></pre>\n<p><code>bria_auth</code> will print <code>SIGN_IN_URL=...</code> and <code>USER_CODE=...</code>. Show the user exactly this — nothing more:</p>\n<blockquote>\n<p><strong>Connect your Bria account:</strong> <a href=\"%7BSIGN_IN_URL%7D\">Click here to sign in</a>\nYour code is <strong></strong> — it's already filled in.</p>\n</blockquote>\n<p>Then wait; <code>bria_auth</code> polls automatically and prints <code>AUTHENTICATED</code> when done.</p>\n<p>If it prints an error, the code expired — run <code>bria_auth</code> again.</p>\n<p><strong>Do not proceed with any API call until authentication is confirmed.</strong></p>\n<h3>Step 3: Verify billing status and resolve API key</h3>\n<pre><code>source ~/.agents/skills/bria-ai/references/code-examples/bria_auth.sh\nbria_introspect\n</code></pre>\n<p>Interpret output:</p>\n<ul>\n<li><code>BILLING_ERROR: ...</code> — relay the message to the user verbatim and <strong>stop</strong>. Do not make any API calls.</li>\n<li><code>TOKEN_EXPIRED</code> — tell the user their session expired and restart from Step 2.</li>\n<li><code>READY</code> — <code>BRIA_API_KEY</code> is now cached in <code>~/.bria/credentials</code>. Proceed.</li>\n</ul>\n<hr>\n<h2>Decision Tree — Which Endpoint to Use</h2>\n<pre><code>Transparent PNG / cutout / remove background?\n  → /v2/image/edit/remove_background\n\nGenerate image from scratch (text → image)?\n  → /v2/image/generate\n\nEdit existing image with text instruction?\n  → /v2/image/edit  (use --key images)\n\nCombine 2-4 images — outfit, product, logo, style, or background from one into another?\n  → /v2/image/edit  (--key images, then one --image per extra reference)\n\nChange / replace / blur background?\n  → /v2/image/edit/replace_background  (prompt: \"blur\" or describe new bg)\n\nPlace product in a lifestyle scene?\n  → /v1/product/lifestyle_shot_by_text\n\nUpscale / increase resolution?\n  → /v2/image/edit/increase_resolution  (scale: 2 or 4)\n\nAnything else (restyle, relight, reseason, restore, colorize, sketch, blend, outpaint)?\n  → See references/capabilities.md for the full endpoint list\n</code></pre>\n<hr>\n<h2>How to Call Any Endpoint</h2>\n<pre><code>source ~/.agents/skills/bria-ai/references/code-examples/bria_client.sh\n\n# Generate (no image input)\nRESULT=$(bria_call /v2/image/generate \"\" '\"prompt\": \"your description\", \"aspect_ratio\": \"16:9\", \"sync\": true')\n\n# Remove background\nRESULT=$(bria_call /v2/image/edit/remove_background \"/path/to/local/image.png\")\n\n# Replace background\nRESULT=$(bria_call /v2/image/edit/replace_background \"https://example.com/img.jpg\" '\"prompt\": \"sunset beach\"')\n\n# Edit image (uses images array — pass --key images)\nRESULT=$(bria_call /v2/image/edit \"/path/to/image.png\" --key images '\"instruction\": \"make it look warmer\"')\n\n# Edit with reference images — each --image adds the next one, in order\nRESULT=$(bria_call /v2/image/edit \"https://example.com/man.jpg\" --key images \\\n  --image \"https://example.com/santa.png\" \\\n  '\"instruction\": \"dress the man in image 1 in the santa outfit from image 2\"')\n\n# Upscale\nRESULT=$(bria_call /v2/image/edit/increase_resolution \"https://example.com/img.jpg\" '\"desired_increase\": 4')\n\n# Lifestyle shot\nRESULT=$(bria_call /v1/product/lifestyle_shot_by_text \"/path/to/product.png\" '\"scene_description\": \"modern kitchen countertop\"')\n\necho \"$RESULT\"\n</code></pre>\n<p><strong>Calling convention:</strong> <code>bria_call &lt;endpoint&gt; &lt;image_or_empty&gt; [--key &lt;json_key&gt;] [extra JSON fields...]</code></p>\n<ul>\n<li>Pass a URL, local file path, or <code>\"\"</code> for endpoints without image input</li>\n<li>Use <code>--key images</code> when the endpoint expects an <code>images</code> array instead of <code>image</code></li>\n<li>Add <code>--image &lt;url_or_path&gt;</code> once per extra reference image (<code>--key images</code>, up to 4 in total).\nOrder is preserved: the positional image is \"image 1\", the first <code>--image</code> is \"image 2\", …</li>\n<li>Returns the result image URL on success, or prints an error to stderr</li>\n</ul>\n<p><strong>Editing with several images (2-4):</strong> put the image being edited first, references after it, and\naddress them by position — <em>\"dress the man in image 1 in the santa outfit from image 2\"</em>. Say what\neach reference contributes, in plain prose. Single-image edits need no positional wording.</p>\n<p><strong>Generation options:</strong> Aspect ratios <code>1:1</code>, <code>16:9</code>, <code>4:3</code>, <code>9:16</code>, <code>3:4</code>. Resolution <code>1MP</code> (default) or <code>4MP</code> (more detail, +30s). Pass <code>\"sync\": true</code> for a single generated image. Editing endpoints are the other way round —\nthey answer with a <code>status_url</code> you poll, and <code>\"sync\": true</code> on an edit fails with a gateway\ntimeout.</p>\n<blockquote>\n<p><strong>Advanced</strong>: For precise control over generation, use the <strong>vgl</strong> skill for structured VGL JSON prompts.</p>\n</blockquote>\n<hr>\n<h2>Common Failures</h2>\n<ul>\n<li><strong><code>bria_call</code> returns empty / no URL</strong> → <code>BRIA_API_KEY</code> was not set. Run Step 3 (<code>bria_introspect</code>) to cache it.</li>\n<li><strong>Async job times out</strong> → Some endpoints take 60–90s. If <code>bria_call</code> reports a timeout, retry once; the job may have been queued.</li>\n<li><strong>ERROR 401</strong> → API key is stale. Delete <code>~/.bria/credentials</code> and re-authenticate from Step 2.</li>\n<li><strong><code>BILLING_ERROR</code></strong> → Relay message to user verbatim, do not retry API calls.</li>\n<li><strong>Local file not found</strong> → Pass the absolute path; <code>bria_client.sh</code> handles base64 encoding automatically.</li>\n<li><strong><code>/v2/image/edit</code> returns wrong result</strong> → Confirm <code>--key images</code> flag is present; this endpoint requires the images array format.</li>\n</ul>\n<hr>\n<h2>Resources</h2>\n<ul>\n<li><strong><a href=\"references/capabilities.md\">Capabilities &amp; Prompt Recipes</a></strong> — Full endpoint table, use-case recipes, and prompt engineering tips</li>\n<li><strong><a href=\"references/api-endpoints.md\">API Endpoints Reference</a></strong> — Complete parameter documentation for all 20+ endpoints</li>\n<li><strong><a href=\"references/code-examples/bria_client.sh\">Shell Client (bria_client.sh)</a></strong> — <code>bria_call</code> helper: auth, base64, JSON, polling</li>\n<li><strong><a href=\"references/code-examples/bria_auth.sh\">Auth Helper (bria_auth.sh)</a></strong> — <code>bria_auth</code> and <code>bria_introspect</code> functions</li>\n<li><strong><a href=\"https://docs.bria.ai/llms.txt\">Full API docs for agents (llms.txt)</a></strong> — Agent-ready Bria API reference</li>\n</ul>\n<h2>Related Skills</h2>\n<ul>\n<li><strong>vgl</strong> — Structured VGL JSON prompts for precise, deterministic control over FIBO image generation</li>\n<li><strong>image-utils</strong> — Classic image manipulation (resize, crop, composite, watermarks) for post-processing</li>\n</ul>\n","files":[{"path":"LICENSE.txt","sizeBytes":1335,"isText":true},{"path":"references/api-endpoints.md","sizeBytes":22317,"isText":true},{"path":"references/capabilities.md","sizeBytes":4216,"isText":true},{"path":"references/code-examples/bria_auth.sh","sizeBytes":3498,"isText":true},{"path":"references/code-examples/bria_client.sh","sizeBytes":5295,"isText":true},{"path":"SKILL.md","sizeBytes":8391,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-09-17T17:02:51.539276Z","sha256":"3568BCD09657477F8C21A2B699D718CFD7E71412D88F54911E2C39932FD52D6E","sizeBytes":17305},"review":null,"source":{"repositoryUrl":"https://github.com/Bria-AI/bria-skill","path":"bria-ai-openclaw/skills/bria-ai","license":null,"commit":"348d2d4e76ade63382dff87a4f651b7c50afba65","subtreeSha":"4AB1D43D5694F1C39280DED4877A6F4FF4BCA2E21ECC23D6A0199C62431D1D5F","lastSyncedAt":"2026-09-25T23:11:53.294767Z"},"reviewedAt":"2026-09-17T17:05:34.545722Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/Bria-AI/bria-skill/tree/main/bria-ai-openclaw/skills/bria-ai"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install bria-ai-bria-skill@llmmart"},{"target":"git","command":"git clone https://github.com/Bria-AI/bria-skill.git"}]}