Make a Browsers session, or have the one of its name
A session is a sandbox of the node's browser image for its kind (the image --browser-images names, by digest in production), fixed at 1 vCPU and 2 GiB, made where region says as any sandbox is, and marked as a Browsers session in the control plane's own table: never by metadata, which no customer can set to make a plain sandbox one (reserved_metadata). Its id is its sandbox's: every call of /v1/sandboxes/{id}/… works on it, and DELETE /v1/sandboxes/{id} ends it. cdp_url is the signed address of its port 9222, which any CDP client (Playwright's connectOverCDP, Puppeteer's connect) takes. It is awake while a client is connected to its browser (or a headful one's screen), whatever its pages do, and falls asleep sleep_after_seconds after the last connection closed, with its pages; a connection that says nothing for connection_idle_seconds is closed by its node (its sandbox's awake_ports and connection_idle_seconds). Its egress never reaches ports 25, 465, 587 and the ports mining pools listen on (its rules' deny_ports, kept through any change of them). A name the project has for a session already answers that session, woken where it slept (200); one a plain sandbox has is refused (409 name_taken). On Free a session is held to Free's quotas of the day, of CPU time and memory, as any sandbox is (429 quota_used_up). How many are awake at once is held by the plan's caps on what is awake (5 on Free: 5 sandboxes, 10 GiB). A session made on a node that keeps no ready template of its image, which builds one for it (the first session of the image there), is answered once the build is over and its browser runs, with its ws_url: it can take as long as the build. Takes an Idempotency-Key. Takes write. With profile, the profile's version (the newest, or version) is loaded into the session before it is answered: the browser is started again on it, logged in where it was (a session made with save: true saves it when it is deleted). kind lightpanda is a session of Lightpanda (the image browser-lightpanda), a browser that runs a page's scripts and keeps its DOM and lays out and draws nothing: made, priced and held to the rules as the others are, with its cdp_url and ws_url; it has no live_url and keeps no profile (kind_unsupported); it has no layout engine, so its screenshots and PDFs over CDP hold the page's text alone (chromium-headless gives the page as it is drawn), and a screencast, which it has nothing for, is refused with an error that names chromium-headless.
https://api.glac.ai/v1/browsers인증
헤더 파라미터
요청 본문JSON선택
- proxyoptionalobject | null
Your own proxy (BR11), on a paid plan:
{"url": ...}; null or not given: none. The session's TCP connections to ports 80 and 443 go out through it, by its node's relay: in the layer its egress rules are enforced in, which reads where each goes (the TLS handshake's server name, the HTTP request's Host) and asks the proxy for a tunnel there (CONNECT, the credentials in Basic). The browser is not told of it, and nothing in the guest holds the credentials; they are the node's to keep, and no answer has them. UDP to port 443 (QUIC) is refused, so the browser speaks HTTP over TCP; connections to other ports go as they went. What goes through it is counted both ways (usage.proxy_bytes) and is ordinary egress. A connection the proxy takes no tunnel for is told so: an HTTP request 502proxy_failed, a TLS handshake an alert. 403proxy_not_on_planon the free plan; 400invalid_proxyfor what is no proxy of yours (paramproxy.url; the message never says the URL); 400unknown_fieldfor a field of it other thanurl.
Returns
200
The session of the name, which the project had: woken where it slept.
- kindchromium-headless또는chromium또는lightpandarequired
chromium-headless: Chromium's headless shell;chromium: the full browser on a screen, watched atlive_url;lightpanda: Lightpanda, which runs a page's scripts and keeps its DOM and has no layout engine (its screenshots and PDFs hold the page's text alone; nolive_url, no profile). - statusawake또는asleep또는unavailable또는failedrequired
awakewhile its sandbox runs,asleepwhile it sleeps (or is held asleep),unavailablewhere its node cannot be reached,failedwhere its sandbox failed after its create was answered (its browser stopped and did not come back, say):errorsays why. One that fails before it runs is no session: its create is refused (503session_failed). - ws_urlstring | nullrequired
The browser's own WebSocket address (
wss://9222-<id>-<signature>.<preview domain>/devtools/browser/<browser id>), for the clients that take nothing else (Puppeteer'sbrowserWSEndpoint, chromedp's remote allocator): the path of the browser its node recorded when the session's template was built (the sandbox'sdevtools) atcdp_url, whose credential it carries. Null wherecdp_urlis, or where the node recorded no browser.cdp_urlserves every CDP client that asks/json/version. - live_urlstring | nullrequired
Where its page is watched and driven, live, at a signed address (rotated with
cdp_url): a headless session's/liveon its CDP port (the image's page drawing the tab's screencast, the viewer's mouse and keyboard passed on), a headful one's screen (noVNC on port 6080). The read-only address isGET /v1/browsers/{id}/live?interactive=false. Null without theurlscope, or where its node has no preview domain, and always for alightpandasession, which has nothing to stream. - connectionsinteger | nullrequired
The connections to its browser (its live page's among them), to a headful one's screen and to the read-only view, open now through its preview addresses: it is awake while there is one (its sandbox's
awake_connections). Null from a node that does not count them.minimum: 0
201
The session, made.
- kindchromium-headless또는chromium또는lightpandarequired
chromium-headless: Chromium's headless shell;chromium: the full browser on a screen, watched atlive_url;lightpanda: Lightpanda, which runs a page's scripts and keeps its DOM and has no layout engine (its screenshots and PDFs hold the page's text alone; nolive_url, no profile). - statusawake또는asleep또는unavailable또는failedrequired
awakewhile its sandbox runs,asleepwhile it sleeps (or is held asleep),unavailablewhere its node cannot be reached,failedwhere its sandbox failed after its create was answered (its browser stopped and did not come back, say):errorsays why. One that fails before it runs is no session: its create is refused (503session_failed). - ws_urlstring | nullrequired
The browser's own WebSocket address (
wss://9222-<id>-<signature>.<preview domain>/devtools/browser/<browser id>), for the clients that take nothing else (Puppeteer'sbrowserWSEndpoint, chromedp's remote allocator): the path of the browser its node recorded when the session's template was built (the sandbox'sdevtools) atcdp_url, whose credential it carries. Null wherecdp_urlis, or where the node recorded no browser.cdp_urlserves every CDP client that asks/json/version. - live_urlstring | nullrequired
Where its page is watched and driven, live, at a signed address (rotated with
cdp_url): a headless session's/liveon its CDP port (the image's page drawing the tab's screencast, the viewer's mouse and keyboard passed on), a headful one's screen (noVNC on port 6080). The read-only address isGET /v1/browsers/{id}/live?interactive=false. Null without theurlscope, or where its node has no preview domain, and always for alightpandasession, which has nothing to stream. - connectionsinteger | nullrequired
The connections to its browser (its live page's among them), to a headful one's screen and to the read-only view, open now through its preview addresses: it is awake while there is one (its sandbox's
awake_connections). Null from a node that does not count them.minimum: 0