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

# Data pipeline

> Capture, processing, signing, aggregation and delivery, step by step.

The Vangrid data pipeline is the governed path that every observation travels from physical capture to your application. At each stage, the pipeline enforces sovereignty controls, preserves cryptographic integrity, and filters for quality, so what arrives in your API response is not just spatially accurate, but verifiably so. Understanding the pipeline helps you predict latency, interpret response fields, and design your system to take full advantage of Vangrid's guarantees.

## Pipeline stages

**1. Capture**

Edge nodes capture spatial observations from their environment. Nodes operate independently and asynchronously, there is no central clock or coordinated capture event. Each node records the time and the location reported by the device at the moment of capture, and both travel with the observation for the rest of its life.

**2. Edge compute**

The node runs detection on every frame as it is recorded and obscures faces and vehicle number plates before the video is encoded. Only the filtered capture is transmitted, and spatial features, object positions, geometries and classifications are extracted from it.

Edge compute is the mechanism behind Vangrid's privacy guarantee: the unblurred frames never leave the hardware, so they cannot be intercepted, subpoenaed, or leaked in transit. No version of a capture in which a face or a number plate is legible exists anywhere off the device that recorded it.

Running feature extraction on the node itself, so that only the derived payload is transmitted, will follow as device compute allows.

**3. Cryptographic signing**

After extracting features, the node signs the payload with its private key. The resulting `provenance_hash` encodes:

* The node's unique identifier
* The capture timestamp
* A hash of the feature payload content

The signature is generated on-device using hardware-backed key storage. Any modification to the payload after signing, in transit, at rest, or in your own systems, produces a hash mismatch that you can detect with standard cryptographic verification.

**4. Aggregation**

Signed payloads from multiple nodes covering the same area of interest are ingested by Vangrid's aggregation layer. The aggregator:

* Groups observations by spatial overlap and temporal proximity
* Cross-corroborates observations from independent nodes to compute `ground_truth_score`
* Detects and flags conflicting observations rather than silently resolving them
* Merges compatible multi-view observations into unified feature records where appropriate

Aggregation adds latency proportional to the number of nodes contributing to a response. Real-time queries use a shorter aggregation window; historical queries use a larger one.

**5. API delivery**

The aggregated, scored response is returned to your application as structured JSON over HTTPS. The response body contains a `features` array, each element carrying geometry, timestamps, quality scores, provenance, and any domain-specific fields relevant to your query type.

## What "sovereign" means

In the context of the Vangrid pipeline, **sovereign** means that data does not transit infrastructure outside your designated boundary without explicit, auditable consent.

Sovereignty operates at three levels:

* **Node-level**, Identifiable frames stay on the node. Faces and number plates are obscured before anything is transmitted, so they never traverse a network at all.
* **Infrastructure-level**, Signed feature payloads are routed only through Vangrid infrastructure within your configured sovereignty boundary. No third-party cloud provider or transit network touches your data without your authorization.
* **API-level**, Your API responses are delivered over TLS. Vangrid does not log or store query content beyond what is required for billing and provenance records.

For defense and government deployments, Vangrid supports nation-state grade sovereignty controls including air-gapped delivery modes, region-locked infrastructure, and custom key management integration. Contact [hello@vangrid.io](mailto:hello@vangrid.io) for details on these configurations.

> [!NOTE]
>
> Standard enterprise accounts operate within a single-region sovereignty boundary by default. Cross-region access requires explicit configuration and is audited in your account's provenance log.

## Latency characteristics

> [accordion] Real-time queries
>
> Real-time queries return observations captured within the last few seconds to minutes, depending on node density and AOI size. The aggregation window is short, Vangrid does not wait for all possible contributing nodes before returning a response. You receive a partial but fast result, with `node_count` and `ground_truth_score` reflecting the nodes that responded within the window.
>
> Typical p50 latency for a real-time query over a small urban AOI is under 500ms from request to first byte. Larger AOIs or lower-density regions will be slower.

> [accordion] Historical queries
>
> Historical queries retrieve observations from Vangrid's provenance archive. Because the data is already aggregated and stored, historical queries are not subject to node response latency, but they do incur retrieval and decryption overhead.
>
> Historical responses include the full set of contributing nodes and their individual signed payloads, giving you a richer audit trail than real-time queries. Typical latency for historical queries is 1–5 seconds depending on archive depth and result size.

> [accordion] Streaming subscriptions
>
> For applications that need continuous updates, fleet tracking, infrastructure monitoring, real-time situational awareness, Vangrid supports streaming subscriptions via WebSocket. Observations matching your AOI and filter criteria are pushed to your connection as they are aggregated, with latency comparable to real-time queries.

## Response data format

Every Vangrid API response is a GeoJSON-compatible JSON object. The top-level structure includes a `features` array where each element represents one spatial observation.

```json theme={"dark"}
{
  "query_id": "qry_01j9z3kfm8x2v4n7",
  "timestamp": "2026-05-22T14:32:07.412Z",
  "aoi": {
    "type": "Polygon",
    "coordinates": [[[-122.4194, 37.7749], [-122.4094, 37.7749], [-122.4094, 37.7849], [-122.4194, 37.7849], [-122.4194, 37.7749]]]
  },
  "node_count": 14,
  "features": [
    {
      "feature_id": "feat_7d3a9c2e",
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [-122.4142, 37.7799, 12.4]
      },
      "properties": {
        "classification": "vehicle.truck",
        "velocity_mps": 4.2,
        "heading_deg": 273.1,
        "captured_at": "2026-05-22T14:32:05.198Z",
        "ground_truth_score": 0.94,
        "provenance_hash": "sha256:a3f8c1d9e4b27056f3a8c9d1e4b270a3f8c1d9e4b27056f3a8c9d1e4b270",
        "sensor_modalities": ["camera", "lidar"],
        "node_count": 3
      }
    }
  ]
}
```

Key response fields:

| Field | Type | Description |
| - | - | - |
| `query_id` | string | Unique identifier for this query, used in audit logs and support. |
| `node_count` | integer | Total number of nodes that contributed to this response. |
| `feature_id` | string | Unique identifier for this observation. |
| `geometry` | GeoJSON geometry | Position and shape of the observed feature. Coordinates are `[longitude, latitude, altitude_meters]`. |
| `classification` | string | Hierarchical object classification (e.g., `vehicle.truck`, `person.pedestrian`). |
| `captured_at` | ISO 8601 string | Timestamp of the original sensor capture on the node. |
| `ground_truth_score` | float | Confidence score from 0.0 to 1.0 based on multi-node corroboration. |
| `provenance_hash` | string | Cryptographic signature of this observation. |
| `sensor_modalities` | array | Sensor types that contributed to this feature. |

## How Vangrid differs from cloud-only alternatives

Cloud-only spatial platforms funnel unfiltered footage into a central processing cluster before returning results. This design introduces several limitations that Vangrid's pipeline avoids:

| | Cloud-only platforms | Vangrid |
| - | - | - |
| **Privacy** | Identifiable footage transits and is stored in the cloud | Unblurred frames never leave the device |
| **Provenance** | No per-observation cryptographic proof | Every feature carries a `provenance_hash` |
| **Sovereignty** | Data crosses arbitrary cloud regions | Data stays within your configured boundary |
| **Latency** | Round-trip to central cluster | Aggregation happens close to the edge |
| **Infrastructure cost** | You pay for cloud compute and storage | Vangrid absorbs node and compute costs |

> [!TIP]
>
> When comparing Vangrid to a cloud-only alternative, ask the vendor: "Can you prove that a specific observation was not altered between capture and delivery?" With Vangrid, the `provenance_hash` answers that question without requiring you to trust any intermediary.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.