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

# Models

> Choose the right model for your agent extraction tasks.

Firecrawl Agent offers three models optimized for different use cases. Choose the right model based on your extraction complexity and cost requirements.

## Available Models

| Model          | Cost                     | Accuracy          | Best For                              |
| -------------- | ------------------------ | ----------------- | ------------------------------------- |
| `spark-2`      | Lowest                   | Comparable to Pro | New integrations                      |
| `spark-1-mini` | **60% cheaper** than Pro | Standard          | Most tasks (default)                  |
| `spark-1-pro`  | Standard                 | Higher            | Complex research, critical extraction |

<Tip>
  **Try Spark 2** for new integrations — it costs less and finishes faster than both Spark 1 models on most tasks. Spark 1 Mini is still the default, so pass `model: "spark-2"` explicitly. Among the Spark 1 models, start with Mini and switch to Pro only for complex multi-domain research or when accuracy is critical.
</Tip>

## Spark 2

`spark-2` is our newest agent model. It removes the accuracy-versus-cost decision: it is cheaper and faster than both Spark 1 models while matching Spark 1 Pro's accuracy, and it completes a higher share of runs.

**Use Spark 2 when:**

* You want the lowest cost per run
* Run time matters
* You would otherwise reach for Spark 1 Pro's accuracy
* You are building a new integration

**Example use cases:**

* Anything you run on Spark 1 Mini or Spark 1 Pro today
* High-volume extraction where cost per run drives the budget
* Multi-domain research that needs to come back quickly

## Spark 1 Mini (Default)

`spark-1-mini` is our efficient model, ideal for straightforward data extraction tasks.

**Use Mini when:**

* Extracting simple data points (contact info, pricing, etc.)
* Working with well-structured websites
* Cost efficiency is a priority
* Running high-volume extraction jobs

**Example use cases:**

* Extracting product prices from e-commerce sites
* Gathering contact information from company pages
* Pulling basic metadata from articles
* Simple data point lookups

## Spark 1 Pro

`spark-1-pro` is our flagship model, designed for maximum accuracy on complex extraction tasks.

**Use Pro when:**

* Performing complex competitive analysis
* Extracting data that requires deep reasoning
* Accuracy is critical for your use case
* Dealing with ambiguous or hard-to-find data

**Example use cases:**

* Multi-domain competitive analysis
* Complex research tasks requiring reasoning
* Extracting nuanced information from multiple sources
* Critical business intelligence gathering

## Specifying a Model

Pass the `model` parameter to select which model to use:

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

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

  # Using Spark 2 (newest: cheapest and fastest)
  result = app.agent(
      prompt="Find the pricing of Firecrawl",
      model="spark-2"
  )

  # Using Spark 1 Mini (default - can be omitted)
  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" });

  // Using Spark 2 (newest: cheapest and fastest)
  const resultSpark2 = await firecrawl.agent({
    prompt: "Find the pricing of Firecrawl",
    model: "spark-2"
  });

  // Using Spark 1 Mini (default - can be omitted)
  const result = await firecrawl.agent({
    prompt: "Find the pricing of Firecrawl",
    model: "spark-1-mini"
  });

  // Using Spark 1 Pro for complex tasks
  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 2 (newest: cheapest and fastest)
  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-2"
    }'

  # 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"
    }'

  # Using Spark 1 Pro for complex tasks
  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>

## Model Comparison

| Feature          | Spark 2           | Spark 1 Mini         | Spark 1 Pro   |
| ---------------- | ----------------- | -------------------- | ------------- |
| **Cost**         | Lowest            | 60% cheaper than Pro | Standard      |
| **Accuracy**     | Comparable to Pro | Standard             | Higher        |
| **Speed**        | Fastest           | Fast                 | Fast          |
| **Best for**     | All tasks         | Most tasks           | Complex tasks |
| **Reasoning**    | Advanced          | Standard             | Advanced      |
| **Multi-domain** | Excellent         | Good                 | Excellent     |

## Pricing by Model

All models use dynamic, credit-based pricing that scales with task complexity:

* **Spark 2**: Uses substantially fewer credits than either Spark 1 model for equivalent tasks
* **Spark 1 Mini**: Uses approximately 60% fewer credits than Pro for equivalent tasks
* **Spark 1 Pro**: Standard credit consumption for maximum accuracy

<Info>
  Credit usage varies based on prompt complexity, data processed, and output structure — regardless of model selected.
</Info>

## Choosing the Right Model

Spark 2 covers both branches below. The tree applies when you are choosing between the two Spark 1 models:

```
                    ┌─────────────────────────────────┐
                    │   What type of task?            │
                    └─────────────────────────────────┘
                                   │
                    ┌──────────────┴──────────────┐
                    ▼                             ▼
          ┌─────────────────┐           ┌─────────────────┐
          │  Simple/Direct  │           │ Complex/Research│
          │  extraction     │           │ multi-domain    │
          └─────────────────┘           └─────────────────┘
                    │                             │
                    ▼                             ▼
          ┌─────────────────┐           ┌─────────────────┐
          │  spark-1-mini   │           │  spark-1-pro    │
          │  (60% cheaper)  │           │  (higher acc.)  │
          └─────────────────┘           └─────────────────┘
```

## API Reference

See the [Agent API Reference](/api-reference/endpoint/agent) for complete parameter documentation.

Have questions about which model to use? Email [help@firecrawl.com](mailto:help@firecrawl.com).

> Are you an AI agent that needs a Firecrawl API key? See [firecrawl.dev/agent-onboarding/SKILL.md](https://www.firecrawl.dev/agent-onboarding/SKILL.md) for automated onboarding instructions.
