Skip to content

RMBG 3.0

Image-to-Image • bria

Model ID

Use with the Workers AI binding, the AI Gateway REST API, or the Unified API.

Calling the provider directly? Use the provider's model name instead, including with provider-native endpoints or the provider's own SDK. For example, Anthropic's name for anthropic/claude-opus-4.8 is claude-opus-4-8.

  • Third-party

Bria's RMBG 3.0 removes the background from an image and returns a PNG cutout with a transparent background, with cleaner edges than RMBG 2.0 on hair, fur, glass, smoke and other fine or see-through detail. In Bria's blind test on 234 hard images it gave the best or tied-best cutout on 185, more than Photoroom, remove.bg, Ideogram, BiRefNet or RMBG 2.0. It is trained only on licensed data and takes a few seconds per image; for speed and high volume use bria/remove-background (RMBG 2.0).

Model Info
Terms and Licenselink ↗
More informationlink ↗
Pricing
  • Per image$0.018

Usage

const response = await env.AI.run(
  'bria/rmbg-3.0',
  {
    image:
      'https://docs.bria.ai/assets/hair-in.ecdf8abae813b036bf5f0db7f48f2e8128a2c2c7f24504803c798d87a63750e4.3d71a9a0.webp',
  },
)
console.log(response)
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "bria/rmbg-3.0",
  "input": {
    "image": "https://docs.bria.ai/assets/hair-in.ecdf8abae813b036bf5f0db7f48f2e8128a2c2c7f24504803c798d87a63750e4.3d71a9a0.webp"
  }
}'
Loose Curly Hair
{
  "state": "Completed",
  "result": {
    "image": "https://examples.aig.cloudflare.com/bria/rmbg-3.0/loose-curly-hair.png"
  }
}

Examples

See-Through Glassware — Remove the background behind wine glasses and a glass carafe while the glass stays see-through. Input from Bria's RMBG 3.0 launch page.
const response = await env.AI.run(
  'bria/rmbg-3.0',
  {
    image:
      'https://docs.bria.ai/assets/glass-in.93980e97cdade22040b0254f2a98edd7735e0fa32d800bebe8da60c4d2635ca8.3d71a9a0.webp',
  },
)
console.log(response)
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "bria/rmbg-3.0",
  "input": {
    "image": "https://docs.bria.ai/assets/glass-in.93980e97cdade22040b0254f2a98edd7735e0fa32d800bebe8da60c4d2635ca8.3d71a9a0.webp"
  }
}'
See-Through Glassware
{
  "state": "Completed",
  "result": {
    "image": "https://examples.aig.cloudflare.com/bria/rmbg-3.0/see-through-glassware.png"
  }
}
Wisps of Smoke — Isolate incense smoke from a patterned textile, keeping the semi-transparent wisps. Input from Bria's RMBG 3.0 launch page.
const response = await env.AI.run(
  'bria/rmbg-3.0',
  {
    image:
      'https://docs.bria.ai/assets/smoke-in.5cd10f54a22f918882c091233932184895c120b58d382728d97b83c692216773.3d71a9a0.webp',
  },
)
console.log(response)
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "bria/rmbg-3.0",
  "input": {
    "image": "https://docs.bria.ai/assets/smoke-in.5cd10f54a22f918882c091233932184895c120b58d382728d97b83c692216773.3d71a9a0.webp"
  }
}'
Wisps of Smoke
{
  "state": "Completed",
  "result": {
    "image": "https://examples.aig.cloudflare.com/bria/rmbg-3.0/wisps-of-smoke.png"
  }
}

Parameters

image
stringrequiredminLength: 1JPEG, PNG, or WEBP image, a public URL or base64-encoded image data (a `data:` URI prefix is accepted).
preserve_alpha
booleanKeep partial transparency from the input alpha channel. When false, every foreground pixel is fully opaque. Default true.
visual_input_content_moderation
booleanReject the request if the input image fails content moderation. Default false.
visual_output_content_moderation
booleanFail the request if the result fails content moderation. Default false.
image
stringformat: uriURL of the PNG cutout with a transparent background. Bria hosts it for a limited time (3 days by default); download it to keep it.

API Schemas (Raw)

Input
Output

Was this helpful?