Skip to main content

audio_speeches

Creates, updates, deletes, gets or lists an audio_speeches resource.

Overview

Nameaudio_speeches
TypeResource
Idopenai_admin.usage.audio_speeches

Fields

The following fields are returned by SELECT queries:

Usage data retrieved successfully.

NameDatatypeDescription
end_timeinteger
objectstring (bucket)
resultsarray
start_timeinteger

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectstart_timeend_time, bucket_width, project_ids, user_ids, api_key_ids, models, group_by, limit, page

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
start_timeintegerStart time (Unix seconds) of the query time range, inclusive.
api_key_idsarrayReturn only usage for these API keys.
bucket_widthstringWidth of each time bucket in response. Currently 1m, 1h and 1d are supported, default to 1d.
end_timeintegerEnd time (Unix seconds) of the query time range, exclusive.
group_byarrayGroup the usage data by the specified fields. Support fields include project_id, user_id, api_key_id, model or any combination of them.
limitintegerSpecifies the number of buckets to return. - bucket_width=1d: default: 7, max: 31 - bucket_width=1h: default: 24, max: 168 - bucket_width=1m: default: 60, max: 1440
modelsarrayReturn only usage for these models.
pagestringA cursor for use in pagination. Corresponding to the next_page field from the previous response.
project_idsarrayReturn only usage for these projects.
user_idsarrayReturn only usage for these users.

SELECT examples

Usage data retrieved successfully.

SELECT
end_time,
object,
results,
start_time
FROM openai_admin.usage.audio_speeches
WHERE start_time = '{{ start_time }}' -- required
AND end_time = '{{ end_time }}'
AND bucket_width = '{{ bucket_width }}'
AND project_ids = '{{ project_ids }}'
AND user_ids = '{{ user_ids }}'
AND api_key_ids = '{{ api_key_ids }}'
AND models = '{{ models }}'
AND group_by = '{{ group_by }}'
AND limit = '{{ limit }}'
AND page = '{{ page }}'
;