Document Query
POST /v1/document_query
Enables natural conversational interactions with documents stored in Smart Buckets. This endpoint allows users to ask questions, request summaries, and explore document content through an intuitive conversational interface. The system understands context and can handle complex queries about document contents.
The query system maintains conversation context throught the request_id
, enabling follow-up questions and deep exploration
of document content. It works across all supported file types and automatically handles multi-page
documents, making complex file interaction as simple as having a conversation.
The system will:
- Maintain conversation history for context when using the same
request_id
- Process questions against file content
- Generate contextual, relevant responses
Document query is supported for all file types, including PDFs, images, and audio files.
Authorizations
Request Body required
object
The storage bucket ID containing the target document. Must be an accessible Smart Bucket
Document identifier within the bucket. Typically matches the storage path or key
User’s input or question about the document. Can be natural language questions, commands, or requests
Client-provided conversation session identifier. Required for maintaining context in follow-up questions. We recommend using a UUID or ULID for this value.
Responses
200
AI-generated response that may include direct document quotes, content summaries, contextual explanations, references to specific sections, and related content suggestions
object
AI-generated response that may include direct document quotes, content summaries, contextual explanations, references to specific sections, and related content suggestions
Based on the document, the key points are...
400
Invalid request parameters
object
Error code
INVALID_ARGUMENT
Error message
Missing required parameter: input