Build with Komilion
Integrate intelligent model orchestration, tool execution, and voice capabilities into your apps.
API Base URL
Important: Use the correct endpoint for all API requests
https://www.komilion.com/apiThis base URL is OpenAI SDK compatible. Your client will call/chat/completions automatically.
Recommended endpoints:
POST /chat/completions- OpenAI-compatible Chat Completions (recommended)POST /chat- Legacy chat endpoint (Komilion flat JSON)POST /neo/tasks- Agent Harness ("Babysitter Mode") tasksPOST /voice/realtime- Realtime Voice (WebSocket config)POST /deepgram/stt- Speech-to-textPOST /deepgram/tts- Text-to-speech
Policy (Cost/Quality)
Choose your driving style via policy or by using neo-mode/<policy>
Frugal
Minimize cost, keep acceptable quality. Great default for high-volume workloads.
Balanced Mode (Default)
Best value for most apps. Good quality with strong cost control.
Premium
Quality-first. Prefer top models + extra verification where applicable.
Use: model: "neo-mode/frugal" | "neo-mode/balanced" | "neo-mode/premium"
Quick Start
Get started with Komilion API in under 2 minutes
Sign Up & Get API Key
Create your account at komilion.com/auth/signup, then go to Dashboard → API Keys to generate your sk-komilion-... key
Make Your First Request
Send a chat completion request and let our orchestrator select the best model
Start Saving
Monitor your savings and let Komilion optimize your AI costs automatically
New Capabilities
Tool Execution
Agents can run Python code, search the web, and generate images.
Realtime Voice ⭐
Bidirectional speech-to-speech with GPT. Sub-300ms latency.
Speech-to-Text
Transcribe audio files with Deepgram Nova-2.
Text-to-Speech
Convert text to speech with Aura models.
API Reference
Interactive code examples in your favorite language
Authentication
Use your API key from Dashboard → API Keys as a Bearer token
# Using your API key (recommended)
curl -X POST https://www.komilion.com/api/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-komilion-YOUR_API_KEY" \
-d '{
"model": "neo-mode",
"messages": [{"role": "user", "content": "Hello!"}]
}'How to get your API key:
- Sign up at komilion.com/auth/signup
- Go to Dashboard → API Keys
- Click "Generate New Key"
- Copy your
sk-komilion-...key
Neo Mode (Autopilot)
POST /api/chat/completions • One API call that routes to direct chat, tool-using workflows, or long-running harness jobs
Request
# Neo Mode (Autopilot) — Komilion decides workflow + best execution model(s)
curl -X POST https://www.komilion.com/api/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-komilion-YOUR_API_KEY" \
-d '{
"model": "neo-mode/balanced",
"messages": [
{"role": "user", "content": "Search + summarize the latest advancements in fusion energy. Include sources."}
],
"taskHint": "reasoning"
}'Parameters
neo-mode (or neo-mode/premium) to let Komilion route intelligently"writing" | "code-generation" | "reasoning" | "vision"Speech-to-Text
POST /api/deepgram/stt • Transcribe audio files or URLs
Request
curl -X POST https://www.komilion.com/api/deepgram/stt \
-H "Authorization: Bearer sk-komilion-YOUR_API_KEY" \
-F "audio=@voice_memo.m4a"Text-to-Speech
POST /api/deepgram/tts • Convert text to lifelike audio
Request
curl -X POST https://www.komilion.com/api/deepgram/tts \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-komilion-YOUR_API_KEY" \
-d '{
"text": "Hello, I am your AI assistant.",
"model": "aura-asteria-en"
}' --output response.wavRealtime Voice (NEW)
POST /api/voice/realtime • Bidirectional speech-to-speech conversations via WebSocket
🎤 Talk to AI in real-time!
- Sub-300ms latency
- Natural conversation flow
- Automatic voice activity detection
- Function calling support
Policies (just pick one!)
Voices
alloy •ash •ballad •coral •echo •sage •shimmer •verse
Implementation
# 1. Get WebSocket configuration (just pick a policy!)
curl -X POST https://www.komilion.com/api/voice/realtime \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-komilion-YOUR_API_KEY" \
-d '{
"policy": "premium",
"voice": "alloy"
}'
# Policies:
# "premium" - Best quality (~$0.15/min)
# "balanced" - Good quality, cheaper (~$0.04/min) [DEFAULT]
# "frugal" - Basic, cheapest (~$0.01/min)
# 2. Connect to WebSocket URL from response
# 3. Send: {"type": "session.update", "session": <sessionConfig>}
# 4. Stream audio as: {"type": "input_audio_buffer.append", "audio": "<base64>"}Audio Format:
- 24kHz sample rate, mono, PCM16
- Base64 encoded when sending/receiving
