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.
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.
byrgi keys demo create backend --rpm 60 --tpm 100000
| Limit | Effect |
|---|---|
| Requests per minute | 429 when exceeded |
| Tokens per minute | 429 when exceeded |
| Parallel requests | 429 when exceeded |
| Budget + reset period | Applies to models with a configured cost; self-hosted models cost 0 by default |
| Expiry | Key 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.
byrgi usage --project demo