Start a new chat session with a first question
POST
/ai/chats
const url = 'http://localhost:8000/api/v1/ai/chats';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"message":"How much did I spend last month?","title":"example","format_hint":"scalar"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8000/api/v1/ai/chats \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "message": "How much did I spend last month?", "title": "example", "format_hint": "scalar" }'Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
object
message
required
string
Example
How much did I spend last month? title
string
format_hint
string
Responses
Section titled “ Responses ”Session created and message queued