Environments
Use
ws:// only for local development.
Request flow
API routes
Orchestrate the full experience
Create identifiers
Create a
sessionId once per user session. Create a new requestId for each
query or action.Fetch tiles with /api/v1/queries
Call
POST /api/v1/queries to fetch the top content tiles for the query.
Keep the same sessionId and requestId you will use everywhere else.Stream the summary over WebSocket
Open
/api/v1/ws and send the get_summary_with_cache action. Append
summary_part chunks as they arrive, then finalize the UI when you receive
summary_complete.Fetch a CTA and suggestions in parallel
Call
POST /api/v1/cta-selection and POST /api/v1/suggestions with the
same IDs so the platform can correlate the entire experience.