Skip to main content
POST
cURL

概述

Bria 的图像编辑 API 提供了一套全面的工具,用于处理和增强图像。
API 调用成功后,使用返回的 request_id 通过 查询状态 端点查询结果。此接口中的 sync 参数是固定的——你无需指定它。

支持的操作

请参考官方文档,查看各操作对应的参数列表。

授权

Authorization
string
header
必填

Bearer token authentication. Use your CometAPI key.

请求头

Content-Type
string

Must be application/json.

路径参数

action
string
必填

Editing action to perform. Supported values: erase, gen_fill, expand, enhance, increase_resolution, replace_background.

请求体

application/json
image
string

Source image as a public URL or base64-encoded data URI. Accepted formats: JPEG, PNG, WebP. Maximum 12 MB.

mask
string

Mask image as a public URL or base64. White areas mark the region to edit; black areas are preserved. Required for erase, gen_fill, and expand actions.

prompt
string

Text description of the desired edit. Required for gen_fill and replace_background actions.

num_results
integer

Number of result variants to generate. Default: 1.

sync
boolean

When true, the response blocks until results are ready. When false (default), returns immediately with placeholder URLs that can be polled.

响应

200 - application/json

Success

The response is of type object.