Add /usage endpoint with token tracking, live balances, and cost calculations
This commit is contained in:
@@ -5,8 +5,9 @@ Anthropic-compatible proxy that routes AI requests to multiple providers based o
|
||||
|
||||
## File Structure
|
||||
- `proxy.mjs` - Main proxy server (zero dependencies, Node.js built-ins only)
|
||||
- `config.json` - API keys and auth token (gitignored)
|
||||
- `config.json` - API keys, auth token, and pricing (gitignored)
|
||||
- `config.example.json` - Template config
|
||||
- `usage-data.json` - Token usage tracking, auto-generated and gitignored
|
||||
- `ein-ai-proxy.service` - Systemd unit file
|
||||
- `deploy.sh` - Deployment and testing script
|
||||
- `sync-context.sh` - Syncs global context to Claude Code and Roo Code
|
||||
@@ -14,6 +15,7 @@ Anthropic-compatible proxy that routes AI requests to multiple providers based o
|
||||
## Development
|
||||
Run locally: `node proxy.mjs` (requires `config.json`)
|
||||
Test health endpoint: `curl http://localhost:3100/health`
|
||||
Check usage: `curl http://localhost:3100/usage`
|
||||
Zero npm dependencies — do not add any.
|
||||
|
||||
## Deployment
|
||||
|
||||
Reference in New Issue
Block a user