Skip to main content
Generate one sessionId per browser session and one requestId per user action. Reuse both values across the coordinated calls for that action.

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.

WebSocket request

WebSocket events

JavaScript example

Use the pages in API reference for request and response schemas. Use this guide for orchestration and WebSocket behavior.