שפּרינגען צו אינהאַלט

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) נאָר אויב איר טיקט אָן געדענקען. באַקומען אַן API שליסל

וועגן OpenRouter

שיקט אַ `prompt` צו אַ שפּראַך־מאָדעל אויסגעקליבן מיטן נייטיקן `model` פּאַראַמעטער. אָפּציאָנעלע אַרײַנגעבונגען אַרײַננעמען `system_prompt`, `temperature` פֿון 0 ביז 2, `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
זוך־מאָטאָר־אויסקלייב: 'auto' און 'native' פֿאַלן ביידע צוריק צו Exa ווען native search איז נישט בנימצא. 'auto' ניצט בנימצא provider-native זוך; 'native' פּרעפֿערירט אײַנגעבויטע זוך פֿון OpenAI, Anthropic, Google, xAI אָדער Perplexity. צו נוצן אויסשליסלעך Exa's search 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
זוך־גרענעץ פּער בקשה, איבערגעגעבן צו Anthropic פֿאַר native search אָבער איגנאָרירט דורך אַנדערע native providers. רופֿן איבער דעם גרענעץ באַקומען אַן טעות־רעזולטאַט און לויפֿן נישט.
web_search_options.max_total_resultsאָפּציאָנעל
טיפּinteger | null
≥ 1
געמיינזאַמע רעזולטאַט־גרענעץ פֿאַר אַלע זוכונגען אין איין בקשה.
web_search_options.search_context_sizeאָפּציאָנעל
טיפּenum
lowmediumhigh
באַהאָלונג־מאָס פּער רעזולטאַט פֿאַר Exa, איבערגענומען דורך max_characters אויב ביידע ווערן צוגעשטעלט און איגנאָרירט פֿאַר native provider זוך. אויסקלייבן low פֿאַר 5K אותיות, medium פֿאַר 15K אָדער high פֿאַר 30K; דאָס נישט ספּעציפֿיצירן לאָזט Exa צופּאַסן די מאָס צו בערך 2–4K פּער רעזולטאַט.
web_search_options.max_charactersאָפּציאָנעל
טיפּinteger | null
1 – 100,000
אינהאַלט־אותיות־גרענעץ פּער רעזולטאַט פֿאַר Exa, וואָס איבערשרײַבט search_context_size אויב ביידע באַשטימונגען ווערן צוגעשטעלט. שטעלן אַן גענויע מאַקסימום פֿון 1 ביז 100,000 אותיות; native provider זוך איגנאָרירט די באַשטימונג.
web_search_options.allowed_domainsאָפּציאָנעל
טיפּstring[]
דאָמיין־אַלאַוו־ליסטע פֿאַר Exa און רובֿ native זוך־providers, וואָס באַגרענעצט רעזולטאַטן צו די אויסגערעכנטע דאָמיינס. Google native search שטיצט עס נישט.
web_search_options.excluded_domainsאָפּציאָנעל
טיפּstring[]
דאָמיין־אויסשליס־ליסטע פֿאַר Exa זוכונגען און צופּאַסיקע native providers; Google און OpenAI native זוכונגען קענען נישט צולייגן די ליסטע. רעזולטאַטן פֿון אויסגערעכנטע דאָמיינס ווערן אויסגעשלאָסן.
web_search_options.user_locationאָפּציאָנעל
טיפּobject
דערנענטערטער באַניצער־אָרט וואָס בייאַסט native זוך־רעזולטאַטן געאָגראַפֿיש; 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/yi/developers/models/openrouter/router.md. אַלע מאָדעלן און גוידעס: https://doitong.com/developers/llms.txt