API 文档

集成 AI 检测器到您的应用中

获取 API Key

在开始使用 API 之前,您需要先获取 API Key。登录用户中心后,在设置页面生成您的专属 API Key。

您的 API Key

sk_test_xxxxxxxxxxxxxxxxxxxx

API 端点

速率限制

免费用户100 次/天
专业用户10,000 次/天
企业用户无限制
POST/api/v1/detect

检测单个文件是否由 AI 生成

请求示例

// 单文件检测
curl -X POST https://api.aidetector.com/v1/detect \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: multipart/form-data" \
  -F "[email protected]"

// 响应示例
{
  "success": true,
  "data": {
    "id": "det_123456",
    "fileName": "document.txt",
    "isAI": true,
    "confidence": 92.5,
    "aiProbability": 87.3,
    "humanProbability": 12.7,
    "analysis": {
      "patterns": ["重复句式", "用词正式"],
      "suggestions": ["增加个性化表达"]
    },
    "createdAt": "2024-01-15T10:30:00Z"
  }
}

错误码

错误码说明
400请求参数错误
401未授权,请检查 API Key
429请求过于频繁,超出速率限制
500服务器内部错误