Developer API

Build powerful AI-powered applications using the KelionAI API. Generate API keys, explore docs, and test endpoints in the sandbox.

πŸš€ Quick Start

Send your first API request in seconds:

curl -X POST https://kelionai.app/api/v1/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{"message":"Hello, KelionAI!"}'

πŸ“‹ Base URL & Auth

All API requests must include your API key in the X-API-Key header.

Base URL:  https://kelionai.app/api/v1
Auth:      X-API-Key: kel_xxxxxxxxxxxx

πŸ”‘ API Keys

πŸ”‘

No API keys yet. Generate one above.

πŸ“š API Reference

Click an endpoint to expand details and examples.

GET /api/v1/status API status and available endpoints Public β–Ό

Returns the current API status and a list of all available endpoints. No authentication required.

{
  "status": "online",
  "version": "1.0",
  "timestamp": "2026-02-26T12:00:00Z",
  "endpoints": [...]
}
GET /api/v1/models List available AI models API Key β–Ό

Returns the list of AI models currently available on this instance.

{
  "models": [
    { "id": "claude-sonnet-4", "name": "Claude Sonnet 4", "provider": "Anthropic", "primary": true }
  ]
}
GET /api/v1/user/profile Get authenticated user profile API Key β–Ό

Returns the profile of the user associated with the API key.

{
  "id": "uuid",
  "email": "user@example.com",
  "name": "User Name",
  "createdAt": "2026-01-01T00:00:00Z"
}
POST /api/v1/chat Send message, receive AI response API Key β–Ό

Send a message to the AI and receive a response. Supports conversation history and avatar selection.

FieldTypeDescription
messagestringRequired. The message to send (max 10 000 chars)
avatarstringOptional. kelion (default) or kira
languagestringOptional. Response language code (default en)
historyarrayOptional. Previous messages [{role, content}] max 20
// Request
{
  "message": "What is the capital of France?",
  "avatar": "kelion",
  "language": "en"
}

// Response
{
  "reply": "The capital of France is Paris.",
  "avatar": "kelion",
  "language": "en",
  "toolsUsed": []
}

πŸ”’ Rate Limits

Each API key is limited to 100 requests/hour by default. The limit resets every hour.

HTTP 429 Too Many Requests
{ "error": "Rate limit exceeded. Max 100 requests/hour." }

❌ Error Codes

CodeMeaning
400Bad request β€” missing or invalid fields
401Unauthorized β€” missing or invalid API key
429Rate limit exceeded
503Service unavailable β€” AI or DB offline
500Internal server error

πŸ§ͺ API Sandbox

Test API endpoints directly in your browser. Your API key is injected automatically when you're signed in.

πŸ”” Webhooks

Configure a URL to receive POST notifications when events happen (e.g. chat response generated).

Leave empty to remove the webhook. KelionAI will send a POST request with a JSON payload to your URL.

πŸ“¦ Payload Format

{
  "event": "chat.response",
  "timestamp": "2026-02-26T12:00:00Z",
  "data": {
    "message": "User message",
    "reply": "AI response",
    "avatar": "kelion",
    "language": "en"
  }
}

Revoke API Key?

This key will be permanently revoked and can no longer be used. This action cannot be undone.