For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Connect
BlogHelp CenterAPI PricingSign up
OverviewElevenCreativeElevenAgentsElevenAPIAPI referenceChangelog
OverviewElevenCreativeElevenAgentsElevenAPIAPI referenceChangelog
  • API reference
    • Introduction
    • Authentication
    • Streaming
  • ElevenAgents
  • ElevenAPI
  • ElevenCreative
  • Core Resources
  • Workspace
        • POSTGet Workspace Usage
  • Legacy
LogoLogo
Login
Login
Connect
BlogHelp CenterAPI PricingSign up
WorkspaceWorkspaceUsage

Get Workspace Usage

POST
/v1/workspace/analytics/query/usage-by-product-over-time
POST
/v1/workspace/analytics/query/usage-by-product-over-time
$curl -X POST https://api.elevenlabs.io/v1/workspace/analytics/query/usage-by-product-over-time \
> -H "Content-Type: application/json" \
> -d '{
> "start_time": 1680307200000,
> "end_time": 1680393600000
>}'
1{
2 "columns": [
3 "timestamp",
4 "product_type",
5 "credits_used"
6 ],
7 "column_types": [
8 "DateTime",
9 "String",
10 "Float"
11 ],
12 "rows": [
13 [
14 "2024-04-01T00:00:00Z",
15 "text-to-speech",
16 "125.5"
17 ],
18 [
19 "2024-04-01T01:00:00Z",
20 "voice-cloning",
21 "75.25"
22 ],
23 [
24 "2024-04-01T02:00:00Z",
25 "speech-to-text",
26 "50.0"
27 ]
28 ],
29 "column_units": [
30 "s",
31 "",
32 "credits"
33 ]
34}

Returns credit usage broken down by product type over time. The response is a tabular structure with columns, column_types, column_units, and rows.

Was this page helpful?
Previous

List Api Requests

Next
Built with

Headers

xi-api-keystringOptional

Request

This endpoint expects an object.
start_timeintegerRequired>=1577836800000

Start of the time range as a Unix timestamp in milliseconds. Must be at least 2020-01-01.

end_timeintegerRequired>=1577836800000

End of the time range as a Unix timestamp in milliseconds. Must be at least 2020-01-01.

interval_secondsintegerOptional>=1Defaults to 60
Bucket size in seconds. Each row in the response covers this many seconds of usage. For example, pass 3600 for hourly buckets or 86400 for daily buckets.
group_bylist of enums or nullOptional
filterslist of objects or nullOptional

Response

Successful Response
columnslist of strings
column_typeslist of enums
rowslist of lists of nullable strings or integers or doubles or booleans
column_unitslist of nullable enums

Errors

422
Unprocessable Entity Error