Rivya AI ডকস
মডেল API পেজ

Flux Kontext Max API ইন্টিগ্রেশন

Rivya Public API v1 দিয়ে Flux Kontext Max ব্যবহার করুন: model id flux-kontext-max, সমর্থিত ইনপুট, প্যারামিটার, Files API নিয়ম, ক্রেডিট এবং response উদাহরণসহ।

API দিয়ে উপলভ্যটেক্সট বা URL প্রস্তুত; reference modes Files API ব্যবহার করেইমেজ
API model id

flux-kontext-max

ইনপুট

text, file

Files API

reference mode-এর জন্য প্রয়োজন

বেস ক্রেডিট

8

ক্ষমতা

ইমেজ

বিলিং

FIXED

প্রম্পট সীমা

নথিভুক্ত prompt limit নেই

রিকোয়েস্ট contract

model id top level-এ পাঠান। Model-specific control params-এ থাকবে।

Keyধরনপ্রয়োজনীয়ডিফল্টবিবরণ
modelstringহ্যাঁflux-kontext-maxflux-kontext-max API model id ব্যবহার করুন।
promptstringহ্যাঁ-টেক্সট ইনপুট সমর্থন করে এমন model-এর prompt text।
paramsobjectনা-মডেল-নির্দিষ্ট প্যারামিটার object। অনুমোদিত key-এর জন্য নিচের row ব্যবহার করুন।
client_request_idstringনা-আপনার সিস্টেমে request trace করার ঐচ্ছিক client-side id।

মডেল প্যারামিটার

Keyধরনপ্রয়োজনীয়ডিফল্টপরিসরবিকল্পবিবরণ
aspectRatioselectনা16:9-21:9, 16:9, 4:3, 1:1, 3:4, 9:16Aspect ratio
outputFormatselectনাjpeg-jpeg, pngJPEG ছোট আকারের হয়, আর transparency বা পরিষ্কার lossless edge দরকার হলে PNG ভালো।
enableTranslationselectনাtrue-true, falsePrompt auto-translate
promptUpsamplingselectনাfalse-false, trueEnabled হলে Rivya generation-এর আগে model-কে আপনার prompt expand ও polish করতে দেয়। এতে detail quality প্রায়ই ভালো হয়, তবে result raw prompt-এর চেয়ে বেশি interpretive হতে পারে।
safetyTolerancenumberনা2min 0 / max 6-Content moderation কতটা strict হবে তা নিয়ন্ত্রণ করে। Generation সাধারণত editing-এর চেয়ে wider range allow করে; lower value বেশি strict এবং higher value বেশি permissive।
watermarktextনা---Watermark

আপলোড নীতি

প্রথমে reference file upload করুন, তারপর ফেরত পাওয়া URL এবং duration token params.referenceMediaItems-এর মধ্যে দিন।

রেফারেন্স নিয়ম

Reference image: Image editing project-এর জন্য 1টি পর্যন্ত image file upload করুন।

সর্বোচ্চ ফাইল

1

সমর্থিত ফাইল ধরন

image

Duration token

duration verification প্রয়োজন হলে video এবং audio reference /api/v1/files থেকে durationToken বহন করবে।

kindসর্বোচ্চ আকারMIME types
image10 MBimage/jpeg, image/png, image/webp

ন্যূনতম request

{
  "model": "flux-kontext-max",
  "prompt": "A clean editorial product image on a soft studio background",
  "params": {
    "aspectRatio": "16:9",
    "outputFormat": "jpeg",
    "enableTranslation": "true",
    "promptUpsampling": "false",
    "safetyTolerance": 2,
    "watermark": "Optional watermark text"
  }
}

রেফারেন্স ফাইল রিকোয়েস্ট

{
  "model": "flux-kontext-max",
  "prompt": "A clean editorial product image on a soft studio background",
  "params": {
    "aspectRatio": "16:9",
    "outputFormat": "jpeg",
    "enableTranslation": "true",
    "promptUpsampling": "false",
    "safetyTolerance": 2,
    "watermark": "Optional watermark text",
    "referenceMediaItems": [
      {
        "url": "https://cdn.example.com/reference-image.png",
        "kind": "image",
        "name": "reference-image.png",
        "mimeType": "image/png"
      }
    ]
  }
}

Create response

create endpoint public task id ফেরত দেয়। task succeeded বা failed না হওয়া পর্যন্ত status endpoint poll করুন।

{
  "id": "task_flux_kontext_max_example",
  "status": "queued",
  "model": "flux-kontext-max",
  "reserved_credits": 8,
  "final_credits": 0,
  "created_at": "2026-05-11T00:00:00.000Z",
  "updated_at": "2026-05-11T00:00:00.000Z",
  "result": null,
  "error": null
}

সাধারণ ত্রুটি

validation_failed, insufficient_credits, idempotency_conflict, rate_limited, not_found

কিছু mode-এর জন্য Files API reference upload দরকার।