The public API.
A small, stable surface for pulling ONYX data into your own tools. Authenticate with an API key, get JSON back. Keys are created in Settings once you have an account.
Authenticate with a key
Send your key either as a bearer token or in x-api-key. Both are accepted; use whichever your client makes easier.
curl https://onyxintelligence.ai/api/public/v1/macro/yield-curve \
-H "Authorization: Bearer $ONYX_API_KEY"
# or
curl https://onyxintelligence.ai/api/public/v1/macro/yield-curve \
-H "x-api-key: $ONYX_API_KEY"What you can call
This is the whole public surface today. It will grow — we would rather list three endpoints that work than twenty that might.
One envelope, every route
Payloads are wrapped with a metadata block carrying the freshness stamp for that value, so you can tell how old a number is rather than assuming it is live.
{
"data": {
"twoYear": 4.37,
"tenYear": 4.71,
"spread": 0.34,
"date": "07/23/2026"
},
"_metadata": {
"freshness": "2026-07-24T19:05:12.482Z",
"source": "FETCH"
}
}source is FETCH when the value came from the upstream provider on this request, or a cache marker when it was served from the cascade described in the methodology.
Rate limits and errors
Create a key in Settings, or read how the data is sourced and cached before you build against it.