Skip to content

OpenRouter

Integrate

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

Up to $5.138 per run charged by actual usage, the rest is refunded Run it on this page

Get API key
OpenRouter LLM

General text LLM gateway where the `model` field picks which language model answers the prompt

OpenRouter · Text

Your first result goes here

Build a request below and run it with your API key. Outputs are copied to our storage, kept forever or 7 days for free.

Build a request

Controls are generated from the model schema. The code and the price update as you change them.

•required

Prompt supplied for chat completion.

System prompt supplying the model with instructions or context.

•required

Name identifying the model to run.

Advanced temperature · max_tokens · reasoning · enable_web_search · web_search_options
default 1

Response variability control, with 0 guaranteeing an identical answer whenever the input is unchanged. Increasing the value shifts responses away from predictable, typical answers toward greater diversity and less common answers.

Cap the response's generated token count at a value no greater than the context length less the prompt length. Generation cannot exceed the specified cap.

Web search configuration, including engine selection, result caps, and domain filtering. Used only when enable_web_search is true.

POST /run/openrouter/router?wait=20 quote → $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"

Run this request

Your key stays in this browser: it is sent only to the Doitong API and saved (localStorage) only if you tick Remember. Get an API key

About OpenRouter

Sends a `prompt` to a language model chosen with the required `model` parameter. Optional inputs include `system_prompt`, `temperature` from 0 to 2, `max_tokens`, a `reasoning` flag and web search through `enable_web_search`. Output has the generated text, optional reasoning and token usage.

Parameters

NameType DefaultAllowed Description
promptrequired
Typestring
Prompt supplied for chat completion.
system_promptoptional
Typestring | null
System prompt supplying the model with instructions or context.
modelrequired
Typestring
Name identifying the model to run.
reasoningoptional
Typeboolean
Defaultfalse
Whether to include reasoning in the final response.
temperatureoptional
Typenumber
Default1
0 – 2
Response variability control, with 0 guaranteeing an identical answer whenever the input is unchanged. Increasing the value shifts responses away from predictable, typical answers toward greater diversity and less common answers.
max_tokensoptional
Typeinteger | null
≥ 1
Cap the response's generated token count at a value no greater than the context length less the prompt length. Generation cannot exceed the specified cap.
web_search_optionsoptional
Typeobject
Web search configuration, including engine selection, result caps, and domain filtering. Used only when enable_web_search is true.
web_search_options.engineoptional
Typeenum
Defaultauto
autonativeexa
Search engine selection: 'auto' and 'native' both fall back to Exa when native search is unavailable. 'auto' uses available provider-native search; 'native' prefers built-in search from OpenAI, Anthropic, Google, xAI, or Perplexity. To use Exa's search API exclusively, select 'exa'.
web_search_options.max_resultsoptional
Typeinteger | null
1 – 25
Result cap for each Exa search call, from 1 to 25, with a default of 5. Native provider search ignores this setting.
web_search_options.max_usesoptional
Typeinteger | null
≥ 1
Per-request search cap, passed to Anthropic for native search but ignored by other native providers. Calls beyond the cap receive an error result and do not run.
web_search_options.max_total_resultsoptional
Typeinteger | null
≥ 1
Combined result limit for all searches within one request.
web_search_options.search_context_sizeoptional
Typeenum
lowmediumhigh
Per-result retrieval amount for Exa, superseded by max_characters if both are supplied and ignored for native provider search. Choose low for 5K characters, medium for 15K, or high for 30K; leaving it unspecified lets Exa adapt the amount to approximately 2–4K per result.
web_search_options.max_charactersoptional
Typeinteger | null
1 – 100,000
Per-result content character cap for Exa, overriding search_context_size if both settings are supplied. Set an exact maximum from 1 to 100,000 characters; native provider search disregards this setting.
web_search_options.allowed_domainsoptional
Typestring[]
Domain allowlist for Exa and most native search providers, restricting results to the listed domains. Google native search does not support it.
web_search_options.excluded_domainsoptional
Typestring[]
Domain exclusion list for Exa searches and compatible native providers; Google and OpenAI native searches cannot apply this list. Results originating from listed domains are excluded.
web_search_options.user_locationoptional
Typeobject
Approximate user location that biases native search results geographically; Exa does not use this information.
web_search_options.user_location.typeoptional
Typestring
Defaultapproximate
Location classification; the only supported value is 'approximate'.
web_search_options.user_location.cityoptional
Typestring | null
Name of the city, such as 'San Francisco'.
web_search_options.user_location.regionoptional
Typestring | null
State or region name, such as 'California'.
web_search_options.user_location.countryoptional
Typestring | null
Country identifier expressed as two letters, such as 'US'.
web_search_options.user_location.timezoneoptional
Typestring | null
Timezone identifier in IANA notation, such as 'America/Los_Angeles'.
required

Output

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"
  }
}
Your files, your choiceEvery outputs[].url is a copy on our storage: kept forever (paid per GB-month) or 7 days for free, by your account setting or ?storage=.
Same shape on every modeltype, url, content_type, width, height and duration, for images, video and audio alike. output is the model’s own result object.
Fields of output
output
stringResult produced by the model.
reasoning
string | nullReasoning generated to support the final response.
partial
booleanIndicates whether the output is incomplete.
error
string | nullMessage describing an error, if one occurred.
usage
object {prompt_tokens, completion_tokens, total_tokens, cost, prompt_tokens_details} | nullDetails of token consumption.

More models: LLM

For AI agents: this page as Markdown is at https://doitong.com/developers/models/openrouter/router.md. All models and guides: https://doitong.com/developers/llms.txt