---
title: "V1 Compute Batch"
method: POST
path: "/v1/compute/batch"
tags: ["v1"]
---

# V1 Compute Batch

`POST /v1/compute/batch`

Geofence crash rate for many (county, selections) combinations in one
request — built for comparing counties side by side. Returns a per-item list
of {county, result|null, error|null} (same order as the request), so a
single failing county is reported inline instead of failing the whole call.
Defaults to summary-only (no per-cell breakdown).

## Headers

- `X-API-Key` string, nullable
- `authorization` string, nullable

## Request body

- V1BatchRequest
  - `items` V1BatchItem[] — One (county, selections) combination per entry. Selections are per-item because a value valid in one county can be invalid in another, so the batch can't share a single selection set.
    - `county` string
    - `selections` GeofenceSelections — Filters for POST /v1/compute (S2-cell / geofence mode).
      - `outcome` 'police_reported' | 'observed_any_injury' | 'airbag' | 'ego_airbag' | 'ka' | 'fatal'
      - `severity` integer
      - `ego_vehicle` union
        - VehicleClass[]
        - 'cars' | 'light_trucks' | 'heavy_trucks' | 'motorcycles' | 'buses' | 'other'
      - `unresolved_nfs` 'marginal' | 'none' | 'all'
      - `in_transport` 'in_transport' | 'include_all'
      - `road_type` union
        - RoadGroup[]
        - 'interstate' | 'other_freeway' | 'arterial' | 'collector_local'
      - `operator_weighting` 'county_wide' | 'robotaxi'
      - `multiplier_vmt` 'calibrated' | 'hpms'
      - `operator_weight` number, nullable
      - `denominator_vmt` 'calibrated' | 'hpms'
      - `tiling` 's2' | 'h3'
      - `under_reporting` 'none' | 'adjusted'
      - `weather` union
        - WeatherFilter[]
        - 'any' | 'dry' | 'rain' | 'fog' | 'winter_storm'
      - `light_condition` union
        - LightFilter[]
        - 'any' | 'daylight' | 'dawn_dusk' | 'dark'
      - `crash_year` union
        - integer[]
        - integer
  - `summary_only` boolean — Batch defaults to summary-only (no per-cell breakdown), as it exists for multi-county comparison. Set false to include `cells`.

## Response `200`

Successful Response

- BatchComputeResult — Per-item results, in the same order as the request's `items`.
  - `results` BatchItemResult[]
    - `county` string, required
    - `result` ComputeResult
      - `N` number, required
      - `D_miles` number, required
      - `D_billions` number, required
      - `rate` number, nullable, required
      - `rate_low` number, nullable
      - `rate_high` number, nullable
      - `rate_non_dyn` number, nullable, required
      - `rate_dyn` number, nullable
      - `multiplier` number, nullable
      - `cells` PerCellResult[]
        - `s2_cell` string, required
        - `count` number, required
        - `vmt` number, required
        - `mult_contrib` number
    - `error` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/humanbaselines/apis/human-crash-baselines-api.md) · [All operations](https://skmtc.net/humanbaselines/apis/human-crash-baselines-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/humanbaselines/human-crash-baselines-api/revisions/f97928a07496/schema)
