API文档
开发者API文档
通过我们的RESTful API,您可以轻松集成AI工具库的数据和功能到您的应用中。
快速开始
2. 发送请求
curl -X GET "https://aitoolhub.com/api/tools" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json"
3. 处理响应
{
"success": true,
"data": [
{
"id": "1",
"name": "ChatGPT",
"slug": "chatgpt",
"category": "text-generation",
"pricing": "FREEMIUM"
}
],
"meta": {
"total": 100,
"page": 1,
"limit": 10
}
}API端点
GET
/api/tools?category=text-generation&limit=10获取工具列表
GET
/api/tools/:slug获取工具详情
GET
/api/scenarios?persona=FOUNDER&limit=20获取场景列表
GET
/api/scenarios/:slug获取场景详情
GET
/api/recipes?scenario=meeting-notes&limit=10获取配方列表
GET
/api/recipes/:slug获取配方详情
POST
/api/search智能搜索
POST
/api/favorites添加收藏
代码示例
const response = await fetch('https://aitoolhub.com/api/tools', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);