Skip to main content
POST
cURL

概覽

Bria 的 Image Editing 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.