コンテンツへスキップ

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"

1 回の実行につき最大 $5.138 実際の使用量に応じて課金され、残額は返金されます このページで実行

APIキーを取得
OpenRouter LLM

`model`フィールドでプロンプトに回答する言語モデルを選ぶ、汎用テキストLLMゲートウェイ

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"

このリクエストを実行

キーはこのブラウザ内に保持されます。Doitong APIにのみ送信され、「記憶する」にチェックを入れた場合のみlocalStorageに保存されます。 APIキーを取得

OpenRouterについて

必須の`model`パラメータで選択した言語モデルに`prompt`を送信します。任意入力として、`system_prompt`、0~2の`temperature`、`max_tokens`、`reasoning`フラグ、`enable_web_search`によるWeb検索を指定できます。出力には生成テキスト、任意の推論、トークン使用量が含まれます。

パラメータ

名前型 デフォルト許可される値 説明
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'は利用可能なプロバイダー固有の検索を使用し、'native'はOpenAI、Anthropic、Google、xAI、Perplexityの組み込み検索を優先します。Exaの検索APIのみを使用するには'exa'を選択します。
web_search_options.max_results任意
型integer | null
1 – 25
各Exa検索呼び出しの結果数上限。1~25で、デフォルトは5です。プロバイダー固有の検索では無視されます。
web_search_options.max_uses任意
型integer | null
≥ 1
リクエストごとの検索上限。native検索ではAnthropicに渡されますが、他のnativeプロバイダーでは無視されます。上限を超える呼び出しはエラー結果を返し、実行されません。
web_search_options.max_total_results任意
型integer | null
≥ 1
1つのリクエスト内のすべての検索に対する合計結果数の上限。
web_search_options.search_context_size任意
型enum
lowmediumhigh
Exaの結果ごとの取得量。両方を指定した場合はmax_charactersが優先され、native検索では無視されます。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検索では無視されます。
web_search_options.allowed_domains任意
型string[]
Exaおよびほとんどのnative検索プロバイダーのドメイン許可リスト。結果を指定ドメインに制限します。Googleのnative検索には対応していません。
web_search_options.excluded_domains任意
型string[]
Exa検索および対応するnativeプロバイダーのドメイン除外リスト。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
2文字で表す国識別子。例:'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はストレージ上のコピーです。アカウント設定または?storage=により、永久保存(GB・月単位で有料)または無料で7日保存できます。
すべてのモデルで同じ形式画像、動画、音声のいずれでも、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/ja/developers/models/openrouter/router.md. すべてのモデルとガイド: https://doitong.com/developers/llms.txt