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

# V1 Compute Batch

`POST /v1/compute/batch`

Geofence crash rate for many (region, selections) combinations in one
request — built for comparing regions side by side. Returns a per-item list
of {region, result|null, error|null} (same order as the request), so a
single failing region 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 (region, selections) combination per entry. Selections are per-item because a value valid in one region can be invalid in another, so the batch can't share a single selection set.
    - `region` string — Which served region to compute. Discover the set with /v1/regions.
    - `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` 'region_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'
      - `time_of_day` union
        - TimeOfDayFilter[]
        - 'any' | 'h00' | 'h01' | 'h02' | 'h03' | 'h04' | 'h05' | 'h06' | 'h07' | 'h08' | 'h09' | 'h10' | 'h11' | 'h12' | 'h13' | 'h14' | 'h15' | 'h16' | 'h17' | 'h18' | 'h19' | 'h20' | 'h21' | 'h22' | 'h23'
      - `day_type` 'any' | 'weekday' | 'weekend' — Weekday or weekend, cut at Friday 18:00 through Monday 05:59. Not the calendar weekend. Friday evening behaves like the weekend and Monday's small hours behave like Sunday night, so a Saturday-Sunday cut splits the effect across both buckets: measured on SF crashes it reads a fatal weekend index of 1.27x against 1.41x on this boundary. It is also what Scanlon et al. (2026) use, which is the only external benchmark this axis has.
      - `crash_year` union
        - integer[]
        - integer
  - `summary_only` boolean — Batch defaults to summary-only (no per-cell breakdown), as it exists for multi-region 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[]
    - `region` string, required
    - `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

## Changes

- **2026-08-27** `204314331993` — 2 info
  - added the new optional request property `items/items/selections/day_type`
  - added the new optional request property `items/items/selections/time_of_day`
- **2026-08-26** `5897d963a448` — 1 breaking, 1 warning, 4 info
  - removed the enum value `county_wide` of the request property `items/items/selections/operator_weighting`
  - removed the request property `items/items/county`
  - added the new optional request property `items/items/region`
  - the `operator_weighting` request property default value changed from `county_wide` to `region_wide`
  - …2 more
- **2026-08-12** `f97928a07496` — 2 breaking, 1 info
  - response property `results/items/result/anyOf[subschema #1: ComputeResult]/rate` list-of-types was widened by adding types `null` to media type `application/json` of response `200`
  - response property `results/items/result/anyOf[subschema #1: ComputeResult]/rate_non_dyn` list-of-types was widened by adding types `null` to media type `application/json` of response `200`
  - the `weather` request property default value changed from `dry, rain, fog` to `any`

[Change history](https://skmtc.dev/humanbaselines/apis/human-crash-baselines-api/changes/v1/compute/batch/post.md)

---

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