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

# Satellite Images v2

> Enable higher-fidelity v2 satellite image renderings and retrieve the v2 image assets alongside the standard crop monitoring outputs.

Satellite Images v2 is an opt-in rendering upgrade for crop monitoring imagery. It produces sharper, smoother PNGs that match the color treatment in the Leaf dashboard, from the same satellite captures and the same underlying index values. When enabled, Leaf publishes a parallel set of v2 image assets alongside the standard ones, so nothing you rely on today changes.

## What changed

Two parts of the display pipeline were reworked. The satellite source, capture cadence, and raw index values are unchanged.

* **Cubic resampling.** Index rasters arrive at a fixed ground resolution (10 m per pixel for Sentinel-2). Standard PNGs enlarge those pixels with nearest-neighbor sampling, which shows as hard squares. Every v2 PNG uses cubic resampling instead, blending between pixel values for a continuous surface.
* **Field-relative color that matches the dashboard.** The v2 relative and colorized outputs anchor the color ramp to the 2nd–98th percentile of the field's values, rather than the absolute image minimum and maximum, so a few extreme pixels no longer flatten the contrast. They use the same red → amber → green palette as the Leaf web dashboard, so your API imagery and the dashboard line up.

<img src="https://mintcdn.com/leaf-3ed5893a/V_9W9lUWF0eh75tc/satellite/images/satellite-v2-before-after.png?fit=max&auto=format&n=V_9W9lUWF0eh75tc&q=85&s=a88e05c97ffebc90abff61c1f3f78b41" alt="Current versus Leaf v2 NDVI rendering of the same field" width="1650" height="930" data-path="satellite/images/satellite-v2-before-after.png" />

Zoomed to a high-variability area, the difference is clearest — the current rendering shows each 10 m pixel as a hard square, while v2 resolves the same values as a smooth gradient:

<img src="https://mintcdn.com/leaf-3ed5893a/V_9W9lUWF0eh75tc/satellite/images/satellite-v2-zoom.png?fit=max&auto=format&n=V_9W9lUWF0eh75tc&q=85&s=427eca21e475cb6c56cb1c59c5d78e04" alt="Zoom comparison of blocky current pixels versus smooth v2 gradient" width="1650" height="960" data-path="satellite/images/satellite-v2-zoom.png" />

<Note>
  v2 is display only. The raw `NDVI.tif` and `NDRE.tif` values, the individual band GeoTIFFs, and every standard asset and its URL are unchanged. Analysis pipelines that read the raw rasters see identical numbers.
</Note>

## Enabling v2

v2 is controlled by the [`satelliteImagesV2`](/configuration/reference#satelliteimagesv2) configuration flag, set at the API owner level. It defaults to `false`.

Base URL: `https://api.withleaf.io/services/config/api`

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PATCH \
    'https://api.withleaf.io/services/config/api/configs' \
    -H 'Authorization: Bearer YOUR_TOKEN' \
    -H 'Content-Type: application/json' \
    -d '{"satelliteImagesV2": true}'
  ```
</CodeGroup>

See the [Configuration Reference](/configuration/reference#satelliteimagesv2) for the property and the [Configuration API](/api-reference/configurations) for full endpoint details.

<Warning>
  Enabling v2 applies to new satellite captures going forward. It does not backfill existing processes. To generate v2 assets for a capture you already have, reprocess that satellite process.
</Warning>

## v2 image outputs

When `satelliteImagesV2` is enabled, each new pass produces these assets in addition to the standard ones. Filenames carry a `_v2` suffix.

| Name | Type | Notes |
| :- | :- | :- |
| RGB\_v2.png | True-color | Cubic-resampled |
| NDVI\_v2.png | Colorized NDVI | Recommended default view |
| NDVI\_relative\_v2.png | Field-relative NDVI | 2–98 percentile, dashboard palette |
| NDVI\_absolute\_v2.png | Fixed-scale NDVI | Comparable across dates |
| NDVI\_color\_v2.tif | Colorized NDVI GeoTIFF | Field-relative color |
| NDRE\_v2.png | Colorized NDRE | |
| NDRE\_relative\_v2.png | Field-relative NDRE | 2–98 percentile, dashboard palette |
| NDRE\_absolute\_v2.png | Fixed-scale NDRE | Comparable across dates |
| NDRE\_color\_v2.tif | Colorized NDRE GeoTIFF | Field-relative color |
| biomass\_v2.png | Biomass | When a biomass image is produced |

The raw `NDVI.tif`, `NDRE.tif`, individual band GeoTIFFs, and `multi_band.tif` are shared by both renderings — there are no `_v2` raster values.

## Selecting v2 images

Retrieve images the same way as today, through `GET /services/satellite/api/fields/{id}/processes`. Each process lists its available files. When v2 is enabled, the `_v2` assets appear in that same file list alongside the standard names. Point your application at the `_v2` filename for the view you want — for example `NDVI_v2.png` in place of `NDVI.png`.

Because the assets are parallel, you can enable v2, compare the two side by side on real fields, and switch your application over when you're ready, with no disruption to the standard outputs in the meantime.

## What to do next

* [Satellite Overview](/satellite/overview) — How the crop monitoring service works.
* [Sentinel-2](/satellite/sentinel) — Bands, resolution, and the standard image outputs.
* [Configuration Reference](/configuration/reference#satelliteimagesv2) — The `satelliteImagesV2` property.
* [API Reference: Satellite](/api-reference/satellite) — Full endpoint reference for the crop monitoring service.
