> For the complete documentation index, see [llms.txt](https://docs.metasleuth.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.metasleuth.io/zh_cn/blocksec-fan-xi-qian-api/introduction/authentication.md).

# 身份验证

我们的API使用API密钥进行身份验证。为了确保您的数据安全，**请不要与任何人共享您的API密钥。**

### 如何获取API密钥？

要生成API密钥，请先[注册一个BlockSec账户](https://account.blocksec.com/signup?referer=https%3A%2F%2Fmetasleuth.io)。注册成功后，访问\_**设置**\_部分中的[APIs](https://metasleuth.io/settings?type=apis)面板，快速获取您的API密钥。

{% hint style="info" %}
如果您通过我们的销售渠道订阅了定制的API服务，请联系您的指定服务联系人以获取API密钥。
{% endhint %}

<figure><img src="/files/P6idY1svKWqeuLYTxW80" alt=""><figcaption></figcaption></figure>

### 如何使用API密钥

在每个API请求的HTTP请求头中包含"**API-KEY**"头，并将您的API密钥作为值提供。请参见以下示例。

{% code overflow="wrap" %}

```sh
curl -L \
  -X POST \
  -H 'Content-Type: application/json' \
  -H 'API-KEY:$API_KEY' \
  'https://aml.blocksec.com/address-label/api/v3/labels' \
  -d '{"chain_id":1,"address":"0x00d7e7409bfe09a736d3e993de9b87d0baa314d5"}'
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.metasleuth.io/zh_cn/blocksec-fan-xi-qian-api/introduction/authentication.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
