services
03

Authentication

Every request carries the API key, c_serv_…, by any carrier below, and is checked for key, rate and credits before it is served. A missing or invalid key gets 401, as does an account API key (c_acct_…), which only manages the account.

auth/carriers
protocolmechanismcarried inexample
rpc
RPCapi key headerrequest headerx-api-key: <YOUR_KEY>
RPCbearer tokenauthorization headerauthorization: Bearer <YOUR_KEY>
RPCpath segmenturl path/<YOUR_KEY>
RPCquery paramurl query?api-key=<YOUR_KEY>
RPCtoken headerrequest headerx-token: <YOUR_KEY>
websocket
WSapi key headerhandshake headerx-api-key: <YOUR_KEY>
WSquery paramurl query?api-key=<YOUR_KEY>
WSsubprotocolhandshake headerSec-WebSocket-Protocol: api-key.<YOUR_KEY>
WSpath segmenturl path/<YOUR_KEY>
carbon stream
Streamtoken metadatagrpc metadatax-token: <YOUR_KEY>
Streamauthorizationgrpc metadataauthorization: Bearer <YOUR_KEY>
!Treat the key like a password. Rotate it from KEYS if exposed; the old key stops working at once. Prefer a header: path and query forms leak into logs and referers.