Skip to content

XxxXTeam/kilo_auto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kilo-auto

OpenAI-compatible proxy for Kilo free models.

Run

cp .env.example .env
go run ./cmd/kilo-auto

Endpoints

  • GET /v1/models: returns refreshed free models in OpenAI list format.
  • POST /v1/responses: proxies requests to https://api.kilo.ai/api/gateway/v1/responses. If API_KEY is set, this endpoint requires Authorization: Bearer <API_KEY>.
  • POST /v1/chat/completions: accepts OpenAI Chat Completions requests and converts them to Kilo Responses requests. Supports normal JSON responses and streaming SSE.
  • GET /healthz: reports refresh status.

Example

curl http://127.0.0.1:8080/v1/models
curl -X POST http://127.0.0.1:8080/v1/responses \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your-local-api-key" \
  -d '{
    "model": "x-ai/grok-code-fast-1:optimized:free",
    "input": "hello"
  }'

Streaming is passed through as server-sent events when upstream returns text/event-stream.

Chat Completions:

curl -X POST http://127.0.0.1:8080/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your-local-api-key" \
  -d '{
    "model": "x-ai/grok-code-fast-1:optimized:free",
    "messages": [
      {"role": "user", "content": "hello"}
    ]
  }'

Streaming Chat Completions:

curl -N -X POST http://127.0.0.1:8080/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your-local-api-key" \
  -d '{
    "model": "x-ai/grok-code-fast-1:optimized:free",
    "stream": true,
    "messages": [
      {"role": "user", "content": "hello"}
    ]
  }'

About

自动获取 kilo.ai 的免费模型并兼容格式

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages