Activity Export
Download grouped usage reports from Activity
The TheRouter.ai billing surfaces support request-level and monthly exports, making finance and platform reporting straightforward without mixing purchase receipts and usage statements.
Overview
This page mirrors the OpenRouter workflow and adapts it for TheRouter.ai. Use TheRouter.ai as your OpenAI-compatible endpoint and keep model IDs in `provider/model` format.
Installation
Install the required SDKs and keep your TheRouter.ai key in environment variables.
install.sh
curl "https://api.therouter.ai/v1/customer/billing/usage-statement.csv?month=2026-03" -H "Authorization: Bearer $THEROUTER_API_KEY"Configuration
Set TheRouter.ai base URL overrides and pass your API key. Add attribution headers when your app should appear in rankings.
TypeScript
const csv = await fetch("https://api.therouter.ai/v1/customer/billing/usage-statement.csv?month=2026-03", {
headers: { Authorization: "Bearer <THEROUTER_API_KEY>" },
});Caveats
Integration note
Exports can include sensitive business metrics; store files in controlled buckets with short retention policies.
For production rollouts, pin SDK versions and validate model compatibility in staging before broad rollout.