GET /wss
Upgrade to a WebSocket CDP browser session.
Opens a WebSocket connection to a remote Chrome DevTools Protocol (CDP) browser. The HTTP connection is upgraded to a WebSocket, providing a CDP interface for automation libraries like Puppeteer and Playwright.
wss://request.usestring.ai/v1/wssAuthentication
Pass your API key as an Authorization: Bearer header when establishing the connection.
Query parameters
Both parameters are optional and are passed on the connect URL:
wss://request.usestring.ai/v1/wss?proxy=standard&countryCode=DE| Parameter | Default | Description |
|---|---|---|
proxy | premium | Proxy tier for the session's traffic: premium (residential) or standard (datacenter, billed at half the premium bandwidth rate — see Browser pricing). |
countryCode | US | ISO 3166-1 alpha-2 country code the session's traffic exits from. Validated against the same country list as /fetch and normalized to uppercase. |
An invalid value — or an unrecognized parameter — rejects the connection after the upgrade with WebSocket close code
1008 and the validation error as the close reason; no session is opened and nothing is billed.
Status codes
| Status | Meaning |
|---|---|
101 | WebSocket connection established; the HTTP connection is upgraded to CDP. |
401 | Missing or invalid API key. |
402 | Insufficient account balance. |
404 | WebSocket upgrade attempted on an invalid path. |
Session limits
A session is forcefully closed 30 minutes after it opens, or after 5 minutes of inactivity, whichever comes first — reconnect to continue. A bandwidth cap also applies. See Session limits.
Usage
See Connect with Puppeteer and Connect with Playwright for full examples, and Browser pricing for how sessions are billed.