> ## Documentation Index
> Fetch the complete documentation index at: https://firecrawl-docs-prompt-injection-screening.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 | Low cost and short run time                     |
| `spark-1-mini` | **60% cheaper** than Pro | Standard          | Cost-sensitive Spark 1 workloads                |
| `spark-1-pro`  | Standard                 | Higher            | Complex research, critical extraction (default) |

<Tip>
  **Spark 1 Pro is the default**, so a request without the `model` parameter uses `spark-1-pro`. Set `model` to `spark-2` to get a lower cost and a shorter run time at comparable accuracy. Set `model` to `spark-1-mini` for a 60% lower cost on simple Spark 1 tasks.
</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. Set `model` to `spark-2` to use it.

**Use Spark 2 when:**

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

**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

`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 (Default)

`spark-1-pro` is our flagship model, designed for maximum accuracy on complex extraction tasks. It is the default: a request that does not set `model` uses `spark-1-pro`.

**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

`spark-1-pro` is the default, so the `model` parameter is optional. Pass it to select a different model:

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

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

  # Using Spark 2 (not the default - set it explicitly)
  result = app.agent(
      prompt="Find the pricing of Firecrawl",
      model="spark-2"
  )

  # Using Spark 1 Mini
  result = app.agent(
      prompt="Find the pricing of Firecrawl",
      model="spark-1-mini"
  )

  # Using Spark 1 Pro (the default) 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 (not the default - set it explicitly)
  const resultSpark2 = await firecrawl.agent({
    prompt: "Find the pricing of Firecrawl",
    model: "spark-2"
  });

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

  // Using Spark 1 Pro (the default) 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 (not the default - set it explicitly)
  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
  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 (the default) 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.
