## TL;DR

Calling the Anchor Browser REST API directly?

## Fix

1. Calling the Anchor Browser REST API directly?
   Expected: you can confirm this matches your situation.

## When to use

- You are dealing with this situation.
- The symptom matches: Anchor Browser REST auth uses the anchor-api-key header - SDK auth is a callback, not a string.

## When NOT to use

- Unrelated issues with a different cause.
- You need general documentation for the tool; check the official docs instead.

## Compatibility

Reported per the linked source. Source: https://docs.anchorbrowser.io/introduction.

## Variant phrasings

### Anchor Browser REST auth uses the anchor-api-key header - SDK auth is a callback, not a string

## Why it happens

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.

## Edge cases

- If your error message differs even slightly, this is probably a different issue; search the exact text.
- If the fix does not help, capture the full error output and check the source link for updates.

## Source

https://docs.anchorbrowser.io/introduction