RAG AI Chatbot Assistant Documentation
Complete API reference, integration examples, authentication guidelines, and response structures.
Overview
Enterprise-grade conversational AI assistant powered by Cylium 3.0. Features real-time RAG context synchronization, multi-turn session persistence, and SSE token streaming.
https://cbts.cyliumos.onlineAuthentication
Authenticate every HTTP request using the custom X-API-Key header:
Do not expose your private key in client-side applications. Proxy requests through your backend service or Edge Workers.
Code Examples
curl -X POST "https://cbts.cyliumos.online/api/v1/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: cyk_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
-d '{
"model": "cyliumos-chat-v2",
"messages": [
{ "role": "system", "content": "You are CyliumOS AI, an enterprise assistant." },
{ "role": "user", "content": "Explain how to secure API endpoints with rate limits." }
],
"temperature": 0.7,
"max_tokens": 1024
}'RAG AI Chatbot API
Fast, context-aware conversational AI assistant integrated with platform intelligence and multi-turn session persistence.
Authentication
Pass your universal API key in the X-API-Key header:
X-API-Key: cyk_live_...
Endpoint
POST /api/v1/chat
Request Headers
| Header | Type | Required | Description |
|---|---|---|---|
Content-Type | string | Yes | application/json |
X-API-Key | string | Yes | Universal API Key generated from dashboard |
Request Body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
message | string | Yes | The user question or query |
session_id | string | No | Existing session ID to resume conversation |
stream | boolean | No | Set true for Server-Sent Events streaming |
Response Schema (200 OK)
{
"success": true,
"session_id": "cs_9f83a2bc104de712",
"response": "CyliumOS provides an enterprise suite of AI microservices...",
"actions": [
{ "label": "Explore Services", "to": "/services" },
{ "label": "Pricing", "to": "/pricing" }
],
"is_authenticated": true,
"timestamp": 1726071405000
}
Code Examples
cURL (Synchronous)
curl -X POST "http://localhost:8002/api/v1/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: cyk_live_x9z0abcdef" \
-d '{
"message": "What AI services are available on CyliumOS?"
}'
cURL (Streaming SSE)
curl -N -X POST "http://localhost:8002/api/v1/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: cyk_live_x9z0abcdef" \
-d '{
"message": "Explain zero-retention privacy.",
"stream": true
}'
TypeScript / JavaScript
const res = await fetch("http://localhost:8002/api/v1/chat", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": "cyk_live_x9z0abcdef",
},
body: JSON.stringify({ message: "Hello AI!" }),
});
const data = await res.json();
console.log(data.response);
Error Codes
| Status | Error Code | Description |
|---|---|---|
| 400 | empty_message | Prompt string is empty |
| 401 | missing_api_key | X-API-Key header missing |
| 401 | invalid_api_key | API key does not exist |
| 403 | service_not_subscribed | User has not subscribed to chatbot |
| 404 | session_not_found | Specified session ID not found |
| 502 | llm_provider_error | Cylium 3.0 upstream AI failure |
Status & Error Responses
{
"detail": {
"success": false,
"error": "invalid_payload",
"message": "Invalid request payload"
}
}{
"detail": {
"success": false,
"error": "missing_api_key",
"message": "X-API-Key header is required"
}
}{
"detail": {
"success": false,
"error": "subscription_required",
"message": "An active subscription is required to access this service"
}
}{
"detail": {
"success": false,
"error": "api_key_expired",
"message": "API key has expired or is revoked"
}
}{
"detail": {
"success": false,
"error": "rate_limit_reached",
"message": "Monthly API request limit reached"
}
}{
"detail": {
"success": false,
"error": "internal_error",
"message": "Internal processing error"
}
}Sample Response
Example payload structure returned by this service.
{
"success": true,
"session_id": "cs_9f83a2bc104de712",
"response": "CyliumOS provides three high-performance AI microservices: NSFW Detection, RAG Chatbot, and Object Visibility Detection.",
"actions": [
{
"label": "View Pricing",
"to": "/pricing"
},
{
"label": "Explore Services",
"to": "/services"
}
],
"is_authenticated": true,
"timestamp": 1726071405000
}Head over to the playground to upload your own files and inspect live bounding boxes and classifications.
Open Playground