{"id":"c3fe0a7b-6918-451d-99a1-1763dbc0687c","entityType":"agent","slug":"clawhub-galbria-bria-ai-client","name":"image generation and editing","canonicalUrl":"https://www.xpersona.co/agent/clawhub-galbria-bria-ai-client","canonicalPath":"/agent/clawhub-galbria-bria-ai-client","generatedAt":"2026-10-09T17:57:06.257Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":null},"description":"Use when generating visual assets with Bria.ai - product photos, hero images, icons, backgrounds. Includes batch generation (multiple images concurrently), pipeline workflows (generate → edit → remove background), and parallel API patterns. Use for websites, presentations, e-commerce catalogs, or any task needing multiple AI-generated images. Skill: image generation and editing Owner: galbria Summary: Use when generating visual assets with Bria.ai - product photos, hero images, icons, backgrounds. Includes batch generation (multiple images concurrently), pipeline workflows (generate → edit → remove background), and parallel API patterns. Use for websites, presentations, e-commerce catalogs, or any task needing multiple AI-generated images. Tags: latest:0.","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 901 downloads reported by the source. Last updated 4/15/2026.","installCommand":"clawhub skill install kn7artjmk0ncb5fmp9x21x4tss80jshr:bria-ai-client","sourceUrl":"https://clawhub.ai/galbria/bria-ai-client","homepage":"https://clawhub.ai/galbria/bria-ai-client","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/galbria/bria-ai-client","kind":"source"}],"safetyScore":84,"overallRank":62,"popularityScore":59,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Use when generating visual assets with Bria.ai - product photos, hero images, icons, backgrounds. Includes batch generation (multiple images concurrently), pipe"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":null},"stars":null,"forks":null,"downloads":901,"packageName":null,"latestVersion":"0.1.0","tractionLabel":"901 downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-03-01T01:41:00.668Z","emptyReason":null},"lastUpdatedAt":"2026-04-15T00:45:39.800Z","lastCrawledAt":"2026-03-01T01:41:00.668Z","lastIndexedAt":null,"nextCrawlAt":"2026-03-02T01:41:00.668Z","lastVerifiedAt":null,"highlights":[{"version":"0.1.0","createdAt":"2026-02-05T17:40:27.361Z","changelog":"Initial release of bria-ai: production-grade visual asset generation via Bria.ai - Generate visual assets (photos, hero images, icons, backgrounds) for web, presentations, e-commerce, and marketing. - Supports batch image generation and parallel API workflows. - Features chained operations: generate, edit, remove background, outpaint, upscale, and more. - Includes text and mask-based editing, advanced background manipulation, restoration, style transfer, and lifestyle photo creation. - Offers practical curl examples and workflow guides for common use cases (website banners, product shots, presentations, social assets).","fileCount":2,"zipByteSize":7175}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install kn7artjmk0ncb5fmp9x21x4tss80jshr:bria-ai-client","setupComplexity":"low","setupSteps":["Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-galbria-bria-ai-client/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-galbria-bria-ai-client/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-galbria-bria-ai-client/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-galbria-bria-ai-client/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-galbria-bria-ai-client/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-galbria-bria-ai-client/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-09T17:57:06.257Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-galbria-bria-ai-client/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-galbria-bria-ai-client/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-galbria-bria-ai-client/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-galbria-bria-ai-client/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":null},"readme":"Skill: image generation and editing\n\nOwner: galbria\n\nSummary: Use when generating visual assets with Bria.ai - product photos, hero images, icons, backgrounds. Includes batch generation (multiple images concurrently), pipeline workflows (generate → edit → remove background), and parallel API patterns. Use for websites, presentations, e-commerce catalogs, or any task needing multiple AI-generated images.\n\nTags: latest:0.1.0\n\nVersion history:\n\nv0.1.0 | 2026-02-05T17:40:27.361Z | auto\n\nInitial release of bria-ai: production-grade visual asset generation via Bria.ai\n\n- Generate visual assets (photos, hero images, icons, backgrounds) for web, presentations, e-commerce, and marketing.\n- Supports batch image generation and parallel API workflows.\n- Features chained operations: generate, edit, remove background, outpaint, upscale, and more.\n- Includes text and mask-based editing, advanced background manipulation, restoration, style transfer, and lifestyle photo creation.\n- Offers practical curl examples and workflow guides for common use cases (website banners, product shots, presentations, social assets).\n\nArchive index:\n\nArchive v0.1.0: 2 files, 7175 bytes\n\nFiles: SKILL.md (21357b), _meta.json (133b)\n\nFile v0.1.0:SKILL.md\n\n---\nname: bria-ai\ndescription: Use when generating visual assets with Bria.ai - product photos, hero images, icons, backgrounds. Includes batch generation (multiple images concurrently), pipeline workflows (generate → edit → remove background), and parallel API patterns. Use for websites, presentations, e-commerce catalogs, or any task needing multiple AI-generated images.\n---\n\n# Bria Visual Asset Generator\n\nGenerate production-ready visual assets for websites, presentations, documents, and applications using Bria's commercially-safe AI models.\n\n## When to Use This Skill\n\n- **Website/App Development**: Hero images, product photos, backgrounds, illustrations\n- **Presentations**: Slides visuals, diagrams, icons, cover images\n- **Documents**: Report graphics, infographics, headers, decorative elements\n- **Marketing**: Social media assets, banners, promotional images\n- **E-commerce**: Product photography, lifestyle shots, catalog images\n- **Batch Generation**: Multiple images with different prompts concurrently\n- **Pipeline Workflows**: Chained operations (generate → edit → remove background → lifestyle shot)\n\n## Core Capabilities\n\n| Need | Capability | Use Case |\n|------|------------|----------|\n| Create new images | FIBO Generate | Hero images, product shots, illustrations |\n| Edit by text | FIBO-Edit | Change colors, modify objects, transform scenes |\n| Edit with mask | GenFill/Erase | Precise inpainting, add/replace specific regions |\n| Add/Replace/Remove objects | Text-based editing | Add vase, replace apple with pear, remove table |\n| Transparent backgrounds | RMBG-2.0 | Extract subjects for overlays, logos, cutouts |\n| Background operations | Replace/Blur/Erase | Change, blur, or remove backgrounds |\n| Expand images | Outpainting | Extend boundaries, change aspect ratios |\n| Upscale images | Super Resolution | Increase resolution 2x or 4x |\n| Enhance quality | Enhancement | Improve lighting, colors, details |\n| Transform style | Restyle | Oil painting, anime, cartoon, 3D render |\n| Change lighting | Relight | Golden hour, spotlight, dramatic lighting |\n| Change season | Reseason | Spring, summer, autumn, winter |\n| Blend/composite | Image Blending | Apply textures, logos, merge images |\n| Text replacement | Rewrite | Change text in images |\n| Restore photos | Restoration | Fix old/damaged photos |\n| Colorize | Colorization | Add color to B&W, or convert to B&W |\n| Sketch to photo | Sketch2Image | Convert drawings to realistic photos |\n| Product photography | Lifestyle Shot | Place products in scenes |\n\n## Quick Reference\n\n### Generate an Image (FIBO)\n\n```bash\ncurl -X POST \"https://engine.prod.bria-api.com/v2/image/generate\" \\\n  -H \"api_token: $BRIA_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"prompt\": \"your description\",\n    \"aspect_ratio\": \"16:9\"\n  }'\n```\n\n**Aspect ratios**: `1:1` (square), `16:9` (hero/banner), `4:3` (presentation), `9:16` (mobile/story), `3:4` (portrait)\n\n> **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.\n\n### Remove Background (RMBG-2.0)\n\n```bash\ncurl -X POST \"https://engine.prod.bria-api.com/v2/image/edit/remove_background\" \\\n  -H \"api_token: $BRIA_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"image\": \"https://...\"}'\n```\n\nReturns PNG with transparency.\n\n### Edit Image (FIBO-Edit) - No Mask Required\n\nEdit any image with natural language instructions:\n\n```bash\ncurl -X POST \"https://engine.prod.bria-api.com/v2/image/edit\" \\\n  -H \"api_token: $BRIA_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"images\": [\"https://...\"],\n    \"instruction\": \"change the mug to red\"\n  }'\n```\n\n**Python example:**\n```python\nfrom bria_client import BriaClient\nclient = BriaClient()\nresult = client.edit_image(image_url, \"change the mug to red\")\nprint(result['result']['image_url'])\n```\n\n### Edit Image Region with Mask (FIBO-Edit)\n\nFor precise control over which region to edit:\n\n```bash\ncurl -X POST \"https://engine.prod.bria-api.com/v2/image/edit/gen_fill\" \\\n  -H \"api_token: $BRIA_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"image\": \"https://...\",\n    \"mask\": \"https://...\",\n    \"prompt\": \"what to generate in masked area\"\n  }'\n```\n\n### Expand Image (Outpainting)\n\nExtend image boundaries to new aspect ratio:\n\n```bash\ncurl -X POST \"https://engine.prod.bria-api.com/v2/image/edit/expand\" \\\n  -H \"api_token: $BRIA_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"image\": \"base64-or-url\",\n    \"aspect_ratio\": \"16:9\",\n    \"prompt\": \"coffee shop background, wooden table\"\n  }'\n```\n\n### Upscale Image\n\nIncrease image resolution 2x or 4x:\n\n```bash\ncurl -X POST \"https://engine.prod.bria-api.com/v2/image/edit/increase_resolution\" \\\n  -H \"api_token: $BRIA_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"image\": \"https://...\", \"scale\": 2}'\n```\n\n### Product Lifestyle Shot\n\nPlace a product in a lifestyle scene:\n\n```bash\ncurl -X POST \"https://engine.prod.bria-api.com/v2/image/edit/lifestyle_shot_by_text\" \\\n  -H \"api_token: $BRIA_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"image\": \"https://product-with-transparent-bg.png\",\n    \"prompt\": \"modern kitchen countertop, natural morning light\"\n  }'\n```\n\n---\n\n## Asset Generation Workflows\n\n### Website Hero Images\n\nGenerate wide banner images for landing pages:\n\n```json\n{\n  \"prompt\": \"Modern tech startup workspace with developers collaborating, bright natural lighting, clean minimal aesthetic\",\n  \"aspect_ratio\": \"16:9\",\n  \"negative_prompt\": \"cluttered, dark, low quality\"\n}\n```\n\n**Tips for hero images:**\n- Use `16:9` for full-width banners\n- Describe lighting and mood explicitly\n- Include \"professional\", \"high quality\", \"commercial\" for polished results\n- Specify \"clean background\" or \"minimal\" for text overlay space\n\n### Product Photography\n\nGenerate e-commerce style product shots:\n\n```json\n{\n  \"prompt\": \"Professional product photo of [item] on white studio background, soft shadows, commercial photography lighting\",\n  \"aspect_ratio\": \"1:1\"\n}\n```\n\n**Then remove background** for transparent PNG to composite anywhere:\n\n```json\n{\"image\": \"generated_image_url\"}\n```\n\n### Presentation Visuals\n\nGenerate slides-ready images:\n\n```json\n{\n  \"prompt\": \"Abstract visualization of data analytics, blue and purple gradient, modern corporate style, clean composition with space for text\",\n  \"aspect_ratio\": \"16:9\"\n}\n```\n\n**Common presentation themes:**\n- \"Abstract technology background\" - tech slides\n- \"Business team collaboration\" - culture slides\n- \"Growth chart visualization\" - metrics slides\n- \"Minimalist geometric patterns\" - section dividers\n\n### Document Graphics\n\nGenerate report or article images:\n\n```json\n{\n  \"prompt\": \"Isometric illustration of cloud computing infrastructure, flat design, vibrant colors, white background\",\n  \"aspect_ratio\": \"4:3\"\n}\n```\n\n### Icons and Illustrations\n\nFor icons, generate then remove background:\n\n```json\n{\n  \"prompt\": \"3D icon of a shield with checkmark, glossy material, soft gradient background, app icon style\",\n  \"aspect_ratio\": \"1:1\"\n}\n```\n\nThen use RMBG-2.0 to get transparent PNG.\n\n### Social Media Assets\n\n**Instagram post (1:1):**\n```json\n{\n  \"prompt\": \"Lifestyle photo of coffee and laptop on wooden desk, morning light, cozy atmosphere\",\n  \"aspect_ratio\": \"1:1\"\n}\n```\n\n**Story/Reel (9:16):**\n```json\n{\n  \"prompt\": \"Vertical product showcase of smartphone, floating in gradient background, tech aesthetic\",\n  \"aspect_ratio\": \"9:16\"\n}\n```\n\n---\n\n## Prompt Engineering Tips\n\n### Be Specific About Style\n- \"professional product photography\" vs \"casual snapshot\"\n- \"flat design illustration\" vs \"3D rendered\"\n- \"corporate modern\" vs \"playful colorful\"\n\n### Specify Technical Details\n- Lighting: \"soft natural light\", \"studio lighting\", \"dramatic shadows\"\n- Background: \"white studio\", \"gradient\", \"blurred office\", \"transparent\"\n- Composition: \"centered\", \"rule of thirds\", \"negative space on left for text\"\n\n### Quality Keywords\nAdd these for polished results:\n- \"high quality\", \"professional\", \"commercial grade\"\n- \"4K\", \"detailed\", \"sharp focus\"\n- \"award-winning photography\" (for photos)\n\n### Negative Prompts\nExclude unwanted elements:\n- \"blurry, low quality, pixelated\"\n- \"text, watermark, logo\"\n- \"cluttered, busy, messy\"\n\n---\n\n## Async Response Handling\n\nAll endpoints return async responses:\n\n```json\n{\n  \"request_id\": \"uuid\",\n  \"status_url\": \"https://engine.prod.bria-api.com/v2/status/uuid\"\n}\n```\n\nPoll the status_url until `status: \"COMPLETED\"`, then get `result.image_url`.\n\n```python\nimport requests, time\n\ndef get_result(status_url, api_key):\n    while True:\n        r = requests.get(status_url, headers={\"api_token\": api_key})\n        data = r.json()\n        if data[\"status\"] == \"COMPLETED\":\n            return data[\"result\"][\"image_url\"]\n        if data[\"status\"] == \"FAILED\":\n            raise Exception(data.get(\"error\"))\n        time.sleep(2)\n```\n\n---\n\n## Batch & Parallel Image Generation\n\n### Generating Multiple Images Concurrently\n\nFor generating many images efficiently, launch requests in parallel and poll concurrently:\n\n```python\nimport asyncio\nimport aiohttp\n\nasync def generate_image(session, api_key, prompt, aspect_ratio=\"1:1\"):\n    \"\"\"Launch a single generation request.\"\"\"\n    async with session.post(\n        \"https://engine.prod.bria-api.com/v2/image/generate\",\n        headers={\"api_token\": api_key, \"Content-Type\": \"application/json\"},\n        json={\"prompt\": prompt, \"aspect_ratio\": aspect_ratio}\n    ) as resp:\n        return await resp.json()\n\nasync def poll_status(session, api_key, status_url, timeout=120):\n    \"\"\"Poll until complete or failed.\"\"\"\n    for _ in range(timeout // 2):\n        async with session.get(status_url, headers={\"api_token\": api_key}) as resp:\n            data = await resp.json()\n            if data[\"status\"] == \"COMPLETED\":\n                return data[\"result\"][\"image_url\"]\n            if data[\"status\"] == \"FAILED\":\n                raise Exception(data.get(\"error\", \"Generation failed\"))\n        await asyncio.sleep(2)\n    raise TimeoutError(f\"Timeout polling {status_url}\")\n\nasync def generate_batch(api_key, prompts, aspect_ratio=\"1:1\", max_concurrent=5):\n    \"\"\"Generate multiple images with different prompts concurrently.\"\"\"\n    semaphore = asyncio.Semaphore(max_concurrent)  # Rate limiting\n\n    async def generate_one(prompt):\n        async with semaphore:\n            async with aiohttp.ClientSession() as session:\n                # Launch request\n                result = await generate_image(session, api_key, prompt, aspect_ratio)\n                # Poll for completion\n                return await poll_status(session, api_key, result[\"status_url\"])\n\n    # Run all concurrently\n    results = await asyncio.gather(*[generate_one(p) for p in prompts], return_exceptions=True)\n    return results\n\n# Usage\nprompts = [\n    \"Professional photo of running shoes on white background\",\n    \"Professional photo of leather handbag on white background\",\n    \"Professional photo of smartwatch on white background\",\n    \"Professional photo of sunglasses on white background\",\n]\nimage_urls = asyncio.run(generate_batch(\"YOUR_API_KEY\", prompts, max_concurrent=3))\n```\n\n**Key points:**\n- Use `asyncio.Semaphore` to limit concurrent requests (recommended: 3-5)\n- `return_exceptions=True` prevents one failure from canceling all requests\n- Each result is either a URL string or an Exception object\n\n### TypeScript/Node.js Parallel Generation\n\n```typescript\ntype AspectRatio = \"1:1\" | \"4:3\" | \"16:9\" | \"3:4\" | \"9:16\";\n\ninterface BriaResponse {\n  request_id: string;\n  status_url: string;\n}\n\ninterface BriaStatusResponse {\n  status: \"IN_PROGRESS\" | \"COMPLETED\" | \"FAILED\";\n  result?: { image_url: string };\n  error?: string;\n}\n\ninterface GenerateBatchResult {\n  prompt: string;\n  imageUrl: string | null;\n  error: string | null;\n}\n\nasync function generateBatch(\n  apiKey: string,\n  prompts: string[],\n  aspectRatio: AspectRatio = \"1:1\",\n  maxConcurrent = 5\n): Promise<GenerateBatchResult[]> {\n  const semaphore = { count: 0, max: maxConcurrent };\n\n  async function withLimit<T>(fn: () => Promise<T>): Promise<T> {\n    while (semaphore.count >= semaphore.max) {\n      await new Promise(r => setTimeout(r, 100));\n    }\n    semaphore.count++;\n    try {\n      return await fn();\n    } finally {\n      semaphore.count--;\n    }\n  }\n\n  async function generateOne(prompt: string): Promise<string> {\n    return withLimit(async () => {\n      // Launch request\n      const res = await fetch(\"https://engine.prod.bria-api.com/v2/image/generate\", {\n        method: \"POST\",\n        headers: { \"api_token\": apiKey, \"Content-Type\": \"application/json\" },\n        body: JSON.stringify({ prompt, aspect_ratio: aspectRatio })\n      });\n      const { status_url } = (await res.json()) as BriaResponse;\n\n      // Poll for result\n      for (let i = 0; i < 60; i++) {\n        const statusRes = await fetch(status_url, { headers: { \"api_token\": apiKey } });\n        const data = (await statusRes.json()) as BriaStatusResponse;\n        if (data.status === \"COMPLETED\") return data.result!.image_url;\n        if (data.status === \"FAILED\") throw new Error(data.error || \"Generation failed\");\n        await new Promise(r => setTimeout(r, 2000));\n      }\n      throw new Error(\"Timeout waiting for generation\");\n    });\n  }\n\n  const results = await Promise.allSettled(prompts.map(generateOne));\n\n  return results.map((result, i) => ({\n    prompt: prompts[i],\n    imageUrl: result.status === \"fulfilled\" ? result.value : null,\n    error: result.status === \"rejected\" ? result.reason.message : null\n  }));\n}\n\n// Usage\nconst results = await generateBatch(process.env.BRIA_API_KEY!, [\n  \"Modern office workspace with natural lighting\",\n  \"Abstract tech background with blue gradient\",\n  \"Professional headshot studio setup\"\n], \"16:9\", 3);\n\nresults.forEach(r => {\n  if (r.imageUrl) console.log(`✓ ${r.prompt}: ${r.imageUrl}`);\n  else console.log(`✗ ${r.prompt}: ${r.error}`);\n});\n```\n```\n\n---\n\n## Pipeline Workflows\n\nChain multiple operations on images (generate → edit → remove background).\n\n### Complete Pipeline Example\n\n```python\nasync def product_pipeline(api_key, product_descriptions, scene_prompt):\n    \"\"\"\n    Pipeline: Generate product → Remove background → Place in lifestyle scene\n    \"\"\"\n    async with aiohttp.ClientSession() as session:\n        results = []\n\n        for desc in product_descriptions:\n            # Step 1: Generate product image\n            gen_result = await generate_image(session, api_key,\n                f\"Professional product photo of {desc} on white background, studio lighting\",\n                aspect_ratio=\"1:1\")\n            product_url = await poll_status(session, api_key, gen_result[\"status_url\"])\n\n            # Step 2: Remove background\n            async with session.post(\n                \"https://engine.prod.bria-api.com/v2/image/edit/remove_background\",\n                headers={\"api_token\": api_key, \"Content-Type\": \"application/json\"},\n                json={\"image\": product_url}\n            ) as resp:\n                rmbg_result = await resp.json()\n            transparent_url = await poll_status(session, api_key, rmbg_result[\"status_url\"])\n\n            # Step 3: Place in lifestyle scene\n            async with session.post(\n                \"https://engine.prod.bria-api.com/v2/image/edit/lifestyle_shot_by_text\",\n                headers={\"api_token\": api_key, \"Content-Type\": \"application/json\"},\n                json={\"image\": transparent_url, \"prompt\": scene_prompt}\n            ) as resp:\n                lifestyle_result = await resp.json()\n            final_url = await poll_status(session, api_key, lifestyle_result[\"status_url\"])\n\n            results.append({\n                \"product\": desc,\n                \"original\": product_url,\n                \"transparent\": transparent_url,\n                \"lifestyle\": final_url\n            })\n\n        return results\n\n# Usage\nproducts = [\"coffee mug\", \"water bottle\", \"notebook\"]\nscene = \"modern minimalist desk, natural morning light, plants in background\"\nresults = asyncio.run(product_pipeline(\"YOUR_API_KEY\", products, scene))\n```\n\n### Parallel Pipeline (Advanced)\n\nProcess multiple products through the pipeline concurrently:\n\n```python\nasync def parallel_pipeline(api_key, products, scene_prompt, max_concurrent=3):\n    \"\"\"Run full pipeline for multiple products in parallel.\"\"\"\n    semaphore = asyncio.Semaphore(max_concurrent)\n\n    async def process_one(product):\n        async with semaphore:\n            return await single_product_pipeline(api_key, product, scene_prompt)\n\n    return await asyncio.gather(*[process_one(p) for p in products], return_exceptions=True)\n```\n\n### Common Pipeline Patterns\n\n| Pipeline | Steps | Use Case |\n|----------|-------|----------|\n| Product → Transparent | generate → remove_background | E-commerce cutouts |\n| Product → Lifestyle | generate → remove_background → lifestyle_shot | Marketing photos |\n| Edit → Upscale | edit → increase_resolution | High-res edited images |\n| Generate → Restyle | generate → restyle | Artistic variations |\n| Generate → Variations | generate (num_results=4) | A/B testing options |\n\n---\n\n## Integration Examples\n\n### React/Next.js Component\n\n```jsx\n// Generate and display a hero image\nconst [imageUrl, setImageUrl] = useState(null);\n\nasync function generateHero(prompt) {\n  const res = await fetch('/api/bria/generate', {\n    method: 'POST',\n    body: JSON.stringify({ prompt, aspect_ratio: '16:9' })\n  });\n  const { image_url } = await res.json();\n  setImageUrl(image_url);\n}\n```\n\n### Python Script for Batch Generation\n\n```python\nimport asyncio\n\n# See \"Batch & Parallel Image Generation\" section for generate_batch function\n\nasync def main():\n    api_key = \"YOUR_API_KEY\"\n    products = [\"running shoes\", \"leather bag\", \"smart watch\"]\n    prompts = [f\"Professional product photo of {p} on white background\" for p in products]\n\n    results = await generate_batch(api_key, prompts, aspect_ratio=\"1:1\", max_concurrent=3)\n\n    for product, result in zip(products, results):\n        if isinstance(result, Exception):\n            print(f\"{product}: FAILED - {result}\")\n        else:\n            print(f\"{product}: {result}\")\n\nasyncio.run(main())\n```\n\n---\n\n## API Reference\n\nSee `references/api-endpoints.md` for complete endpoint documentation.\n\n### Key Endpoints\n\n**Generation**\n| Endpoint | Purpose |\n|----------|---------|\n| `POST /v2/image/generate` | Generate images from text (FIBO) |\n\n**Edit by Text (No Mask)**\n| Endpoint | Purpose |\n|----------|---------|\n| `POST /v2/image/edit` | Edit image with natural language instruction |\n| `POST /v2/image/edit/add_object_by_text` | Add objects to image |\n| `POST /v2/image/edit/replace_object_by_text` | Replace objects in image |\n| `POST /v2/image/edit/erase_by_text` | Remove objects by name |\n\n**Edit with Mask**\n| Endpoint | Purpose |\n|----------|---------|\n| `POST /v2/image/edit/gen_fill` | Inpaint/generate in masked region |\n| `POST /v2/image/edit/erase` | Erase masked region |\n\n**Background Operations**\n| Endpoint | Purpose |\n|----------|---------|\n| `POST /v2/image/edit/remove_background` | Remove background (RMBG-2.0) |\n| `POST /v2/image/edit/replace_background` | Replace with AI-generated background |\n| `POST /v2/image/edit/blur_background` | Apply blur to background |\n| `POST /v2/image/edit/erase_foreground` | Remove foreground, fill background |\n| `POST /v2/image/edit/crop_foreground` | Crop tightly around subject |\n\n**Image Transformation**\n| Endpoint | Purpose |\n|----------|---------|\n| `POST /v2/image/edit/expand` | Outpaint to new aspect ratio |\n| `POST /v2/image/edit/enhance` | Enhance quality and details |\n| `POST /v2/image/edit/increase_resolution` | Upscale 2x or 4x |\n| `POST /v2/image/edit/blend` | Blend/merge images or textures |\n| `POST /v2/image/edit/reseason` | Change season/weather |\n| `POST /v2/image/edit/restyle` | Transform artistic style |\n| `POST /v2/image/edit/relight` | Modify lighting |\n\n**Text & Restoration**\n| Endpoint | Purpose |\n|----------|---------|\n| `POST /v2/image/edit/replace_text` | Replace text in image |\n| `POST /v2/image/edit/sketch_to_image` | Convert sketch to photo |\n| `POST /v2/image/edit/restore` | Restore old/damaged photos |\n| `POST /v2/image/edit/colorize` | Colorize B&W or convert to B&W |\n\n**Product Photography**\n| Endpoint | Purpose |\n|----------|---------|\n| `POST /v2/image/edit/lifestyle_shot_by_text` | Place product in scene by text |\n| `POST /v2/image/edit/shot_by_image` | Place product on reference background |\n\n**Utilities**\n| Endpoint | Purpose |\n|----------|---------|\n| `POST /v2/structured_instruction/generate` | Generate JSON instruction (no image) |\n| `GET /v2/status/{id}` | Check async request status |\n\n### Authentication\n\nAll requests need `api_token` header:\n```\napi_token: YOUR_BRIA_API_KEY\n```\n\n---\n\n## Related Skills\n\n- **[vgl](../vgl/SKILL.md)** - Write structured VGL (Visual Generation Language) JSON prompts for precise, deterministic control over FIBO image generation. Use VGL for reproducible outputs with explicit visual attributes.\n- **[image-utils](../image-utils/SKILL.md)** - Classic image manipulation (resize, crop, composite, watermarks) for post-processing Bria outputs\n\nFile v0.1.0:_meta.json\n\n{\n  \"ownerId\": \"kn7artjmk0ncb5fmp9x21x4tss80jshr\",\n  \"slug\": \"bria-ai-client\",\n  \"version\": \"0.1.0\",\n  \"publishedAt\": 1770313227361\n}","readmeExcerpt":"Skill: image generation and editing Owner: galbria Summary: Use when generating visual assets with Bria.ai - product photos, hero images, icons, backgrounds. Includes batch generation (multiple images concurrently), pipeline workflows (generate → edit → remove background), and parallel API patterns. Use for websites, presentations, e-commerce catalogs, or any task needing multiple AI-generated images. Tags: latest:0.","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"curl -X POST \"https://engine.prod.bria-api.com/v2/image/generate\" \\\n  -H \"api_token: $BRIA_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{"},{"language":"bash","snippet":"curl -X POST \"https://engine.prod.bria-api.com/v2/image/generate\" \\\n  -H \"api_token: $BRIA_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"prompt\": \"your description\",\n    \"aspect_ratio\": \"16:9\"\n  }'"},{"language":"bash","snippet":"curl -X POST \"https://engine.prod.bria-api.com/v2/image/edit/remove_background\" \\\n  -H \"api_token: $BRIA_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"image\": \"https://...\"}'"},{"language":"bash","snippet":"curl -X POST \"https://engine.prod.bria-api.com/v2/image/edit/remove_background\" \\\n  -H \"api_token: $BRIA_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"image\": \"https://...\"}'"},{"language":"bash","snippet":"curl -X POST \"https://engine.prod.bria-api.com/v2/image/edit\" \\\n  -H \"api_token: $BRIA_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{"},{"language":"bash","snippet":"curl -X POST \"https://engine.prod.bria-api.com/v2/image/edit\" \\\n  -H \"api_token: $BRIA_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"images\": [\"https://...\"],\n    \"instruction\": \"change the mug to red\"\n  }'"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: bria-ai\ndescription: Use when generating visual assets with Bria.ai - product photos, hero images, icons, backgrounds. Includes batch generation (multiple images concurrently), pipeline workflows (generate → edit → remove background), and parallel API patterns. Use for websites, presentations, e-commerce catalogs, or any task needing multiple AI-generated images.\n---\n\n# Bria Visual Asset Generator\n\nGenerate production-ready visual assets for websites, presentations, documents, and applications using Bria's commercially-safe AI models.\n\n## When to Use This Skill\n\n- **Website/App Development**: Hero images, product photos, backgrounds, illustrations\n- **Presentations**: Slides visuals, diagrams, icons, cover images\n- **Documents**: Report graphics, infographics, headers, decorative elements\n- **Marketing**: Social media assets, banners, promotional images\n- **E-commerce**: Product photography, lifestyle shots, catalog images\n- **Batch Generation**: Multiple images with different prompts concurrently\n- **Pipeline Workflows**: Chained operations (generate → edit → remove background → lifestyle shot)\n\n## Core Capabilities\n\n| Need | Capability | Use Case |\n|------|------------|----------|\n| Create new images | FIBO Generate | Hero images, product shots, illustrations |\n| Edit by text | FIBO-Edit | Change colors, modify objects, transform scenes |\n| Edit with mask | GenFill/Erase | Precise inpainting, add/replace specific regions |\n| Add/Replace/Remove objects | Text-based editing | Add vase, replace apple with pear, remove table |\n| Transparent backgrounds | RMBG-2.0 | Extract subjects for overlays, logos, cutouts |\n| Background operations | Replace/Blur/Erase | Change, blur, or remove backgrounds |\n| Expand images | Outpainting | Extend boundaries, change aspect ratios |\n| Upscale images | Super Resolution | Increase resolution 2x or 4x |\n| Enhance quality | Enhancement | Improve lighting, colors, details |\n| Transform style | Restyle | Oil painting, anime, cartoon, 3D render |\n| Change lighting | Relight | Golden hour, spotlight, dramatic lighting |\n| Change season | Reseason | Spring, summer, autumn, winter |\n| Blend/composite | Image Blending | Apply textures, logos, merge images |\n| Text replacement | Rewrite | Change text in images |\n| Restore photos | Restoration | Fix old/damaged photos |\n| Colorize | Colorization | Add color to B&W, or convert to B&W |\n| Sketch to photo | Sketch2Image | Convert drawings to realistic photos |\n| Product photography | Lifestyle Shot | Place products in scenes |\n\n## Quick Reference\n\n### Generate an Image (FIBO)\n\n```bash\ncurl -X POST \"https://engine.prod.bria-api.com/v2/image/generate\" \\\n  -H \"api_token: $BRIA_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"prompt\": \"your description\",\n    \"aspect_ratio\": \"16:9\"\n  }'\n```\n\n**Aspect ratios**: `1:1` (square), `16:9` (hero/banner), `4:3` (presentation), `9:16` (mobile/story), `3:4` (portrait)\n\n> **Advanced**: For precise, deterministic control"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7artjmk0ncb5fmp9x21x4tss80jshr\",\n  \"slug\": \"bria-ai-client\",\n  \"version\": \"0.1.0\",\n  \"publishedAt\": 1770313227361\n}"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"Use when generating visual assets with Bria.ai - product photos, hero images, icons, backgrounds. Includes batch generation (multiple images concurrently), pipeline workflows (generate → edit → remove background), and parallel API patterns. Use for websites, presentations, e-commerce catalogs, or any task needing multiple AI-generated images. Skill: image generation and editing Owner: galbria Summary: Use when generating visual assets with Bria.ai - product photos, hero images, icons, backgrounds. Includes batch generation (multiple images concurrently), pipeline workflows (generate → edit → remove background), and parallel API patterns. Use for websites, presentations, e-commerce catalogs, or any task needing multiple AI-generated images. Tags: latest:0.","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":832,"uniquenessScore":55,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-09T17:57:06.257Z","emptyReason":null},"items":[{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-10T18:48:31.762Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}