1. Install dependencies
Copy .env.example to .env and set real values:
OPENROUTER_API_KEY=your_openrouter_key_here
ASTROLABE_API_KEY=set_a_long_random_secret_here
PORT=3000
Optional OpenRouter headers:
OPENROUTER_SITE_URL=https://your-site.example
OPENROUTER_APP_NAME=Astrolabe
3. Start Astrolabe
Astrolabe listens on http://localhost:3000 by default.
4. Test the endpoint
curl -X POST http://localhost:3000/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your_astrolabe_api_key" \
-d '{"model":"ignored-by-astrolabe","messages":[{"role":"user","content":"Say hello in one line."}]}'
model is accepted for compatibility but Astrolabe overrides it with the selected tier model.