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: () => process.env.ANCHOR_API_KEY }) - note auth is a callback function, not the string - and Python takes api_key value at 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: () => process.env.ANCHOR_API_KEY }) where auth is a callback function, and the Python SDK takes api_key value at client construction. Key prefix is anc- per the docs examples.

## Matched source
Source: Source: https://docs.anchorbrowser.io/introduction
Original query: "Anchor Browser REST auth uses the anchor-api-key header - SDK auth is a callback, not a string"
Key terms: anchor, auth, browser, callback, header, rest, string, uses
