Authentication
Authenticate Merius API requests with a bearer token. Create a key, store it in an environment variable, and pass it in the Authorization header.
Merius authenticates every request with an API key sent as a bearer token in the Authorization
header. The same header works for every endpoint.
Create an API key
Sign in to the Merius dashboard, open API keys, and create a key. Copy it when it is shown: we
store only a hash, so the full key is visible exactly once. Keys are prefixed riv_ so they are
easy to spot in logs and secret scanners.
Treat a key like a password. Anyone who has it can spend against your account until the key is revoked.
Authenticate a request
Send the key as a bearer token. This single header authorizes calls to every endpoint:
curl https://api.merius.ai/v1/models \
-H "Authorization: Bearer $MERIUS_API_KEY"Keep keys out of source
Read the key from an environment variable instead of hard-coding it. Set it once in your shell or your deployment's secret store, and reference it everywhere:
export MERIUS_API_KEY="riv_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"Never commit a key, embed it in client-side code, or ship it in a mobile app. See Security for rotation and per-environment keys.