Skip to content

API access

Every call to the Human Crash Baselines API needs an API key. This page explains how to get one and how to use it.

Request a key

API access is granted on request. Email humanbaselines@valgo.ai to request a key. A short note on your use case helps us provision the right access. You can also submit feedback or ask questions at the same address.

Use your key

Keys look like hbk_…. Pass yours to the client explicitly, or set the HUMANBASELINES_API_KEY environment variable and omit it:

python
from humanbaselines import HumanBaselines

hb = HumanBaselines(api_key="hbk_...")
bash
export HUMANBASELINES_API_KEY="hbk_..."
python
hb = HumanBaselines()   # key read from the environment

The client sends it automatically as the X-API-Key header on every request. If no key is found, the constructor raises ValueError immediately; it never makes an unauthenticated request.

Keep keys out of source

Standard hygiene: We prefer the environment variable (or a secrets manager) over hard-coding the key. Don't commit keys to version control.

What the server enforces

SituationResponse
Valid keyRequest proceeds.
Missing or invalid key401AuthenticationError.
Server has no keys configured503ServiceUnavailableError (fails closed; never serves an open API).

Keys are compared in constant time, so an invalid key reveals nothing about a valid one through timing.

Next steps

Derived statistics only. Attribute every published figure. Maintained by Valgo.