메인 콘텐츠로 건너뛰기
POST
/
bria
/
image
/
edit
/
{action}
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"
}
'
{}

개요

Bria의 이미지 편집 API는 이미지를 조작하고 향상시키기 위한 포괄적인 도구 모음을 제공합니다.
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 문서
각 작업별 파라미터 목록은 공식 문서를 참고하세요.

인증

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.