Chat API
The Chat API lets you interact with Ketivee's conversational AI models. Use it to send and receive messages in real time.
Overview
The Chat API provides a RESTful interface to Ketivee's conversational models. Authenticate using your API key.
Endpoint
POST https://api.ketivee.com/v1/chat
Request
{
"message": "Hello, Ketivee!",
"session_id": "your-session-id"
}
Response
{
"data": {
"reply": "Hello! How can I help you today?",
"session_id": "your-session-id"
}
}
Example
fetch('https://api.ketivee.com/v1/chat', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
message: 'Hello, Ketivee!',
session_id: 'test-session-1'
})
})
.then(res => res.json())
.then(console.log);