Skip to main content

Send a chat message

POST /api/chat Send a message to the AI assistant and receive a response.

Request

{
  "message": "What is Olis?",
  "sessionId": "uuid-string",
  "context": []
}

Parameters

message
string
required
The user’s message or query
sessionId
string
required
Unique session identifier for conversation continuity
context
array
Optional array of previous messages for context

Response

{
  "response": "Olis is an AI-powered assistant...",
  "sources": ["doc1.pdf", "doc2.md"],
  "confidence": 0.95,
  "sessionId": "uuid-string"
}

Example

curl -X POST http://localhost:8000/api/chat \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "message": "What is Olis?",
    "sessionId": "test-session"
  }'