Skip to content

Unify API

Một MCP server cho agent của bạn.

Thêm một URL MCP server vào agent để xem model, quản lý key và kiểm tra credit ngay trong công cụ.

POST /api/v1/mcp
{removed:   "mcpServers": {}added:   "mcpServers": {added:     "anyrouter": {added:       "url": "https://anyrouter.dev/api/v1/mcp"added:     }added:   }}
Cài đặt MCP đầy đủ

Kết quả trả về

Tab cURL ở trên, chạy trên prod ngày 2026-10-31 với key gói Go. Chỉ giữ các field hiển thị, giá trị dài được cắt bằng "…".

captured from prod
HTTP 200
mcp-protocol-version: 2026-07-28

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "tools": [
      "list_models",
      "recommend_model",
      "list_okf_concepts",
      "get_okf_concept",
      "publish_artifact",
      "list_artifacts",
      "get_artifact",
      "delete_artifact",
      "set_artifact_visibility",
      "get_system_status"
    ]
  }
}
mcp-protocol-version
Phiên bản giao thức MCP mà server dùng.

Hỗ trợ

  • Đăng nhập OAuth ở lần gọi tool đầu tiên
  • Tool model với mọi key; tool tài khoản (get_credits, create_key) sau khi đăng nhập OAuth

Model Decisions

Không phải chat. Gửi một tình huống và câu hỏi có các lựa chọn cố định, nhận lại xác suất cho từng lựa chọn. Decisions miễn phí từ gói Go trở lên, gói Free có 5 request dùng thử.

POST /api/v1/decisions
curl https://anyrouter.dev/api/v1/decisions \
  -H "Authorization: Bearer $ANYROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "hal-x/thx-01", "state": "My card was charged twice",
    "questions": {"team": {"type": "choice", "criteria": {"billing": "Payments", "tech": "API problems"}}}}'

# {"answers": {"team": {"type": "choice", "choice": "billing", "probabilities": {"billing": 0.97, "tech": 0.03}}}, "model": "hal-x/thx-01", "status": "completed"}

Tài liệu và use case liên quan

Tiếp theo