Skip to Content
hackrouter

Authentication

Keys, where to send them, and what happens when one is revoked.

Every request except GET /v1/models needs a key. Create keys in the console; each starts with hr-.

Send it either way:

Authorization: Bearer hr-...
x-api-key: hr-...

If both are present, Authorization is used.

Keys

  • One balance. All keys of an account draw on the same balance. Use one per project or environment to see what each spends.
  • Monthly limits. A key can have a limit in dollars per calendar month, in UTC. Past it, that key gets 402 key_limit_reached and the other keys carry on.
  • Revoking. A revoked key stops working within a minute, everywhere.

A missing, wrong or revoked key gets 401 invalid_api_key. See Errors.

On this page