All plans are🏷️30% OFFfor a limited time!www.cyliumos.online
CyliumOS
API DOCUMENTATION

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.

Endpoint
POST /api/v1/chat
· Base URL:https://cbts.cyliumos.online

Authentication

Authenticate every HTTP request using the custom X-API-Key header:

X-API-Key: cyk_live_xxxxxxxxxxxxxxxxxxxxxxxx

Do not expose your private key in client-side applications. Proxy requests through your backend service or Edge Workers.

Code Examples

Multi-Language SDKs
cURL — request
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:

Code Snippet
X-API-Key: cyk_live_...

Endpoint

POST /api/v1/chat

Request Headers

HeaderTypeRequiredDescription
Content-TypestringYesapplication/json
X-API-KeystringYesUniversal API Key generated from dashboard

Request Body (JSON)

FieldTypeRequiredDescription
messagestringYesThe user question or query
session_idstringNoExisting session ID to resume conversation
streambooleanNoSet true for Server-Sent Events streaming

Response Schema (200 OK)

Code Snippet
{
  "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)

Code Snippet
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)

Code Snippet
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

Code Snippet
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

StatusError CodeDescription
400empty_messagePrompt string is empty
401missing_api_keyX-API-Key header missing
401invalid_api_keyAPI key does not exist
403service_not_subscribedUser has not subscribed to chatbot
404session_not_foundSpecified session ID not found
502llm_provider_errorCylium 3.0 upstream AI failure

Status & Error Responses

400 Bad Request
Input payload is empty, missing, or malformed.
{
  "detail": {
    "success": false,
    "error": "invalid_payload",
    "message": "Invalid request payload"
  }
}
401 Unauthorized
The X-API-Key header is missing or the key is not recognised.
{
  "detail": {
    "success": false,
    "error": "missing_api_key",
    "message": "X-API-Key header is required"
  }
}
402 Payment Required
No active subscription for this service.
{
  "detail": {
    "success": false,
    "error": "subscription_required",
    "message": "An active subscription is required to access this service"
  }
}
403 Forbidden
The key was revoked or has expired.
{
  "detail": {
    "success": false,
    "error": "api_key_expired",
    "message": "API key has expired or is revoked"
  }
}
429 Too Many Requests
Monthly request quota or rate limit has been reached.
{
  "detail": {
    "success": false,
    "error": "rate_limit_reached",
    "message": "Monthly API request limit reached"
  }
}
500 Internal Error
Server error occurred while processing the request.
{
  "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
}
Ready to test?

Head over to the playground to upload your own files and inspect live bounding boxes and classifications.

Open Playground