For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Logo
DocumentationAPI ReferenceChangelog
DocumentationAPI ReferenceChangelog
  • Get Started
    • Introduction
    • Authentication
    • Rate Limits
    • Pricing
  • Integration
    • MCP Server
    • SDKs
    • OpenAI Compatibility
    • MCP Docs Server
    • llms.txt
    • x402
  • Guides
    • Research Parameters
    • Research Chat
    • Brainstorming
    • Model Selection
    • Prompt Guidance
    • Versioning
  • Reference
    • Errors
    • Pagination
On this page
  • Create a chat message
  • Stream the response (SSE)
  • Poll for a message
  • List chat history
Guides

Research Chat

Follow-up questions with streaming responses

Research chat lets you ask follow-up questions on an existing research job. Responses are generated asynchronously and can be streamed via Server-Sent Events (SSE). When a response includes inline citations (e.g., [1]), the corresponding sources are returned in the results array by matching citation indices against the research job’s results.

Create a chat message

Send a POST request to /research/{job_id}/chat with a JSON body containing content (and optional snippets). The response returns the newly created chat message in a processing state.

Stream the response (SSE)

Open an SSE connection to /research/{job_id}/chat/{message_id}/stream. Each data: line is a chat.completion.chunk payload; the final chunk includes a results array when the content includes citations.

Poll for a message

Fetch /research/{job_id}/chat/{message_id} to check status. While processing you will receive a status field. When completed, the response includes content and a results array containing the research sources referenced by citation index in the content.

List chat history

Call /research/{job_id}/chat to list messages newest-first. Assistant messages can include a results array containing the research sources whose citation_index appears in that message’s content.

Built with