OpenAI API

UsageModerationsResult

object

The aggregated moderations usage details of the specific time bucket.

objectstringrequired

Allowed values:organization.usage.moderations.result

input_tokensintegerrequired

The aggregated number of input tokens used.

num_model_requestsintegerrequired

The count of requests made to the model.

project_idstring

When group_by=project_id, this field provides the project ID of the grouped usage result.

user_idstring

When group_by=user_id, this field provides the user ID of the grouped usage result.

api_key_idstring

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

modelstring

When group_by=model, this field provides the model name of the grouped usage result.

Example

UsageResponse

object
objectstringrequired

Allowed values:page

dataarray[object]required
Show Child Parameters
has_morebooleanrequired
next_pagestringrequired
Example

UsageTimeBucket

object
objectstringrequired

Allowed values:bucket

start_timeintegerrequired
end_timeintegerrequired
resultOne Of
arrayrequired
UsageCompletionsResultobject

The aggregated completions usage details of the specific time bucket.

Show Child Parameters
Example

UsageVectorStoresResult

object

The aggregated vector stores usage details of the specific time bucket.

objectstringrequired

Allowed values:organization.usage.vector_stores.result

usage_bytesintegerrequired

The vector stores usage in bytes.

project_idstring

When group_by=project_id, this field provides the project ID of the grouped usage result.

Example

User

object

Represents an individual user within an organization.

objectstringrequired

The object type, which is always organization.user

Allowed values:organization.user

idstringrequired

The identifier, which can be referenced in API endpoints

namestringrequired

The name of the user

emailstringrequired

The email address of the user

rolestringrequired

owner or reader

Allowed values:ownerreader

added_atintegerrequired

The Unix timestamp (in seconds) of when the user was added.

Example