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

Get an API key

Enter your email and we'll generate a key. It'll be shown here and emailed to you.

Prefer email, or need custom/partner access? Write to humanbaselines@valgo.ai with a short note on your use case. You can also submit feedback or ask questions there.

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.