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

# 模型

> 为你的代理抽取任务选择合适的模型。

Firecrawl 代理提供两种针对不同场景优化的模型。请根据你的提取复杂度和成本要求选择合适的模型。

<div id="available-models">
  ## 可用模型
</div>

| Model          | Cost        | Accuracy | Best For      |
| -------------- | ----------- | -------- | ------------- |
| `spark-1-mini` | **成本低 60%** | 标准       | 适用于大多数任务 (默认) |
| `spark-1-pro`  | 标准          | 更高       | 复杂研究、关键数据抽取   |

<Tip>
  **优先使用 Spark 1 Mini** (默认) ——在成本降低 60% 的情况下，它可以很好地处理大多数抽取任务。仅在需要进行复杂的多领域研究或对准确性要求极高时再切换到 Pro。
</Tip>

<div id="spark-1-mini-default">
  ## Spark 1 Mini (默认)
</div>

`spark-1-mini` 是我们的高效模型，适合处理简单直接的数据提取任务。

**在以下场景使用 Mini：**

* 提取简单数据点 (联系信息、价格等)
* 处理结构清晰的网站
* 需要优先考虑成本效率
* 需要运行高频、大批量提取任务

**示例用例：**

* 从电商网站提取产品价格
* 从公司页面收集联系信息
* 从文章中获取基础元数据
* 简单的数据点查询

<div id="spark-1-pro">
  ## Spark 1 Pro
</div>

`spark-1-pro` 是我们的旗舰模型，专为在复杂提取任务中实现最高准确率而设计。

**在以下情况下使用 Pro：**

* 执行复杂的竞品分析
* 提取需要深度推理的数据
* 你的用例对准确性要求极高
* 处理模糊或难以获取的数据

**示例用例：**

* 多领域竞品分析
* 需要推理的复杂研究任务
* 从多个来源提取细微信息
* 关键业务情报收集

<div id="specifying-a-model">
  ## 指定模型
</div>

通过传递 `model` 参数来选择要使用的模型：

<CodeGroup>
  ```python Python theme={null}
  from firecrawl import Firecrawl

  app = Firecrawl(api_key="fc-YOUR_API_KEY")

  # 使用 Spark 1 Mini(默认,可省略)
  result = app.agent(
      prompt="Find the pricing of Firecrawl",
      model="spark-1-mini"
  )

  # Using Spark 1 Pro for complex tasks
  result = app.agent(
      prompt="Compare all enterprise features and pricing across Firecrawl, Apify, and ScrapingBee",
      model="spark-1-pro"
  )

  print(result.data)
  ```

  ```js Node theme={null}
  import { Firecrawl } from 'firecrawl';

  const firecrawl = new Firecrawl({ apiKey: "fc-YOUR_API_KEY" });

  // 使用 Spark 1 Mini(默认 - 可省略)
  const result = await firecrawl.agent({
    prompt: "Find the pricing of Firecrawl",
    model: "spark-1-mini"
  });

  // 使用 Spark 1 Pro 处理复杂任务
  const resultPro = await firecrawl.agent({
    prompt: "Compare all enterprise features and pricing across Firecrawl, Apify, and ScrapingBee",
    model: "spark-1-pro"
  });

  console.log(result.data);
  ```

  ```bash cURL theme={null}
  # Using Spark 1 Mini (default)
  curl -X POST "https://api.firecrawl.dev/v2/agent" \
    -H "Authorization: Bearer $FIRECRAWL_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "prompt": "Find the pricing of Firecrawl",
      "model": "spark-1-mini"
    }'

  # 使用 Spark 1 Pro 处理复杂任务
  curl -X POST "https://api.firecrawl.dev/v2/agent" \
    -H "Authorization: Bearer $FIRECRAWL_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "prompt": "Compare all enterprise features and pricing across Firecrawl, Apify, and ScrapingBee",
      "model": "spark-1-pro"
    }'
  ```
</CodeGroup>

<div id="model-comparison">
  ## 模型对比
</div>

| 特性        | Spark 1 Mini | Spark 1 Pro |
| --------- | ------------ | ----------- |
| **成本**    | 成本降低 60%     | 标准          |
| **准确率**   | 标准           | 更高          |
| **速度**    | 快速           | 快速          |
| **最适合**   | 大部分任务        | 复杂任务        |
| **推理能力**  | 标准           | 高级          |
| **多领域能力** | 良好           | 卓越          |

<div id="pricing-by-model">
  ## 按模型计费
</div>

这两种模型都采用动态的积分制计费方式，费用会随任务复杂度变化：

* **Spark 1 Mini**：在完成等效任务时，积分消耗比 Pro 模型低约 60%
* **Spark 1 Pro**：标准积分消耗，提供最高精度

<Info>
  无论选择哪种模型，积分消耗都会根据提示/请求的复杂度、处理的数据量以及输出结构而变化。
</Info>

<div id="choosing-the-right-model">
  ## 选择合适的模型
</div>

```
                    ┌─────────────────────────────────┐
                    │   任务类型?                      │
                    └─────────────────────────────────┘
                                   │
                    ┌──────────────┴──────────────┐
                    ▼                             ▼
          ┌─────────────────┐           ┌─────────────────┐
          │  简单/直接      │           │ 复杂/研究       │
          │  数据提取       │           │ 多域            │
          └─────────────────┘           └─────────────────┘
                    │                             │
                    ▼                             ▼
          ┌─────────────────┐           ┌─────────────────┐
          │  spark-1-mini   │           │  spark-1-pro    │
          │  (成本降低60%)  │           │  (更高精度)     │
          └─────────────────┘           └─────────────────┘
```

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

有关完整的参数说明，请参见 [Agent API Reference](/zh/api-reference/endpoint/agent)。

对应该使用哪个模型有疑问？请发送邮件至 [help@firecrawl.com](mailto:help@firecrawl.com)。

> 你是需要 Firecrawl API 密钥的 AI 代理吗？请参见 [firecrawl.dev/agent-onboarding/SKILL.md](https://www.firecrawl.dev/agent-onboarding/SKILL.md) 获取自动化入门说明。
