مواد پر جائیں

Flux 2 Flex

انٹیگریٹ کریں

ماڈل id 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.com/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.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

مثال جیسی فائلیں: ⁨$0.05⁩ 50 API کریڈٹس آپ کی فائلیں رن سے پہلے ناپی جاتی ہیں اس صفحے پر چلائیں

API کلید حاصل کریں
Black Forest Labs متن سے تصویر #stylized#transform

قابل ایڈجسٹ مراحل اور رہنمائی والا متن سے تصویر جنریٹر، ٹائپوگرافی اور تصاویر میں متن کے لیے موزوں

Black Forest Labs · تصویر

آپ کا پہلا نتیجہ یہاں آئے گا

ذیل میں درخواست بنائیں اور اپنی API کلید کے ساتھ چلائیں۔ آؤٹ پٹس ہمارے اسٹوریج میں کاپی ہو جاتے ہیں، ہمیشہ کے لیے یا مفت میں 7 دن تک محفوظ رہتے ہیں۔

درخواست بنائیں

کنٹرولز ماڈل اسکیما سے تیار ہوتے ہیں۔ آپ کے بدلنے کے ساتھ کوڈ اور قیمت اپ ڈیٹ ہوتے ہیں۔

•لازمی

تصویر کی تخلیق کی رہنمائی کرنے والا پرامپٹ۔

image_size ڈیفالٹ landscape_4_3

تخلیق شدہ تصویر کی dimensions۔

ایڈوانسڈ safety_tolerance · output_format · guidance_scale · num_inference_steps · seed · enable_safety_checker
safety_tolerance ڈیفالٹ 2

تخلیق کردہ تصویر کی safety setting، 5 پر زیادہ سے زیادہ نرمی اور 1 پر زیادہ سے زیادہ سختی کے درمیان tolerance رکھتی ہے۔

output_format ڈیفالٹ jpeg

نتیجہ خیز تصویر کا فائل فارمیٹ۔

ڈیفالٹ 3.5

تخلیق کے دوران لاگو کی جانے والی guidance scale۔

ڈیفالٹ 28

چلائے جانے والے inference steps کی تعداد۔

تخلیق کے لیے سیڈ قدر۔

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.com/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.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

یہ درخواست چلائیں

آپ کی key اسی براؤزر میں رہتی ہے: یہ صرف Doitong API کو بھیجی جاتی ہے اور صرف اس صورت میں localStorage میں محفوظ ہوتی ہے جب آپ Remember منتخب کریں۔ 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
تخلیق شدہ تصویر کی dimensions۔
seedاختیاری
قسمinteger | null
تخلیق کے لیے سیڈ قدر۔
safety_toleranceاختیاری
قسمenum
ڈیفالٹ2
12345
تخلیق کردہ تصویر کی safety setting، 5 پر زیادہ سے زیادہ نرمی اور 1 پر زیادہ سے زیادہ سختی کے درمیان tolerance رکھتی ہے۔
enable_safety_checkerاختیاری
قسمboolean
ڈیفالٹtrue
حفاظتی جانچ کا سوئچ؛ بند ترتیب صرف مجاز اکاؤنٹس کے لیے قابلِ قبول ہے۔ ایسی اجازت کے بغیر تمام درخواستوں کی حفاظتی جانچ ہوتی ہے۔
output_formatاختیاری
قسمenum
ڈیفالٹjpeg
jpegpng
نتیجہ خیز تصویر کا فائل فارمیٹ۔
guidance_scaleاختیاری
قسمnumber
ڈیفالٹ3.5
1.5 – 10
تخلیق کے دوران لاگو کی جانے والی guidance scale۔
num_inference_stepsاختیاری
قسمinteger
ڈیفالٹ28
2 – 50
چلائے جانے والے inference steps کی تعداد۔
لازمی

آؤٹ پٹ

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.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
آپ کی فائلیں، آپ کا انتخابہر outputs[].url ہمارے اسٹوریج میں ایک کاپی ہے: ہمیشہ کے لیے محفوظ (فی GB-ماہ ادائیگی) یا مفت میں 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تخلیق کے دوران استعمال ہونے والی سیڈ ویلیو۔

مزید ماڈلز: متن سے تصویر

AI ایجنٹس کے لیے: یہ صفحہ Markdown میں یہاں موجود ہے https://doitong.com/ur/developers/models/flux-2-flex.md. تمام ماڈلز اور گائیڈز: https://doitong.com/developers/llms.txt