{ "model_id": "bria/remove-background", "provider_id": "bria", "name": "Remove Background", "description": "Bria's RMBG 2.0 model removes the background from an image and returns a PNG cutout with a transparent background. Partial transparency from the input's alpha channel is kept by default.", "task": "Image-to-Image", "tags": [ "Image Editing", "Image-to-Image", "Background Removal" ], "context_length": null, "max_output_tokens": null, "schema_version": "1.0.0", "pricing": { "Per image": 0.018 }, "examples": [ { "name": "Portrait Cutout", "description": "Remove the background from a portrait, using Bria's sample input.", "input": { "image": "https://labs-assets.bria.ai/sandbox-example-inputs/remove_background_example.jpg" }, "output": { "image": "https://examples.aig.cloudflare.com/bria/remove-background/portrait-cutout.png" }, "raw_response": { "state": "Completed", "result": { "image": "https://examples.aig.cloudflare.com/bria/remove-background/portrait-cutout.png" } }, "code_snippets": [ { "label": "typescript", "language": "typescript", "code": "const response = await env.AI.run(\n 'bria/remove-background',\n { image: 'https://labs-assets.bria.ai/sandbox-example-inputs/remove_background_example.jpg' },\n)\nconsole.log(response)" }, { "label": "curl", "language": "bash", "code": "curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \\\n --header \"Authorization: Bearer $CLOUDFLARE_API_TOKEN\" \\\n --header \"Content-Type: application/json\" \\\n --data '{\n \"model\": \"bria/remove-background\",\n \"input\": {\n \"image\": \"https://labs-assets.bria.ai/sandbox-example-inputs/remove_background_example.jpg\"\n }\n}'" } ] } ], "default_example": null, "code_snippets": [], "supports_async": false, "zdr": false, "zdr_comment": null, "external_info": "https://docs.bria.ai/image-editing/editing/background-remove", "terms": "https://bria.ai/terms-of-use", "cover_image_url": "https://pub-26f1392c1b674324be6786695bd72257.r2.dev/bria/remove-background.png", "metadata": { "Input Formats": "JPEG, PNG", "Output Format": "PNG with transparency" }, "request_formats": null, "providers": null, "provider_details": [ { "id": "bria", "pricing": { "output_image_count": 0.018 } } ], "banner": null, "created_at": "2026-10-06 18:54:00", "schema": { "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "image": { "type": "string", "minLength": 1, "description": "JPEG or PNG image (RGB, RGBA, or CMYK), a public URL or base64-encoded image data (a `data:` URI prefix is accepted)." }, "preserve_alpha": { "description": "Keep partial transparency from the input alpha channel. When false, every foreground pixel is fully opaque. Default true.", "type": "boolean" }, "visual_input_content_moderation": { "description": "Reject the request if the input image fails content moderation. Default false.", "type": "boolean" }, "visual_output_content_moderation": { "description": "Fail the request if the result fails content moderation. Default false.", "type": "boolean" } }, "required": [ "image" ], "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "image": { "type": "string", "format": "uri", "description": "URL of the PNG cutout with a transparent background. Bria hosts it for a limited time (3 days by default); download it to keep it." } }, "required": [ "image" ], "additionalProperties": false } } }