CometAPI를 통해 Bria 이미지 편집 API를 사용하여 POST /bria/image/edit/로 erase, gen_fill, expand, enhance, upscale 또는 배경 교체를 수행합니다.
curl --request POST \
--url https://api.cometapi.com/bria/image/edit/{action} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"image": "https://raw.githubusercontent.com/cometapi-dev/.github/refs/heads/main/assets/img/original_image.png",
"mask": "https://raw.githubusercontent.com/cometapi-dev/.github/refs/heads/main/assets/img/mask_image.png"
}
'{}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.
curl --request POST \
--url https://api.cometapi.com/bria/image/edit/{action} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"image": "https://raw.githubusercontent.com/cometapi-dev/.github/refs/heads/main/assets/img/original_image.png",
"mask": "https://raw.githubusercontent.com/cometapi-dev/.github/refs/heads/main/assets/img/mask_image.png"
}
'{}