> For the complete documentation index, see [llms.txt](https://minara.ai/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://minara.ai/docs/minara-handbook/zh/jiao-yi/agent-api/authentication.md).

# 身份验证

Minara 提供两种用于验证 API 请求的方法。

### API 密钥（订阅）

标准方法，适用于 **专业版** 和 **合作伙伴** 套餐用户。请将你的 API 密钥包含在每个请求的 `Authorization` 请求头中。

**格式：**

```
Authorization: Bearer <YOUR_API_KEY>
```

**示例：**

```bash
curl -H "Authorization: Bearer sk-minara-xxxxxxxx" https://api.minara.ai/v1/developer/chat
```

> **安全性：** 请像对待密码一样对待你的 API 密钥。切勿将其暴露在客户端代码或公开仓库中。

👉 **了解更多：** [Broken mention](broken://pages/3dba6ec36094dcf3c6328da6af20e21b2e2a298f)

### 按量付费（x402）

对于无需订阅的按使用量访问，我们支持 [**x402 协议**](https://www.x402.org/)。可直接使用 $USDC 等稳定币支付 API 调用费用（无需订阅）。

**x402 API URL**:[https://x402.minara.ai](https://x402.minara.ai/)

**探索我们的 x402 端点：** [x402scan 上的 Minara](https://www.x402scan.com/server/66307a3c-aeb9-4508-9531-71eed69bc9b5)

👉 **了解更多：** [Broken mention](broken://pages/9d8bc343809eda70f895a7dac8f9cd689841f43e)


---

# 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:

```
GET https://minara.ai/docs/minara-handbook/zh/jiao-yi/agent-api/authentication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
