Docs / Authentication

Authentication

Every request to /v1 needs an API key in a bearer header. That is the whole scheme: no organisation or project headers, no OAuth.

cURL
curl https://api.hmbrd.dev/v1/models \
  -H "Authorization: Bearer $HUMMINGRELAY_API_KEY"

The OpenAI SDKs send this header for you when you pass api_key / apiKey. Keys always start with hr_live_; a string with any other prefix is rejected without a lookup.

Accounts and invitations

Accounts are created by invitation only. An invite link lets you choose a login and a password and creates the account with its starting balance and a first API key. A link works once and expires 12 hours after it was issued. If yours expired, ask for a new one.

Create and revoke keys

Spend limits and expiry

Both are optional and set when the key is created, under Options. They cannot be changed afterwards — create a new key instead.

Use them for keys you hand to someone else, put on a CI runner, or give to an agent you do not watch: a leaked key is then worth at most its limit, for at most its lifetime.

Share a key

When you create a key you can ask for a share link — a way to hand the key to another person without pasting it into a chat.

Authentication errors

Authentication errors
StatuscodeWhen
401missing_api_keyNo Authorization: Bearer … header.
401invalid_api_keyThe key is unknown, malformed or revoked.
401api_key_expiredThe key passed its expiry date. Create a new one.
403account_suspendedThe key is valid but the account is suspended. Completions are refused; GET /v1/models still answers.
401 response body
{
  "error": {
    "message": "Missing API key. Send `Authorization: Bearer hr_live_…`.",
    "type": "invalid_request_error",
    "code": "missing_api_key",
    "param": null
  }
}