Njuolgga sisdollui

OpenRouter

Integrere

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

Gitta 5,138 $ juohke ráŋggas mákso duohta geavaheami mielde, loahppa máhcaheami Vuodje dán siiddu alde

Oza API-čoavdaga
OpenRouter LLM

Oppalaš teaksta-LLM-láhtti gos `model` vállje gielamodealla mii vástida promptii

OpenRouter · Teaksta

Dát lea du vuosttaš bohtos

Daga jearaldaga vuolábealde ja vuodje dan iežat API-čoavddain. Boađusat kopierejuvvojit min vurkemii, bisuhuvvojit álo dahje 7 beaivvi nuvttá.

Ráhkat jearaldaga

Kontrollat ráhkaduvvojit modealla skeama vuođul. Koda ja haddi ođasmahttojuvvojit go rievddadat daid.

•gáibiduvvo

Bivdda chat completion:a várás.

Vuogádat-bivdda mii addá modeallii bagadusaid dahje konteavstta.

•gáibiduvvo

Nama mii identifisere modealla maid galgá vuodjut.

Viiddiduvvon temperature · max_tokens · reasoning · enable_web_search · web_search_options
standárda 1

Vástádusa variašuvnna stivrejeapmi, mas 0 sihkkarastá identtalaš vástádusa go sisa-addin ii rievdan. Stuoridit árvu fievrrida vástádusaid vuorddehahttivuođas ja dábálaš vástádusain eanet diversitehtii ja hárve-vástádusaide.

Ráddje vástádusa ráhkaduvvon tokenaid logu árvui mii ii leat stuorát go konteavstta guhkkodat minus bivdda guhkkodat. Ráhkadeapmi ii sáhte mannat badjel meroštallon ráji.

Web-ohcama konfigurašuvdna, mii sisttisdoallá mohtora válljema, boađusrájáid ja domena-filterema. Geavahuvvo dušše go enable_web_search lea true.

POST /run/openrouter/router?wait=20 haddemearrádus → 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"

Geavat dán ohcamuša

Du key báhcá dán fierpmádatlogan: dat sáddejuvvo dušše Doitong API:ii ja vurkejuvvo (localStorage) dušše jos válljet Remember. Viečča API-keya

Dát lea OpenRouter birra

Sádde `prompt` gielamodeallii mii válljejuvvo geatnegahtton `model` parámeteraiguin. Eaktodáhtolaš inputat leat `system_prompt`, `temperature` 0 gitta 2, `max_tokens`, `reasoning`-flagga ja web-ohcan `enable_web_search` bokte. Bohtosis leat ráhkaduvvon teaksta, eaktodáhtolaš ákkastallan ja tokengeavaheapmi.

Parametterat

NammaŠládja StandárdaDohkkehuvvon Govvádus
promptgáibiduvvo
Šládjastring
Bivdda chat completion:a várás.
system_prompteaktodáhtolaš
Šládjastring | null
Vuogádat-bivdda mii addá modeallii bagadusaid dahje konteavstta.
modelgáibiduvvo
Šládjastring
Nama mii identifisere modealla maid galgá vuodjut.
reasoningeaktodáhtolaš
Šládjaboolean
Standárdafalse
Galget go ákkastallamat sisttisdoallat loahppavástádusas.
temperatureeaktodáhtolaš
Šládjanumber
Standárda1
0 – 2
Vástádusa variašuvnna stivrejeapmi, mas 0 sihkkarastá identtalaš vástádusa go sisa-addin ii rievdan. Stuoridit árvu fievrrida vástádusaid vuorddehahttivuođas ja dábálaš vástádusain eanet diversitehtii ja hárve-vástádusaide.
max_tokenseaktodáhtolaš
Šládjainteger | null
≥ 1
Ráddje vástádusa ráhkaduvvon tokenaid logu árvui mii ii leat stuorát go konteavstta guhkkodat minus bivdda guhkkodat. Ráhkadeapmi ii sáhte mannat badjel meroštallon ráji.
web_search_optionseaktodáhtolaš
Šládjaobject
Web-ohcama konfigurašuvdna, mii sisttisdoallá mohtora válljema, boađusrájáid ja domena-filterema. Geavahuvvo dušše go enable_web_search lea true.
web_search_options.engineeaktodáhtolaš
Šládjaenum
Standárdaauto
autonativeexa
Ohcanmohtora válljen: 'auto' ja 'native' máhccaba goassige Exa:i go native-ohcan ii leat olámuttus. 'auto' geavaha olámuttus provider-native-ohcama; 'native' vuoruhit OpenAI, Anthropic, Google, xAI dahje Perplexity:a sisaboahta ohcama. Exa:a ohcan-API dušše geavaheapmái vállje 'exa'.
web_search_options.max_resultseaktodáhtolaš
Šládjainteger | null
1 – 25
Boađusrádji juohke Exa-ohcančuohpamis, 1–25, standárdan 5. Native-provider-ohcan ii fuola dán heiveheamis.
web_search_options.max_useseaktodáhtolaš
Šládjainteger | null
≥ 1
Ohcanrádji juohke jearaldahkii, mii sáddejuvvo Anthropic:i native-ohcamii muhto vuoittáhallá eará native-provideriin. Čuohpamat badjel ráji ožžot meattáhusboađusa ja eai vuodju.
web_search_options.max_total_resultseaktodáhtolaš
Šládjainteger | null
≥ 1
Oktiibuot boađusrádji buot ohcamiidda ovtta jearaldagas.
web_search_options.search_context_sizeeaktodáhtolaš
Šládjaenum
lowmediumhigh
Exa:a juohke boađusa oažžunmearri, mii max_characters:ain badjeldoallá jus goappašat leat addojuvvon ja ii geavahuvvo native-provider-ohcamis. Vállje low 5K mearkka várás, medium 15K várás dahje high 30K várás; jos guođát meroštallakeahttá, Exa heiveha meari sullii 2–4K mearkka juohke boađussii.
web_search_options.max_characterseaktodáhtolaš
Šládjainteger | null
1 – 100 000
Exa:a juohke boađusa sisdoalu mearkkarádji, mii search_context_size:a badjeldoallá jus goappašat leat addojuvvon. Meroštal čielga bajimusmeari 1–100 000 mearkka; native-provider-ohcan ii fuola dán heiveheamis.
web_search_options.allowed_domainseaktodáhtolaš
Šládjastring[]
Domena-boahtinlohpi Exa:a ja eanáš native-ohcanprovideriid várás, mii ráddje boađusaid dán listtu domenaide. Google native-ohcan ii doarjjo dan.
web_search_options.excluded_domainseaktodáhtolaš
Šládjastring[]
Domena-eretlohku Exa-ohcamiidda ja heivehuvvon native-provideriide; Google ja OpenAI native-ohcamat eai sáhte dán listtu geavahit. Listtus namuhuvvon domenaid boađusat guođđojuvvojit eret.
web_search_options.user_locationeaktodáhtolaš
Šládjaobject
Geahččalanlágan geavaheaddji báiki mii geográfalaččat váikkuha native-ohcanboađusaide; Exa ii geavat dán dieđu.
web_search_options.user_location.typeeaktodáhtolaš
Šládjastring
Standárdaapproximate
Báikki klassifiseren; dušše dorjojuvvon árvu lea 'approximate'.
web_search_options.user_location.cityeaktodáhtolaš
Šládjastring | null
Gávpoga namma, omd. 'San Francisco'.
web_search_options.user_location.regioneaktodáhtolaš
Šládjastring | null
Stáhta dahje regiovnna namma, omd. 'California'.
web_search_options.user_location.countryeaktodáhtolaš
Šládjastring | null
Guovllu identifikahtor guokte bustávas, omd. 'US'.
web_search_options.user_location.timezoneeaktodáhtolaš
Šládjastring | null
Áigeguovllu identifikahtor IANA-notašuvnnas, omd. 'America/Los_Angeles'.
gáibiduvvo

Boađus

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"
  }
}
Du fiillat, du válljenJuohke outputs[].url lea kopia min vurkemis: bisuhuvvo álo (mákso GB-mánu mielde) dahje 7 beaivvi nuvttá, du konto­o heiveheami dahje ?storage= mielde.
Seammá hápmi juohke modeallastype, url, content_type, width, height ja duration, govvii, videoii ja jienai seammá ládje. output lea modealla iežas boađusobjekta.
Outputa giettit
output
stringModealla ráhkadan boađus.
reasoning
string | nullÁkkastallan mii lea ráhkaduvvon loahppavástádusa doarjjan.
partial
booleanČájeha lea go boađus oanehaš dahje ii.
error
string | nullDiehtu mii čilge meattáhusa, jos dáhpáhuvai.
usage
object {prompt_tokens, completion_tokens, total_tokens, cost, prompt_tokens_details} | nullToken-geavaheami dieđut.

Eanet modeallat: LLM

AI-agenttaide: dán siidu Markdowna lea dáppe https://doitong.com/se/developers/models/openrouter/router.md. Buot modeallat ja ráđit: https://doitong.com/developers/llms.txt