curl --request GET \
--url https://api.openai.com/v1/organization/usage/audio_speeches \
--header 'Authorization: Bearer <token>'{
"object": "page",
"data": [
{
"object": "bucket",
"start_time": 123,
"end_time": 123,
"result": [
{
"object": "organization.usage.completions.result",
"input_tokens": 123,
"output_tokens": 123,
"num_model_requests": 123,
"input_cached_tokens": 123,
"input_audio_tokens": 123,
"output_audio_tokens": 123,
"project_id": "<string>",
"user_id": "<string>",
"api_key_id": "<string>",
"model": "<string>",
"batch": true
}
]
}
],
"has_more": true,
"next_page": "<string>"
}Get audio speeches usage details for the organization.
curl --request GET \
--url https://api.openai.com/v1/organization/usage/audio_speeches \
--header 'Authorization: Bearer <token>'{
"object": "page",
"data": [
{
"object": "bucket",
"start_time": 123,
"end_time": 123,
"result": [
{
"object": "organization.usage.completions.result",
"input_tokens": 123,
"output_tokens": 123,
"num_model_requests": 123,
"input_cached_tokens": 123,
"input_audio_tokens": 123,
"output_audio_tokens": 123,
"project_id": "<string>",
"user_id": "<string>",
"api_key_id": "<string>",
"model": "<string>",
"batch": true
}
]
}
],
"has_more": true,
"next_page": "<string>"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Start time (Unix seconds) of the query time range, inclusive.
End time (Unix seconds) of the query time range, exclusive.
Width of each time bucket in response. Currently 1m, 1h and 1d are supported, default to 1d.
1m, 1h, 1d Return only usage for these projects.
Return only usage for these users.
Return only usage for these API keys.
Return only usage for these models.
Group the usage data by the specified fields. Support fields include project_id, user_id, api_key_id, model or any combination of them.
project_id, user_id, api_key_id, model Specifies the number of buckets to return.
bucket_width=1d: default: 7, max: 31bucket_width=1h: default: 24, max: 168bucket_width=1m: default: 60, max: 1440A cursor for use in pagination. Corresponding to the next_page field from the previous response.
Usage data retrieved successfully.
page Show child attributes
bucket The aggregated completions usage details of the specific time bucket.
Show child attributes
organization.usage.completions.result The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens.
The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens.
The count of requests made to the model.
The aggregated number of text input tokens that has been cached from previous requests. For customers subscribe to scale tier, this includes scale tier tokens.
The aggregated number of audio input tokens used, including cached tokens.
The aggregated number of audio output tokens used.
When group_by=project_id, this field provides the project ID of the grouped usage result.
When group_by=user_id, this field provides the user ID of the grouped usage result.
When group_by=api_key_id, this field provides the API key ID of the grouped usage result.
When group_by=model, this field provides the model name of the grouped usage result.
When group_by=batch, this field tells whether the grouped usage result is batch or not.
Was this page helpful?