Skip to main content

Fully OpenAI-compatible API proxy for Kilo

Project description

Kilo Proxy

A fully OpenAI-compatible API proxy for Kilo.

Features

  • Full OpenAI API compatibility - chat completions, completions, embeddings, models
  • All OpenAI parameters supported - max_tokens, temperature, tools, stream, response_format, etc.
  • Streaming SSE support - real-time streaming responses
  • Background server mode - run as a daemon process
  • Token authentication management - easy auth configuration
  • Cross-platform - Windows, macOS, Linux

Installation

pip install -e .

Or install from source:

pip install .

CLI Commands

Authentication

Set your Kilo authentication token:

kilo-proxy auth [token]

If no token is provided, anonymous access is used by default.

Start Server (Background)

Start the server in background mode:

kilo-proxy start [--host HOST] [--port PORT]

Options:

  • --host - Host to bind to (default: 127.0.0.1)
  • --port - Port to listen on (default: 5380)

Stop Server

Stop the background server:

kilo-proxy stop

Run Server (Foreground)

Run the server in foreground mode:

kilo-proxy proxy [--host HOST] [--port PORT]

Options:

  • --host - Host to bind to (default: 127.0.0.1)
  • --port - Port to listen on (default: 5380)

Server Status

Check the current server status:

kilo-proxy status

List Models

List all available models:

kilo-proxy models

Broke Mode (Toggle Free Models)

Toggle broke mode (only show free models):

kilo-proxy broke          # Toggle broke mode
kilo-proxy broke on       # Enable broke mode
kilo-proxy broke off      # Disable broke mode
kilo-proxy broke --list   # List all free models

Configuration Wizard

Interactive configuration:

kilo-proxy config         # Run configuration wizard
kilo-proxy config --show  # Show current config

Install OpenCode Integration

Install and configure OpenCode to use Kilo models:

kilo-proxy install opencode

This interactive wizard will:

  1. Find or create your OpenCode config
  2. Ask if you're broke (free models only)
  3. Let you select models for all or per agent/category
  4. Optionally install Oh My OpenCode support
  5. Map Oh My OpenCode models to Kilo models
  6. Write the configuration files

Show Configuration

Display the current configuration:

kilo-proxy config-show

Autolaunch (Run on Boot)

Install the proxy to start automatically on system boot:

kilo-proxy autolaunch

Remove the proxy from boot:

kilo-proxy unautolaunch

Works on Windows (Task Scheduler), macOS (LaunchAgents), and Linux (systemd user services).

API Endpoints

Method Endpoint Description
GET /v1/models List all available models
GET /v1/models/{model_id} Get a specific model
POST /v1/chat/completions Create a chat completion
POST /v1/completions Create a text completion
POST /v1/embeddings Create embeddings
GET /v1/engines List engines (legacy)
GET /health Health check endpoint

Usage Examples

List Models

curl http://localhost:5380/v1/models

Chat Completion (Non-streaming)

curl http://localhost:5380/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "z-ai/glm-5:free",
    "messages": [
      {"role": "user", "content": "Hello, how are you?"}
    ],
    "max_tokens": 100,
    "temperature": 0.7
  }'

Chat Completion (Streaming)

curl http://localhost:5380/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "z-ai/glm-5:free",
    "messages": [
      {"role": "user", "content": "Tell me a short story"}
    ],
    "stream": true,
    "max_tokens": 500
  }'

Configuration

File Location
Config file ~/.kilo-proxy/config.json
PID file ~/.kilo-proxy/server.pid

Supported Models

Popular free models available through Kilo:

  • z-ai/glm-5:free
  • minimax/minimax-m2.5:free
  • deepseek/deepseek-chat:free
  • meta-llama/llama-3-8b-instruct:free
  • qwen/qwen-2-7b-instruct:free

Run kilo-proxy models to see all available models.

Requirements

  • Python 3.9+

License

MIT

Author

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kilo_proxy-1.0.0.tar.gz (17.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kilo_proxy-1.0.0-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

Details for the file kilo_proxy-1.0.0.tar.gz.

File metadata

  • Download URL: kilo_proxy-1.0.0.tar.gz
  • Upload date:
  • Size: 17.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for kilo_proxy-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f150902e580980d73fde5560e378e29680abdf9b14d505be9d5974ae1bca5412
MD5 d169f7f4ab2b8d93e4bb0648104b789f
BLAKE2b-256 8e2f90930ce928829d68a14177be0ac22ebee9d6681c81b06a728eae53a94552

See more details on using hashes here.

File details

Details for the file kilo_proxy-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: kilo_proxy-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 17.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for kilo_proxy-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c059a31a161ceac1a802d4571d6bb257bd46f60a9b455b9b22a06fc28e874c16
MD5 0b6fbec90dc53c0c67c59fd3854efa28
BLAKE2b-256 02f12121edaacc0a588c476c13ac23ea3b2883866a7162ac45cb5066090dc680

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page