কনটেন্টে যান

Workflow Utilities Pick Image By Index

ইন্টিগ্রেট করুন

মডেল id workflow-utilities/pick-image-by-index
# 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/workflow-utilities/pick-image-by-index?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "images": [
      "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
    ],
    "index": 1
  }'

# 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"

এই অনুরোধ: ≈০.০০১$ ১ API ক্রেডিট এই পেজে চালান

API কী পান
Utility · ছবি

আপনার প্রথম ফলাফল এখানে আসবে

নিচে একটি রিকোয়েস্ট তৈরি করে আপনার API কী দিয়ে চালান। আউটপুট আমাদের স্টোরেজে কপি করা হয়, চিরকাল বা বিনামূল্যে ৭ দিন পর্যন্ত রাখা হয়।

একটি অনুরোধ তৈরি করুন

মডেল স্কিমা থেকে কন্ট্রোল তৈরি করা হয়। এগুলো পরিবর্তন করলে কোড ও মূল্য আপডেট হয়।

•আবশ্যক image_urls
একটি ফাইল ড্রপ করুন, অথবা

নির্বাচনের সোর্স হিসেবে ব্যবহৃত ছবির URL অ্যারে।

•আবশ্যক

অবস্থান অনুযায়ী ছবি নির্বাচন, 1 থেকে গণনা করে: প্রথম ছবির জন্য 1, দ্বিতীয়টির জন্য 2 এবং একইভাবে পরবর্তী ছবি অনুরোধ করুন।

অ্যাডভান্সড fallback_index
fallback_index ডিফল্ট first-image

সীমার বাইরের ছবি নির্বাচন নীতি, ডিফল্ট হিসেবে `first-image` ব্যবহৃত হয়; বৈধ `index`-এর ক্ষেত্রে এটি উপেক্ষা করা হয়, তবে 1-এর কম `index` বা খালি `image_urls` অ্যারের ক্ষেত্রে যাচাইকরণ ব্যর্থ হয়। অ্যারের দৈর্ঘ্যের চেয়ে বড় `index` হলেই কেবল নীতিটি সক্রিয় হয়: `first-image` প্রথম ছবিটি নির্বাচন করে, আর `last-image` শেষ ছবিটি নির্বাচন করে।

POST /run/workflow-utilities/pick-image-by-index?wait=20 মূল্য → ০.০০১$
# 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/workflow-utilities/pick-image-by-index?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "images": [
      "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
    ],
    "index": 1
  }'

# 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-তে পাঠানো হয় এবং Remember টিক দিলে কেবল localStorage-এ সংরক্ষিত হয়। একটি API কী পান

Workflow Utilities Pick Image By Index সম্পর্কে

ছবির URL-এর একটি অ্যারে থেকে একটি ছবি ফেরত দেয়। `index` 1-ভিত্তিক, তাই 1 দিলে প্রথম ছবি পাওয়া যায়। ইনডেক্স তালিকার দৈর্ঘ্যের বেশি হলে প্রথম নাকি শেষ ছবি ফেরত দেওয়া হবে তা `fallback_index` নির্ধারণ করে। ওয়ার্কফ্লোতে ধাপ চেইন করার জন্য উপযোগী।

প্যারামিটার

ক্যানোনিকাল নাম অথবা নেটিভ নাম—দুটো একসঙ্গে নয়—পাঠান। ক্যানোনিকাল নামগুলো

নামধরন ডিফল্টঅনুমোদিত বিবরণ
image_urlsআবশ্যক images
ধরনurl[] · image
নির্বাচনের সোর্স হিসেবে ব্যবহৃত ছবির URL অ্যারে।
indexআবশ্যক
ধরনinteger
অবস্থান অনুযায়ী ছবি নির্বাচন, 1 থেকে গণনা করে: প্রথম ছবির জন্য 1, দ্বিতীয়টির জন্য 2 এবং একইভাবে পরবর্তী ছবি অনুরোধ করুন।
fallback_indexঐচ্ছিক
ধরনenum
ডিফল্টfirst-image
first-imagelast-image
সীমার বাইরের ছবি নির্বাচন নীতি, ডিফল্ট হিসেবে `first-image` ব্যবহৃত হয়; বৈধ `index`-এর ক্ষেত্রে এটি উপেক্ষা করা হয়, তবে 1-এর কম `index` বা খালি `image_urls` অ্যারের ক্ষেত্রে যাচাইকরণ ব্যর্থ হয়। অ্যারের দৈর্ঘ্যের চেয়ে বড় `index` হলেই কেবল নীতিটি সক্রিয় হয়: `first-image` প্রথম ছবিটি নির্বাচন করে, আর `last-image` শেষ ছবিটি নির্বাচন করে।
আবশ্যক ক্যানোনিকাল নাম, এটিও গ্রহণযোগ্য

ফাইল প্যারামিটার হিসেবে একটি পাবলিক https:// URL, 10 MB পর্যন্ত একটি data: URI, অথবা আপলোডের file_url গ্রহণ করা হয়। ফাইল

আউটপুট

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "workflow-utilities/pick-image-by-index",
  "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": 1,
    "usd": "0.001",
    "charged": 1,
    "refunded": 0
  },
  "input": {
    "image_urls": [
      "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
    ],
    "index": 1
  },
  "output": {
    "image": {
      "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
    },
    "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
      }
    ]
  },
  "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-মাস অনুযায়ী অর্থপ্রদত্ত) অথবা অ্যাকাউন্ট সেটিংস বা ?storage= অনুযায়ী বিনামূল্যে ৭ দিন পর্যন্ত।
প্রতিটি মডেলে একই গঠনছবি, ভিডিও এবং অডিও—সব ক্ষেত্রেই type, url, content_type, width, height এবং duration। output হলো মডেলের নিজস্ব ফলাফল অবজেক্ট।
আউটপুটের ফিল্ড
image
object {url, content_type, file_name, file_size, width, height}নির্দিষ্ট অবস্থানে নির্বাচিত ছবি।
images
array of object {url, content_type, file_name, file_size, width, height}merge এবং অন্যান্য ইউটিলিটি থেকে সরবরাহ করা `images` রেফারেন্স প্রত্যাশাকারী পরবর্তী নোডগুলোর জন্য সামঞ্জস্যপূর্ণ আউটপুট। এতে নির্বাচিত ছবিটি এক-উপাদানের অ্যারেতে থাকে, তাই ওই নোডগুলোতে কোনো পরিবর্তন প্রয়োজন হয় না।

আরও মডেল: ছবি সম্পাদনা

AI এজেন্টদের জন্য: এই পৃষ্ঠাটি Markdown হিসেবে এখানে আছে https://doitong.com/bn/developers/models/workflow-utilities/pick-image-by-index.md. সব মডেল ও গাইড: https://doitong.com/developers/llms.txt