Ana içeriğe atla
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" } '
{}

Genel Bakış

Bria’nın Image Editing API’si, görüntüleri düzenlemek ve iyileştirmek için kapsamlı bir araç seti sunar.
Başarılı bir API çağrısından sonra, dönen request_id değerini kullanarak sonuçları Query Status endpoint’i üzerinden sorgulayın.Bu arayüzde sync parametresi sabittir — bunu belirtmeniz gerekmez.

Desteklenen İşlemler

OperationDescriptionDocumentation
eraseGörüntülerden nesneleri kaldırırBria Erase Docs
gen_fillMaskelenmiş alanlar için üretken doldurmaBria Gen Fill Docs
expandGörüntü tuvalini genişletirBria Expand Docs
enhanceGörüntü kalitesini iyileştirirBria Enhance Docs
increase_resolutionGörüntü çözünürlüğünü yükseltirBria Upscale Docs
replace_backgroundGörüntü arka planını değiştirirBria Background Docs
Lütfen her işleme özel parametre listesi için resmi dokümantasyona başvurun.

Yetkilendirmeler

Authorization
string
header
gerekli

Bearer token authentication. Use your CometAPI key.

Başlıklar

Content-Type
string

Must be application/json.

Yol Parametreleri

action
string
gerekli

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

Gövde

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.

Yanıt

200 - application/json

Success

The response is of type object.