Skip to main content
POST
/
oracle
/
stream
Oracle research with real-time streaming (Pro only)
curl --request POST \
  --url https://apigcp.trynia.ai/v2/oracle/stream \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "query": "How does authentication work in the FastAPI codebase?",
  "repositories": [
    "fastapi/fastapi",
    "tiangolo/sqlmodel"
  ],
  "data_sources": [
    "FastAPI Documentation",
    "SQLModel Docs"
  ],
  "output_format": "markdown report with code examples"
}
'
"<string>"

Authorizations

Authorization
string
header
required

API key must be provided in the Authorization header

Body

application/json
query
string
required

Research question to investigate

Example:

"How does authentication work in the FastAPI codebase?"

repositories
string[]

Optional list of repository identifiers to search

Example:
["fastapi/fastapi", "tiangolo/sqlmodel"]
data_sources
string[]

Optional list of documentation source identifiers to search

Example:
["FastAPI Documentation", "SQLModel Docs"]
output_format
string

Optional output format specification

Example:

"markdown report with code examples"

Response

SSE stream of research progress

Stream of Server-Sent Events with JSON payloads. Event types:

  • connected: Connection established
  • iteration_start: {type, iteration, max_iterations}
  • tool_start: {type, action, args, reason, iteration}
  • tool_complete: {type, action, success, result_summary, iteration}
  • generating_report: {type, message}
  • complete: {type, result: OracleResearchResponse}
  • error: {type, action, error, iteration}
  • heartbeat: {type, timestamp}