Time to First Request: 5 Minutes
Follow this playbook to deploy your AI Reliability Layer locally. You will route your first request, trigger a failover, and view the AI-native telemetry in under 5 minutes.
1Deploy the Core Engine & Generate API Key
Selixes is containerized for zero-friction local development. Run the core engine (Control Plane + Data Plane) on your local machine:
docker run -d -p 4000:4000 --name selixes-core selixes/core:latestNext, generate your first API key to authenticate requests. Run this CLI command inside the container:
docker exec -it selixes-core selixes-cli generate-key*(Save this key, you will need it in the next step).*
22-Line SDK Drop-in
Selixes is fully compatible with the standard OpenAI SDK. Swap the `baseURL` and `apiKey` to point your existing application to the local reliability layer:
import OpenAI from 'openai';
// Selixes integration takes exactly 2 lines:
const openai = new OpenAI({
apiKey: process.env.SELIXES_API_KEY, // 1. Secure reliability key
baseURL: 'http://localhost:4000/v1' // 2. Swapped base URL
});3Dispatch Your First Reliable Request
Pass transaction cost caps, timeout limits, and semantic caching directives directly through standard HTTP request headers:
const response = await openai.chat.completions.create({
model: 'gpt-4o',
messages: [{ role: 'user', content: 'Extract details from CSV invoices' }],
headers: {
'x-selixes-session-id': 'session_crm_batch_02',
'x-selixes-max-session-cost': '0.15', // Autonomous block if spend exceeds $0.15
'x-selixes-semantic-cache': 'true', // Serve from vector DB if similar prompt exists
'x-selixes-timeout': '5000' // Instantly failover to Anthropic if OpenAI takes > 5s
}
});4Access the AI-Native Telemetry
Selixes doesn't just log requests; it tells you *why* routing decisions were made. Start the companion dashboard:
docker run -d -p 3000:3000 --name selixes-dashboard --link selixes-core selixes/dashboard:latestNavigate to http://localhost:3000 to review active transactions, inspect provider failover rationales, and audit token economics.
*(Note: For staging or production deployments, use our `docker-compose.yml` to orchestrate both services and Redis simultaneously).*
Next Up: Primitives & Routing
Learn how autonomic failovers and local Ollama continuity backups operate under the hood.