Documentation Index
Fetch the complete documentation index at: https://docs.oneinbox.ai/llms.txt
Use this file to discover all available pages before exploring further.
開始前
必要なもの: api_key と LLM モデル。モデル作成・更新時に tool_ids でツールを紐付けます。
API のツール種別:
| 種別 | 動作 |
|---|
api_call | エージェントが HTTP エンドポイントを呼び出す |
transfer_call | 人間の電話番号へ転送 |
end_call | エージェントが通話を切断 |
1. ツールを作成
例 — 自社 API を呼び出す:curl -X POST https://api.oneinbox.ai/v1/tools \
-H "Authorization: Bearer <api_key>" \
-H "Content-Type: application/json" \
-d '{
"name": "get_weather",
"type": "api_call",
"description": "Look up current weather for a city.",
"url": "https://api.weather.com/v1/current",
"method": "GET",
"headers": {"Authorization": "Bearer <secret>"},
"parameters": [
{"name": "city", "type": "string", "required": true, "description": "City name"}
]
}'
人間へ転送:curl -X POST https://api.oneinbox.ai/v1/tools \
-H "Authorization: Bearer <api_key>" \
-H "Content-Type: application/json" \
-d '{
"name": "transfer_to_human",
"type": "transfer_call",
"description": "Escalate to a human agent.",
"transfer_to": "+15105550100"
}'
通話終了:curl -X POST https://api.oneinbox.ai/v1/tools \
-H "Authorization: Bearer <api_key>" \
-H "Content-Type: application/json" \
-d '{
"name": "hangup",
"type": "end_call",
"description": "End the call."
}'
2. LLM モデルにツールを紐付け
目的: 通話中にエージェントがツールを使えるようにします。モデルを更新(または作成時に tool_ids を設定):curl -X PATCH https://api.oneinbox.ai/v1/models/<llm_id> \
-H "Authorization: Bearer <api_key>" \
-H "Content-Type: application/json" \
-d '{
"tool_ids": ["<tool_id>"]
}'
この llm_id にリンク済みのエージェントは自動的に変更を反映します。 3. ツールの一覧・管理
# 一覧
curl https://api.oneinbox.ai/v1/tools \
-H "Authorization: Bearer <api_key>"
# 1 件取得
curl https://api.oneinbox.ai/v1/tools/<tool_id> \
-H "Authorization: Bearer <api_key>"
# 削除
curl -X DELETE https://api.oneinbox.ai/v1/tools/<tool_id> \
-H "Authorization: Bearer <api_key>"
API リファレンス
ツール作成 · ツール一覧 · ツール更新