api.raze.bot, ws.raze.bot and router.raze.bot (the router and launch). On the API every route except /, /health and /openapi.yaml needs it; on the router every route except /health, /ready, /evm/health and /evm/ready. The API reads it from the first of these that is present, and checks only that one (a wrong x-api-key fails even next to a right Authorization header):
- Header
x-api-key: <key> - Header
Authorization: Bearer <key>(bearerworks too) - Query
?apiKey=<key>(?api_key=works too)
WebSocket and SSE
Browsers cannot set headers on aWebSocket or an EventSource, so both take the key in the URL. The WebSocket checks it before the upgrade: a bad key never becomes a socket.
x-api-key on the upgrade request instead.
Playground
The interactive playground in these docs sendsx-api-key. Paste the raw key.
Key hygiene
- Keep keys on your server, in environment variables. A key in a browser bundle or a page URL is a public key.
- For a web app, proxy REST and the WebSocket through your backend and add the key there.
- Limits are per key, and the keys of one account share the account’s limit: see Rate limits.