Getting a key
Keys are minted from the reseller console, under API keys. They cannot be minted with an API key.That restriction is deliberate. A key that can mint keys survives its own
revocation: whoever held a leaked token would issue themselves a replacement
before you noticed, and could revoke your real keys on the way out. Minting is
a signed-in, human act.
Never send it from a browser
The API rejects any partner key that arrives with anOrigin header, because a
browser is the one client that always sends one. Keep it in your backend’s
secret store.
Scopes
A key only reaches what it was granted. Grant the minimum a caller needs — then a leaked key is a smaller problem.messages:* is deliberately separate from assistants:write: a key issued to
edit a prompt should not thereby be able to message a merchant’s customers.
Likewise webhooks:manage from webhooks:read — creating an endpoint and
rotating its signing secret is a different authority from reading what was
delivered, and the secret is the thing an attacker wants.
A request outside a key’s scopes returns 403 with the missing scope named:

