Skip to main content
POST
Chat with Knowledge Base
Query a knowledge base using natural language and receive contextual responses. This endpoint supports both direct queries and conversational context through message history.

Headers

string
required
Your API key for authentication.
string
required
Must be application/json.

Body Parameters

array
Array of chat messages for conversational context. Use this for multi-turn conversations.
string
required
The role of the message sender (e.g., “user”, “assistant”, “system”).
string
required
The content of the message.
string
required
The ID of the knowledge base to query against.

Response

object
Chat response with contextual information.
string
The AI-generated response based on the knowledge base content.
string
Additional context information used to generate the response.
array
Array of source documents that were used to generate the response.
string
Unique identifier of the source document.
string
Relevant content from the source document.
object
Additional metadata about the source document.
null
Will be null on successful query.

Docs for agents: llms.txt