Skip to main content
POST
Generate Briefing
Generate a briefing on-demand from an ad-hoc prompt via Server-Sent Events streaming. The prompt (query) is run through the briefing engine — the same engine behind your scheduled briefings — so the output matches your scheduled briefing’s depth, formatting, and citations. Send a fresh prompt on each call.

Request

query (required) is your briefing prompt. All other fields are optional:
  • tickers / stock_ids — securities to scope the briefing to.
  • frequencydaily (default), weekly, or monthly; sets the data window (last 1 / 7 / 30 days, anchored at “now”).
  • timezone — IANA timezone (e.g. Asia/Shanghai) used for the window and timestamps. Defaults to UTC.
  • language — output language; auto-detected from the prompt when omitted.
  • previous_summary — the prior briefing’s content, to carry formatting/continuity across calls (optional).

Event Flow

Progress status events stream while the briefing runs, followed by a single answer event carrying the full briefing markdown (with linked [N](url) citations), then status:finish. Read the content from the answer event’s answer_piece. The full content arrives once (not token-by-token), because inline citations are resolved only after the briefing completes. On failure, a single status event with status: "error" (carrying a code) is emitted instead of answer. This endpoint is stateless: each call generates a standalone briefing from the prompt you send.

Authentication

For platform API keys, pass organization_id, user_id, and user_email in the request body to select which user the briefing is generated for. Organization-bound keys resolve the user automatically.

Authorizations

X-API-KEY
string
header
required

Body

application/json
query
string
required

The ad-hoc briefing prompt (used as the briefing topic), run through the briefing engine

tickers
string[]

Optional ticker symbols to scope the briefing

stock_ids
string[]

Optional internal stock ids to scope the briefing

frequency
enum<string>

Data window (last 1 / 7 / 30 days, anchored at now). Defaults to daily.

Available options:
daily,
weekly,
monthly
language
string

Output language; auto-detected from the prompt when omitted

timezone
string

IANA timezone (e.g. Asia/Shanghai) for the window and timestamps. Defaults to UTC.

previous_summary
string

Prior briefing content, to carry continuity across calls (optional)

conversation_id
string | null

Deprecated and ignored; this endpoint is stateless

organization_id
string

Organization ID for platform API keys

user_id
string

User ID (customer_id) for platform API keys

user_email
string

User email for platform API keys

user_name
string

User name for platform API keys

Response

SSE stream of briefing events, each sent as data: {json}\n\n. Sequence: status → [status]* → answer → status:finish. A keepalive is sent as a status event roughly every 30s. On failure a single status event with status "error" (carrying a code) is emitted instead of answer. The answer arrives once (full content), not token-by-token, because inline citations are resolved only after the briefing completes.

Stream status event indicating start, finish, or keep_alive of the analytics stream.

event_name
enum<string>
required

Type of event in the analytics stream

Available options:
status
data
object
required

Event-specific data payload