API文档

开发者API文档

通过我们的RESTful API,您可以轻松集成AI工具库的数据和功能到您的应用中。

快速开始

1. 获取API密钥

在个人设置页面生成您的API密钥

前往设置

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);

认证方式

所有API请求都需要在请求头中包含您的API密钥:

Authorization: Bearer YOUR_API_KEY

使用限制

免费版

每小时 100 次请求

专业版

每小时 1000 次请求

企业版

无限制

查看定价