Skip to main content
Set stream to true on POST https://api-beta.ai-baseline.xyz/v2/sandp_500/query to receive Server-Sent Events instead of a single JSON response. Streaming is supported for:
ModeStreaming
basicSupported
researchSupported
agentic_researchSupported
Retrieval completes before optional answer or analysis token deltas begin. Answer deltas are emitted only when include.answer=true; analysis deltas are emitted only when include.analysis=true.
curl -N -X POST https://api-beta.ai-baseline.xyz/v2/sandp_500/query \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $AI_BASELINE_API_KEY" \
  -d '{
    "query": "What supply chain risks did Apple disclose in Item 1A?",
    "mode": "research",
    "effort": "medium",
    "stream": true,
    "metadata_filters": {
      "sec_ticker": "AAPL",
      "sec_form_type": "10-K"
    },
    "include": {
      "analysis": true
    }
  }'

Event Types

Each frame uses the standard SSE shape:
event: <type>
data: <json>
EventEmitted when
retrieval.startedThe server has accepted the request and started retrieval.
retrieval.completedRetrieval has finished and the evidence count is known.
answer.deltaA text delta for the grounded answer is available when answer generation is enabled.
analysis.deltaAn analysis delta is available for research or agentic_research when include.analysis=true.
finalThe final ResearchResponse envelope is available.
errorThe streaming workflow failed after the stream opened.
The final event uses the same response envelope as non-streaming requests and honors the same include controls.