API Documentation

Build with Komilion

Integrate intelligent model orchestration into your applications with our simple, powerful API

Quick Start

Get started with Komilion API in under 2 minutes

1

Sign Up & Get API Key

Create your account and authenticate to receive your JWT token

2

Make Your First Request

Send a chat completion request and let our orchestrator select the best model

3

Start Saving

Monitor your savings and let Komilion optimize your AI costs automatically

Why Developers Love Our API

Simple Integration

RESTful API with clear endpoints. Works with any programming language or framework.

Secure & Reliable

JWT authentication, encrypted connections, and 99.9% uptime guarantee.

Pay As You Go

No monthly fees. Only pay for what you use with transparent pricing.

API Reference

Interactive code examples in your favorite language

Authentication

POST /api/auth • Authenticate and receive your JWT token

curl -X POST https://www.komilion.com/api/auth \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "password": "your_password"
  }'

Response

{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "user": {
    "id": "user_123",
    "email": "[email protected]"
  }
}

Chat Completions

POST /api/chat • Send messages and get AI responses with intelligent model routing

Request

curl -X POST https://www.komilion.com/api/chat \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "messages": [
      {"role": "user", "content": "Explain quantum computing"}
    ],
    "taskType": "general",
    "tier": "popular"
  }'

Parameters

messages
Array of message objects with role and content
taskType
Type of task: "coding", "analysis", "creative", "general"
tier
Model tier: "budget", "popular", "topTier"

Response

{
  "response": "Quantum computing is...",
  "selectedModel": "claude-3-5-sonnet-20241022",
  "reasoning": "Selected Claude 3.5 Sonnet for...",
  "cost": 0.045,
  "tier": "popular"
}

Model Recommendations

POST /api/recommend • Get AI-powered model recommendations for your task

Request

curl -X POST https://www.komilion.com/api/recommend \
  -H "Content-Type: application/json" \
  -d '{
    "taskType": "coding",
    "userRequest": "Build a web scraper"
  }'

Response

{
  "tier": "popular",
  "selectedModel": "gpt-4-turbo-2024-04-09",
  "reasoning": "Coding tasks benefit from...",
  "alternatives": []
}

File Upload

POST /api/upload • Upload files for multimodal AI analysis

Request

curl -X POST https://www.komilion.com/api/upload \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -F "[email protected]" \
  -F "userId=YOUR_USER_ID"

Response

{
  "id": "file_abc123",
  "fileName": "document.pdf",
  "fileSize": 2048576,
  "mimeType": "application/pdf",
  "cloudStoragePath": "uploads/1729785600000-document.pdf"
}

Rate Limits

Fair usage limits to ensure service quality for all users

60
Requests per minute
1000
Requests per hour
10MB
Max file upload size
CLI Features

Advanced CLI Capabilities

Powerful orchestration features for building with AI

Agent Mode

Natural language interface powered by Gemini 2.5 Pro. Chat conversationally and let the agent handle complex orchestration behind the scenes.

Conversational interface
Tool orchestration
Multimodal support

Parallel Execution

Run multiple AI agents simultaneously on independent tasks. Intelligent dependency analysis maximizes parallelism.

Dependency analysis
Real-time progress tracking
Dramatically reduced execution time

Babysitter Mode

Long-running tasks with minimal intervention. Automatic or manual step-by-step execution with cost/time warnings.

Manual & auto modes
Cost/time warnings
Pause/resume capabilities

Iteration Mode

Automatically iterate up to 3 times until specifications are met. Perfect for code generation and content creation.

Up to 3 iterations
Spec validation
Continuous improvement

Ready to Build?

Start integrating Komilion API into your applications today