圖片編輯
透過 CometAPI 使用 Bria 圖片編輯 API,以 POST /bria/image/edit/ 執行 erase、gen_fill、expand、enhance、upscale 或背景替換。
Documentation Index
Fetch the complete documentation index at: https://apidoc.cometapi.com/llms.txt
Use this file to discover all available pages before exploring further.
概覽
Bria 的圖片編輯 API 提供一套完整的工具,用於操作與增強圖片。request_id 透過查詢狀態端點查詢結果。此介面的 sync 參數為固定值——你不需要指定它。支援的操作
| 操作 | 說明 | 文件 |
|---|---|---|
erase | 從圖片中移除物件 | Bria Erase 文件 |
gen_fill | 針對遮罩區域進行生成式填充 | Bria Gen Fill 文件 |
expand | 擴展圖片畫布 | Bria Expand 文件 |
enhance | 提升圖片品質 | Bria Enhance 文件 |
increase_resolution | 提高圖片解析度 | Bria Upscale 文件 |
replace_background | 替換圖片背景 | Bria Background 文件 |
授權
Bearer token authentication. Use your CometAPI key.
標頭
Must be application/json.
路徑參數
Editing action to perform. Supported values: erase, gen_fill, expand, enhance, increase_resolution, replace_background.
主體
Source image as a public URL or base64-encoded data URI. Accepted formats: JPEG, PNG, WebP. Maximum 12 MB.
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.
Text description of the desired edit. Required for gen_fill and replace_background actions.
Number of result variants to generate. Default: 1.
When true, the response blocks until results are ready. When false (default), returns immediately with placeholder URLs that can be polled.
回應
Success
The response is of type object.