> ## Documentation Index
> Fetch the complete documentation index at: https://docs.keyapi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 快速开始 KeyAPI

> 在 5 分钟内完成第一次 KeyAPI API 调用。

## 1. 获取 API Key

访问 [keyapi.ai](https://keyapi.ai) 注册账号，并进入 Dashboard 获取你的 API Key。

## 2. 发起第一次请求

所有请求都使用 **Bearer authentication**。请在 `Authorization` header 中传入你的 API Key。

<CodeGroup>
  ```bash cURL theme={null}
  curl -H "Authorization: Bearer YOUR_API_KEY" \
    "https://api.keyapi.ai/v1/tiktok/influencer/detail?unique_id=karladelatorre97"
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.keyapi.ai/v1/tiktok/influencer/detail",
      params={"unique_id": "karladelatorre97"},
      headers={"Authorization": "Bearer YOUR_API_KEY"},
  )
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const res = await fetch(
    "https://api.keyapi.ai/v1/tiktok/influencer/detail?unique_id=karladelatorre97",
    {
      headers: {
        Authorization: "Bearer YOUR_API_KEY",
      },
    }
  );
  console.log(await res.json());
  ```
</CodeGroup>

## 3. 检查响应

成功响应通常如下：

```json theme={null}
{
  "code": 0,
  "message": "success",
  "data": {
    "status_code": 0,
    "status_msg": "",
    "user": { ... }
  }
}
```

<Note>
  `code: 0` 表示请求成功。非 0 值表示业务错误，请结合 `message` 查看具体原因。
</Note>

## 下一步

* 阅读 [Authentication](/zh/overview/authentication) 指南，了解完整认证方式。
* 在左侧导航中按平台浏览接口，例如 TikTok、Instagram 等。
