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

# 身份验证

> LI.FI Intents API 的 API 密钥、访问级别与环境。

LI.FI Intents API 有两种访问级别：开放的集成商端点和需要身份验证的求解器端点。

***

## 集成商

集成商端点完全开放。无需 API 密钥、无需注册、无速率限制。你可以立即开始构建。

### 端点

| Method | Path                               | 说明             |
| ------ | ---------------------------------- | -------------- |
| `POST` | `/quote/request`                   | 为意图请求报价        |
| `GET`  | `/api/v1/integrator/quote/request` | V1 集成商友好型报价端点  |
| `POST` | `/orders/submit`                   | 向求解器网络提交订单     |
| `GET`  | `/orders`                          | 列出订单（可选过滤器）    |
| `GET`  | `/orders/status`                   | 获取订单状态         |
| `GET`  | `/chains/supported`                | 获取支持的链列表       |
| `GET`  | `/routes`                          | 获取支持的路由（链/资产对） |

***

## 求解器（需要 API 密钥）

求解器端点需要通过 `api-key` 请求头传入 API 密钥。这些端点用于提交报价、管理求解器账户和跟踪信誉。

| Method | Path                             | 说明                 |
| ------ | -------------------------------- | ------------------ |
| `POST` | `/quotes/submit`                 | 提交或更新最多 20 万条求解器报价 |
| `GET`  | `/solver-api/quotes`             | 获取求解器已上传的报价库存      |
| `GET`  | `/solver-api/solver/identities`  | 获取用于信誉跟踪的求解器身份     |
| `POST` | `/solver-api/account/register`   | 注册求解器账户            |
| `POST` | `/solver-api/account/unregister` | 注销求解器账户            |

### 为请求进行身份验证

在 `api-key` 请求头中传入你的 API 密钥：

```bash theme={"system"}
curl -X POST 'https://order.li.fi/quotes/submit' \
  -H 'Content-Type: application/json' \
  -H 'api-key: YOUR_SOLVER_API_KEY' \
  -d '{ ... }'
```

### 获取 API 密钥

在求解器 UI 中注册并管理你的求解器 API 密钥：

| 环境         | 求解器 UI                                        | API 基础 URL                |
| ---------- | --------------------------------------------- | ------------------------- |
| Production | [intents.li.fi](https://intents.li.fi/)       | `https://order.li.fi`     |
| Testnet    | [devintents.li.fi](https://devintents.li.fi/) | `https://order-dev.li.fi` |

我们建议先在测试网上验证你的集成，然后再上线。

***

## 环境

| 环境          | 基础 URL                    | 用途                            |
| ----------- | ------------------------- | ----------------------------- |
| Production  | `https://order.li.fi`     | 使用真实资产的实时订单                   |
| Development | `https://order-dev.li.fi` | 测试网订单（Sepolia、Base Sepolia 等） |

两个环境上均可在 [`/docs`](https://order.li.fi/docs) 获取交互式 API 文档。

***

## 后续步骤

<CardGroup cols={2}>
  <Card title="快速开始" icon="rocket" href="/lifi-intents/quickstart">
    面向集成商的端到端托管流程
  </Card>

  <Card title="Intents API 概述" icon="code" href="/lifi-intents/intents-api/api-overview">
    集成商端点、订单生命周期与地址编码
  </Card>

  <Card title="求解器 API 概述" icon="gears" href="/lifi-intents/for-solvers/api-overview">
    求解器端点、报价与账户管理
  </Card>
</CardGroup>
