Skip to main content

Credit Analytics

The Credit Analytics tab provides tools for managing the platform's credit economy. It is organized into two sub-tabs: User Credits for viewing and adjusting individual user credit balances, and Margins for reviewing revenue-versus-cost analytics. The model price catalog that both read is managed in Models > Prices.

User Credits Manager​

Search and Sorting​

A filter card at the top provides the following controls:

ControlDescription
Search usersFilter users by name or email address.
Sort by CreditsSort users by credit balance: Highest First or Lowest First.
RefreshReloads the user list from the server.

User Table​

The user table displays the following columns:

ColumnDescription
UserThe user's full name and email address.
CreditsThe user's current credit balance, formatted with locale-appropriate separators.
Last LoginThe date of the user's most recent login, or "Never" if they have not logged in.
StatusStatus chips showing Active/Inactive state and an "Admin" badge for admin users.
CreatedThe date the user account was created.
ActionsView Profile and Credits adjustment buttons.

Actions​

Each user row provides two actions:

ActionDescription
View ProfileOpens the admin profile viewer for the user.
CreditsOpens the credit adjustment modal for the user.

Credit Adjustment Modal​

The credit adjustment modal allows administrators to add or remove credits from a user's balance:

FieldDescription
UserDisplays the selected user's name or email (read-only).
Current BalanceShows the user's current credit count (read-only).
AmountThe number of credits to add or remove. Minimum value is 10, with increments of 10. Default is 100.
NoteAn optional text field for documenting the reason for the adjustment (e.g., "Promotional bonus", "Compensation for issue").

Two action buttons are provided:

  • Add Credits (green) - Adds the specified amount to the user's balance.
  • Remove Credits (red) - Subtracts the specified amount from the user's balance.

Pagination​

Pagination controls appear above and below the user table:

  • Previous / Next buttons for page navigation
  • Page indicator showing "Page X of Y"
  • Items per page selector with options: 10, 20, 50, or 100 per page
  • Total Users count

Margins​

The Margins sub-tab reports revenue versus provider cost over the last 30 days, with a header chip showing the current pricing target (credits charged per $1 of provider cost). A refresh button reloads all four views:

ViewDescription
By model by dayDaily credits charged, provider cost, and effective margin per model.
By user (worst margin first)Per-user margin over the window, sorted so underpriced usage surfaces first.
Monthly COGS by providerMonth-by-month provider cost totals with invoice reconciliation (below).
Settlement basisHow usage was priced: provider-reported token counts versus the local estimate fallback, with average token deltas as an estimate-quality signal.

Margin chips are banded against the target: green within 2% of it, yellow between break-even and 20% above target (usually usage charged under older pricing), and red below break-even or more than 20% above target. Red-below means the platform lost money on that usage; red-above means it was charged well over current pricing.

Invoice reconciliation​

Each closed month-by-provider row accepts the provider's actual invoice total (with a required note naming the invoice and its billing period). The table then shows the delta between the invoice and recorded cost, and a status chip:

ChipMeaning
matchDelta under 2% of the invoice. No action.
reviewDelta between 2% and 10%. Worth a look.
gapDelta over 10%. Decompose it (below).
no invoiceNothing entered yet. The current month stays here until it closes.

Entries are append-only: a correction is a new entry, and the newest one counts. The recorded-cost side always includes all traffic (user-billed, organization-billed, and internal operational usage), because providers invoice everything.

Monthly runbook​

  1. Wait for the month to close (months are UTC) and provider invoices to arrive.
  2. Enter each invoice total with a note naming the invoice id and its billing period.
  3. Green chips: done. Otherwise decompose the gap:
Gap signatureLikely causeAction
Uniform percentage across a provider's modelsStale catalog pricesUpdate rates in Models > Prices
Invoice exceeds recorded cost, token counts look lowMissing usage eventsInstrument the unmetered path
Provider invoices you but has no row at allFully unmetered featureLoudest signature; treat as a bug
Small constant offsetBilling-period or timezone skew, provider roundingNote it; no action inside tolerance

Two standing caveats: months here are UTC while some providers bill in local-time periods, and recorded cost can move slightly after month close as late events land, so re-check a chip before escalating.

Best Practices​

  • Use the "Sort by Credits: Lowest First" option to identify users who may be running low on credits and could benefit from a top-up or subscription upgrade.
  • Always include a note when adjusting credits to maintain an audit trail of why changes were made.