MASAKA / Browser / Sessions
A browser with
a clear lifetime.
Every session is project-scoped, region-bound, time-bounded, metered after readiness, and terminally settled.
Create a session
POST
/api/sessionsCreate and reserve capacity| Field | Purpose |
|---|---|
url | Initial public HTTP(S) page. |
region | china or overseas. |
preview_mode | visual frames or semantic live DOM. |
max_seconds | Bounded runtime, normally 30–900 seconds. |
profile_id / proxy_id | Optional owned resources. |
Lifecycle
queued→starting→running→completed
failed and expired are also terminal. Billing begins only after running; keep polling with backoff and stop when the work is done.
List and inspect
GET
/api/sessionsPage, filter, and search project sessionsGET
/api/sessions/:idCurrent status, URL, region, and usageList responses deliberately omit worker transport addresses, secrets, and profile bytes.
Stop and settle
POST
/api/sessions/:id/stopIdempotent terminal request