v1

latestOpenAPI 3.0.02026-07-26300209.6 KB
Browser Context Profiles

Create a profile setup session

Starts a temporary setup browser for a Browser Context Profile. The response returns session_id, cdp_url, base_url, timeout_seconds, and expires_at. Connect your Playwright, Puppeteer, or CDP client to cdp_url, log in, then save the setup session with session_id. Unsaved setup state is discarded if the session is cancelled or times out.

post/v1/profiles/{profileId}/setup-session

Path parameters

profileIdstring required

Browser Context Profile ID

Example:prof_abc123def4567890

Browser Context Profile ID

Request body

urlstring

Target URL the browser session will navigate to on startup. Bare domains (e.g. tinyfish.ai) are automatically prefixed with https://. If omitted, the browser starts at about:blank.

timeout_secondsinteger nullable

Inactivity timeout in seconds (5–86400). If omitted, null, or greater than your plan maximum, the plan maximum is used.

Example request

{
  "url": "https://www.tinyfish.ai",
  "timeout_seconds": 300
}

Response

Create a profile setup session succeeded.

session_idstring required

Unique identifier for this browser session.

cdp_urlstring uri required

WebSocket URL for browser connection. Pass this to Playwright's connect_over_cdp or any WebSocket-based CDP client.

base_urlstring uri required

HTTPS base URL for the session. Use to access session endpoints such as /pages.

timeout_secondsinteger required
expires_atstring required

Example response

{
  "session_id": "br-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "cdp_url": "wss://browser.example.tinyfish.io/session/cdp",
  "base_url": "https://browser.example.tinyfish.io/session",
  "timeout_seconds": 300,
  "expires_at": "2026-06-10T12:05:00Z"
}