Understanding how credits are consumed at various levels is key to monitoring usage, optimizing billing, and managing your customer activity. Our API provides all the metadata you need to track usage within your own application or business intelligence (BI) environment.
This guide explains how to implement user-level credit tracking and aggregate consumption across users or tenants.
Overview
Every transcript, fact, and document created through the API returns metadata that includes credit usage details. By storing and analyzing this data, you can calculate credit consumption for individual users, tenants, or time periods.
You can track usage at multiple levels by:
Storing the unique interaction ID returned by the API
Using that ID to tie usage back to your internal user records
Pulling all related records (interactions, transcripts, facts, and documents)
Aggregating the
creditsConsumedfield to calculate total usageStoring and visualizing results in your own reporting or BI system
Step 1: Store the Interaction ID Returned from the API
When you create an interaction, the API response includes a unique interactionId.
Store this value in your database and associate it with the relevant user ID or customerID from your application.
Example response (simplified):
{ "interactionId": "int_abc123", "assignedUserId": "user_12345", "createdAt": "2025-10-23T10:15:30Z" }Best Practice:
Use your internal
userIdortenantIdfields to mapinteractionIdvalues to users.This mapping allows you to aggregate all downstream credit usage (e.g., transcripts, documents, or facts) associated with each interaction.
Step 2: Retrieve Usage Data
You can retrieve credit consumption data using the following API endpoints:
Returns all interactions per tenant.
Use the
createdAtfield to segment results by date or time period.
Each transcript response includes:
creditsConsumed: credits used for transcript and audio processingcreatedAt: timestamp for time-based tracking
Each fact includes:
creditsConsumed: credits used for fact creationcreatedAt: timestamp for time-based tracking
Each document includes:
creditsConsumed: credits used for document creationcreatedAt: timestamp for time-based tracking
Step 3: Aggregate and Analyze Usage
Once you have collected all relevant records, aggregate the total creditsConsumed values to calculate:
Total usage per interaction
Total usage per user (using your internal mapping)
Total usage per tenant
Usage over a specific time window
Example (simplified):
Interaction ID | User ID | Tenant ID | Date | Credits Consumed |
int_abc123 | user_12345 | tenant_A | 2025-10-01 | 120 |
int_xyz987 | user_67890 | tenant_A | 2025-10-01 | 75 |
int_qwe456 | user_98765 | tenant_B | 2025-10-02 | 300 |
Aggregate results to show total usage by user or tenant in your reporting system.
Step 4: Store and Visualize in Your BI Tool
To make this data accessible and useful:
Store all retrieved records (
interactionId,userId,tenantId,creditsConsumed, andcreatedAt) in your own database.Connect that data to a BI tool or your platform’s native reporting interface.
Use filters and visualizations to track:
Credit usage trends over time
High-usage users or customers
Billing or quota consumption reports
Example Workflow Summary
Create Interactions → Capture and store
interactionIdwith your user and customer mappingRetrieve Records → Use
Listendpoints for Interactions, Transcripts, Facts, and DocumentsExtract Credits → Use
creditsConsumedandcreatedAtAggregate Data → Sum credits by interaction, user, tenant, or date range
Store & Visualize → Save to your database or BI tool for analysis
Have a question for our team?
Click Support in the bottom-left corner of the console to submit a ticket or reach out via email at [email protected] and we'll be happy to assist you.
