Skip to main content
POST
Stream an Agent Spark response

Authorizations

Authorization
string
header
required

Body

application/json

Agent Spark request payload.

Request payload for the Agent Spark stream.

prompt
string
required

The chat prompt.

chat_id
string

Optional existing chat session ID.

dataset_code
string

Optional root dataset code used to scope the chat. When both are provided, a non-empty dataset_codes list takes precedence.

Example:

"ds-core"

dataset_codes
string[]

Dataset codes that must belong to the same dataset tree. Takes precedence over dataset_code when both are provided.

docked_audiences
string[]

Optional docked audience UUIDs.

Response

Successful Server-Sent Events stream. Each frame is one of the AgentSparkStream event types. Event order follows wire order on the connection.

One Server-Sent Events frame from POST /beta/spark-api/agents/spark. The event field is the SSE event name. data is the JSON object on the corresponding data: line.

event
enum<string>
required
Available options:
chat_init
data
object
required