byrgi

Gateway & API keys

The gateway is LiteLLM, running next to the API on :4000. It is the only public way to call models.

Model names

A reconciler runs every 30 seconds (and right after deployments change) and registers each running model as <project>/<service>, or <project>/<env>/<service> outside production. Anything Byrgi registered that no longer runs is removed.

bash
curl http://localhost:4000/v1/chat/completions \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{"model":"demo/llm","messages":[{"role":"user","content":"Hello"}]}'

Any OpenAI SDK works: set base_url to the gateway and api_key to a project key.

API keys

Keys belong to a project and can only call that project's models. Raw keys are shown once; Byrgi and LiteLLM store the same SHA-256 hash.

bash
byrgi keys demo create backend --rpm 60 --tpm 100000
LimitEffect
Requests per minute429 when exceeded
Tokens per minute429 when exceeded
Parallel requests429 when exceeded
Budget + reset periodApplies to models with a configured cost; self-hosted models cost 0 by default
ExpiryKey stops working after this date

Usage

Spend logs are copied into Byrgi every minute, deduplicated by request id. Successful and failed requests (auth, rate limit, upstream errors) are counted separately and shown by day, model and key.

bash
byrgi usage --project demo