Browser API for AI agent automation
Keep the page open while an agent works. Inspect controls, perform an action, then read the updated state before taking the next step.
Open a browser session
curl -i https://api.oassis.dev/web/v1/session \
-H 'Content-Type: application/json' \
-d '{"url":"https://example.com","formats":["controls"]}'Keep the returned sessionId. Controls identify elements the agent can act on; inspect them before selecting a target.
Act and inspect the result
curl -i https://api.oassis.dev/web/v1/act \
-H 'Content-Type: application/json' \
-d '{"sessionId":"SESSION_ID","actions":[{"navigate":"https://example.com"}],"formats":["controls","markdown"]}'Actions include navigation, click, typing, selection, scrolling and waiting. A click target can use a control reference or a CSS selector. Check the action schema before sending an action.
Close the session
curl -i -X POST https://api.oassis.dev/web/v1/session/SESSION_ID/closeClose sessions when finished. Idle expiry and ownership checks apply; keep session identifiers with the caller that opened them.
Plan the cost
HTTP session opening costs $0.005 plus the requested outputs. Each action costs $0.0005, with additional output and session-time charges where applicable. The payment challenge gives the exact amount for a request.
Build deliberate automation
Use sessions for workflows such as navigating a catalogue or inspecting a dynamic page. Your agent must choose actions and verify the outcome. Confirm consequential submissions or purchases with the user before performing them.
Continue with MCP integration, x402 payments or the OpenAPI reference.