AI Evaluate (Stream)
AI
AI Evaluate (Stream)
Stream an AI evaluation against the current page as Server-Sent Events in an OpenAI-compatible format.
POST
AI Evaluate (Stream)
Overview
Same input asPOST /browser/sessions/{id}/ai/evaluate, but the response is a long-lived Server-Sent Events stream. Response Content-Type is text/event-stream.
Each chunk follows the OpenAI Chat Completions streaming shape — a data: line carrying a JSON object, separated by a blank line. The stream terminates with data: [DONE].
Path Parameters
string
required
Browser session ID (UUID).
Body
Same shape as the non-streaming endpoint.string
required
Natural-language instruction for the model.
string
default:"simple"
One of
simple, agent.integer
default:"20"
Agent-mode step cap.
string
Explicit LLM model ID.
object
JSON schema for structured output.
Example Request
Response
Success Response (200)
Content-Type: text/event-streamCache-Control: no-cacheConnection: keep-alive
delta.content: "Error: ..." and finish_reason: "stop", followed by data: [DONE].
Error Responses
Notes
- Use
-N(no-buffer) with cURL to see chunks as they arrive. - Any OpenAI-compatible SSE parser can consume this endpoint.
- For one-shot JSON output without streaming, use
POST /browser/sessions/{id}/ai/evaluate.