Skip to main content
POST
Start a Chromium session

Authorizations

Authorization
string
header
required

Your Styne API key: Authorization: Bearer $STYNE_API_KEY.

Body

application/json

Start a browser session. Every field is optional.

region
string

Region to start in: ash (default). ams is accepted and served in ash for now; aliases eu, us-east.

timeout
integer

Seconds the session lives.

idle_timeout_seconds
integer

Seconds without a connected CDP client before the session sleeps; 0 never sleeps on its own.

secure
boolean

Refused with a 422: a browser session is reached only with the signed token in its cdp_url.

metadata
object

Your own keys and JSON values (also accepted as user_metadata), kept with the session and answered on create, GET /browsers/{id} and GET /browsers: at most 50 keys of 1 to 64 letters, digits, _ - . :, each value at most 512 bytes as JSON.

unblock
string

What happens on a block or captcha page: off, auto (default) or always.

captcha
string

What the session does with a CAPTCHA: off, click (default: the widget's checkbox is clicked) or solve (a challenge the click does not pass is solved, metered per solve, at most 10 per session).

egress
string

Where the session's traffic leaves from, from its first request: direct (default), residential or mullvad. Residential traffic is metered per GB; static and image CDNs, ad hosts and the browser's own background fetches leave directly.

country
string

Two-letter country of the residential or mullvad address, for example it. Needs egress residential or mullvad.

proxy
any

Refused with a 422 that names egress and country, which pick where the session's traffic leaves.

timezone
string

IANA timezone the session reports, for example Europe/Berlin.

locale
string

BCP 47 language tag, for example de-DE.

profile
string

Start the saved browser of this profile, signed in as it was left.

fork
boolean

With profile: an unbound copy for runs in parallel.

persist
boolean

With profile: true (the default without fork) saves the browser into the profile on the server whenever the session ends (a delete, its timeout, a stop of its machine); false writes the profile only on POST /profiles/{id}/save. true without profile or with fork is a 422.

viewport
object

Page size in CSS pixels (window.innerWidth x innerHeight), 320x240 to 3840x2160, set before the start answers; pages opened later get it too. Default 1280x633.

recording
boolean

false: the edge keeps no recording of the session (console, network, trace and replay answer empty). Default true.

downloads
boolean

true: the browser saves every download into /home/browser/Downloads for the whole session; read the files with GET /sandboxes/{id}/files. Default false.

stealth
boolean

false: unblock and captcha default to off (a value you name still wins). true or absent keeps the defaults.

extensions
array

Ids of uploaded extensions (POST /extensions) loaded into the browser before the start answers, at most 10; an id the account does not have is a 422 that names it.

Response

Success. The answer is described on https://docs.styne.ai/browsers.