Document Q&A API
Compare Indices with Pyq AI
This endpoint answers comparative questions using 2 indexes.
POST
/
compare-indices
Body Parameters
account_id
int
requiredThis is your account ID.
input_sequence
string
requiredThis is the query you wish to answer using documents from the given index.
index_name_1
string
requiredThis is the first index you want to consider.
index_name_2
string
requiredThis is the second index you want to consider.
model
string
This is an optional parameter specifying if you would like to use Anthropic’s Claude instead of our default. The value “claude” will result in using that for your query.
Headers
Authorization
string
requiredThis is your API token associated with your account.
Response
answer
string
Pyq AI’s response to your query.
sources
list
List of sources consulted to get answer.
source_documents
list
Most relevant sections from the sources consulted to get the answer.