Install
Sanvaya is alpha and not for production.
From PyPI
pip install --pre sanvaya
From source
To read or change the code, run it from source. You need Python 3.11 or later and uv.
git clone https://github.com/anilatambharii/sanvaya.git
cd sanvaya
uv sync
export OPENAI_API_KEY=placeholder # enough to start; a real key is needed to get answers
uv run sanvaya check --config examples/sanvaya.yaml
uv run sanvaya up --config examples/sanvaya.yaml
In PowerShell, set the variable with $env:OPENAI_API_KEY = "placeholder" instead of export. check does not contact a provider, so a placeholder passes it. A real call also needs a real model name in place of replace-with-a-model-name in the example, and a real key. up keeps running in that terminal until you stop it with Ctrl+C.
In another terminal:
curl http://127.0.0.1:8080/healthz
curl http://127.0.0.1:8080/v1/models
You should see {"status":"ok"} and a list with one model. In Windows PowerShell, type curl.exe (with the .exe), because plain curl there is a different command.
The example listens on this machine only, over plain HTTP.
After an upgrade
An exposure approval made in an earlier alpha is refused after an upgrade. Run sanvaya expose approve again.