diff --git a/api-reference/v2-openapi.json b/api-reference/v2-openapi.json index 719a6f0f..89ee21d8 100644 --- a/api-reference/v2-openapi.json +++ b/api-reference/v2-openapi.json @@ -159,13 +159,18 @@ "application/json": { "schema": { "type": "object", - "required": ["code"], "properties": { + "prompt": { + "type": "string", + "minLength": 1, + "maxLength": 10000, + "description": "Natural language task for the AI agent. Required if `code` is not set." + }, "code": { "type": "string", "minLength": 1, "maxLength": 100000, - "description": "Code to execute in the scrape-bound browser sandbox" + "description": "Code to execute in the scrape-bound browser sandbox. Required if `prompt` is not set." }, "language": { "type": "string", @@ -191,7 +196,7 @@ }, "responses": { "200": { - "description": "Code executed successfully", + "description": "Interaction executed successfully", "content": { "application/json": { "schema": { @@ -200,6 +205,21 @@ "success": { "type": "boolean" }, + "output": { + "type": "string", + "nullable": true, + "description": "The agent's natural language answer. Only present when using `prompt`." + }, + "liveViewUrl": { + "type": "string", + "nullable": true, + "description": "Read-only live view URL for the browser session" + }, + "interactiveLiveViewUrl": { + "type": "string", + "nullable": true, + "description": "Interactive live view URL where viewers can control the browser" + }, "stdout": { "type": "string", "nullable": true, @@ -208,7 +228,7 @@ "result": { "type": "string", "nullable": true, - "description": "Standard output (alias for stdout)" + "description": "Raw return value from the sandbox. For `code`: the last expression evaluated. For `prompt`: the raw page snapshot the agent used." }, "stderr": { "type": "string",