GET
/
v1
/
usage
/
character-stats
from elevenlabs import ElevenLabs

client = ElevenLabs(
    api_key="YOUR_API_KEY",
)
client.usage.get_characters_usage_metrics(
    start_unix=1,
    end_unix=1,
)
{
  "time": [
    123
  ],
  "usage": {}
}

Headers

xi-api-key
string

Your API key. This is required by most endpoints to access our API programatically. You can view your xi-api-key using the 'Profile' tab on the website.

Query Parameters

start_unix
integer
required

UTC Unix timestamp for the start of the usage window, in milliseconds. To include the first day of the window, the timestamp should be at 00:00:00 of that day.

end_unix
integer
required

UTC Unix timestamp for the end of the usage window, in milliseconds. To include the last day of the window, the timestamp should be at 23:59:59 of that day.

include_workspace_metrics
boolean
default:false

Whether or not to include the statistics of the entire workspace.

breakdown_type
enum<string>
default:none

How to break down the information. Cannot be "user" if include_workspace_metrics is False.

Available options:
none,
voice,
user,
api_keys,
all_api_keys,
product_type,
model,
resource

Response

200
application/json
Successful Response
time
integer[]
required
usage
object
required