Headless Chrome
Headless Chromium for browser automation, screenshots and PDF generation.
- browser
- testing
Guide: Drive a browser
Run it
briq run chromebriq_run({ recipe: "chrome", wait: true })curl -X POST https://api.briq.cloud/v1/briqs \
-H "Authorization: Bearer $BRIQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"recipe": "chrome",
"wait": true
}'
# → { "briqs": [{ "id": "bq_…", … }], "outputs": { "BROWSER_WS_ENDPOINT": "…" }, … }
# ... when done, for each briq id
curl -X DELETE https://api.briq.cloud/v1/briqs/<id> \
-H "Authorization: Bearer $BRIQ_API_KEY"stack: app
services:
chrome:
recipe: chrome
# its defaults, each a field you can set:
# image: ghcr.io/browserless/chromium:latest
# size: smallFields
| Name | Type | Options | Default |
|---|---|---|---|
| image | string | — | "ghcr.io/browserless/chromium:latest" |
| env | record | { key: string | { secret, value?, literal?, scope?, hosts?, locations? } } | {} |
| cmd | string | string[] | — | — |
| size | enum | small, medium, large | "small" |
| files | record | { key: string | { base64 } } | — |
| egress | object | { hosts } | — |
Outputs
Returned by briq_run once the stack is healthy. Hosts resolve inside your team network; secrets are generated per run.
- BROWSER_WS_ENDPOINT
- ws://chrome.<stack>.internal:3000?token=<BROWSERLESS_TOKEN>
- BROWSERLESS_URL
- http://chrome.<stack>.internal:3000
- BROWSERLESS_TOKEN
- <BROWSERLESS_TOKEN>
What it runs
| Briq | Image | Ports | Size | Volume |
|---|---|---|---|---|
| chrome | ghcr.io/browserless/chromium:latest | 3000 | small | — |
When to use it
- The agent or its tests need a real browser: open pages, fill forms, take screenshots and PDFs.
- You do not want Chromium where the agent runs, or the agent cannot run code at all.
An agent with only briq's tools drives it with briq_exec; one that runs code connects
Playwright or Puppeteer. The guide shows both.
Tips
smallfor a few pages now and then: steady work uses up a shared CPU's allowance and every call slows down.largehas four CPUs.- The first call on a new briq is slow, up to about 30 seconds: Chromium's first launch.
- 50 seconds per call: pass
&timeout=(in ms) for another limit. - Four browsers at once, ten more calls queued.
- From outside briq:
expose: "private", then send the URL's token as a cookie (headers: { cookie: "briq_token=…" }inconnect). The browser's owntokenstays in the address. - No sessions, proxies or stealth: each connection gets a new browser.