Endpoints
All requests require an
X-API-Key header. See Authentication.
The SDKs (
tinyfish for Python and @tiny-fish/sdk for TypeScript) target https://agent.tinyfish.ai/v1/browser by default, while the REST host documented here is https://api.browser.tinyfish.ai. Both hosts are supported and behave identically.Session creation typically takes 10-30 seconds. Set your HTTP client timeout to at least 60 seconds. Direct Browser API sessions are isolated; use Browser Context Profiles when you need reusable cookies or storage.
Request
Parameters
string
Target URL the session will navigate to on startup. Bare domains (e.g.
tinyfish.ai) are automatically prefixed with https://. Omit to start at about:blank.integer
Inactivity timeout in seconds (5–86400). Defaults to your plan maximum.
Response
On success, returns201 Created with a JSON body containing session_id, cdp_url, and base_url.
string
Unique identifier for this session.
string
WebSocket URL for browser connection. Pass this to Playwright’s
connect_over_cdp or any CDP client.string
HTTPS base URL for the session. Use to access session endpoints such as
/pages.DELETE — Terminate a Session
204.
Path Parameters
string
required
The
session_id returned when the session was created.Response
Returns204 No Content with an empty body on success.
Error Codes
Debugging — Open DevTools Inspector
PollGET {base_url}/pages and open the devtoolsFrontendUrl of the first non-blank page to inspect the live browser session.
The page starts at
about:blank and navigates asynchronously — skip blank pages when polling to get the correct inspector URL.Session Lifecycle
SDK Methods
End-to-End Example
Create a session, connect with Playwright, take a screenshot, and extract the page title.Error Reference
Related
Browser Overview
First request, success shape, and product routing
Authentication
API key setup
Browser Context Profiles
Persist login state for future Agent API runs
Error Codes
Full list of API error codes
Key Concepts
Understand where Browser fits in the overall API surface