OpenAI-compatible proxy for Kilo free models.
cp .env.example .env
go run ./cmd/kilo-autoGET /v1/models: returns refreshed free models in OpenAI list format.POST /v1/responses: proxies requests tohttps://api.kilo.ai/api/gateway/v1/responses. IfAPI_KEYis set, this endpoint requiresAuthorization: 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.
curl http://127.0.0.1:8080/v1/modelscurl -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"}
]
}'