Passer au contenu principal
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"
}
'
{}

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.

Vue d’ensemble

L’API Image Editing de Bria fournit une suite complète d’outils pour manipuler et améliorer des images.
Après un appel API réussi, utilisez le request_id renvoyé pour interroger les résultats via le point de terminaison Query Status.Le paramètre sync est fixe sur cette interface — vous n’avez pas besoin de le spécifier.

Opérations prises en charge

OpérationDescriptionDocumentation
eraseSupprimer des objets des imagesBria Erase Docs
gen_fillRemplissage génératif pour les zones masquéesBria Gen Fill Docs
expandÉtendre le canevas de l’imageBria Expand Docs
enhanceAméliorer la qualité de l’imageBria Enhance Docs
increase_resolutionAugmenter la résolution de l’imageBria Upscale Docs
replace_backgroundRemplacer l’arrière-plan de l’imageBria Background Docs
Veuillez consulter la documentation officielle pour la liste des paramètres propre à chaque opération.

Autorisations

Authorization
string
header
requis

Bearer token authentication. Use your CometAPI key.

En-têtes

Content-Type
string

Must be application/json.

Paramètres de chemin

action
string
requis

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

Corps

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.

Réponse

200 - application/json

Success

The response is of type object.