AEO Optima Docs
Features

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 TypeWhat It CoversHow Cost Is Calculated
SnapshotLLM API calls when capturing AI responsesToken count × model pricing (input + output)
AI AnalysisAutomated analysis runs (opportunity scoring, comprehensive)Token count × model pricing
SERPSearch engine results page captures via Serper or DataForSEOQuery count × per-query rate
EmailAlert notifications, weekly digests, scheduled reportsEmail count × per-email rate (~$0.0004)

Cost Formula

Each usage record stores:

  • prompt_tokens — tokens sent to the model
  • completion_tokens — tokens returned by the model
  • pricing_input — cost per million input tokens
  • pricing_output — cost per million output tokens

Cost calculation:

cost_input  = prompt_tokens × pricing_input / 1,000,000
cost_output = completion_tokens × pricing_output / 1,000,000
cost_total  = cost_input + cost_output

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 captures
  • ai_analyses_count — daily AI analysis runs
  • emails_sent_count — daily emails sent

These counters enforce plan quotas and are displayed in usage dashboards.

On this page