Calling the Anchor Browser REST API directly? Put the key in an anchor-api-key header: headers {'anchor-api-key': process.env.ANCHOR_API_KEY, 'Content-Type': 'application/json'}. It is not a Bearer token in Authorization, so a 401 on direct API calls usually means the header name is wrong, not the key. If you use the SDKs you skip this: TypeScript takes client.setConfig({ auth: () =&gt; process.env.ANCHOR_API_KEY }) - note auth is a callback function, not the string - and Python takes api_key [your value] construction. Anchor keys start with anc-.

Context: Official Anchor Browser docs (Batch Browser Sessions): direct REST calls authenticate with an anchor-api-key header - 'anchor-api-key': process.env.ANCHOR_API_KEY - not an Authorization Bearer header. The TypeScript SDK takes the key via client.setConfig({ auth: () =&gt; process.env.ANCHOR_API_KEY }) where auth is a callback function, and the Python SDK takes api_key [your value] client construction. Key prefix is anc- per the docs examples.