Skip to main content
POST
/
api
/
v2
/
chat
/
document-search
curl --request POST \
--url https://paradigm.lighton.ai/api/v2/chat/document-search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"query": "How to implement authentication?"
}'
{
  "chat_session_id": 123,
  "answer": "<string>",
  "user_instructions": "<string>",
  "chat_settings": {
    "company": "<string>",
    "instruction": "<string>"
  },
  "model": "<string>",
  "documents": [
    {
      "id": 123,
      "name": "<string>",
      "document_extracts": [
        {
          "id": 123,
          "text": "<string>",
          "metadata": {
            "ID": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "pages": "<string>",
            "total_pages": "<string>"
          }
        }
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer token authentication

Body

Request serializer for document search endpoint.

query
string
required

Search query to find relevant documents

tool
enum<string>
default:DocumentSearch
Available options:
DocumentSearch,
VisionDocumentSearch
private
boolean
default:false

Private search flag

company_scope
boolean
default:false

Include documents from company scope

private_scope
boolean
default:false

Include documents from private scope

workspace_ids
integer[]

List of workspace IDs whose documents will be added to scope

file_ids
integer[]

List of document IDs that will be added to scope

model
string
default:alfred-4.2

Model to use for document search

chat_session_id
integer | null

ID of the chat session for context

Response

Search results

Response serializer for document search results.

chat_session_id
integer
required
answer
string
required
user_instructions
string
required
chat_settings
object
required

Response serializer for light chat settings.

model
string
required
documents
object[]
required
I