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

# V1 Compute

`POST /v1/compute`

Geofence (S2-cell) crash rate for the given filters: region-wide N, D,
rate + 95% CI, optional operator-weighted rate, and a per-cell breakdown.
Pass `summary_only: true` to drop the per-cell breakdown.

## Headers

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

## Request body

- V1ComputeRequest
  - `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 — Drop the per-cell `cells` breakdown (returned as []), keeping just the region-wide scalars. Cuts the bulk of the response for callers that don't need the map heatmap.

## Response `200`

Successful Response

- 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

## Other responses

- `422` — Validation Error

## Changes

- **2026-08-27** `204314331993` — 2 info
  - added the new optional request property `selections/day_type`
  - added the new optional request property `selections/time_of_day`
- **2026-08-26** `5897d963a448` — 1 breaking, 1 warning, 3 info
  - removed the enum value `county_wide` of the request property `selections/operator_weighting`
  - removed the request property `county`
  - added the new optional request property `region`
  - the `operator_weighting` request property default value changed from `county_wide` to `region_wide`
  - …1 more
- **2026-08-12** `f97928a07496` — 2 breaking, 1 info
  - response property `rate` list-of-types was widened by adding types `null` to media type `application/json` of response `200`
  - response property `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/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)
