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

# RasterFlow Billing

> Understand how RasterFlow usage is metered in RasterFlow Spatial Units, how to estimate the RasterFlow Spatial Units a task consumes before you run it, and how RasterFlow charges appear on your bill.

<Badge color="purple">Public Preview</Badge>

<br />

<br />

Wherobots Cloud meters usage in Spatial Units. Each engine has its own kind of Spatial Unit, metered a different way:

```mermaid theme={"system"}
flowchart LR
  W(["Wherobots Cloud<br/>usage, metered in<br/>Spatial Units"]):::root
  W --> S["WherobotsDB<br/>Spatial Units"]:::engine
  W --> R["RasterFlow<br/>Spatial Units"]:::engine
  S --> S1["Computing power provisioned<br/>to a runtime, for as long<br/>as the runtime runs"]:::time
  R --> R1["Data processed by<br/>a RasterFlow task"]:::data
  classDef root fill:#b59ee8,stroke:#6133be,color:#2a1a4a;
  classDef engine fill:#f3eefc,stroke:#9d7fe0,color:#2a1a4a;
  classDef time fill:#fff7e6,stroke:#d9920a,color:#5c3d00;
  classDef data fill:#eaf7ee,stroke:#2e9e54,color:#14532d;
```

A **WherobotsDB Spatial Unit** measures the computational horsepower provisioned to a runtime, and accrues for as long as that runtime runs. A **RasterFlow Spatial Unit** measures the data a RasterFlow task processes.

This page covers RasterFlow Spatial Units. For WherobotsDB Spatial Units, see [Managing Costs](/get-started/organization-management/managing-costs) and [Runtimes](/develop/runtimes/#what-factors-influence-spatial-unit-consumption).

<Note>
  For up-to-date information on rates and prices, see [Wherobots Pricing](https://wherobots.com/pricing).
</Note>

## What is a RasterFlow Spatial Unit?

A RasterFlow Spatial Unit measures the data a RasterFlow task processes. One RasterFlow Spatial Unit is 1,000,000,000 units of that data, before any complexity factor is applied.

A single pixel can carry several bands, and a task can run over several time periods, so the data a task processes is all three multiplied together:

```text theme={"system"}
pixels         = (AOI in km² × 1,000,000) ÷ (resolution in meters)²
data processed = pixels × bands × time periods
```

Four inputs therefore determine the data a task processes:

1. The **area** of your area of interest.
2. The **resolution** you request.
3. The number of **bands**.
4. The number of **time periods**.

Because a Spatial Unit depends only on those inputs and the task you run, and not on how long the task takes, you can estimate a task's cost before you run it.

<Tip>
  **Resolution is the largest lever.** Because resolution is squared in the data size calculation, increasing the resolution by a factor of two (60 cm to 30 cm, for example) quadruples the data processed. Area, bands, and time periods each scale linearly.
</Tip>

Where the band count comes from depends on the task. For **mosaicking**, it is the number of bands you request. For tasks that run on an existing store (**inference**, **Build Multiscales**, and **Mosaic Vectorization**), it is the band count of that input store, which may differ from the mosaic you started with. Mosaic Vectorization, for example, usually runs over a single-band model prediction, even when the mosaic behind it had four bands.

<Accordion title="Example: data processed for a Sentinel-2 mosaic">
  A 100,000 km² Sentinel-2 mosaic at 10 m resolution with 4 bands, over 1 time period:

  ```text theme={"system"}
  pixels         = 100,000 × 1,000,000 ÷ 10²  = 1,000,000,000
  data processed = 1,000,000,000 × 4 × 1      = 4,000,000,000 pixel values
  ```
</Accordion>

### Time periods

A **time period** is a distinct span of time for which RasterFlow produces a separate output. Most tasks use a single time period, but you can request more: running the [Fields of the World (FTW)](/develop/rasterflow/rasterflow-models) model across two years produces one result per year, and twice the RasterFlow Spatial Units of a single year.

## How a task's cost is calculated

Every RasterFlow charge follows the same path, from the inputs you choose to the cost on your bill. A task's cost is the RasterFlow Spatial Units it is billed for, multiplied by the price of that task: `cost = Spatial Units billed × price per Spatial Unit`.

Five components determine that cost:

<AccordionGroup>
  <Accordion title="Data processed" icon="image">
    The pixels a task reads, across every band and time period: `pixels × bands × time periods`. Your area of interest and the resolution you request determine the pixel count, so this is the part of the calculation you control directly.
  </Accordion>

  <Accordion title="RasterFlow Spatial Unit" icon="gauge-high">
    The unit RasterFlow usage is metered in. One RasterFlow Spatial Unit is 1,000,000,000 units of data processed, so a task's Spatial Units are the data it processes divided by 1,000,000,000.
  </Accordion>

  <Accordion title="Complexity Factor" icon="microchip">
    A multiplier applied to the Spatial Units of mosaicking and inference, reflecting how much processing each performs per pixel. The **Mosaicking Complexity Factor** varies by dataset and the **Inference Complexity Factor** varies by model. Build Multiscales and Mosaic Vectorization apply no such multiplier.
  </Accordion>

  <Accordion title="Minimum charge" icon="arrow-down-to-line">
    Each task is billed a **minimum of 1 RasterFlow Spatial Unit** at that task's price, no matter how small the area of interest. If a task's calculated Spatial Units fall below the minimum, you are billed the minimum instead.
  </Accordion>

  <Accordion title="Price per Spatial Unit" icon="credit-card">
    Each of the four RasterFlow tasks has its own price per Spatial Unit. Because the price per Spatial Unit differs by task, add up the **cost** of a multi-task workflow rather than its Spatial Units.
  </Accordion>
</AccordionGroup>

## RasterFlow tasks and pricing

Each of the four RasterFlow tasks has its own price per RasterFlow Spatial Unit.

Mosaicking and inference also apply a complexity factor, a multiplier reflecting how much processing they perform per pixel, so the Spatial Units they consume reflect the work they actually do. The **Mosaicking Complexity Factor** varies by dataset, and the **Inference Complexity Factor** varies by model. Build Multiscales and Mosaic Vectorization apply no such multiplier.

For the current price of each task, see [Wherobots Pricing](https://wherobots.com/pricing).

### Mosaicking

Mosaicking builds an analysis-ready raster mosaic from an imagery dataset for your area of interest.

**Mosaicking Complexity Factor: varies by dataset.** Datasets that require cloud removal and compositing, such as Sentinel-2, go through additional mosaic pre-processing. Datasets that are read directly, such as NAIP, have a reduced complexity factor.

| Dataset        | Mosaic pre-processing                                                                                                                                                                                                     | Mosaicking Complexity Factor |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------: |
| **NAIP**       | Source imagery is read directly and reprojected onto your output grid. Aerial imagery is captured cloud-free, so no cloud removal or compositing is required.                                                             |             0.1×             |
| **Sentinel-2** | Every available scene across your time period is searched and read, cloud and shadow are masked pixel by pixel, and the remaining clear observations are composited into a single cloud-free value for each output pixel. |             1.0×             |

For more information, see [RasterFlow Datasets](/develop/rasterflow/rasterflow-datasets).

### Inference

Inference runs a model over your data, such as segmentation or feature extraction.

**Inference Complexity Factor: varies by model.** Each model's factor is derived from its throughput (bytes processed per second), normalized to the **SAM3** reference model: a model that processes imagery more slowly than SAM3 has a higher factor, and a faster model has a lower one.

| Model                         | Intended use                                                                                   | Inference Complexity Factor |
| ----------------------------- | ---------------------------------------------------------------------------------------------- | :-------------------------: |
| **SAM3**                      | Text-prompted object detection, returning either bounding boxes or geometries                  |       1.0× (reference)      |
| **Tile2Net**                  | Sidewalk, crosswalk, and pedestrian pathway detection from very high-resolution aerial imagery |             1.8×            |
| **Meta CHM v1**               | Tree canopy height estimation from high-resolution aerial imagery                              |             1.0×            |
| **Fields of the World (FTW)** | Agricultural field boundary detection from Sentinel-2 imagery                                  |             0.2×            |
| **ChesapeakeRSC**             | Road detection from high-resolution aerial imagery, including roads obscured by tree cover     |             0.1×            |

For more information, see [RasterFlow Models](/develop/rasterflow/rasterflow-models).

### Build Multiscales

[Build Multiscales](/develop/rasterflow/rasterflow-multiscales) generates multi-resolution overviews of a mosaic, so it draws quickly at any zoom level.

Build Multiscales consumes one RasterFlow Spatial Unit for every 1,000,000,000 units of data it processes.

### Mosaic Vectorization

[Mosaic Vectorization](/reference/rasterflow/client#vectorize_mosaic) converts a raster mosaic or prediction into vector features.

Mosaic Vectorization consumes one RasterFlow Spatial Unit for every 1,000,000,000 units of data it processes. It usually runs over a single-band model prediction, so it processes a quarter of the data of a four-band task over the same area.

## Worked examples

<Accordion title="Mosaicking by dataset and resolution" defaultOpen={true}>
  Fixed area of interest: 10,000 km², 4 bands, 1 time period.

  <table>
    <colgroup>
      <col width="10%" />

      <col width="10%" />

      <col width="15%" />

      <col width="17%" />

      <col width="15%" />

      <col width="12%" />

      <col width="21%" />
    </colgroup>

    <thead>
      <tr>
        <th>Dataset</th>
        <th>Resolution</th>
        <th>Pixels</th>
        <th>Data processed (pixel values)</th>
        <th style={{ textAlign: "center" }}>Mosaicking Complexity Factor</th>
        <th style={{ textAlign: "right" }}>Spatial Units</th>
        <th>Spatial Units billed</th>
      </tr>
    </thead>

    <tbody>
      <tr>
        <td>NAIP</td>
        <td>30 cm</td>
        <td>111,111,000,000</td>
        <td>444,444,000,000</td>
        <td style={{ textAlign: "center" }}>0.1×</td>
        <td style={{ textAlign: "right" }}>44.4</td>
        <td>44.4</td>
      </tr>

      <tr>
        <td>NAIP</td>
        <td>60 cm</td>
        <td>27,778,000,000</td>
        <td>111,111,000,000</td>
        <td style={{ textAlign: "center" }}>0.1×</td>
        <td style={{ textAlign: "right" }}>11.1</td>
        <td>11.1</td>
      </tr>

      <tr>
        <td>Sentinel-2</td>
        <td>10 m</td>
        <td>100,000,000</td>
        <td>400,000,000</td>
        <td style={{ textAlign: "center" }}>1.0×</td>
        <td style={{ textAlign: "right" }}>0.4</td>
        <td>1.0 (minimum charge applied)</td>
      </tr>
    </tbody>
  </table>
</Accordion>

<Accordion title="Field boundary detection with Fields of the World" defaultOpen={true}>
  Area of interest: 100,000 km², Sentinel-2 at 10 m, 8 bands, 1 time period.  The Fields of the World model uses 4 bands for the Planting Season and 4 bands for the Harvest Season.

  ```text theme={"system"}
  pixels         = 100,000 × 1,000,000 ÷ 10²  = 1,000,000,000
  data processed = 1,000,000,000 × 8 × 1      = 8,000,000,000 pixel values
  ```

  <table>
    <colgroup>
      <col width="26%" />

      <col width="9%" />

      <col width="30%" />

      <col width="18%" />

      <col width="17%" />
    </colgroup>

    <thead>
      <tr>
        <th>Task</th>
        <th style={{ textAlign: "center" }}>Bands</th>
        <th>Data processed (pixel values)</th>
        <th style={{ textAlign: "center" }}>Complexity Factor</th>
        <th style={{ textAlign: "right" }}>Spatial Units</th>
      </tr>
    </thead>

    <tbody>
      <tr>
        <td>Mosaicking (Sentinel-2)</td>
        <td style={{ textAlign: "center" }}>8</td>
        <td>8,000,000,000</td>
        <td style={{ textAlign: "center" }}>1.0×</td>
        <td style={{ textAlign: "right" }}>8.0</td>
      </tr>

      <tr>
        <td>Inference (FTW)</td>
        <td style={{ textAlign: "center" }}>8</td>
        <td>8,000,000,000</td>
        <td style={{ textAlign: "center" }}>0.2×</td>
        <td style={{ textAlign: "right" }}>1.6</td>
      </tr>

      <tr>
        <td>Build Multiscales</td>
        <td style={{ textAlign: "center" }}>8</td>
        <td>8,000,000,000</td>
        <td style={{ textAlign: "center" }}>none</td>
        <td style={{ textAlign: "right" }}>8.0</td>
      </tr>

      <tr>
        <td>Mosaic Vectorization</td>
        <td style={{ textAlign: "center" }}>1</td>
        <td>1,000,000,000 pixel values</td>
        <td style={{ textAlign: "center" }}>none</td>
        <td style={{ textAlign: "right" }}>1.0</td>
      </tr>

      <tr>
        <td><strong>Total</strong></td>

        <td style={{ textAlign: "center" }} />

        <td />

        <td style={{ textAlign: "center" }} />

        <td style={{ textAlign: "right" }}><strong>18.6</strong></td>
      </tr>
    </tbody>
  </table>

  <Note>
    Mosaic Vectorization runs over the model's prediction, which is a single band, so it processes one eighth of the data the eight-band tasks do.
  </Note>
</Accordion>

## What you are charged for

Beyond the per-task calculation, these situations affect what appears on your bill:

| Situation                                                                                                                                                                                   | What you are charged                                                                                                                                       |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **A workflow with multiple tasks**, such as the recipes that combine mosaicking and inference in one call ([`predict_mosaic_recipe()`](/reference/rasterflow/client#predict_mosaic_recipe)) | Each task is charged individually, at its own price. You see separate charges for building the mosaic and for running the model inference.                 |
| **A task you cancel** from [Workload History](/develop/workload-history)                                                                                                                    | You may be charged the complete cost of the task if processing has already started.                                                                        |
| **A repeat of the same task with the same inputs**, within the task cache period (currently **7 days**)                                                                                     | Nothing. The task returns cached results from the previous run, and a full cache hit that returns immediately is not charged.                              |
| **Storage and data transfer**                                                                                                                                                               | Nothing today, including RasterFlow artifacts kept in Wherobots-managed storage. Wherobots reserves the right to introduce charges in future, with notice. |

## Viewing your costs

Look up the RasterFlow Spatial Units consumed and the cost of any RasterFlow execution in [**Workload History**](https://cloud.wherobots.com/workloads). Each execution lists its tasks, the Spatial Units each consumed, and the resulting charge.

## Controlling your costs

Every RasterFlow Spatial Unit comes from your data, so you control your cost directly. To reduce the RasterFlow Spatial Units a task consumes:

<AccordionGroup>
  <Accordion title="Use a smaller area of interest" icon="crop">
    RasterFlow Spatial Units scale linearly with area. Validate a workflow on a small area of interest before running it at full scale.
  </Accordion>

  <Accordion title="Use a coarser resolution where your analysis allows" icon="grid">
    Resolution has a squared effect, so it is the largest lever. Doubling the pixel size cuts the data processed to a quarter.
  </Accordion>

  <Accordion title="Request only the bands you need" icon="layer-group">
    Band count scales linearly. A three-band request costs three-quarters of a four-band request over the same area.
  </Accordion>

  <Accordion title="Request only the time periods you need" icon="calendar">
    Each additional time period is a separate set of imagery to process. Two years of output is twice the RasterFlow Spatial Units of one.
  </Accordion>
</AccordionGroup>

## Next steps

<CardGroup cols={2}>
  <Card title="Get Started with RasterFlow" icon="layer-group" href="/develop/rasterflow/index">
    Learn about RasterFlow's key features and capabilities.
  </Card>

  <Card title="Managing Costs" icon="hand-holding-dollar" href="/get-started/organization-management/managing-costs">
    Keep WherobotsDB Spatial Unit consumption low while testing and developing.
  </Card>

  <Card title="Workload History" icon="clock-rotate-left" href="/develop/workload-history">
    Review the tasks you ran and the units they consumed.
  </Card>

  <Card title="Wherobots Pricing" icon="tags" href="https://wherobots.com/pricing">
    See current tiers, rates, and plan details.
  </Card>
</CardGroup>
