Production-Ready Universal AI Gateway • BYOK Infrastructure

One OpenAI-Compatible Endpoint. All Upstream AI Providers.

Connect your KiosAPI, OpenAI, or custom AI credentials. CrystalAPI handles secure encryption, rate limiting, and unified routing without marking up inference fees.

CrystalAPI Gateway Flow Architecture
BYOK Mode: Active

Your Application

Cursor, Cline, Roo Code, Python, Node.js OpenAI SDK

Authorization: Bearer gw_live_...
Unified Gateway

CrystalAPI Gateway

  • AES-256 Key Decryption
  • Token & Rate Limiting
  • Namespaced Routing
  • Transparent SSE Stream

Upstream Providers

Direct Inference Execution

KiosAPI (GPT, Claude, Gemini)OpenAI / Custom Endpoints

Built for High Performance & Complete Privacy

Deploy on your Tokoserver VPS with Docker Compose in minutes.

Bring Your Own Key (BYOK)

Your keys remain yours. Upstream API keys are encrypted at rest with AES-256-GCM. CrystalAPI never bills you for inference.

Zero-Overhead Streaming

Transparent SSE proxying with sub-millisecond gateway latency. Supports AbortSignal propagation when clients disconnect.

KiosAPI First-Class Adapter

Connect your KiosAPI token (`sk-kilo-...`) to route between GPT-4o, Claude 3.5 Sonnet, Gemini 2.0 Flash, and DeepSeek.

Developer Friendly Integration

Works seamlessly with standard tools, IDEs, and SDKs.

import OpenAI from "openai";

// Point standard OpenAI SDK to CrystalAPI gateway
const client = new OpenAI({
  apiKey: "gw_live_xxxxxxxxxxxxxxxxxxxxxxxx",
  baseURL: "http://localhost:4000/v1"
});

const stream = await client.chat.completions.create({
  model: "kiosapi/gpt-4o", // Namespaced provider model
  messages: [{ role: "user", content: "Explain quantum computing in simple terms." }],
  stream: true,
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content || "");
}