OpenRouter
OpenRouter usage is imported from the Activity API and attributed to organization members by email.
-
Create a management key for your OpenRouter organization
-
Set the environment variable:
Terminal window OPENROUTER_MANAGEMENT_KEY=sk-or-v1-... -
Optionally, limit the import to specific workspaces by ID or slug (comma-separated):
Terminal window OPENROUTER_WORKSPACES=engineeringLeave it unset to import activity from all workspaces.
Sync Behavior
Section titled “Sync Behavior”| Setting | Value |
|---|---|
| Schedule | Every 6 hours |
| Data | Daily token counts, model, member email, cost (including BYOK) |
| History | Last 30 days (OpenRouter’s activity retention) |
The first sync imports the full 30-day window. Later syncs re-import from the day before the last sync through today, so partial days are completed on the next run.
When workspaces are configured, only members of those workspaces are imported and records are tagged with the workspace (openrouter:<workspace-id>).
Manual Sync
Section titled “Manual Sync”pnpm cli sync openrouter --days 30