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

Flux Kontext Max API integration

Rivya Public API v1 দিয়ে Flux Kontext Max ব্যবহার করুন: model id flux-kontext-max, supported inputs, parameters, Files API rules, credits এবং response examples সহ।

Available via APIText বা URL ready; reference modes Files API ব্যবহার করেইমেজ
API model id

flux-kontext-max

Inputs

text, file

Files API

reference modes-এর জন্য required

Base credits

8

Capability

ইমেজ

Billing

FIXED

প্রম্পট সীমা

documented prompt limit নেই

Request contract

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

KeyTypeRequiredDefaultবিবরণ
modelstringYesflux-kontext-maxflux-kontext-max API model id ব্যবহার করুন।
promptstringYes-text input support করে এমন models-এর prompt text।
paramsobjectNo-Model-specific parameter object। allowed keys-এর জন্য নিচের rows ব্যবহার করুন।
client_request_idstringNo-আপনার system-এ requests trace করার optional client-side id।

Model parameters

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

Upload policy

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

Reference rule

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

Max files

1

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

image

Duration token

duration verification required হলে video এবং audio references /api/v1/files থেকে durationToken carry করবে।

kindMax sizeMIME types
image10 MBimage/jpeg, image/png, image/webp

Minimal 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 return করে। task succeeds বা fails না করা পর্যন্ত 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
}

Common errors

validation_failed, insufficient_credits, idempotency_conflict, rate_limited, not_found

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