Skip to content

Connecting

The simplest way to use rayobrowse cloud — pass your API key as a query parameter and connect any CDP client. No SDK required.

wss://cloud.rayobrowse.com/connect?token=YOUR_API_KEY&os=windows
from playwright.sync_api import sync_playwright
WS_URL = "wss://cloud.rayobrowse.com/connect?token=YOUR_API_KEY&os=windows"
with sync_playwright() as p:
browser = p.chromium.connect_over_cdp(WS_URL)
page = browser.new_page()
page.goto("https://example.com")
print(page.title())
browser.close()

Append any of these to the URL:

ParameterExampleDescription
tokentoken=YOUR_API_KEYRequired. Your API key
osos=windowsTarget fingerprint OS: windows, linux, android, macos
proxyproxy=http://user:pass@host:portRoute traffic through a proxy
headlessheadless=trueRun without GUI (default: true)
vncvnc=trueStart per-browser noVNC session
browser_languagebrowser_language=en-USAccept-Language header
maxLifetimemaxLifetime=300Session TTL in seconds
protection.*protection.canvas=noisePer-feature fingerprint overrides
wss://cloud.rayobrowse.com/connect?token=YOUR_API_KEY&os=windows&proxy=http://user:pass@host:port
wss://cloud.rayobrowse.com/connect?token=YOUR_API_KEY&os=windows&vnc=true

The VNC URL is returned in the x-vnc-url response header.

The SDK is a convenience wrapper that adds session management, reconnection, VNC URL retrieval, and typed errors. Install it only if you need those features.

from rayobrowse import Rayobrowse
from playwright.sync_api import sync_playwright
client = Rayobrowse(
endpoint="wss://cloud.rayobrowse.com",
api_key="your-api-key",
)
ws_url = client.connect_url(
os="windows",
proxy="http://user:pass@host:port",
headless=True,
)
with sync_playwright() as p:
browser = p.chromium.connect_over_cdp(ws_url)
page = browser.new_page()
page.goto("https://example.com")
print(page.title())
browser.close()
client.close()
  1. Your client connects to wss://cloud.rayobrowse.com/connect?token=...
  2. The gateway creates a browser on one of the backend servers
  3. The connection is upgraded to a direct CDP WebSocket to the browser
  4. Response headers include x-session-id (for reconnection) and optionally x-vnc-url
  5. Your CDP traffic goes directly to the browser — the gateway is not in the data path