The browser#
A web browser on a simulated Linux machine, behind the hosted API. The machine's whole screen is the browser: no desktop, no window frame, no address bar. A screenshot is the page and nothing else, and what you send is what the page receives.
Use it in two ways:
- One call. Send an address, get the page back: as a PNG, as its markup after its script ran, as Markdown, as its links, or markup and picture together. The browser is made for the call and gone when it answers.
- A session. Open a browser, send it to pages, click, type and scroll with actions, and read or draw it between them. It lives until you delete it or leave it unused.
Every call takes an API key with the browser scope (§ Keys). All paths are under
https://computaco.ai/v1.
One call#
API=https://computaco.ai/v1
curl -s $API/browser/screenshot -H "authorization: Bearer $CW_KEY" \
-d '{"url": "https://example.com/", "viewport": {"width": 1280, "height": 800}}' -o page.png
curl -s $API/browser/content -H "authorization: Bearer $CW_KEY" -d '{"url": "https://example.com/"}'
# → {"url": "https://example.com/", "status": 200, "title": "Example Domain", "html": "<!DOCTYPE html><html>…"}
| Method and path | Body | Answer |
|---|---|---|
POST /browser/screenshot | {url, viewport?, wait_ms?, full_page?, place?} | image/png |
POST /browser/content | {url, viewport?, wait_ms?, place?} | {url, status, title, html} |
POST /browser/markdown | {url, viewport?, wait_ms?, place?} | {url, title, markdown} |
POST /browser/links | {url, viewport?, wait_ms?, place?} | {url, links: [{href, text}]} |
POST /browser/snapshot | {url, viewport?, wait_ms?, full_page?, place?} | {url, status, title, html, screenshot}, the screenshot a base64 PNG |
urlis what a person types in an address bar:example.comopenshttps://example.com/.viewportis{width, height}in pixels, 64 to 2,560 wide and 64 to 1,600 high. Left out, it is 1280 × 800.wait_ms(0 to 30,000) runs the machine's clock that long after the page loads, so the page's timers fire before it is read.placeis where the browser runs:"lightning"(the default) or"heavy", on any route that opens a page or a session. A Lightning browser holds 128 MB, enough for most pages; a large one (a long Wikipedia article with its pictures) needs Heavy, which holds 6 GB and needs a plan that includes Heavy. A page too large for its place is answered422 page_too_large, and the session stays at the page before it.full_page: truedraws the whole page, as tall as it is, up to 4,096,000 pixels in all (3,200 pixels tall at 1,280 wide). A taller page is cut at its foot, and the answer says so withX-Full-Page-Clipped: true.htmlis the page's markup as it stands after its script ran, not the bytes the server sent.statusis the HTTP status the page was answered with: a missing page is read with its404.markdownholds the page's headings, text, links and pictures, in order.linksare the page's<a href>links, resolved against the page, with their text.- An address the browser cannot open (a
file://path, a scheme it does not fetch) is a422navigation_failed.
Every answer carries X-Browser-Ms-Used: how long the call held the browser, in
milliseconds.
Sessions#
S=$(curl -s $API/browser/sessions -H "authorization: Bearer $CW_KEY" \
-d '{"url": "https://example.com/", "viewport": {"width": 1280, "height": 800}}' | jq -r .id)
curl -s $API/browser/sessions/$S/actions -H "authorization: Bearer $CW_KEY" -d '{"actions": [
{"family": "pointer.v1", "op": "click", "payload": {"x": 640, "y": 300, "width": 1280, "height": 800}},
{"family": "keyboard.v1", "op": "type", "payload": {"text": "hello"}},
{"family": "browser.v1", "op": "navigate", "payload": {"url": "https://example.org/"}}]}'
curl -s $API/browser/sessions/$S/screenshot -H "authorization: Bearer $CW_KEY" -o now.png
curl -s -X DELETE $API/browser/sessions/$S -H "authorization: Bearer $CW_KEY"
| Method and path | What it does |
|---|---|
POST /browser/sessions {url?, viewport?, idle_ttl_s?, wait_ms?} | Open a session, at url when given: 201 with the session. |
GET /browser/sessions | The organization's sessions. |
GET /browser/sessions/{id} | The session: {id, url, title, status, viewport, idle_ttl_s, expires_at, created_at, place, state_hash, tick}. url is null until it is sent to a page. |
POST /browser/sessions/{id}/actions {actions} | Up to 64 actions, in order: {outcomes, state_hash, tick}. |
GET /browser/sessions/{id}/screenshot?full_page= | The screen as a PNG at the session's viewport. |
GET /browser/sessions/{id}/content, /markdown, /links | The page on show, read as the one-call routes read it. A session with no page answers 409 no_page. |
DELETE /browser/sessions/{id} | Close it. |
An action is {family, op, payload} from three families
(action families): browser.v1 (navigate, back, forward,
reload, click, fill, submit, key, scroll, tabs), keyboard.v1 (type, key)
and pointer.v1 (move, down, up, click, double_click, wheel at screen coordinates). Each outcome
says whether its action succeeded; an action of another family is an unsuccessful
outcome, not an error.
A session is deleted after idle_ttl_s seconds with no request to it: 300 when left out,
from 60 to 86,400. expires_at says when, and every request moves it.
A session is a simulation. Its id is the simulation's, so with a key that also holds the
simulations scope you can snapshot it, fork it (POST /simulations/{id}/fork gives a
second session at the same page), and read its history, as for any simulation
(the hosted API). A session of another organization is a 404.
What the browser is#
The browser runs on a simulated Ubuntu machine with the browser as its only application.
Its screen is the browser's page, edge to edge, as a fullscreen kiosk browser shows it.
There is no address bar to type into: you send it to a page with navigate.
The machine's network is its own. A name it does not know is a real host on the internet, reached on ports 80 and 443. Every answer from a real host is recorded with the step that asked for it, so a fork or a replay of a session sees the same page and fetches nothing again. A session that has not been sent anywhere has no page.
Keys#
A key reaches the browser when it holds the browser scope. A key made with no scopes
named holds every scope, browser among them, and a key that held simulations before the
scope came holds browser too. Make a key that reaches only the browser with
POST /v1/keys {"scopes": ["browser"]}.
Limits and price#
A call counts against your plan as simulations do:
- A session, and each one-call request while it runs, is one of the plan's simulations
at once (
simulations_max: 8 on Free, 32 on Pro). - Each action, and the navigation of a one-call request or of a session opened at
url, is one step (steps_per_minute). - Each screenshot is one render (
renders_per_minute; a whole-page screenshot of a page never drawn is drawn once at the viewport first, which is not counted).
There is no charge by the hour. A browser that runs all month costs nothing more than the plan:
| Price | Browsers at once | One browser all month (730 hours) | Every browser all month | |
|---|---|---|---|---|
| Free | $0 | 8 | $0 | $0 |
| Pro | $29 a month | 32 | $0.040 an hour | $0.0012 a browser-hour (23,360 hours) |
| Cloudflare Browser Run, Workers Paid | $5 a month | 10, then $2 a month each | $0.090 an hour after the first 10 hours | 23,360 hours with 32 browsers: $2,150.50 |
Cloudflare's prices are from its pricing page (developers.cloudflare.com/browser-rendering/pricing, read 2026-11-22): 10 browser hours a month included on Workers Paid, then $0.09 an hour, and 10 concurrent browsers, then $2.00 a month each. The last row is $5 + (23,360 − 10) × $0.09
- 22 × $2.00.
Measured#
On 2026-11-22, on one desktop computer under other load (load average 24 to 32), with the API in its local test runtime and the world's own start page as the page, so no time went to the internet. Wall time is the client's, from request to the last byte; 20 calls each, 10 for sessions.
| Call | p50 | p95 |
|---|---|---|
| One-call screenshot, 1280 × 800, the first after the API started | 652 ms | |
| One-call screenshot, 1280 × 800, after it | 247 ms | 389 ms |
| One-call content | 189 ms | 473 ms |
| Open a session with no page | 162 ms | 170 ms |
| Open a session at a page | 177 ms | 196 ms |
One navigate action in a session | 46 ms | 51 ms |
| A session's screenshot | 86 ms | 104 ms |
The engine running a session held 38.4 MB of memory. A real page adds the time its host takes to answer.
Clients#
from computerworld_cloud import Client
client = Client() # COMPUTERWORLD_API_KEY
client.browser.screenshot("https://example.com/").save("page.png")
print(client.browser.markdown("https://example.com/")["markdown"])
with client.browser.create_session("https://example.com/") as s:
s.act([{"family": "keyboard.v1", "op": "key", "payload": {"key": "End"}}])
s.screenshot(full_page=True).save("whole.png")
import { Client } from 'computerworld-cloud';
const client = new Client(process.env.COMPUTERWORLD_API_KEY);
const { bytes } = await client.browser.screenshot('https://example.com/');
const s = await client.browser.createSession({ url: 'https://example.com/' });
await s.navigate('https://example.org/');
console.log((await s.links()).links);
await s.delete();