> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vidgo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Bria RMBG 3.0 背景移除

> Bria RMBG 3.0 背景移除 API 把一张照片转换为原尺寸的透明 PNG，并可用可选提示词说明要保留的主体。

> [!TIP]
>
> 1. 提交后会返回 `task_id`。如果提供了 `callback_url`，当任务状态变为 `finished` 或 `failed` 时，系统会向 `callback_url` 发送 POST 请求。
> 2. 无论是否提供 `callback_url`，都可以通过统一的[查询任务状态](https://docs.vidgo.ai/zh/api-manual/task-management/status.md)接口获取结果。

Bria RMBG 3.0 背景移除把一张照片转换为与原图同尺寸的透明 PNG 抠图。照片中有多个可能的主体时，可以加一句可选提示词，用简单的语言说明要保留什么，例如 "the woman and her bicycle"。典型用途包括商品图、头像、营销合成图和设计素材。

Bria AI 这样介绍该模型：“RMBG 3.0 是 Bria 第三代背景移除模型，也是第一款基于生成式基础模型构建的版本。”据 Bria 介绍，它只使用授权数据训练，能把“任何照片转换为干净、柔和的 alpha 蒙版”。

## 模型

* **bria/rmbg-v3.0/remove-background** — Bria RMBG 3.0 背景移除，每次一个透明 PNG。

## 功能

* 背景移除生成柔和的 alpha 蒙版，适合头发、毛发和细节边缘；Bria 称其在自家基准测试的头发与毛发类别中平均排名最佳。
* 可选的自然语言提示词，说明要保留的主体。
* 输出一个透明 PNG，宽高与输入图片相同。
* 按次固定计费。

## 必填参数

* `image_urls` (string\[])：恰好一张图片，使用公开可访问的 HTTP(S) URL。

## 可选参数

* `prompt` (string)：用简单的语言说明要保留什么，最多 2,000 个字符。首尾空白会被去除，空白提示词会被忽略。

## 输出

任务完成后，[查询任务状态](https://docs.vidgo.ai/zh/api-manual/task-management/status.md)和回调内容的 `files` 数组中返回一个带透明通道的 PNG，宽高与输入图片相同。

## 示例

* **商品抠图**：一张商品照片，使用默认设置。
* **带提示词和回调的抠图**：公园人像，`prompt: "the woman and her bicycle"`，并设置 `callback_url`。

## 注意事项

* `input` 接收 `image_urls` 和 `prompt`，其他字段返回 400。`model` 和 `callback_url` 放在请求根级，与 `input` 并列。
* `image_urls` 只接收一个公开 HTTP(S) URL；空数组、多个 URL 或数据 URI 会返回 400。
* 每次请求按固定费率计费，提示词不影响价格。提交时预扣积分，任务失败会全额退还。当前费率见[定价页](https://vidgo.ai/apis/api-pricing)。


## OpenAPI

````yaml zh/api-manual/image-series/bria-rmbg-v3-0-remove-background.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: Vidgo API - Bria RMBG 3.0 背景移除
  description: Bria RMBG 3.0 背景移除 API 把一张照片转换为原尺寸的透明 PNG，并可用可选提示词说明要保留的主体。
  version: 1.0.0
servers:
  - url: https://api.vidgo.ai
    description: 生产环境服务器
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Bria RMBG 3.0 Remove Background
      summary: 提交 Bria RMBG 3.0 背景移除 任务
      operationId: submitBriaRmbg30RemoveBackgroundTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
            examples:
              cutout:
                summary: 商品抠图
                value:
                  model: bria/rmbg-v3.0/remove-background
                  input:
                    image_urls:
                      - https://example.com/ceramic-mug.jpg
              guided:
                summary: 带提示词和回调的抠图
                value:
                  model: bria/rmbg-v3.0/remove-background
                  callback_url: https://your-domain.com/callback
                  input:
                    image_urls:
                      - https://example.com/park-portrait.jpg
                    prompt: the woman and her bicycle
      responses:
        '200':
          description: 任务提交结果。任务 ID 标识一项异步任务；生成可能仍在进行中。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
        '400':
          description: 请求参数无效
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: 未授权
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SubmitRequest:
      type: object
      required:
        - model
        - input
      additionalProperties: false
      properties:
        model:
          type: string
          example: bria/rmbg-v3.0/remove-background
        callback_url:
          type: string
          format: uri
          description: 可选的 Webhook URL，用于接收完成或失败通知。
          example: https://your-domain.com/callback
        input:
          type: object
          required:
            - image_urls
          additionalProperties: false
          properties:
            image_urls:
              type: array
              minItems: 1
              maxItems: 1
              items:
                type: string
                format: uri
                description: 使用公开可访问的 HTTP(S) 图片链接。
              description: 必填，恰好一张需要去除背景的图片。
            prompt:
              type: string
              maxLength: 2000
              description: >-
                可选，用简单的语言说明要保留的主体，例如 `the woman and her bicycle`。最多 2,000
                个字符；首尾空白会被去除，空白提示词会被忽略。
    SubmitResponse:
      type: object
      required:
        - code
        - data
      properties:
        code:
          type: integer
          example: 200
        data:
          type: object
          required:
            - task_id
            - status
            - created_time
          properties:
            task_id:
              type: string
              example: task-example-001
            status:
              type: string
              example: not_started
            created_time:
              type: string
              format: date-time
              example: '2026-11-25T10:30:00'
    ErrorResponse:
      type: object
      required:
        - detail
      properties:
        detail:
          type: string
          description: 错误信息。参见[错误码](/zh/api-manual/error-codes)。
          example: prompt is required
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: '使用 `Authorization: Bearer VIDGO_API_KEY`。'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.