Skip to content

Commit aba5f13

Browse files
Document direct header usage in client constructors
Co-authored-by: Shri Sukhani <shrisukhani@users.noreply.github.com>
1 parent 8c77824 commit aba5f13

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ export HYPERBROWSER_API_KEY="your_api_key"
2424
export HYPERBROWSER_BASE_URL="https://api.hyperbrowser.ai" # optional
2525
```
2626

27-
You can also pass custom headers (for tracing/correlation) via `ClientConfig`:
27+
You can also pass custom headers (for tracing/correlation) either via
28+
`ClientConfig` or directly to the client constructor.
2829

2930
```python
3031
from hyperbrowser import ClientConfig, Hyperbrowser
@@ -38,6 +39,18 @@ with Hyperbrowser(config=config) as client:
3839
...
3940
```
4041

42+
```python
43+
from hyperbrowser import Hyperbrowser
44+
45+
with Hyperbrowser(
46+
api_key="your_api_key",
47+
headers={"X-Correlation-Id": "req-123"},
48+
) as client:
49+
...
50+
```
51+
52+
> If you pass `config=...`, do not also pass `api_key`, `base_url`, or `headers`.
53+
4154
## Clients
4255

4356
The SDK provides both sync and async clients with mirrored APIs:

0 commit comments

Comments
 (0)