Reconcile AI costs with confidence

Match token usage and estimated costs from Request Logs to your actual provider invoices and verify pricing accuracy.

Overview

Billing reconciliation is the process of matching the AI usage recorded in ModelRiver's Request Logs with the actual charges on your provider invoices. This helps you verify pricing accuracy, identify discrepancies, and maintain financial accountability.

Important: The costs shown in ModelRiver Request Logs are estimated costs based on the tokens sent and received, calculated using your configured model pricing. For the most accurate and authoritative cost data, always refer to the billing dashboards and invoices from your specific AI providers (e.g., OpenAI, Anthropic, Google, etc.).


Understanding billing data in Request Logs

What ModelRiver tracks

For each request, ModelRiver records:

  • Prompt tokens (input tokens) – Tokens in your request to the provider
  • Completion tokens (output tokens) – Tokens in the provider's response
  • Total tokens – Sum of prompt and completion tokens
  • Estimated price – Calculated from token counts and your configured model pricing

What ModelRiver does NOT track

  • Actual provider charges – These come from the provider's billing system
  • Volume discounts – Provider-level discounts are not reflected in per-request estimates
  • Cached token credits – Some providers discount cached or repeated tokens
  • Platform fees – Any fees beyond per-token pricing

Reconciliation workflow

Step 1: Gather your data

  1. From ModelRiver: Navigate to Request Logs, filter to the billing period, and aggregate:

    • Total requests by provider and model
    • Total prompt tokens by provider and model
    • Total completion tokens by provider and model
    • Sum of estimated prices
  2. From your provider: Access your provider's billing dashboard or API usage page:

Step 2: Compare token counts

Match the total tokens recorded in ModelRiver against the provider's reported usage:

MetricModelRiverProviderDifference
Prompt tokensYour dataProvider dataShould be close
Completion tokensYour dataProvider dataShould be close
Total tokensYour dataProvider dataShould be close

Expected variance: Token counts should match closely. Small differences (< 1%) may occur due to:

  • Timing differences at the boundary of billing periods
  • Internal provider processing tokens not visible to the API
  • Rounding differences in token counting

Step 3: Compare costs

Match estimated costs against actual charges:

  • ModelRiver estimate – Sum of estimated prices from Request Logs
  • Provider invoice – Actual charge from the provider

Expected variance: Cost estimates may differ by 5-15% from actual charges due to:

  • Price updates not yet reflected in your model definitions
  • Volume discounts applied by the provider
  • Cached token credits
  • Currency conversion or tax adjustments
  • Free tier credits or promotional pricing

Step 4: Investigate discrepancies

If token counts or costs differ significantly:

  1. Check model pricing – Verify your ModelRiver model definitions have current pricing
  2. Check for external usage – Are provider API keys used outside of ModelRiver?
  3. Check for failed requests – Some providers charge for tokens on failed requests
  4. Check billing period boundaries – Ensure you're comparing the same time period
  5. Check for playground/test usage – These may or may not appear on provider invoices depending on whether test mode is used

Keeping pricing up to date

Why pricing accuracy matters

ModelRiver's estimated costs are only as accurate as your model pricing definitions. Providers regularly update their pricing, so it's important to keep your definitions current.

How to update pricing

  1. Check your provider's pricing page for current rates
  2. Update model pricing in your ModelRiver model definitions
  3. Note that pricing updates only affect future requests — historical estimates remain unchanged

Common pricing changes to watch for

  • New model launches – New models may have different pricing than predecessors
  • Price reductions – Providers frequently lower prices as models mature
  • Pricing structure changes – Providers may change from per-token to per-request pricing or introduce tiered pricing
  • Input/output price ratio changes – The relative cost of input vs. output tokens may shift

Best practices

Monthly reconciliation

  • Reconcile at least monthly to catch discrepancies early
  • Keep a record of reconciliation results for audit purposes
  • Update model pricing after each reconciliation

Track usage by API key

  • If multiple teams or projects share a provider account, track usage by project
  • ModelRiver's project-scoped API keys make this easier
  • Match per-project usage against the provider's per-key reporting (if available)

Separate test from production

  • Always filter to Live mode when reconciling against provider invoices
  • Test mode requests that don't reach the provider won't appear on invoices
  • Playground requests that do reach the provider will appear on invoices

Next steps