Issue Description
When querying Speech-to-Text (STT) usage metrics using the Reseller RESTful API (v2), reported consumption values do not match the aggregate figures displayed in the Reseller Console. The aggregated billing duration or stream count returned by the API appears lower than actual usage.
Platform and SDK Context
Service / API: Reseller RESTful API (v2) / Agora Speech-to-Text (STT) Service
Target Issue: Billing usage data inconsistency between RESTful API response and Reseller Console
Error Message
No explicit error message returned; API response shows "retCode": 0 and "msg": "success".
Root Cause Analysis
This data discrepancy is caused by outdated or incomplete SKU (Stock Keeping Unit) parameter lists passed in client-side RESTful API requests following backend STT product updates.
SKU Model Transition: As the STT architecture evolves (e.g., introduction of higher-concurrency transcription pipelines or new language model tiers), new product SKUs are assigned to track backend usage.
Console vs. API Mapping Difference: The Reseller Console and internal billing services automatically incorporate these new SKUs into their baseline query scope. However, RESTful API queries rely on explicit parameters (
sku_listor internal product ID filters) provided in the request payload.Silent Telemetry Omission: When an API request specifies a hardcoded or cached SKU list containing only legacy product IDs, the billing server executes the query successfully without throwing an error. However, any STT usage generated under the newly introduced SKUs is omitted from the API response payload, causing a telemetry mismatch.
Solution and Resolution Steps
Identify Active and Legacy SKU Mappings
Audit your API client implementation or billing orchestration service to check if SKU parameters are hardcoded or cached locally.
Update Request SKU Parameters
If you are using cached or hardcoded SKU IDs in your API requests, replace them with the new SKU values corresponding to STT usage.
Re-run Query and Validate Data Synchronization
Execute the updated API request and compare the returned
usage_secondsorchannel_countmetrics against the aggregate reports in the Reseller Console to confirm full data alignment.