main
- Add Pulse Analytics script tag to root layout (data-domain=llm.xmr.network) - Add server-side tracking for successful API calls (chat completions, completions, embeddings) via /api/track/server endpoint - Add lib/pulse.ts tracking utility (fire-and-forget)
LLM Proxy API
OpenAI-compatible gateway with user auth, API key management, usage analytics, and admin controls.
Quick Start
- Install dependencies:
npm install
- Create env file:
cp .env.example .env
- Run services (MongoDB + Redis), then seed:
npm run db:seed
- Start app:
npm run dev
App runs at http://localhost:3000.
API Documentation
Use the full interactive docs at:
http://localhost:3000/docs
Inside /docs you get:
- Multi-page API reference and auth guide
- Endpoint docs for:
GET /v1/modelsPOST /v1/chat/completionsPOST /v1/completionsPOST /v1/embeddings
- Live endpoint testing with:
- Account key dropdown when logged in
- Manual API key input when logged out
- Claude Code setup guide and troubleshooting
API Key Setup
- Register at
/register - Login and open
/dashboard/api-keys - Create a key and copy it (shown once)
- Use it in requests:
Authorization: Bearer lp_...
Claude Code Quick Example
claude \
--model gpt-4.1-mini \
--openai-api-base http://localhost:3000/v1 \
--openai-api-key "$LLM_PROXY_API_KEY"
Languages
TypeScript
98.2%
Shell
1.1%
CSS
0.3%
JavaScript
0.3%