POST
javascript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 const axios = require('axios'); const api_key = "YOUR API-KEY"; const url = "https://api.segmind.com/v1/bria-extract-object"; const data = { "image": "https://segmind-resources.s3.amazonaws.com/input/bria-extract-object-input.jpg", "prompt": "the bright red ceramic coffee mug", "autocrop": true, "remove_background": false, "visual_input_content_moderation": false, "visual_output_content_moderation": false }; (async function() { try { const response = await axios.post(url, data, { headers: { 'x-api-key': api_key } }); console.log(response.data); } catch (error) { console.error('Error:', error.response.data); } })();
RESPONSE
image/jpeg
HTTP Response Codes
200 - OKImage Generated
401 - UnauthorizedUser authentication failed
404 - Not FoundThe requested URL does not exist
405 - Method Not AllowedThe requested HTTP method is not allowed
406 - Not AcceptableNot enough credits
500 - Server ErrorServer had some issue with processing

Attributes


imagestr *

Source image to extract from; public URL or base64 data URI (JPEG, PNG, WEBP, max 12MB). Use a clear shot where the target object is fully visible.


promptstr *

Natural-language name of the single object to extract. Be spatially specific when similar items appear, e.g. the sneaker on the left.


autocropboolean ( default: true )

Tightens the output canvas around the extracted object. Enable for ready-to-composite product cutouts; disable to keep original image dimensions.


remove_backgroundboolean ( default: 1 )

Refines the cutout alpha via RMBG for softer matte edges. Enable for photographic subjects; disable for text, logos or graphics.


visual_input_content_moderationboolean ( default: 1 )

Moderates the input image before processing and stops on failure. Enable for user-generated uploads; disable for trusted internal assets.


visual_output_content_moderationboolean ( default: 1 )

Moderates the extracted result and blocks unsafe output. Enable for public-facing pipelines; disable for trusted internal assets.

To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.

Bria Extract Object: AI Object Extraction API

What is Bria Extract Object?

Bria Extract Object isolates a single object you describe in plain language and returns it as a precise RGBA-PNG cutout with soft, continuous alpha edges. Unlike background removal, which strips the entire foreground, Extract Object targets one object by name — so you can pull a single product out of a multi-product lifestyle shot, separate one person from a group, or lift a subject made of several parts. It belongs to Bria's enterprise image-editing suite, trained exclusively on licensed data for full IP safety and commercially safe outputs. Because results are transparent PNGs, they drop straight into compositing, catalog, and design pipelines with no manual masking.

Key Features

  • Prompt-driven extraction: name the object (for example, the red car) to target it directly.
  • Clean RGBA output with soft, continuous alpha edges for natural blending over any background.
  • Autocrop to tighten the canvas around the object for ready-to-use cutouts.
  • Optional RMBG refinement for softer, matte-quality edges.
  • Built-in input and output content-moderation toggles.
  • Accepts JPEG, PNG, and WEBP via public URL or base64 data URI.

Best Use Cases

  • E-commerce: pull one product out of a flat-lay or lifestyle scene for clean catalog and packshot assets.
  • Marketing and design: extract a subject for compositing into new backgrounds, banners, and ads.
  • Group photos: separate a single person from a crowd.
  • Automated pipelines: batch object isolation at scale without manual masking.

In testing, extracting the bright red ceramic coffee mug from a five-object flat-lay returned a crisp, handle-and-rim-accurate cutout with no background bleed.

Prompt Tips and Output Quality

Name exactly one object, and when similar items appear add a spatial qualifier such as the sneaker on the left. Keep autocrop on for tight product cutouts; turn it off to preserve the input's original dimensions. Enable remove_background for photographic subjects that need softer matte edges, but leave it off for text, logos, or graphics to avoid over-trimming fine detail.

FAQs

How is Extract Object different from background removal? Background removal keeps the whole foreground, while Extract Object isolates the one object you name — ideal when a scene contains several items.

What image formats and sizes are supported? JPEG, PNG, and WEBP, supplied as a public URL or a base64 data URI, up to 12MB.

Does the output keep transparency? Yes. The model returns an RGBA-PNG cutout with soft alpha edges, ready to composite over any background.

Can it extract an object made of several parts? Yes. Extraction targets the named subject even when it spans multiple parts of the image.

How do I pick one of several similar objects? Add a spatial or color qualifier to the prompt, such as the mug on the right or the yellow hammer.

Is it safe for commercial use? Yes. Bria models are trained exclusively on licensed data, producing IP-safe outputs for commercial workflows.