{ "openapi": "3.0.3", "info": { "title": "sandbox-agent", "description": "Universal API for automatic coding agents in sandboxes. Supports Claude Code, Codex, OpenCode, and Amp.", "contact": { "name": "Rivet Gaming, LLC", "email": "developer@rivet.gg" }, "license": { "name": "Apache-2.0" }, "version": "0.5.0-rc.1" }, "servers": [ { "url": "http://localhost:2468" } ], "paths": { "/v1/acp": { "get": { "tags": ["v1"], "operationId": "get_v1_acp_servers", "responses": { "200": { "description": "Active ACP server instances", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AcpServerListResponse" } } } } } } }, "/v1/acp/{server_id}": { "get": { "tags": ["v1"], "operationId": "get_v1_acp", "parameters": [ { "name": "server_id", "in": "path", "description": "Client-defined ACP server id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "SSE stream of ACP envelopes" }, "400": { "description": "Invalid request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "404": { "description": "Unknown ACP server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "406": { "description": "Client does not accept SSE responses", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } }, "post": { "tags": ["v1"], "operationId": "post_v1_acp", "parameters": [ { "name": "server_id", "in": "path", "description": "Client-defined ACP server id", "required": true, "schema": { "type": "string" } }, { "name": "agent", "in": "query", "description": "Agent id required for first POST", "required": false, "schema": { "type": "string", "nullable": true } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AcpEnvelope" } } }, "required": true }, "responses": { "200": { "description": "JSON-RPC response envelope", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AcpEnvelope" } } } }, "202": { "description": "JSON-RPC notification accepted" }, "400": { "description": "Invalid ACP envelope", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "404": { "description": "Unknown ACP server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "406": { "description": "Client does not accept JSON responses", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "409": { "description": "ACP server bound to different agent", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "415": { "description": "Unsupported media type", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "504": { "description": "ACP agent process response timeout", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } }, "delete": { "tags": ["v1"], "operationId": "delete_v1_acp", "parameters": [ { "name": "server_id", "in": "path", "description": "Client-defined ACP server id", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "ACP server closed" } } } }, "/v1/agents": { "get": { "tags": ["v1"], "operationId": "get_v1_agents", "parameters": [ { "name": "config", "in": "query", "description": "When true, include version/path/configOptions (slower)", "required": false, "schema": { "type": "boolean", "nullable": true } }, { "name": "no_cache", "in": "query", "description": "When true, bypass version cache", "required": false, "schema": { "type": "boolean", "nullable": true } } ], "responses": { "200": { "description": "List of v1 agents", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentListResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } } }, "/v1/agents/{agent}": { "get": { "tags": ["v1"], "operationId": "get_v1_agent", "parameters": [ { "name": "agent", "in": "path", "description": "Agent id", "required": true, "schema": { "type": "string" } }, { "name": "config", "in": "query", "description": "When true, include version/path/configOptions (slower)", "required": false, "schema": { "type": "boolean", "nullable": true } }, { "name": "no_cache", "in": "query", "description": "When true, bypass version cache", "required": false, "schema": { "type": "boolean", "nullable": true } } ], "responses": { "200": { "description": "Agent info", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentInfo" } } } }, "400": { "description": "Unknown agent", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } } }, "/v1/agents/{agent}/install": { "post": { "tags": ["v1"], "operationId": "post_v1_agent_install", "parameters": [ { "name": "agent", "in": "path", "description": "Agent id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentInstallRequest" } } }, "required": true }, "responses": { "200": { "description": "Agent install result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentInstallResponse" } } } }, "400": { "description": "Invalid request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "500": { "description": "Install failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } } }, "/v1/browser/back": { "post": { "tags": ["v1"], "summary": "Navigate the browser back in history.", "description": "Sends a CDP `Page.navigateToHistoryEntry` command with the previous\nhistory entry and returns the resulting page URL and title.", "operationId": "post_v1_browser_back", "responses": { "200": { "description": "Page info after navigating back", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserPageInfo" } } } }, "409": { "description": "Browser runtime is not active", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "502": { "description": "CDP command failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } } }, "/v1/browser/cdp": { "get": { "tags": ["v1"], "summary": "Open a CDP WebSocket proxy session.", "description": "Upgrades the connection to a WebSocket that relays bidirectionally to\nChromium's internal CDP WebSocket endpoint. External tools like Playwright\nor Puppeteer can connect via `ws://sandbox-host:2468/v1/browser/cdp`.", "operationId": "get_v1_browser_cdp_ws", "responses": { "101": { "description": "WebSocket upgraded" }, "409": { "description": "Browser runtime is not active", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "502": { "description": "CDP connection failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } } }, "/v1/browser/click": { "post": { "tags": ["v1"], "summary": "Click an element in the browser page.", "description": "Finds the element matching `selector`, computes its center point via\n`DOM.getBoxModel`, and dispatches mouse events through `Input.dispatchMouseEvent`.", "operationId": "post_v1_browser_click", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserClickRequest" } } }, "required": true }, "responses": { "200": { "description": "Click performed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserActionResponse" } } } }, "404": { "description": "Element not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "409": { "description": "Browser runtime is not active", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "502": { "description": "CDP command failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } } }, "/v1/browser/console": { "get": { "tags": ["v1"], "summary": "Get browser console messages.", "description": "Returns console messages captured from the browser, optionally filtered by\nlevel (log, debug, info, warning, error) and limited in count.", "operationId": "get_v1_browser_console", "parameters": [ { "name": "level", "in": "query", "required": false, "schema": { "type": "string", "nullable": true } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "format": "int32", "nullable": true, "minimum": 0 } } ], "responses": { "200": { "description": "Console messages retrieved", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserConsoleResponse" } } } }, "409": { "description": "Browser not active", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "500": { "description": "Internal error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } } }, "/v1/browser/content": { "get": { "tags": ["v1"], "summary": "Get the HTML content of the current browser page.", "description": "Returns the outerHTML of the page or a specific element selected by a CSS\nselector, along with the current URL and title.", "operationId": "get_v1_browser_content", "parameters": [ { "name": "selector", "in": "query", "required": false, "schema": { "type": "string", "nullable": true } } ], "responses": { "200": { "description": "Page HTML content", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserContentResponse" } } } }, "409": { "description": "Browser runtime is not active", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "502": { "description": "CDP command failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } } }, "/v1/browser/contexts": { "get": { "tags": ["v1"], "summary": "List browser contexts (persistent profiles).", "description": "Returns all browser context directories with their name, creation date,\nand on-disk size.", "operationId": "get_v1_browser_contexts", "responses": { "200": { "description": "Browser contexts listed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserContextListResponse" } } } }, "500": { "description": "Internal error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } }, "post": { "tags": ["v1"], "summary": "Create a browser context (persistent profile).", "description": "Creates a new browser context directory that can be passed as contextId\nto the browser start endpoint for persistent cookies and storage.", "operationId": "post_v1_browser_contexts", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserContextCreateRequest" } } }, "required": true }, "responses": { "201": { "description": "Browser context created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserContextInfo" } } } }, "500": { "description": "Internal error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } } }, "/v1/browser/contexts/{context_id}": { "delete": { "tags": ["v1"], "summary": "Delete a browser context (persistent profile).", "description": "Removes the browser context directory and all stored data (cookies,\nlocal storage, cache, etc.).", "operationId": "delete_v1_browser_context", "parameters": [ { "name": "context_id", "in": "path", "description": "Browser context ID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Browser context deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserActionResponse" } } } }, "404": { "description": "Browser context not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "500": { "description": "Internal error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } } }, "/v1/browser/cookies": { "get": { "tags": ["v1"], "summary": "Get browser cookies.", "description": "Returns cookies from the browser, optionally filtered by URL.\nUses CDP Network.getCookies.", "operationId": "get_v1_browser_cookies", "parameters": [ { "name": "url", "in": "query", "required": false, "schema": { "type": "string", "nullable": true } } ], "responses": { "200": { "description": "Cookies retrieved", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserCookiesResponse" } } } }, "409": { "description": "Browser not active", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "502": { "description": "CDP command failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } }, "post": { "tags": ["v1"], "summary": "Set browser cookies.", "description": "Sets one or more cookies in the browser via CDP Network.setCookies.", "operationId": "post_v1_browser_cookies", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserSetCookiesRequest" } } }, "required": true }, "responses": { "200": { "description": "Cookies set", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserActionResponse" } } } }, "409": { "description": "Browser not active", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "502": { "description": "CDP command failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } }, "delete": { "tags": ["v1"], "summary": "Delete browser cookies.", "description": "Deletes cookies matching the given name and/or domain. If no filters are\nprovided, clears all browser cookies.", "operationId": "delete_v1_browser_cookies", "parameters": [ { "name": "name", "in": "query", "required": false, "schema": { "type": "string", "nullable": true } }, { "name": "domain", "in": "query", "required": false, "schema": { "type": "string", "nullable": true } } ], "responses": { "200": { "description": "Cookies deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserActionResponse" } } } }, "409": { "description": "Browser not active", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "502": { "description": "CDP command failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } } }, "/v1/browser/crawl": { "post": { "tags": ["v1"], "summary": "Crawl multiple pages starting from a URL.", "description": "Performs a breadth-first crawl: navigates to each page, extracts content in\nthe requested format, collects links, and follows them within the configured\ndomain and depth limits.", "operationId": "post_v1_browser_crawl", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserCrawlRequest" } } }, "required": true }, "responses": { "200": { "description": "Crawl results", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserCrawlResponse" } } } }, "409": { "description": "Browser runtime is not active", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "502": { "description": "CDP command failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } } }, "/v1/browser/dialog": { "post": { "tags": ["v1"], "summary": "Handle a JavaScript dialog (alert, confirm, prompt) in the browser.", "description": "Accepts or dismisses the currently open dialog using\n`Page.handleJavaScriptDialog`, optionally providing prompt text.", "operationId": "post_v1_browser_dialog", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserDialogRequest" } } }, "required": true }, "responses": { "200": { "description": "Dialog handled", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserActionResponse" } } } }, "409": { "description": "Browser runtime is not active", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "502": { "description": "CDP command failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } } }, "/v1/browser/execute": { "post": { "tags": ["v1"], "summary": "Execute a JavaScript expression in the browser.", "description": "Evaluates the given expression via CDP `Runtime.evaluate` and returns the\nresult value and its type. Set `awaitPromise` to resolve async expressions.", "operationId": "post_v1_browser_execute", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserExecuteRequest" } } }, "required": true }, "responses": { "200": { "description": "Execution result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserExecuteResponse" } } } }, "409": { "description": "Browser runtime is not active", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "502": { "description": "CDP command failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } } }, "/v1/browser/forward": { "post": { "tags": ["v1"], "summary": "Navigate the browser forward in history.", "description": "Sends a CDP `Page.navigateToHistoryEntry` command with the next\nhistory entry and returns the resulting page URL and title.", "operationId": "post_v1_browser_forward", "responses": { "200": { "description": "Page info after navigating forward", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserPageInfo" } } } }, "409": { "description": "Browser runtime is not active", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "502": { "description": "CDP command failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } } }, "/v1/browser/hover": { "post": { "tags": ["v1"], "summary": "Hover over an element.", "description": "Finds the element matching `selector`, computes its center via `DOM.getBoxModel`,\nand dispatches a `mouseMoved` event.", "operationId": "post_v1_browser_hover", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserHoverRequest" } } }, "required": true }, "responses": { "200": { "description": "Hover performed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserActionResponse" } } } }, "404": { "description": "Element not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "409": { "description": "Browser runtime is not active", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "502": { "description": "CDP command failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } } }, "/v1/browser/links": { "get": { "tags": ["v1"], "summary": "Get all links on the current page.", "description": "Extracts all anchor elements from the page via CDP and returns their href\nand text content.", "operationId": "get_v1_browser_links", "responses": { "200": { "description": "Links on the page", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserLinksResponse" } } } }, "409": { "description": "Browser runtime is not active", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "502": { "description": "CDP command failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } } }, "/v1/browser/markdown": { "get": { "tags": ["v1"], "summary": "Get the page content as Markdown.", "description": "Extracts the DOM HTML via CDP, strips navigation/footer/aside elements, and\nconverts the remaining content to Markdown using html2md.", "operationId": "get_v1_browser_markdown", "responses": { "200": { "description": "Page content as Markdown", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserMarkdownResponse" } } } }, "409": { "description": "Browser runtime is not active", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "502": { "description": "CDP command failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } } }, "/v1/browser/navigate": { "post": { "tags": ["v1"], "summary": "Navigate the browser to a URL.", "description": "Sends a CDP `Page.navigate` command and optionally waits for a lifecycle\nevent before returning the resulting page URL, title, and HTTP status.", "operationId": "post_v1_browser_navigate", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserNavigateRequest" } } }, "required": true }, "responses": { "200": { "description": "Navigation result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserPageInfo" } } } }, "409": { "description": "Browser runtime is not active", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "502": { "description": "CDP command failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } } }, "/v1/browser/network": { "get": { "tags": ["v1"], "summary": "Get browser network requests.", "description": "Returns network requests captured from the browser, optionally filtered by\nURL pattern and limited in count.", "operationId": "get_v1_browser_network", "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "format": "int32", "nullable": true, "minimum": 0 } }, { "name": "urlPattern", "in": "query", "required": false, "schema": { "type": "string", "nullable": true } } ], "responses": { "200": { "description": "Network requests retrieved", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserNetworkResponse" } } } }, "409": { "description": "Browser not active", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "500": { "description": "Internal error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } } }, "/v1/browser/pdf": { "get": { "tags": ["v1"], "summary": "Generate a PDF of the current browser page.", "description": "Generates a PDF document from the current page via CDP `Page.printToPDF`\nand returns the PDF bytes.", "operationId": "get_v1_browser_pdf", "parameters": [ { "name": "format", "in": "query", "required": false, "schema": { "allOf": [ { "$ref": "#/components/schemas/BrowserPdfFormat" } ], "nullable": true } }, { "name": "landscape", "in": "query", "required": false, "schema": { "type": "boolean", "nullable": true } }, { "name": "printBackground", "in": "query", "required": false, "schema": { "type": "boolean", "nullable": true } }, { "name": "scale", "in": "query", "required": false, "schema": { "type": "number", "format": "float", "nullable": true } } ], "responses": { "200": { "description": "Browser page as PDF bytes" }, "409": { "description": "Browser runtime is not active", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "502": { "description": "CDP command failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } } }, "/v1/browser/reload": { "post": { "tags": ["v1"], "summary": "Reload the current browser page.", "description": "Sends a CDP `Page.reload` command with an optional cache bypass flag\nand returns the resulting page URL and title.", "operationId": "post_v1_browser_reload", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserReloadRequest" } } }, "required": true }, "responses": { "200": { "description": "Page info after reload", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserPageInfo" } } } }, "409": { "description": "Browser runtime is not active", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "502": { "description": "CDP command failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } } }, "/v1/browser/scrape": { "post": { "tags": ["v1"], "summary": "Scrape structured data from the current page using CSS selectors.", "description": "For each key in the `selectors` map, runs `querySelectorAll` with the CSS\nselector value and collects `textContent` from every match. If `url` is\nprovided the browser navigates there first.", "operationId": "post_v1_browser_scrape", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserScrapeRequest" } } }, "required": true }, "responses": { "200": { "description": "Scraped data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserScrapeResponse" } } } }, "409": { "description": "Browser runtime is not active", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "502": { "description": "CDP command failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } } }, "/v1/browser/screenshot": { "get": { "tags": ["v1"], "summary": "Capture a browser page screenshot.", "description": "Captures a screenshot of the current browser page via CDP\n`Page.captureScreenshot` and returns the image bytes with the appropriate\nContent-Type header.", "operationId": "get_v1_browser_screenshot", "parameters": [ { "name": "format", "in": "query", "required": false, "schema": { "allOf": [ { "$ref": "#/components/schemas/BrowserScreenshotFormat" } ], "nullable": true } }, { "name": "quality", "in": "query", "required": false, "schema": { "type": "integer", "format": "int32", "nullable": true, "minimum": 0 } }, { "name": "fullPage", "in": "query", "required": false, "schema": { "type": "boolean", "nullable": true } }, { "name": "selector", "in": "query", "required": false, "schema": { "type": "string", "nullable": true } } ], "responses": { "200": { "description": "Browser screenshot as image bytes" }, "409": { "description": "Browser runtime is not active", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "502": { "description": "CDP command failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } } }, "/v1/browser/scroll": { "post": { "tags": ["v1"], "summary": "Scroll the page or a specific element.", "description": "If a `selector` is provided, scrolls that element. Otherwise scrolls the\npage window by the given `x` and `y` pixel offsets.", "operationId": "post_v1_browser_scroll", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserScrollRequest" } } }, "required": true }, "responses": { "200": { "description": "Scroll performed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserActionResponse" } } } }, "404": { "description": "Element not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "409": { "description": "Browser runtime is not active", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "502": { "description": "CDP command failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } } }, "/v1/browser/select": { "post": { "tags": ["v1"], "summary": "Select an option in a `