theo.browser namespace wraps the Theo Browser REST API. Every method returns strongly-typed responses and throws TheoApiError on failure.
Quick example
Methods
theo.browser.create(request?)
Create a new managed browser session. Returns BrowserSessionHandle.
theo.browser.list()
List the caller’s active sessions. Returns BrowserSessionSnapshot[].
theo.browser.get(id)
Inspect a single session. Returns BrowserSessionSnapshot — includes the current page URL/title/favicon and a freshly-minted embed_url (1 h TTL).
theo.browser.live(id, options?)
Refresh the iframe-embeddable live view URL. Returns BrowserLiveView.
Pass { force: true } after the embedded iframe posts a browserbase-disconnected message so the returned URL targets the new CDP page id immediately.
theo.browser.end(id)
End the session and stop billing. Returns BrowserEndResult with the final duration, proxy bytes, and cost.
Types
Related
- Browser Sessions API — REST endpoint reference
- Embed the Theo Browser — drop-in iframe integration
