Claude Code/Codex
A coding agent such as Claude Code or Codex can query the API directly, given one URL and a question in plain English. It makes the calls, reads the result, and returns the rate with its confidence interval and a link that opens the tool on the matching view.
Setup
- Put your API key in the environment (request one):bash
export HUMANBASELINES_API_KEY="hbk_..." - Point the agent at the primer:
Use https://humanbaselines.com/agent to answer my crash-baseline questions.
That page teaches the agent the API and tells it to look up real regions and filter values instead of guessing. It is plain markdown, so you can read it yourself: https://humanbaselines.com/agent
Example
What's the crash rate for cars and light trucks in Travis County?
4.05 incidents per million miles (95% CI 4.0–4.1), from about 24,600 police-reported crashes over 6.07 billion vehicle-miles. Open in the tool →
The agent picks the endpoint, maps the question to real filters, and links each answer back into the tool. Other questions it handles:
- "Compare the heavy-truck crash rate across Houston, Dallas, and San Antonio."
- "How much does adjusting for under-reporting change the fatal rate in SF?"
- "Fatal crash rate for cars in Travis County?"
Missing or invalid key
If the API key is missing or invalid, the primer tells the agent to stop and ask for one rather than estimate a rate.
Next steps
- Filters and Regions & corridors: the vocabulary behind your questions.
- Methodology: how the rate and CI are derived.
- To write the calls yourself in Python, see the Quickstart.