Skip to main content

UsageResponse

A response object containing the usage report for the authenticated API key.

Fields

FieldTypeDescription
metricstringThe usage metric. Currently only nlp-analyze-requests.
granularitystringThe granularity of the report: month or day.
sinceDatestringStart of the time range (inclusive), ISO date format (e.g., 2025-01-01).
untilDatestringEnd of the time range (inclusive), ISO date format (e.g., 2025-12-31).
totalUsagenumberTotal number of requests across the entire time range.
usageByPeriodArray[UsageDetail]Usage broken down by time period, ordered by date.

UsageDetail

FieldTypeDescription
periodstringThe time period: YYYY-MM for monthly granularity, YYYY-MM-DD for daily.
usagenumberThe number of requests in this period.

Example

{
"metric": "nlp-analyze-requests",
"granularity": "month",
"sinceDate": "2025-02-05",
"untilDate": "2026-02-05",
"totalUsage": 102234,
"usageByPeriod": [
{ "period": "2025-02", "usage": 4256 },
{ "period": "2025-03", "usage": 8905 },
{ "period": "2025-04", "usage": 8606 },
{ "period": "2025-05", "usage": 8929 },
{ "period": "2025-06", "usage": 8594 },
{ "period": "2025-07", "usage": 8870 },
{ "period": "2025-08", "usage": 8897 },
{ "period": "2025-09", "usage": 8602 },
{ "period": "2025-10", "usage": 8898 },
{ "period": "2025-11", "usage": 8617 },
{ "period": "2025-12", "usage": 8871 },
{ "period": "2026-01", "usage": 8883 },
{ "period": "2026-02", "usage": 1306 }
]
}