Quickstart
-
Create a secret key. In the dashboard, open API Keys and create a secret key (
sk_…). Keep it on your server: it spends your organization’s balance.Terminal window export DATUM_API_KEY=sk_... -
Install a client. BrowserReal speaks plain HTTP. The official Browser Use Cloud SDK wraps those calls in Python and TypeScript. Drive the browser with the Playwright, Puppeteer or Browser Use you already use, as they are: there is no browser to download, and nothing to patch for stealth.
Python 3.10 or newer.
Terminal window pip install browser-use-sdk playwrightTerminal window npm i browser-use-sdk playwright tsxUse the
curlcommand in your terminal. -
Start a browser, use it, stop it.
import asyncio, osfrom browser_use_sdk.v4 import AsyncBrowserUsefrom playwright.async_api import async_playwrightasync def main():async with AsyncBrowserUse(api_key=os.environ["DATUM_API_KEY"],base_url="https://browser.datum.network/api/v4",) as client:browser = await client.browsers.create(timeout=15)print("Watch it:", browser.live_url)try:async with async_playwright() as p:chrome = await p.chromium.connect_over_cdp(browser.cdp_url)page = await chrome.contexts[0].new_page()await page.goto("https://example.com")print(await page.title())finally:await client.browsers.stop(browser.id) # saves the profile, ends the billingasyncio.run(main())An ES module, for its top-level
await: save it asstart.mtsand runnpx tsx start.mts.import { BrowserUse } from 'browser-use-sdk/v4';import { chromium } from 'playwright';const apiKey = process.env.DATUM_API_KEY;if (!apiKey) throw new Error('Set DATUM_API_KEY to your Datum secret key.');const client = new BrowserUse({apiKey,baseUrl: 'https://browser.datum.network/api/v4',});const browser = await client.browsers.create({ timeout: 15 });console.log('Watch it:', browser.liveUrl);try {if (!browser.cdpUrl) throw new Error('BrowserReal did not return a CDP URL.');const chrome = await chromium.connectOverCDP(browser.cdpUrl);try {const page = await chrome.contexts()[0].newPage();await page.goto('https://example.com');console.log(await page.title());} finally {await chrome.close();}} finally {await client.browsers.stop(browser.id); // saves the profile and ends billing}Terminal window curl -X POST https://browser.datum.network/api/v4/browsers \-H "X-Browser-Use-API-Key: $DATUM_API_KEY" \-H "Content-Type: application/json" \-d '{"timeout": 15}'# → { "id": "…", "cdpUrl": "wss://…", "liveUrl": "https://…", … }curl -X PATCH https://browser.datum.network/api/v4/browsers/BROWSER_ID \-H "X-Browser-Use-API-Key: $DATUM_API_KEY" \-H "Content-Type: application/json" \-d '{"action": "stop"}' -
Watch it. Open the
liveUrlthe code printed, or find the browser on the dashboard’s Sessions page, to see the screen and take control yourself. Every session, with its cost and recording, is in History.
With a Browser Use agent
Section titled “With a Browser Use agent”Install Browser Use with pip install browser-use and set
ANTHROPIC_API_KEY for this model. Run the agent inside the try above in place of the Playwright code.
from browser_use import Agent, Browser, ChatAnthropic
agent = Agent( task="Find the top story on news.ycombinator.com", llm=ChatAnthropic(model="claude-sonnet-4-5"), browser=Browser(cdp_url=browser.cdp_url),)await agent.run()Install the official Browser Use Pi SDK with Node.js 22.19 or newer.
Set OPENROUTER_API_KEY for the model and keep your Datum secret in DATUM_API_KEY.
npm i browser-use-sdk @browser_use/pi tsxexport OPENROUTER_API_KEY=...Save as agent.mts and run npx tsx agent.mts.
import { BrowserUse } from 'browser-use-sdk/v4';import { Browser, BrowserUse as BrowserAgent } from '@browser_use/pi';
const apiKey = process.env.DATUM_API_KEY;if (!apiKey) throw new Error('Set DATUM_API_KEY to your Datum secret key.');
const client = new BrowserUse({ apiKey, baseUrl: 'https://browser.datum.network/api/v4',});const browser = await client.browsers.create({ timeout: 15 });try { if (!browser.cdpUrl) throw new Error('BrowserReal did not return a CDP URL.'); const agent = await BrowserAgent.create({ model: 'openrouter/openai/gpt-5.6-luna', browser: Browser.chrome({ cdpUrl: browser.cdpUrl }), }); try { const result = await agent.run('Open https://example.com and report the page title.'); console.log(result.status, result.text); } finally { await agent.close(); }} finally { await client.browsers.stop(browser.id); // saves the profile and ends billing}- Stay signed in between runs with a profile.
- Browse from a country with a residential proxy.
- Watch a browser, or take control of it, in the live view.
- See every option of
POST /browsers.