An AI API proxy with budget control. Currently supports:
Clone the repository and install dependencies:
pip install -r requirements.txtSet the OPENAI_ADMIN_KEY environment variable with your OpenAI Admin key (read-only).
Edit settings.yaml to configure other settings.
python main.pyConfigure your API base URL to http://localhost:8080/pro or http://localhost:8080/mini instead of https://api.openai.com/v1.
When token usage exceeds the threshold, the proxy will block further requests.
Note: There is latency in the OpenAI usage API, so usage tracking may not always be accurate.