Browsers
6 endpoints at https://api.kosa8.com, sent with Authorization: Bearer $KOSA8_API_KEY. Generated from the API's own OpenAPI description, which a test holds to the router.
Open a headless browser for an agent (Cloudflare Browser Run), driven over CDP#
POST
/v1/browsersscope sandboxes:writeBilled per second at BROWSER_PRICE_PER_HOUR ($0.12/browser-hour; GET /v1/pricing rates.browser_h). Against a plan's sandbox-hours a browser-hour counts as an hour of the smallest sandbox (0.25 vCPU). Refused 429 browser_limit past the org's concurrency (Solo 1, Pro 3, Team 5, Scale 10), 503 browsers_full past the account's 200, 402 like a sandbox (plan_required, payment, spending cap).
JSON bodyttl_sintegerClosed at this age; an idle browser (no CDP traffic for min(ttl, 20 min)) closes sooner Default
300. Min 30. Max 3600.sandbox_idstringAttach to a sandbox: the browser closes when the sandbox is deleted
namestring—
201400401402403404429501503
curl -s -X POST https://api.kosa8.com/v1/browsers \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json
Open browsers (state=all: the last 100)#
GET
Parameters/v1/browsersscope sandboxes:readstatequery · "open" | "all"—
200401403
curl -s -X GET https://api.kosa8.com/v1/browsers \ -H "Authorization: Bearer $KOSA8_API_KEY"
A browser, with a fresh cdp_url while it is open#
GET
Parameters/v1/browsers/{id}scope sandboxes:readidrequiredpath · stringBrowser id (brw_…)
200401403404
curl -s -X GET https://api.kosa8.com/v1/browsers/$SBX \ -H "Authorization: Bearer $KOSA8_API_KEY"
Close a browser (billing stops)#
DELETE
Parameters/v1/browsers/{id}scope sandboxes:writeidrequiredpath · stringBrowser id (brw_…)
200401403404
curl -s -X DELETE https://api.kosa8.com/v1/browsers/$SBX \ -H "Authorization: Bearer $KOSA8_API_KEY"
Open a URL in the browser and answer its title, text and a screenshot#
POST
/v1/browsers/{id}/pagescope sandboxes:writeA new tab, closed after. For agents without a CDP client of their own.
Parametersidrequiredpath · stringBrowser id (brw_…)
urlrequiredstring—
screenshotboolean—
textboolean—
full_pageboolean—
200400401403404410502504
curl -s -X POST https://api.kosa8.com/v1/browsers/$SBX/page \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json
The browser's CDP WebSocket (open cdp_url with a CDP client)#
GET
/v1/browsers/{id}/cdppublicAuthenticated by the token in cdp_url, never an API key.
Parametersidrequiredpath · stringBrowser id (brw_…)
tokenrequiredquery · string—
101401410
curl -s -X GET https://api.kosa8.com/v1/browsers/$SBX/cdp