सामग्री पर जाएँ

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.com/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.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

प्रति रन अधिकतम $5.138 तक वास्तविक उपयोग के अनुसार शुल्क लिया जाता है, बाकी रिफंड किया जाता है इसे इस पेज पर चलाएँ

API कुंजी प्राप्त करें
OpenRouter LLM

सामान्य टेक्स्ट LLM गेटवे, जहाँ `model` फ़ील्ड तय करता है कि प्रॉम्प्ट का उत्तर कौन-सा भाषा मॉडल देगा

OpenRouter · टेक्स्ट

आपका पहला परिणाम यहाँ आएगा

नीचे एक अनुरोध बनाएँ और उसे अपनी API कुंजी से चलाएँ। आउटपुट हमारे स्टोरेज में कॉपी किए जाते हैं और हमेशा के लिए या 7 दिन तक मुफ़्त में रखे जाते हैं।

अनुरोध बनाएँ

कंट्रोल मॉडल स्कीमा से जनरेट होते हैं। इन्हें बदलने पर कोड और कीमत अपडेट होती है।

•आवश्यक

चैट कम्प्लीशन के लिए दिया गया प्रॉम्प्ट।

मॉडल को निर्देश या संदर्भ देने वाला सिस्टम प्रॉम्प्ट।

•आवश्यक

चलाए जाने वाले मॉडल की पहचान करने वाला नाम।

उन्नत temperature · max_tokens · reasoning · enable_web_search · web_search_options
डिफ़ॉल्ट 1

उत्तर की परिवर्तनशीलता का नियंत्रण, जिसमें इनपुट अपरिवर्तित रहने पर 0 समान उत्तर की गारंटी देता है। मान बढ़ाने पर उत्तर पूर्वानुमेय, सामान्य उत्तरों से हटकर अधिक विविध और कम सामान्य उत्तरों की ओर जाते हैं।

उत्तर में निर्मित टोकन की संख्या को ऐसी सीमा पर रोकें जो कॉन्टेक्स्ट लंबाई में से प्रॉम्प्ट लंबाई घटाने के परिणाम से अधिक न हो। निर्माण निर्दिष्ट सीमा से अधिक नहीं हो सकता।

वेब सर्च कॉन्फ़िगरेशन, जिसमें इंजन चयन, परिणाम सीमाएँ और डोमेन फ़िल्टरिंग शामिल हैं। केवल तब उपयोग किया जाता है जब enable_web_search true हो।

POST /run/openrouter/router?wait=20 कोटेशन → $5.138
# 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/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.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

यह अनुरोध चलाएँ

आपकी key इसी ब्राउज़र में रहती है: इसे केवल Doitong API को भेजा जाता है और केवल तभी (localStorage) में सेव किया जाता है जब आप Remember चुनते हैं। API कुंजी प्राप्त करें

OpenRouter के बारे में

`prompt` को आवश्यक `model` पैरामीटर से चुने गए भाषा मॉडल को भेजता है। वैकल्पिक इनपुट में `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 – 2
उत्तर की परिवर्तनशीलता का नियंत्रण, जिसमें इनपुट अपरिवर्तित रहने पर 0 समान उत्तर की गारंटी देता है। मान बढ़ाने पर उत्तर पूर्वानुमेय, सामान्य उत्तरों से हटकर अधिक विविध और कम सामान्य उत्तरों की ओर जाते हैं।
max_tokensवैकल्पिक
प्रकारinteger | null
≥ 1
उत्तर में निर्मित टोकन की संख्या को ऐसी सीमा पर रोकें जो कॉन्टेक्स्ट लंबाई में से प्रॉम्प्ट लंबाई घटाने के परिणाम से अधिक न हो। निर्माण निर्दिष्ट सीमा से अधिक नहीं हो सकता।
web_search_optionsवैकल्पिक
प्रकारobject
वेब सर्च कॉन्फ़िगरेशन, जिसमें इंजन चयन, परिणाम सीमाएँ और डोमेन फ़िल्टरिंग शामिल हैं। केवल तब उपयोग किया जाता है जब enable_web_search true हो।
web_search_options.engineवैकल्पिक
प्रकारenum
डिफ़ॉल्टauto
autonativeexa
सर्च इंजन चयन: native सर्च उपलब्ध न होने पर 'auto' और 'native' दोनों Exa पर फ़ॉलबैक करते हैं। 'auto' उपलब्ध provider-native सर्च का उपयोग करता है; 'native' OpenAI, Anthropic, Google, xAI या Perplexity की बिल्ट-इन सर्च को प्राथमिकता देता है। केवल Exa के सर्च API का उपयोग करने के लिए 'exa' चुनें।
web_search_options.max_resultsवैकल्पिक
प्रकारinteger | null
1 – 25
प्रत्येक Exa सर्च कॉल के परिणामों की सीमा, 1 से 25 तक, जिसका डिफ़ॉल्ट 5 है। Native provider सर्च इस सेटिंग को अनदेखा करता है।
web_search_options.max_usesवैकल्पिक
प्रकारinteger | null
≥ 1
प्रति-अनुरोध सर्च सीमा, native सर्च के लिए Anthropic को भेजी जाती है, लेकिन अन्य native providers द्वारा अनदेखी की जाती है। सीमा से अधिक कॉल को त्रुटि परिणाम मिलता है और वे चलते नहीं हैं।
web_search_options.max_total_resultsवैकल्पिक
प्रकारinteger | null
≥ 1
एक अनुरोध के भीतर सभी खोजों के लिए संयुक्त परिणाम सीमा।
web_search_options.search_context_sizeवैकल्पिक
प्रकारenum
lowmediumhigh
Exa के लिए प्रति-परिणाम रिट्रीवल मात्रा, दोनों दिए जाने पर max_characters द्वारा प्रतिस्थापित और native provider सर्च के लिए अनदेखी की जाती है। 5K वर्णों के लिए low, 15K के लिए medium या 30K के लिए high चुनें; इसे निर्दिष्ट न करने पर Exa प्रति परिणाम लगभग 2–4K के अनुसार मात्रा समायोजित करता है।
web_search_options.max_charactersवैकल्पिक
प्रकारinteger | null
1 – 1,00,000
Exa के लिए प्रति-परिणाम सामग्री वर्ण सीमा, दोनों सेटिंग दिए जाने पर search_context_size को ओवरराइड करती है। 1 से 100,000 वर्णों तक सटीक अधिकतम सेट करें; native provider सर्च इस सेटिंग को अनदेखा करता है।
web_search_options.allowed_domainsवैकल्पिक
प्रकारstring[]
Exa और अधिकांश native सर्च providers के लिए डोमेन allowlist, जो परिणामों को सूचीबद्ध डोमेन तक सीमित करती है। Google native सर्च इसका समर्थन नहीं करती।
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.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
आपकी फ़ाइलें, आपकी पसंदहर outputs[].url हमारे स्टोरेज में एक कॉपी है: हमेशा के लिए (प्रति GB-माह भुगतान) या 7 दिन तक मुफ़्त में, आपके अकाउंट की सेटिंग या ?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/hi/developers/models/openrouter/router.md. सभी मॉडल और गाइड: https://doitong.com/developers/llms.txt