A fully OpenAI-compatible API proxy for Kilo.
- 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
pip install kilo-proxyOr install from source:
pip install -e .Set your Kilo authentication token:
kilo-proxy auth [token]If no token is provided, anonymous access is used by default.
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 the background server:
kilo-proxy stopRun 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)
Check the current server status:
kilo-proxy statusList all available models:
kilo-proxy modelsToggle 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 modelsRestart the proxy server:
kilo-proxy restartGenerate a new session ID to bypass rate limits:
kilo-proxy new-sessionView server logs:
kilo-proxy logs # Show last 100 lines
kilo-proxy logs --lines 50 # Show last 50 lines
kilo-proxy logs --errors # Show errors only
kilo-proxy logs --follow # Follow log outputStart the proxy and launch OpenCode:
kilo-proxy opencodeRotate your IP address to bypass rate limits! Load proxies from a URL or file, and the shuffler will automatically rotate your IP at a set interval.
# Enable/disable IP shuffling
kilo-proxy shuffle on
kilo-proxy shuffle off
# Add proxies manually
kilo-proxy shuffle add http://ip:port
kilo-proxy shuffle add socks5://ip:port
# Load proxies from URL or file (one per line, # for comments)
kilo-proxy shuffle load https://example.com/proxies.txt
kilo-proxy shuffle load ./proxies.txt
# List configured proxies
kilo-proxy shuffle list
# Set shuffle interval (minimum 60 seconds)
kilo-proxy shuffle interval 300
# Force immediate shuffle
kilo-proxy shuffle now
# Check all proxies (mark working/broken)
kilo-proxy shuffle check
kilo-proxy shuffle check --remove # Auto-remove broken proxies
# Fix/normalize proxy URLs
kilo-proxy shuffle fix
# View shuffler status
kilo-proxy shuffle statusInteractive configuration:
kilo-proxy config # Run configuration wizard
kilo-proxy config --show # Show current configInstall and configure OpenCode to use Kilo models:
kilo-proxy install opencodeThis interactive wizard will:
- Find or create your OpenCode config
- Ask if you're broke (free models only)
- Let you select models for all or per agent/category
- Optionally install Oh My OpenCode support
- Map Oh My OpenCode models to Kilo models
- Write the configuration files
Display the current configuration:
kilo-proxy config-showInstall the proxy to start automatically on system boot:
kilo-proxy autolaunchRemove the proxy from boot:
kilo-proxy unautolaunchWorks on Windows (Task Scheduler), macOS (LaunchAgents), and Linux (systemd user services).
| 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 |
curl http://localhost:5380/v1/modelscurl 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
}'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
}'| File | Location |
|---|---|
| Config file | ~/.kilo-proxy/config.json |
| PID file | ~/.kilo-proxy/server.pid |
Popular free models available through Kilo:
z-ai/glm-5:freeminimax/minimax-m2.5:freedeepseek/deepseek-chat:freemeta-llama/llama-3-8b-instruct:freeqwen/qwen-2-7b-instruct:free
Run kilo-proxy models to see all available models.
- Python 3.9+
MIT
- lousybook94 (notlousybook)
- GitHub: https://github.com/notlousybook/KiloProxy
- PyPI: https://pypi.org/project/kilo-proxy/
- Email: lousybook94@gmail.com
- Location: Pluto, the planet