Cost Tracking
Understand how AEO Optima tracks costs across LLM snapshots, AI analysis, SERP captures, and email — with per-user attribution and daily trends.
Overview
AEO Optima automatically tracks costs across all billable operations. Every LLM API call, SERP capture, AI analysis run, and email send is recorded with precise token counts and pricing. Costs are computed in real-time using per-model pricing from the dynamic model registry.
What Is Tracked
| Source Type | What It Covers | How Cost Is Calculated |
|---|---|---|
| Snapshot | LLM API calls when capturing AI responses | Token count × model pricing (input + output) |
| AI Analysis | Automated analysis runs (opportunity scoring, comprehensive) | Token count × model pricing |
| SERP | Search engine results page captures via Serper or DataForSEO | Query count × per-query rate |
| Alert notifications, weekly digests, scheduled reports | Email count × per-email rate (~$0.0004) |
Cost Formula
Each usage record stores:
prompt_tokens— tokens sent to the modelcompletion_tokens— tokens returned by the modelpricing_input— cost per million input tokenspricing_output— cost per million output tokens
Cost calculation:
These are PostgreSQL generated columns — they update automatically when pricing or token values change.
Where to See Costs
- Dashboard → Usage — Your project-level cost breakdown with daily usage charts.
Per-User Attribution
When a user manually triggers a snapshot or SERP capture, their user_id is attached to the usage record. This enables per-user cost tracking inside your organization.
Background operations (worker, cron jobs, MCP) record user_id: null since there's no user session context.
Model Pricing
Pricing data comes from the model registry, which syncs daily with provider rates. This means cost calculations automatically reflect the latest pricing without manual updates.
Supported providers include OpenAI, Anthropic, Google, Perplexity, DeepSeek, Meta, Mistral, Cohere, and more — all via OpenRouter.
Daily Usage Counters
In addition to cost tracking, AEO Optima maintains daily counters per organization:
snapshots_count— daily snapshot capturesai_analyses_count— daily AI analysis runsemails_sent_count— daily emails sent
These counters enforce plan quotas and are displayed in usage dashboards.