跳转到主要内容

API Key

每一次 KeyAPI API 请求都必须携带 API Key。你可以在 dashboard 中找到自己的 API Key。
请妥善保管 API Key。不要把它暴露在前端代码或公开仓库中。

Bearer Authentication

KeyAPI 使用 Bearer authentication。请在 Authorization header 中传入你的 API Key。
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.keyapi.ai/v1/tiktok/influencer/detail?unique_id=karladelatorre97"

Response Envelope

所有接口都会返回一致的 JSON envelope:
{
  "code": 0,
  "message": "success",
  "data": { ... }
}
字段类型说明
codeinteger0 表示成功,非 0 表示业务错误
messagestring可读的状态说明
dataobject | array接口返回的数据主体

Error Responses

HTTP Status含义
400请求参数无效
401API Key 缺失或无效
402余额或 credits 不足,需要充值或升级
403当前 API Key 无权访问该接口
429请求过于频繁,已触发限流
500服务端内部错误