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

Seedream 4.0 API ইন্টিগ্রেশন

Rivya Public API v1 দিয়ে Seedream 4.0 ব্যবহার করুন: model id seedream-4-0, সমর্থিত ইনপুট, প্যারামিটার, Files API নিয়ম, ক্রেডিট এবং response উদাহরণসহ।

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

seedream-4-0

ইনপুট

text, file

Files API

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

বেস ক্রেডিট

6

ক্ষমতা

ছবি

বিলিং

FIXED

প্রম্পট সীমা

5000 অক্ষর

রিকোয়েস্ট contract

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

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

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

Keyধরনপ্রয়োজনীয়ডিফল্টপরিসরবিকল্পবিবরণ
image_sizeselectনাsquare_hd-square, square_hd, portrait_4_3, portrait_3_2, portrait_16_9, landscape_4_3, landscape_3_2, landscape_16_9, landscape_21_9framing ratio control করে। output resolution-এর সঙ্গে মিলে final pixel dimension নির্ধারণ করে।
image_resolutionselectনা1K-1K, 2K, 4Kcurrent tier হলো `1K`, `2K` এবং `4K`। higher resolution সাধারণত larger file এবং longer wait বোঝায়।
max_imagesnumberনা1min 1 / max 6 / step 1-valid value 1 থেকে 6। এক task কতগুলো image return করতে পারে তা control করে, তাই prompt সেই count-এর সঙ্গে aligned রাখাই ভালো।
seednumberনা-min 0 / max 2147483647 / step 1-প্রতিবার নতুন random result চাইলে empty রাখুন। একই integer reuse করলে আগের result reproduce বা fine-tune করা সহজ হয়। Prompt এবং অন্য key setting একই রকম থাকলেই শুধু result কাছাকাছি থাকে, এবং এটি guaranteed 1:1 match নয়।
nsfw_checkerselectনাfalse-false, truecontent filter control করে। এটি off করলে raw output-এর কাছাকাছি যায়, কিন্তু weaker safety layer accept করতে হয়।

আপলোড নীতি

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

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

Reference images: Seedream 4.0 edit path-এর জন্য সর্বোচ্চ 10টি image upload করুন।

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

10

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

image

Duration token

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

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

ন্যূনতম request

{
  "model": "seedream-4-0",
  "prompt": "A clean editorial product image on a soft studio background",
  "params": {
    "image_size": "square_hd",
    "image_resolution": "1K",
    "max_images": 1,
    "seed": 0,
    "nsfw_checker": "false"
  }
}

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

{
  "model": "seedream-4-0",
  "prompt": "A clean editorial product image on a soft studio background",
  "params": {
    "image_size": "square_hd",
    "image_resolution": "1K",
    "max_images": 1,
    "seed": 0,
    "nsfw_checker": "false",
    "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_seedream_4_0_example",
  "status": "queued",
  "model": "seedream-4-0",
  "reserved_credits": 6,
  "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 দরকার।