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": { ... }
}
| 字段 | 类型 | 说明 |
|---|
code | integer | 0 表示成功,非 0 表示业务错误 |
message | string | 可读的状态说明 |
data | object | array | 接口返回的数据主体 |
Error Responses
| HTTP Status | 含义 |
|---|
400 | 请求参数无效 |
401 | API Key 缺失或无效 |
402 | 余额或 credits 不足,需要充值或升级 |
403 | 当前 API Key 无权访问该接口 |
429 | 请求过于频繁,已触发限流 |
500 | 服务端内部错误 |