OutDocAI
Query
POST
/query

Send a question and get an answer grounded in your uploaded documents, with sources.

Authorization

BearerAuth
headerAuthorizationBearer <token>

Pass your OutDocAI API key as Authorization: Bearer od_….

Request Body

application/json
  1. body
query*string

The question to ask.

conversation_id?string

Continue an existing conversation.

Formatuuid
document_ids?array<>

Optional document scope.

include_graph?boolean
Defaultfalse
top_k?integer

Response Body

Answer with sources

application/json
  1. response
answer?string
conversation_id?string
Formatuuid
sources?array<>
curl -X POST 'http://localhost:8000/api/v1/public/query' \  -H 'Content-Type: application/json' \  -d '{  "query": "What is the renewal date?",  "conversation_id": null,  "include_graph": false}'
{  "answer": "string",  "conversation_id": "cc71b11a-25cd-4c2d-9950-df2cc38e3407",  "sources": [    {      "document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6",      "filename": "string",      "page": 0,      "text": "string"    }  ]}