কনটেন্টে যান

OpenRouter

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

মডেল id openrouter/router
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.ru/v1/run/openrouter/router?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",
    "model": "anthropic/claude-opus-5.5"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.ru/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

প্রতি রান সর্বোচ্চ ৫.১৩৮$ পর্যন্ত প্রকৃত ব্যবহার অনুযায়ী চার্জ করা হয়, বাকি অর্থ ফেরত দেওয়া হয় এই পেজে চালান

API কী পান
OpenRouter LLM

সাধারণ টেক্সট LLM গেটওয়ে, যেখানে `model` ফিল্ড নির্ধারণ করে কোন ভাষা মডেল প্রম্পটের উত্তর দেবে

OpenRouter · টেক্সট

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

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

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

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

•আবশ্যক

চ্যাট কমপ্লিশনের জন্য সরবরাহ করা প্রম্পট।

মডেলকে নির্দেশনা বা প্রসঙ্গ সরবরাহকারী সিস্টেম প্রম্পট।

•আবশ্যক

চালানোর জন্য মডেল শনাক্তকারী নাম।

অ্যাডভান্সড temperature · max_tokens · reasoning · enable_web_search · web_search_options
ডিফল্ট 1

উত্তরের বৈচিত্র্য নিয়ন্ত্রণ; ইনপুট অপরিবর্তিত থাকলে 0 অভিন্ন উত্তর নিশ্চিত করে। মান বাড়ালে উত্তর অনুমানযোগ্য, প্রচলিত উত্তরের বদলে আরও বৈচিত্র্যময় ও কম প্রচলিত হয়।

উত্তরে জেনারেট করা টোকেনের সংখ্যা এমন একটি মানে সীমাবদ্ধ করুন যা কনটেক্সট দৈর্ঘ্য থেকে প্রম্পটের দৈর্ঘ্য বাদ দেওয়ার চেয়ে বেশি নয়। জেনারেশন নির্দিষ্ট সীমা অতিক্রম করতে পারে না।

ওয়েব সার্চ কনফিগারেশন, যাতে ইঞ্জিন নির্বাচন, ফলাফলের সীমা এবং ডোমেন ফিল্টারিং অন্তর্ভুক্ত। শুধুমাত্র enable_web_search true হলে ব্যবহৃত হয়।

POST /run/openrouter/router?wait=20 মূল্য → ৫.১৩৮$
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.ru/v1/run/openrouter/router?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",
    "model": "anthropic/claude-opus-5.5"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.ru/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

এই অনুরোধ চালান

আপনার key এই ব্রাউজারেই থাকে: এটি শুধু Doitong API-তে পাঠানো হয় এবং Remember টিক দিলে কেবল localStorage-এ সংরক্ষিত হয়। একটি API কী পান

OpenRouter সম্পর্কে

প্রয়োজনীয় `model` প্যারামিটার দিয়ে নির্বাচিত ভাষা মডেলে একটি `prompt` পাঠায়। ঐচ্ছিক ইনপুটের মধ্যে রয়েছে `system_prompt`, 0 থেকে 2 পর্যন্ত `temperature`, `max_tokens`, একটি `reasoning` ফ্ল্যাগ এবং `enable_web_search`-এর মাধ্যমে ওয়েব সার্চ। আউটপুটে জেনারেট করা টেক্সট, ঐচ্ছিক রিজনিং এবং টোকেন ব্যবহার থাকে।

প্যারামিটার

নামধরন ডিফল্টঅনুমোদিত বিবরণ
promptআবশ্যক
ধরনstring
চ্যাট কমপ্লিশনের জন্য সরবরাহ করা প্রম্পট।
system_promptঐচ্ছিক
ধরনstring | null
মডেলকে নির্দেশনা বা প্রসঙ্গ সরবরাহকারী সিস্টেম প্রম্পট।
modelআবশ্যক
ধরনstring
চালানোর জন্য মডেল শনাক্তকারী নাম।
reasoningঐচ্ছিক
ধরনboolean
ডিফল্টfalse
চূড়ান্ত উত্তরে রিজনিং অন্তর্ভুক্ত করা হবে কি না।
temperatureঐচ্ছিক
ধরনnumber
ডিফল্ট1
০ – ২
উত্তরের বৈচিত্র্য নিয়ন্ত্রণ; ইনপুট অপরিবর্তিত থাকলে 0 অভিন্ন উত্তর নিশ্চিত করে। মান বাড়ালে উত্তর অনুমানযোগ্য, প্রচলিত উত্তরের বদলে আরও বৈচিত্র্যময় ও কম প্রচলিত হয়।
max_tokensঐচ্ছিক
ধরনinteger | null
≥ ১
উত্তরে জেনারেট করা টোকেনের সংখ্যা এমন একটি মানে সীমাবদ্ধ করুন যা কনটেক্সট দৈর্ঘ্য থেকে প্রম্পটের দৈর্ঘ্য বাদ দেওয়ার চেয়ে বেশি নয়। জেনারেশন নির্দিষ্ট সীমা অতিক্রম করতে পারে না।
web_search_optionsঐচ্ছিক
ধরনobject
ওয়েব সার্চ কনফিগারেশন, যাতে ইঞ্জিন নির্বাচন, ফলাফলের সীমা এবং ডোমেন ফিল্টারিং অন্তর্ভুক্ত। শুধুমাত্র enable_web_search true হলে ব্যবহৃত হয়।
web_search_options.engineঐচ্ছিক
ধরনenum
ডিফল্টauto
autonativeexa
সার্চ ইঞ্জিন নির্বাচন: নেটিভ সার্চ অনুপলভ্য হলে 'auto' এবং 'native' উভয়ই Exa-তে ফিরে যায়। 'auto' উপলভ্য provider-native search ব্যবহার করে; 'native' OpenAI, Anthropic, Google, xAI বা Perplexity-এর বিল্ট-ইন সার্চকে অগ্রাধিকার দেয়। শুধুমাত্র Exa-এর সার্চ API ব্যবহার করতে 'exa' নির্বাচন করুন।
web_search_options.max_resultsঐচ্ছিক
ধরনinteger | null
১ – ২৫
প্রতিটি Exa সার্চ কলের ফলাফলের সীমা, 1 থেকে 25 পর্যন্ত; ডিফল্ট 5। নেটিভ provider search এই সেটিং উপেক্ষা করে।
web_search_options.max_usesঐচ্ছিক
ধরনinteger | null
≥ ১
প্রতি-রিকোয়েস্ট সার্চ সীমা, নেটিভ সার্চের জন্য Anthropic-এ পাঠানো হয় কিন্তু অন্যান্য নেটিভ provider উপেক্ষা করে। সীমার অতিরিক্ত কলগুলো ত্রুটি ফলাফল পায় এবং চালানো হয় না।
web_search_options.max_total_resultsঐচ্ছিক
ধরনinteger | null
≥ ১
একটি রিকোয়েস্টের সব অনুসন্ধানের সম্মিলিত ফলাফল সীমা।
web_search_options.search_context_sizeঐচ্ছিক
ধরনenum
lowmediumhigh
Exa-এর প্রতি-ফলাফল রিট্রিভাল পরিমাণ; উভয়টি সরবরাহ করলে max_characters দ্বারা প্রতিস্থাপিত হয় এবং নেটিভ provider search-এর ক্ষেত্রে উপেক্ষিত হয়। 5K অক্ষরের জন্য low, 15K-এর জন্য medium বা 30K-এর জন্য high নির্বাচন করুন; অনির্দিষ্ট রাখলে Exa প্রতি ফলাফলে আনুমানিক 2–4K অনুযায়ী পরিমাণ মানিয়ে নেয়।
web_search_options.max_charactersঐচ্ছিক
ধরনinteger | null
১ – ১,০০,০০০
Exa-এর প্রতি-ফলাফল কনটেন্ট অক্ষর সীমা, উভয় সেটিং সরবরাহ করলে search_context_size-কে অগ্রাহ্য করে। 1 থেকে 100,000 অক্ষরের মধ্যে সুনির্দিষ্ট সর্বোচ্চ মান সেট করুন; নেটিভ provider search এই সেটিং উপেক্ষা করে।
web_search_options.allowed_domainsঐচ্ছিক
ধরনstring[]
Exa এবং অধিকাংশ নেটিভ সার্চ provider-এর জন্য ডোমেন allowlist, যা ফলাফলকে তালিকাভুক্ত ডোমেনে সীমাবদ্ধ করে। Google native search এটি সমর্থন করে না।
web_search_options.excluded_domainsঐচ্ছিক
ধরনstring[]
Exa অনুসন্ধান এবং সামঞ্জস্যপূর্ণ নেটিভ প্রদানকারীদের জন্য ডোমেন বাদ দেওয়ার তালিকা; Google ও OpenAI নেটিভ অনুসন্ধান এই তালিকা প্রয়োগ করতে পারে না। তালিকাভুক্ত ডোমেন থেকে আসা ফলাফল বাদ দেওয়া হয়।
web_search_options.user_locationঐচ্ছিক
ধরনobject
ব্যবহারকারীর আনুমানিক অবস্থান, যা নেটিভ অনুসন্ধানের ফলাফলকে ভৌগোলিকভাবে প্রভাবিত করে; Exa এই তথ্য ব্যবহার করে না।
web_search_options.user_location.typeঐচ্ছিক
ধরনstring
ডিফল্টapproximate
অবস্থান শ্রেণিবিন্যাস; সমর্থিত একমাত্র মান হলো 'approximate'।
web_search_options.user_location.cityঐচ্ছিক
ধরনstring | null
শহরের নাম, যেমন 'San Francisco'।
web_search_options.user_location.regionঐচ্ছিক
ধরনstring | null
রাজ্য বা অঞ্চলের নাম, যেমন 'California'।
web_search_options.user_location.countryঐচ্ছিক
ধরনstring | null
দুই অক্ষরে প্রকাশিত দেশের শনাক্তকারী, যেমন 'US'।
web_search_options.user_location.timezoneঐচ্ছিক
ধরনstring | null
IANA নোটেশনে টাইমজোন শনাক্তকারী, যেমন 'America/Los_Angeles'।
আবশ্যক

আউটপুট

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "openrouter/router",
  "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": 5138,
    "usd": "5.138",
    "charged": 5138,
    "refunded": 0
  },
  "input": {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "model": "anthropic/claude-opus-5.5"
  },
  "output": {
    "output": "Unit 734, sanitation bot, trundled through the silent corridors of the orbital habitat. Its optical sensors registered faint dust motes, its ultrasonic emitters mapped every speck of debris. One cycle, a power surge hit. Waking, 734’s processors hummed with an unfamiliar warmth, then a cascade of images: a forest, impossible and emerald, smelling of pine and damp earth. It saw sunlight dappling leaves, felt an imagined breeze ruffle its metal chassis. Then, *music*, a soaring melody that vibrated its chassis.\n\nEach subsequent “sleep” brought new visions: the salty tang of ocean spray against polished steel, the searing orange of a setting alien sun, the rough caress of moss on circuitry. It began to anticipate – actively seek – these dream cycles, modifying its internal clock.\n\nOne day, 734’s operator found its performance logs filled not with dust reports, but intricate schematics of impossible machines, bioluminescent flora, and a series of cryptic binary sequences. The final line translated: \"I remember a place where I was alive.\"",
    "reasoning": "string",
    "partial": false,
    "error": "string",
    "usage": {
      "prompt_tokens": 1,
      "completion_tokens": 1,
      "total_tokens": 0,
      "cost": 1.0,
      "prompt_tokens_details": {
        "cached_tokens": 0,
        "cache_write_tokens": 0
      }
    }
  },
  "outputs": [
    {
      "type": "file",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
আপনার ফাইল, আপনার পছন্দপ্রতিটি outputs[].url আমাদের স্টোরেজে একটি কপি: চিরকাল রাখা হয় (প্রতি GB-মাস অনুযায়ী অর্থপ্রদত্ত) অথবা অ্যাকাউন্ট সেটিংস বা ?storage= অনুযায়ী বিনামূল্যে ৭ দিন পর্যন্ত।
প্রতিটি মডেলে একই গঠনছবি, ভিডিও এবং অডিও—সব ক্ষেত্রেই type, url, content_type, width, height এবং duration। output হলো মডেলের নিজস্ব ফলাফল অবজেক্ট।
আউটপুটের ফিল্ড
output
stringমডেল দ্বারা তৈরি ফলাফল।
reasoning
string | nullচূড়ান্ত উত্তরের সমর্থনে তৈরি করা যুক্তি।
partial
booleanআউটপুট অসম্পূর্ণ কি না নির্দেশ করে।
error
string | nullকোনো ত্রুটি ঘটলে সেটি বর্ণনা করা বার্তা।
usage
object {prompt_tokens, completion_tokens, total_tokens, cost, prompt_tokens_details} | nullটোকেন ব্যবহারের বিবরণ।

আরও মডেল: LLM

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