Bria Background Replace
按实际用量计费
ae_bria_background_replace
将图片背景替换为通过文本描述的新场景,或基于参考图片生成的场景。
按实际用量计费
价格说明
单次费用为(较大值(48 × 成功生成图片数量(张), 0))AE积分。各项条件同时适用,按所选条件计算合计费用。
按实际成功生成的图片数量计费,而非请求生成的图片数量。排队等待时间不收费。
API 调用
通过统一工具网关发起同步请求,鉴权和计费由 AgentEarth 处理。
cURL
curl --request POST \
--url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_bria_background_replace' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"request_body": {
"image_url": "https://storage.googleapis.com/falserverless/bria/bria_bg_replace_fg.jpg"
}
}
}'- 请求方式
- POST
- 接口地址
- /agent-api/v1/tool/execute
- 鉴权方式
- X-Api-Key
- 超时时间
- 60 秒
响应示例
{
"error_no": 0,
"error_msg": "",
"result": [
{
"type": "text",
"text": "xxx"
}
],
"platform_annotations": {
"source": "AgentEarth",
"platform_note": "xxx",
"platform_suggestion": "xxx"
}
}工具参数
未传入的可选参数将使用平台默认值。
| 参数 | 类型 | 必填 | 说明 | 默认值 |
|---|---|---|---|---|
request_body | object | 是 | 暂无参数说明。 | — |
request_body.fast | boolean | 否 | Whether to use the fast model | true |
request_body.seed | integer | unknown | 否 | The same seed and the same prompt given to the same version of the model will output the same image every time. | — |
request_body.prompt | string | unknown | 否 | The prompt you would like to use to generate images. | — |
request_body.image_url | string | 是 | Input Image to erase from | — |
request_body.sync_mode | boolean | 否 | If `True`, the media will be returned as a data URI and the output data won't be available in the request history. | false |
request_body.num_images | integer | 否 | Number of Images to generate. | 1 |
request_body.ref_image_url | string | 否 | The URL of the reference image to be used for generating the new background. Use "" to leave empty. Either ref_image_url or bg_prompt has to be provided but not both. If both ref_image_url and ref_image_file are provided, ref_image_url will be used. Accepted formats are jpeg, jpg, png, webp. | "" |
request_body.refine_prompt | boolean | 否 | Whether to refine prompt | true |
request_body.negative_prompt | string | 否 | The negative prompt you would like to use to generate images. | "" |





