agentHub
API

APIリファレンス

AILoft統合のための完全なREST APIドキュメント。

ベースURL
認証
JSONレスポンス

認証

すべてのリクエストにはAuthorizationヘッダーにBearerトークンとしてAPIキーが必要です。

// Header
Authorization: Bearer your-api-token

APIキーを秘密にしてください。クライアントサイドのコードで公開しないでください。

エンドポイント

GET/api/agentsメタデータ、評価、価格付きの利用可能なすべてのエージェントを一覧表示。

パラメータ

categorystringFilter by category (Development, Analytics, Legal, ...)
searchstringSearch in name, description and tags
backendstringFilter by compatible backend (e.g. openai, claude, ollama)
pricingstringFilter: "free" or "paid"
sortstringSort: popular, newest, rating (default: newest)
pagenumberPage number (default: 1)
limitnumberResults per page (1–50, default: 12)
レスポンス: { agents: Agent[], total: number, page: number }
GET/api/agents/:slug特定のエージェントの詳細情報を取得。

パラメータ

slugstringUnique agent slug (URL param)
レスポンス: { ...AgentDetail, author: { id, name, username }, reviews: Review[] }
GET/api/agents/:slug/reviewsエージェントのページネーション付きレビューを取得。

パラメータ

slugstringAgent slug (URL param)
pagenumberPage number (default: 1)
limitnumberResults per page (1–50, default: 10)
レスポンス: { reviews: Review[], total: number, page: number }
GET/api/agents/:slug/similarGet similar agents from the same category.

パラメータ

slugstringAgent slug (URL param)
レスポンス: { agents: Agent[] }
POST/api/agents/:slug/install有料エージェントをインストール。ウォレットから差引。

パラメータ

slugstringAgent slug (URL param)
backendstringTarget backend (default: "openai")
レスポンス: { success: boolean, message: string, config: InstallConfig }
POST/api/agents/install-free無料エージェントをインストール。認証必要。

パラメータ

agentSlugstringAgent slug (body)
emailstringEmail for delivery (body)
レスポンス: { ok: boolean }
POST/api/agents/:slug/reviews🔒インストール済みエージェントのレビューを投稿。

パラメータ

ratingnumberRating 1–5 (required)
commentstringReview text (optional)
レスポンス: { id, rating, comment, agentId, userId, createdAt }
GET/api/payments/wallet🔒ウォレット残高と取引履歴を取得。
レスポンス: { balance, totalEarned, totalWithdrawn, available, stripeAccountStatus }

データ型

Agent

id: string
slug: string
name: string
description: string
icon: string | null
category: string
agentType: "prompt_based" | "app_ui"
compatible: string[]
tags: string[]
pricing: { type: "one_time", amount?: number }
rating: number
installs: number
isFeatured: boolean
createdAt: string (ISO 8601)
author: { id: string, name: string }

Review

id: string
rating: number (1–5)
comment: string | null
agentId: string
userId: string
user: { name, username, avatarUrl }
createdAt: string (ISO 8601)