تخطّي إلى المحتوى

Flux 2 Flex

التكامل

معرّف النموذج flux-2-flex
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.ru/v1/run/flux-2-flex?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.ru/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

ملفات مثل المثال: ⁨‏0.05 $⁩ 50 رصيد API · ≈ ⁨‏5.27 ₽⁩ تُقاس ملفاتك قبل التشغيل تشغيله في هذه الصفحة

الحصول على مفتاح API
Black Forest Labs من نص إلى صورة #stylized#transform

مولد نص إلى صورة بخطوات وإرشاد قابلين للضبط، موجه للطباعة والنصوص داخل الصور

Black Forest Labs · صورة

ستظهر نتيجتك الأولى هنا

أنشئ طلبًا أدناه وشغّله باستخدام مفتاح API الخاص بك. تُنسخ المخرجات إلى تخزيننا، وتُحفظ إلى الأبد أو لمدة 7 أيام مجانًا.

إنشاء طلب

تُنشأ عناصر التحكم من مخطط النموذج. يتحدّث الرمز والسعر عند تغييرها.

•مطلوب

الموجّه الذي يوجّه توليد الصورة.

image_size الافتراضي landscape_4_3

أبعاد الصورة المُولّدة.

متقدم safety_tolerance · output_format · guidance_scale · num_inference_steps · seed · enable_safety_checker
safety_tolerance الافتراضي 2

إعداد أمان الصورة المولدة، ويتراوح التسامح فيه من أقصى قدر من السماح عند 5 إلى أقصى قدر من التشدد عند 1.

output_format الافتراضي jpeg

تنسيق ملف الصورة الناتجة.

الافتراضي 3.5

مقياس التوجيه المطبق أثناء التوليد.

الافتراضي 28

عدد خطوات الاستدلال المطلوب تنفيذها.

قيمة البذرة للتوليد.

POST /run/flux-2-flex?wait=20 عرض السعر → ⁨‏0.05 $⁩
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.ru/v1/run/flux-2-flex?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.ru/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

تشغيل هذا الطلب

يبقى مفتاحك في هذا المتصفح: لا يُرسل إلا إلى Doitong API ويُحفظ في localStorage فقط إذا فعّلت خيار التذكّر. الحصول على مفتاح API

حول Flux 2 Flex

ينشئ صورًا من `prompt` مع تحكم مباشر في `num_inference_steps` (من 2 إلى 50، والافتراضي 28) و`guidance_scale` (من 1.5 إلى 10، والافتراضي 3.5). تُختار الأحجام من إعدادات مسبقة مثل square_hd وportrait_16_9 وlandscape_4_3. الإخراج بصيغة jpeg أو png، ويجعل `seed` النتائج قابلة للتكرار.

المعاملات

الاسمالنوع الافتراضيمسموح الوصف
promptمطلوب
النوعstring
الموجّه الذي يوجّه توليد الصورة.
image_sizeاختياري
النوعobject
الافتراضيlandscape_4_3
square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9
أبعاد الصورة المُولّدة.
seedاختياري
النوعinteger | null
قيمة البذرة للتوليد.
safety_toleranceاختياري
النوعenum
الافتراضي2
12345
إعداد أمان الصورة المولدة، ويتراوح التسامح فيه من أقصى قدر من السماح عند 5 إلى أقصى قدر من التشدد عند 1.
enable_safety_checkerاختياري
النوعboolean
الافتراضيtrue
مفتاح فحص السلامة الذي لا يُحترم إيقافه إلا للحسابات المصرح لها. تخضع جميع الطلبات غير المصرح لها لفحوص السلامة.
output_formatاختياري
النوعenum
الافتراضيjpeg
jpegpng
تنسيق ملف الصورة الناتجة.
guidance_scaleاختياري
النوعnumber
الافتراضي3.5
1.5 – 10
مقياس التوجيه المطبق أثناء التوليد.
num_inference_stepsاختياري
النوعinteger
الافتراضي28
2 – 50
عدد خطوات الاستدلال المطلوب تنفيذها.
مطلوب

المخرجات

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "flux-2-flex",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 50,
    "usd": "0.05",
    "charged": 50,
    "refunded": 0
  },
  "input": {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  },
  "output": {
    "images": [
      {
        "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
        "content_type": "image/jpeg",
        "file_name": "0-output.jpeg",
        "file_size": 1843200,
        "width": 1024,
        "height": 768
      }
    ],
    "seed": 42
  },
  "outputs": [
    {
      "type": "image",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "width": 1024,
      "height": 768,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
ملفاتك، خيارككل outputs[].url هو نسخة على تخزيننا: تُحفظ إلى الأبد (مع الدفع لكل غيغابايت-شهر) أو لمدة 7 أيام مجانًا، وفق إعداد حسابك أو ?storage=.
البنية نفسها في كل نموذجtype وurl وcontent_type وwidth وheight وduration للصور والفيديو والصوت على حد سواء. output هو كائن النتائج الخاص بالنموذج.
حقول المخرجات
images
array of object {url, content_type, file_name, file_size, width, height}الصور الناتجة عن النموذج.
seed
integerقيمة البذرة المستخدمة أثناء التوليد.

مزيد من النماذج: من نص إلى صورة

لوكلاء الذكاء الاصطناعي: تتوفر هذه الصفحة بصيغة Markdown على https://doitong.com/ar/developers/models/flux-2-flex.md. جميع النماذج والأدلة: https://doitong.com/developers/llms.txt