forked from router-for-me/CLIProxyAPI
-
-
Notifications
You must be signed in to change notification settings - Fork 188
Open
Description
Summary
Add support for Kilo API (https://api.kilo.ai) which provides access to multiple free models including z-ai/glm-4.7:free.
Background
Kilo API is an OpenRouter-compatible API that can be used directly without the CLI. It provides free access to multiple models.
Quick Test
# List models
curl https://api.kilo.ai/api/openrouter/models
# Chat completion with free model
curl -X POST https://api.kilo.ai/api/openrouter/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer anonymous" \
-H "User-Agent: kilo/1.0.14" \
-d '{
"model": "z-ai/glm-4.7:free",
"messages": [{"role": "user", "content": "Hello"}],
"max_tokens": 100
}'Available Free Models
minimax/minimax-m2.1:freez-ai/glm-4.7:freearcee-ai/trinity-large-preview:freeopenrouter/freestepfun/step-3.5-flash:free
API Details
- Base URL:
https://api.kilo.ai/api/openrouter - Format: OpenAI/OpenRouter compatible
- Authentication:
Authorization: Bearer anonymous(for free access) or valid token - Headers Required:
User-Agent: kilo/1.0.14(or similar)Content-Type: application/json
Feature Request
1. Add Kilo Provider to CLIProxyAPI
provider: kilo
baseURL: https://api.kilo.ai/api/openrouter
apiKey: anonymous
format: openai-compatible2. Model Discovery
- GET
/v1/models→ Proxy tohttps://api.kilo.ai/api/openrouter/models
3. Chat Completions
- POST
/v1/chat/completions→ Proxy to Kilo API - Add required headers
Implementation Example
// In CLIProxyAPI provider registry
type KiloProvider struct {
baseURL string
apiKey string
}
func (k *KiloProvider) ListModels() ([]Model, error) {
resp, err := http.Get(k.baseURL + "/models")
// ...
}
func (k *KiloProvider) ChatCompletion(req ChatRequest) (*ChatResponse, error) {
headers := map[string]string{
"Authorization": "Bearer " + k.apiKey,
"User-Agent": "cli-proxy-api/1.0",
"Content-Type": "application/json",
}
// ...
}Priority
High - Direct API access confirmed working with free models
Additional Resources
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels