Overview
The Document Chat API allows you to ask questions about your ingested documents and receive answers grounded in your content. The API supports conversational memory, enabling follow-up questions that maintain context.Endpoint
Authentication
Include your API token in the Authorization header:Request
Headers
| Header | Value | Required |
|---|---|---|
Authorization | Bearer YOUR_API_TOKEN | Yes |
Content-Type | application/json | Yes |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
question | string | Yes | The question to ask about your documents |
conversation_id | string | No | Conversation identifier to maintain memory context across questions |
reset | boolean | No | When true, starts a new conversation and ignores previous history. Default: false |
file_names | string[] | No | Restrict search to specific documents by file name |
Example Request
Example with Conversation Memory
Example with Specific Documents
Response
Success Response (200 OK)
| Field | Type | Description |
|---|---|---|
answer | string | The answer to your question, grounded in document content |
conversation_id | string | Conversation identifier for follow-up questions |
Example Response
Error Responses
| Status Code | Description |
|---|---|
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid or missing API token |
| 404 | Not Found - Specified file not found |
| 500 | Internal Server Error |
Usage Examples
Python
JavaScript
Best Practices
- Use conversation memory — Pass
conversation_idfor follow-up questions to maintain context - Be specific — Clear, specific questions get better answers
- Scope when needed — Use
file_namesto focus on specific documents - Reset when changing topics — Set
reset: truewhen switching to unrelated questions

