Skip to content
中文

Choosing the backend

A session can run on three backends. Say which one with source in the body of POST /browser/v1/sessions.

sourceBackendUse it whenProxyBilling
{ "type": "cloud" }Browser Run (Cloudflare)You want the fastest start and need no proxy. A site can detect that the browser is automated.Not allowedBilled per millisecond(See the live price)
{ "type": "container" }Our own Chrome containerYou need a browser that does not look automated, with or without a proxy. With a proxy the exit address is fixed.OptionalTime Billed per millisecond(See the live price) plus traffic Metered by use(See the live price)
{ "type": "byob", "browser": "byb_…" }The user’s own paired Chrome or EdgePages must load from the user’s own network and sign-ins.Not allowedFree

The short form { "byob": "byb_…" } is the same as the third row.

When source is absent the old rule applies: a session with proxies runs in the container, any other session on Browser Run. The session you get back reports the backend it really used as source.type (cloud, container or byob; byob also carries browser).

Examples

These are request bodies, not recorded results.

{ "source": { "type": "container" } }
{
"source": { "type": "container" },
"proxies": [{ "type": "external", "server": "isp.example.net:8003", "username": "u1", "password_secret": { "vault_id": "vlt_1", "secret": "vsec_1" } }]
}

Without a proxy the container’s traffic leaves from the container’s own address, and the session reports it in the cloudBrowser.session.egressObserved event with proxyHost set to direct. With a proxy see Fixed-exit proxy.

Traffic is billed for every container session

A container session is billed for the bytes the browser moves, with or without a proxy: proxyBytes on the session, one browser_proxy_bytes line next to browser_ms in the single usage record written when the session ends. Browser Run and byob sessions have no traffic line.

Errors

codeHTTPWhenWhat to do
INVALID_PARAMS400source.type is cloud and proxies is also sent (Browser Run cannot use a proxy; use source.type container).Use source.type container, or drop the proxy.
INVALID_PARAMS400byob with proxies or with a login-state context.Drop the proxy or the context.
INVALID_PARAMS400An unknown type, an extra key, or a malformed browser id.Send one of the four forms above.
PROVIDER_UNSUPPORTED501The container backend is not opened for your organization (source.type container, or proxies).Ask us to open it, or use cloud.
PROVIDER_FAILED502The container did not start, or its proxy was unreachable. Retryable.Retry; check the proxy.
PROVIDER_CAPACITY429The container backend is rolling out. Retryable.Retry shortly.

A login state bound to a proxy counts as a proxy: it cannot be used with source.type cloud.

Next