# OpenRouter + PostHog AI Examples Track OpenRouter API calls with PostHog via the OpenAI-compatible API. ## Setup ```bash pnpm install cp .env.example .env # Fill in your API keys in .env ``` ## Examples - **chat.ts** - Chat completions via OpenRouter ## Run ```bash source .env npx tsx chat.ts ```