الانتقال إلى المحتوى الرئيسي
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.

نظرة عامة

يوفر Bria Image Editing API مجموعة شاملة من الأدوات لمعالجة الصور وتحسينها.
بعد إجراء استدعاء API بنجاح، استخدم request_id المُعاد للاستعلام عن النتائج عبر نقطة النهاية Query Status.المعامل 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.