Authentication

Send your key with either header; scopes and the key prefix.

Send your key on every request. Both header styles work on both endpoints:

http
Authorization: Bearer tb_live_...
# or
x-api-key: tb_live_...

If both headers are present they must carry the same key. Keys are shown once at creation; store them in a secret manager or environment variable, never in source control.

Key prefix

Every key starts with tb_live_ and spends live credits on real models. The earlier tb_test_ keys have been retired and are refused. See Environments.

Scopes

Keys carry scopes (chat:write, models:read). A key without the needed scope receives 403 insufficient_scope.

Never send a third-party provider credential to Top Billing. Anything that is not a tb_ key is rejected with 401 and is never forwarded anywhere.