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

# V1 Compute

`POST /v1/compute`

Geofence (S2-cell) crash rate for the given filters: county-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
  - `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 — Drop the per-cell `cells` breakdown (returned as []), keeping just the county-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

---

[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)
