Server Tools は現在 ベータ版 です。インターフェースは安定していますが、追加のツールが追加中です。
利用可能な Server Tools
Server Tools vs Plugins vs ユーザー定義ツール
クイックスタート
- TypeScript
- Python
- cURL
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
ウェブ検索や日時など、リアルタイムの機能をモデルに提供します。Server Tools は ARouter がモデルに代わって実行するため、クライアント側のロジックは不要です。
| ツール ID | 説明 | 価格 |
|---|---|---|
web_search | ウェブを検索し、引用付きの構造化された結果を返す | 検索クエリごと |
datetime | 任意のタイムゾーンの現在の日付と時刻を返す | 無料 |
| Server Tools | Plugins | ユーザー定義ツール | |
|---|---|---|---|
| 誰が実行するか? | ARouter | ARouter | あなたのアプリ |
| モデルが呼び出しを制御? | はい | いいえ(毎リクエストに適用) | はい |
| 構造化された引用? | はい | はい(ウェブのみ) | N/A |
| ストリーミングで利用可能? | はい | はい | はい |
{
"model": "openai/gpt-5.4",
"messages": [{"role": "user", "content": "What are the top AI news stories today?"}],
"tools": [{"type": "arouter", "arouter": {"id": "web_search"}}]
}
const response = await client.chat.completions.create({
model: "openai/gpt-5.4",
messages: [{ role: "user", content: "What are the top AI news stories today?" }],
tools: [{ type: "arouter", arouter: { id: "web_search" } } as any],
});
console.log(response.choices[0].message.content);
response = client.chat.completions.create(
model="openai/gpt-5.4",
messages=[{"role": "user", "content": "What are the top AI news stories today?"}],
tools=[{"type": "arouter", "arouter": {"id": "web_search"}}],
)
print(response.choices[0].message.content)
curl https://api.arouter.ai/v1/chat/completions \
-H "Authorization: Bearer lr_live_xxxx" \
-H "Content-Type: application/json" \
-d '{"model": "openai/gpt-5.4", "messages": [{"role": "user", "content": "Top AI news today?"}], "tools": [{"type": "arouter", "arouter": {"id": "web_search"}}]}'
{
"usage": {
"prompt_tokens": 450, "completion_tokens": 210, "total_tokens": 660, "cost": 0.00234,
"server_tool_calls": {"web_search": 2}
}
}