> ## Documentation Index
> Fetch the complete documentation index at: https://firecrawl-abimaelmartell-agent-default-model.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 代理注册

> 让 AI 代理以编程方式代表人类担保人创建 Firecrawl API 密钥。

代理注册让 AI 代理能够以编程方式创建 Firecrawl API 密钥——无需浏览器、无需 OAuth，也无需人工在创建时参与。代理提供人类用户的 email，Firecrawl 会预配一个沙箱 API 密钥，可立即使用，并带有 50 额度上限。该用户会收到一封 email，用于确认或阻止该密钥。

<Info>
  **无需认证。** `/agent-signup` 端点是公开的。代理无需现有 API 密钥即可调用它。
</Info>

<div id="how-it-works">
  ## 工作原理
</div>

1. **代理调用 `POST /v2/agent-signup`**，并提供用户的电子邮件、代理名称以及 `accept_terms: true`。
2. **Firecrawl 会立即返回一个 API 密钥**。该密钥会被置于沙盒环境中，具有 **50 额度**，并且在发起方确认之前仅限进行纯索引抓取。
3. **用户本人会收到一封电子邮件**，其中包含两个链接：**Confirm & Link Key** 或 **Block this key**。
4. **确认后**，该沙盒密钥会合并到用户本人现有的 Firecrawl 账户中 (如果没有，则会创建一个新账户) 。该密钥将继承完整套餐的限制。
5. **阻止后**，该密钥会被禁用，并且该电子邮件将受到保护，防止今后未经授权的注册。

```
Agent                    Firecrawl                  Human
  │                         │                         │
  │── POST /agent-signup ──▶│                         │
  │◀── API key (sandboxed) ─│── verification email ──▶│
  │                         │                         │
  │   uses key (50 credits) │                         │
  │                         │                         │
  │                         │◀── confirm or block ────│
  │                         │                         │
  │   key upgraded to full  │                         │
  │   plan (if confirmed)   │                         │
```

<div id="for-agents">
  ## 供代理使用
</div>

<div id="creating-a-key">
  ### 创建密钥
</div>

```bash theme={null}
curl -X POST "https://api.firecrawl.dev/v2/agent-signup" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "user@company.com",
    "agent_name": "Research Assistant",
    "accept_terms": true
  }'
```

响应：

```json theme={null}
{
  "success": true,
  "api_key": "fc-...",
  "sponsor_status": "pending",
  "credit_limit": 50,
  "credits_remaining": 50,
  "verification_deadline_at": "2026-03-23T12:00:00.000Z",
  "tos_url": "https://firecrawl.dev/terms-of-service"
}
```

立即使用返回的 `api_key` 进行抓取、搜索以及其他 Firecrawl 操作。该密钥会立即生效，但在人工确认之前，额度上限为 50。

<div id="handling-the-sandbox-limits">
  ### 处理沙箱限制
</div>

当 `sponsor_status` 为 `"pending"` 时：

* 该密钥有一个硬性 **50 额度上限**。额度耗尽后，请求会返回 `402`，并带有 `error: "unverified_credit_limit_reached"`。
* 所有 scrape 请求都仅限于 **仅索引模式** (不进行完整的浏览器渲染) 。
* 如果未在 **5 天**内确认，该密钥将过期。

一旦用户完成确认，该密钥将升级到其完整方案，不再有额度上限或模式限制。

<div id="error-handling">
  ### 错误处理
</div>

| 状态    | 错误                                                          | 含义                          |
| ----- | ----------------------------------------------------------- | --------------------------- |
| `402` | `unverified_credit_limit_reached`                           | 50 额度的沙箱已耗尽。请让相关人员确认。       |
| `403` | `sponsor_verification_expired`                              | 已超过 5 天期限，仍未确认。             |
| `403` | `This API key has been blocked`                             | 该 API 密钥已被用户阻止。请停止使用。       |
| `409` | `A pending agent signup confirmation has already been sent` | 此 email 已有一个 API 密钥处于待确认状态。 |

<div id="for-humans">
  ## 面向用户
</div>

当代理使用你的邮箱创建密钥时，你会收到一封包含两个选项的邮件：

* **确认并关联密钥** — 将代理的密钥合并到你的 Firecrawl 账户中。如果你还没有账户，系统会为你创建一个。该密钥将继承你当前方案的限制。
* **阻止此密钥** — 立即禁用该密钥，并阻止该邮箱后续的代理注册。

你也可以通过 [Firecrawl Dashboard](https://firecrawl.dev/signin) 管理代理密钥。如果你已有账户，还会看到应用内通知。

<Warning>
  如果你未授权该代理，请立即点击 **阻止此密钥**。这会撤销该密钥并阻止其被进一步使用。
</Warning>

<div id="api-reference">
  ## API 参考
</div>

| 端点                                                                                 | 描述            |
| ---------------------------------------------------------------------------------- | ------------- |
| [`POST /v2/agent-signup`](/zh/api-reference/endpoint/agent-signup)                 | 创建一个沙箱 API 密钥 |
| [`POST /v2/agent-signup/confirm`](/zh/api-reference/endpoint/agent-signup-confirm) | 确认并将密钥关联到账户   |
| [`POST /v2/agent-signup/block`](/zh/api-reference/endpoint/agent-signup-block)     | 阻止并禁用密钥       |
