Flux Kontext
إنشاء وتحرير الصور المتقدم باستخدام نماذج Flux Kontext
المزايا
- توليد الصور من النص
- نقل الأسلوب
- تعديل الصور
- مخرجات عالية الدقة
التسعير
| Model | Credits |
|---|---|
| flux-kontext-pro | 2 (~$0.02) |
| flux-kontext-max | 4 (~$0.04) |
نقطة النهاية
POST
/api/v1/images/generateالمُعاملات
| معامل | النوع | مطلوب | وصف |
|---|---|---|---|
| model | string | مطلوب | "flux-kontext-pro" or "flux-kontext-max" |
| type | string | اختياري | "text-to-image" or "image-to-image" (default: text-to-image) |
| prompt | string | مطلوب | Text description |
| image_urls | string[] | اختياري | Input image URLs or base64 for editing/style transfer |
| input_image | string | اختياري | Deprecated. Alias for image_urls[0] |
| image_size | string | اختياري | Output image size (e.g. 1024x1024) |
مثال للطلب
{
"model": "flux-kontext-pro",
"type": "image-to-image",
"prompt": "Transform into a watercolor painting style",
"image_urls": ["https://tempfile.aiquickdraw.com/workers/nano/image_1772780968156_ygk0zm.png"]
}مثال على الرد
{
"success": true,
"data": {
"task_id": "task_flux123",
"credits_used": 2,
"remaining_credits": 498
}
}أمثلة التعليمات البرمجية
curl -X POST https://gateway.bananapro.site/api/v1/images/generate \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "flux-kontext-pro",
"type": "image-to-image",
"prompt": "Transform into a watercolor painting style",
"image_urls": ["https://tempfile.aiquickdraw.com/workers/nano/image_1772780968156_ygk0zm.png"]
}'