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:
| Control | Description |
|---|---|
| Search users | Filter users by name or email address. |
| Sort by Credits | Sort users by credit balance: Highest First or Lowest First. |
| Refresh | Reloads the user list from the server. |
User Table
The user table displays the following columns:
| Column | Description |
|---|---|
| User | The user's full name and email address. |
| Credits | The user's current credit balance, formatted with locale-appropriate separators. |
| Last Login | The date of the user's most recent login, or "Never" if they have not logged in. |
| Status | Status chips showing Active/Inactive state and an "Admin" badge for admin users. |
| Created | The date the user account was created. |
| Actions | View Profile and Credits adjustment buttons. |
Actions
Each user row provides two actions:
| Action | Description |
|---|---|
| View Profile | Opens the admin profile viewer for the user. |
| Credits | Opens 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:
| Field | Description |
|---|---|
| User | Displays the selected user's name or email (read-only). |
| Current Balance | Shows the user's current credit count (read-only). |
| Amount | The number of credits to add or remove. Minimum value is 10, with increments of 10. Default is 100. |
| Note | An 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:
| View | Description |
|---|---|
| By model by day | Daily 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 provider | Month-by-month provider cost totals with invoice reconciliation (below). |
| Settlement basis | How 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:
| Chip | Meaning |
|---|---|
| match | Delta under 2% of the invoice. No action. |
| review | Delta between 2% and 10%. Worth a look. |
| gap | Delta over 10%. Decompose it (below). |
| no invoice | Nothing 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
- Wait for the month to close (months are UTC) and provider invoices to arrive.
- Enter each invoice total with a note naming the invoice id and its billing period.
- Green chips: done. Otherwise decompose the gap:
| Gap signature | Likely cause | Action |
|---|---|---|
| Uniform percentage across a provider's models | Stale catalog prices | Update rates in Models > Prices |
| Invoice exceeds recorded cost, token counts look low | Missing usage events | Instrument the unmetered path |
| Provider invoices you but has no row at all | Fully unmetered feature | Loudest signature; treat as a bug |
| Small constant offset | Billing-period or timezone skew, provider rounding | Note 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.