Naar hoofdinhoud gaan
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"
}
'
{}

Overzicht

De Image Editing API van Bria biedt een uitgebreide set tools voor het bewerken en verbeteren van afbeeldingen.
Na een succesvolle API-aanroep gebruik je de geretourneerde request_id om resultaten op te vragen via het endpoint Query Status.De parameter sync staat vast op deze interface — je hoeft die niet op te geven.

Ondersteunde bewerkingen

BewerkingBeschrijvingDocumentatie
eraseObjecten uit afbeeldingen verwijderenBria Erase Docs
gen_fillGenerative fill voor gemaskeerde gebiedenBria Gen Fill Docs
expandAfbeeldingscanvas uitbreidenBria Expand Docs
enhanceAfbeeldingskwaliteit verbeterenBria Enhance Docs
increase_resolutionAfbeeldingsresolutie opschalenBria Upscale Docs
replace_backgroundAfbeeldingsachtergrond vervangenBria Background Docs
Raadpleeg de officiële documentatie voor de parameters die specifiek zijn voor elke bewerking.

Autorisaties

Authorization
string
header
vereist

Bearer token authentication. Use your CometAPI key.

Headers

Content-Type
string

Must be application/json.

Padparameters

action
string
vereist

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

Body

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.

Respons

200 - application/json

Success

The response is of type object.