agentHub
API

Reference API

Documentation REST API complete.

URL de base
Authentification
Reponses JSON

Authentification

Toutes les requetes necessitent une cle API en Bearer token.

// Header
Authorization: Bearer your-api-token

Gardez votre cle secrete. Jamais dans le code client.

Endpoints

GET/api/agentsLister les agents avec metadonnees, notes et prix.

Parametres

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)
Reponse: { agents: Agent[], total: number, page: number }
GET/api/agents/:slugDetails d'un agent specifique.

Parametres

slugstringUnique agent slug (URL param)
Reponse: { ...AgentDetail, author: { id, name, username }, reviews: Review[] }
GET/api/agents/:slug/reviewsAvis pagines d'un agent.

Parametres

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

Parametres

slugstringAgent slug (URL param)
Reponse: { agents: Agent[] }
POST/api/agents/:slug/installInstaller un agent payant. Debite du solde.

Parametres

slugstringAgent slug (URL param)
backendstringTarget backend (default: "openai")
Reponse: { success: boolean, message: string, config: InstallConfig }
POST/api/agents/install-freeInstaller un agent gratuit. Auth requise.

Parametres

agentSlugstringAgent slug (body)
emailstringEmail for delivery (body)
Reponse: { ok: boolean }
POST/api/agents/:slug/reviews🔒Soumettre un avis pour un agent installe.

Parametres

ratingnumberRating 1–5 (required)
commentstringReview text (optional)
Reponse: { id, rating, comment, agentId, userId, createdAt }
GET/api/payments/wallet🔒Solde et historique des transactions.
Reponse: { balance, totalEarned, totalWithdrawn, available, stripeAccountStatus }

Types de donnees

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)