Skip to content
Primary navigation

Usage

Audio speeches
client.admin.organization.usage.audioSpeeches(UsageAudioSpeechesParams { start_time, api_key_ids, bucket_width, 7 more } query, RequestOptionsoptions?): UsageAudioSpeechesResponse { data, has_more, next_page, object }
GET/organization/usage/audio_speeches
Audio transcriptions
client.admin.organization.usage.audioTranscriptions(UsageAudioTranscriptionsParams { start_time, api_key_ids, bucket_width, 7 more } query, RequestOptionsoptions?): UsageAudioTranscriptionsResponse { data, has_more, next_page, object }
GET/organization/usage/audio_transcriptions
Code interpreter sessions
client.admin.organization.usage.codeInterpreterSessions(UsageCodeInterpreterSessionsParams { start_time, bucket_width, end_time, 4 more } query, RequestOptionsoptions?): UsageCodeInterpreterSessionsResponse { data, has_more, next_page, object }
GET/organization/usage/code_interpreter_sessions
Completions
client.admin.organization.usage.completions(UsageCompletionsParams { start_time, api_key_ids, batch, 8 more } query, RequestOptionsoptions?): UsageCompletionsResponse { data, has_more, next_page, object }
GET/organization/usage/completions
Embeddings
client.admin.organization.usage.embeddings(UsageEmbeddingsParams { start_time, api_key_ids, bucket_width, 7 more } query, RequestOptionsoptions?): UsageEmbeddingsResponse { data, has_more, next_page, object }
GET/organization/usage/embeddings
Images
client.admin.organization.usage.images(UsageImagesParams { start_time, api_key_ids, bucket_width, 9 more } query, RequestOptionsoptions?): UsageImagesResponse { data, has_more, next_page, object }
GET/organization/usage/images
Moderations
client.admin.organization.usage.moderations(UsageModerationsParams { start_time, api_key_ids, bucket_width, 7 more } query, RequestOptionsoptions?): UsageModerationsResponse { data, has_more, next_page, object }
GET/organization/usage/moderations
Vector stores
client.admin.organization.usage.vectorStores(UsageVectorStoresParams { start_time, bucket_width, end_time, 4 more } query, RequestOptionsoptions?): UsageVectorStoresResponse { data, has_more, next_page, object }
GET/organization/usage/vector_stores
Costs
client.admin.organization.usage.costs(UsageCostsParams { start_time, api_key_ids, bucket_width, 5 more } query, RequestOptionsoptions?): UsageCostsResponse { data, has_more, next_page, object }
GET/organization/costs
ModelsExpand Collapse
UsageAudioSpeechesResponse { data, has_more, next_page, object }
data: Array<Data>
end_time: number
object: "bucket"
results: Array<OrganizationUsageCompletionsResult { input_tokens, num_model_requests, object, 10 more } | OrganizationUsageEmbeddingsResult { input_tokens, num_model_requests, object, 4 more } | OrganizationUsageModerationsResult { input_tokens, num_model_requests, object, 4 more } | 6 more>
One of the following:
OrganizationUsageCompletionsResult { input_tokens, num_model_requests, object, 10 more }

The aggregated completions usage details of the specific time bucket.

input_tokens: number

The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.completions.result"
output_tokens: number

The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens.

api_key_id?: string | null

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

batch?: boolean | null

When group_by=batch, this field tells whether the grouped usage result is batch or not.

input_audio_tokens?: number

The aggregated number of audio input tokens used, including cached tokens.

input_cached_tokens?: number

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.

model?: string | null

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

output_audio_tokens?: number

The aggregated number of audio output tokens used.

project_id?: string | null

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

service_tier?: string | null

When group_by=service_tier, this field provides the service tier of the grouped usage result.

user_id?: string | null

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

OrganizationUsageEmbeddingsResult { input_tokens, num_model_requests, object, 4 more }

The aggregated embeddings usage details of the specific time bucket.

input_tokens: number

The aggregated number of input tokens used.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.embeddings.result"
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

user_id?: string | null

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

OrganizationUsageModerationsResult { input_tokens, num_model_requests, object, 4 more }

The aggregated moderations usage details of the specific time bucket.

input_tokens: number

The aggregated number of input tokens used.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.moderations.result"
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

user_id?: string | null

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

OrganizationUsageImagesResult { images, num_model_requests, object, 6 more }

The aggregated images usage details of the specific time bucket.

images: number

The number of images processed.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.images.result"
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

size?: string | null

When group_by=size, this field provides the image size of the grouped usage result.

source?: string | null

When group_by=source, this field provides the source of the grouped usage result, possible values are image.generation, image.edit, image.variation.

user_id?: string | null

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

OrganizationUsageAudioSpeechesResult { characters, num_model_requests, object, 4 more }

The aggregated audio speeches usage details of the specific time bucket.

characters: number

The number of characters processed.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.audio_speeches.result"
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

user_id?: string | null

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

OrganizationUsageAudioTranscriptionsResult { num_model_requests, object, seconds, 4 more }

The aggregated audio transcriptions usage details of the specific time bucket.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.audio_transcriptions.result"
seconds: number

The number of seconds processed.

formatint64
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

user_id?: string | null

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

OrganizationUsageVectorStoresResult { object, usage_bytes, project_id }

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

object: "organization.usage.vector_stores.result"
usage_bytes: number

The vector stores usage in bytes.

project_id?: string | null

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

OrganizationUsageCodeInterpreterSessionsResult { num_sessions, object, project_id }

The aggregated code interpreter sessions usage details of the specific time bucket.

num_sessions: number

The number of code interpreter sessions.

object: "organization.usage.code_interpreter_sessions.result"
project_id?: string | null

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

OrganizationCostsResult { object, amount, api_key_id, 3 more }

The aggregated costs details of the specific time bucket.

object: "organization.costs.result"
amount?: Amount { currency, value }

The monetary value in its associated currency.

currency?: string

Lowercase ISO-4217 currency e.g. “usd”

value?: number

The numeric value of the cost.

api_key_id?: string | null

When group_by=api_key_id, this field provides the API Key ID of the grouped costs result.

line_item?: string | null

When group_by=line_item, this field provides the line item of the grouped costs result.

project_id?: string | null

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

quantity?: number | null

When group_by=line_item, this field provides the quantity of the grouped costs result.

start_time: number
has_more: boolean
next_page: string | null
object: "page"
UsageAudioTranscriptionsResponse { data, has_more, next_page, object }
data: Array<Data>
end_time: number
object: "bucket"
results: Array<OrganizationUsageCompletionsResult { input_tokens, num_model_requests, object, 10 more } | OrganizationUsageEmbeddingsResult { input_tokens, num_model_requests, object, 4 more } | OrganizationUsageModerationsResult { input_tokens, num_model_requests, object, 4 more } | 6 more>
One of the following:
OrganizationUsageCompletionsResult { input_tokens, num_model_requests, object, 10 more }

The aggregated completions usage details of the specific time bucket.

input_tokens: number

The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.completions.result"
output_tokens: number

The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens.

api_key_id?: string | null

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

batch?: boolean | null

When group_by=batch, this field tells whether the grouped usage result is batch or not.

input_audio_tokens?: number

The aggregated number of audio input tokens used, including cached tokens.

input_cached_tokens?: number

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.

model?: string | null

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

output_audio_tokens?: number

The aggregated number of audio output tokens used.

project_id?: string | null

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

service_tier?: string | null

When group_by=service_tier, this field provides the service tier of the grouped usage result.

user_id?: string | null

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

OrganizationUsageEmbeddingsResult { input_tokens, num_model_requests, object, 4 more }

The aggregated embeddings usage details of the specific time bucket.

input_tokens: number

The aggregated number of input tokens used.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.embeddings.result"
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

user_id?: string | null

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

OrganizationUsageModerationsResult { input_tokens, num_model_requests, object, 4 more }

The aggregated moderations usage details of the specific time bucket.

input_tokens: number

The aggregated number of input tokens used.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.moderations.result"
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

user_id?: string | null

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

OrganizationUsageImagesResult { images, num_model_requests, object, 6 more }

The aggregated images usage details of the specific time bucket.

images: number

The number of images processed.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.images.result"
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

size?: string | null

When group_by=size, this field provides the image size of the grouped usage result.

source?: string | null

When group_by=source, this field provides the source of the grouped usage result, possible values are image.generation, image.edit, image.variation.

user_id?: string | null

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

OrganizationUsageAudioSpeechesResult { characters, num_model_requests, object, 4 more }

The aggregated audio speeches usage details of the specific time bucket.

characters: number

The number of characters processed.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.audio_speeches.result"
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

user_id?: string | null

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

OrganizationUsageAudioTranscriptionsResult { num_model_requests, object, seconds, 4 more }

The aggregated audio transcriptions usage details of the specific time bucket.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.audio_transcriptions.result"
seconds: number

The number of seconds processed.

formatint64
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

user_id?: string | null

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

OrganizationUsageVectorStoresResult { object, usage_bytes, project_id }

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

object: "organization.usage.vector_stores.result"
usage_bytes: number

The vector stores usage in bytes.

project_id?: string | null

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

OrganizationUsageCodeInterpreterSessionsResult { num_sessions, object, project_id }

The aggregated code interpreter sessions usage details of the specific time bucket.

num_sessions: number

The number of code interpreter sessions.

object: "organization.usage.code_interpreter_sessions.result"
project_id?: string | null

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

OrganizationCostsResult { object, amount, api_key_id, 3 more }

The aggregated costs details of the specific time bucket.

object: "organization.costs.result"
amount?: Amount { currency, value }

The monetary value in its associated currency.

currency?: string

Lowercase ISO-4217 currency e.g. “usd”

value?: number

The numeric value of the cost.

api_key_id?: string | null

When group_by=api_key_id, this field provides the API Key ID of the grouped costs result.

line_item?: string | null

When group_by=line_item, this field provides the line item of the grouped costs result.

project_id?: string | null

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

quantity?: number | null

When group_by=line_item, this field provides the quantity of the grouped costs result.

start_time: number
has_more: boolean
next_page: string | null
object: "page"
UsageCodeInterpreterSessionsResponse { data, has_more, next_page, object }
data: Array<Data>
end_time: number
object: "bucket"
results: Array<OrganizationUsageCompletionsResult { input_tokens, num_model_requests, object, 10 more } | OrganizationUsageEmbeddingsResult { input_tokens, num_model_requests, object, 4 more } | OrganizationUsageModerationsResult { input_tokens, num_model_requests, object, 4 more } | 6 more>
One of the following:
OrganizationUsageCompletionsResult { input_tokens, num_model_requests, object, 10 more }

The aggregated completions usage details of the specific time bucket.

input_tokens: number

The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.completions.result"
output_tokens: number

The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens.

api_key_id?: string | null

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

batch?: boolean | null

When group_by=batch, this field tells whether the grouped usage result is batch or not.

input_audio_tokens?: number

The aggregated number of audio input tokens used, including cached tokens.

input_cached_tokens?: number

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.

model?: string | null

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

output_audio_tokens?: number

The aggregated number of audio output tokens used.

project_id?: string | null

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

service_tier?: string | null

When group_by=service_tier, this field provides the service tier of the grouped usage result.

user_id?: string | null

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

OrganizationUsageEmbeddingsResult { input_tokens, num_model_requests, object, 4 more }

The aggregated embeddings usage details of the specific time bucket.

input_tokens: number

The aggregated number of input tokens used.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.embeddings.result"
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

user_id?: string | null

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

OrganizationUsageModerationsResult { input_tokens, num_model_requests, object, 4 more }

The aggregated moderations usage details of the specific time bucket.

input_tokens: number

The aggregated number of input tokens used.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.moderations.result"
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

user_id?: string | null

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

OrganizationUsageImagesResult { images, num_model_requests, object, 6 more }

The aggregated images usage details of the specific time bucket.

images: number

The number of images processed.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.images.result"
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

size?: string | null

When group_by=size, this field provides the image size of the grouped usage result.

source?: string | null

When group_by=source, this field provides the source of the grouped usage result, possible values are image.generation, image.edit, image.variation.

user_id?: string | null

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

OrganizationUsageAudioSpeechesResult { characters, num_model_requests, object, 4 more }

The aggregated audio speeches usage details of the specific time bucket.

characters: number

The number of characters processed.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.audio_speeches.result"
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

user_id?: string | null

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

OrganizationUsageAudioTranscriptionsResult { num_model_requests, object, seconds, 4 more }

The aggregated audio transcriptions usage details of the specific time bucket.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.audio_transcriptions.result"
seconds: number

The number of seconds processed.

formatint64
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

user_id?: string | null

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

OrganizationUsageVectorStoresResult { object, usage_bytes, project_id }

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

object: "organization.usage.vector_stores.result"
usage_bytes: number

The vector stores usage in bytes.

project_id?: string | null

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

OrganizationUsageCodeInterpreterSessionsResult { num_sessions, object, project_id }

The aggregated code interpreter sessions usage details of the specific time bucket.

num_sessions: number

The number of code interpreter sessions.

object: "organization.usage.code_interpreter_sessions.result"
project_id?: string | null

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

OrganizationCostsResult { object, amount, api_key_id, 3 more }

The aggregated costs details of the specific time bucket.

object: "organization.costs.result"
amount?: Amount { currency, value }

The monetary value in its associated currency.

currency?: string

Lowercase ISO-4217 currency e.g. “usd”

value?: number

The numeric value of the cost.

api_key_id?: string | null

When group_by=api_key_id, this field provides the API Key ID of the grouped costs result.

line_item?: string | null

When group_by=line_item, this field provides the line item of the grouped costs result.

project_id?: string | null

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

quantity?: number | null

When group_by=line_item, this field provides the quantity of the grouped costs result.

start_time: number
has_more: boolean
next_page: string | null
object: "page"
UsageCompletionsResponse { data, has_more, next_page, object }
data: Array<Data>
end_time: number
object: "bucket"
results: Array<OrganizationUsageCompletionsResult { input_tokens, num_model_requests, object, 10 more } | OrganizationUsageEmbeddingsResult { input_tokens, num_model_requests, object, 4 more } | OrganizationUsageModerationsResult { input_tokens, num_model_requests, object, 4 more } | 6 more>
One of the following:
OrganizationUsageCompletionsResult { input_tokens, num_model_requests, object, 10 more }

The aggregated completions usage details of the specific time bucket.

input_tokens: number

The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.completions.result"
output_tokens: number

The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens.

api_key_id?: string | null

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

batch?: boolean | null

When group_by=batch, this field tells whether the grouped usage result is batch or not.

input_audio_tokens?: number

The aggregated number of audio input tokens used, including cached tokens.

input_cached_tokens?: number

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.

model?: string | null

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

output_audio_tokens?: number

The aggregated number of audio output tokens used.

project_id?: string | null

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

service_tier?: string | null

When group_by=service_tier, this field provides the service tier of the grouped usage result.

user_id?: string | null

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

OrganizationUsageEmbeddingsResult { input_tokens, num_model_requests, object, 4 more }

The aggregated embeddings usage details of the specific time bucket.

input_tokens: number

The aggregated number of input tokens used.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.embeddings.result"
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

user_id?: string | null

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

OrganizationUsageModerationsResult { input_tokens, num_model_requests, object, 4 more }

The aggregated moderations usage details of the specific time bucket.

input_tokens: number

The aggregated number of input tokens used.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.moderations.result"
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

user_id?: string | null

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

OrganizationUsageImagesResult { images, num_model_requests, object, 6 more }

The aggregated images usage details of the specific time bucket.

images: number

The number of images processed.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.images.result"
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

size?: string | null

When group_by=size, this field provides the image size of the grouped usage result.

source?: string | null

When group_by=source, this field provides the source of the grouped usage result, possible values are image.generation, image.edit, image.variation.

user_id?: string | null

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

OrganizationUsageAudioSpeechesResult { characters, num_model_requests, object, 4 more }

The aggregated audio speeches usage details of the specific time bucket.

characters: number

The number of characters processed.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.audio_speeches.result"
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

user_id?: string | null

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

OrganizationUsageAudioTranscriptionsResult { num_model_requests, object, seconds, 4 more }

The aggregated audio transcriptions usage details of the specific time bucket.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.audio_transcriptions.result"
seconds: number

The number of seconds processed.

formatint64
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

user_id?: string | null

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

OrganizationUsageVectorStoresResult { object, usage_bytes, project_id }

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

object: "organization.usage.vector_stores.result"
usage_bytes: number

The vector stores usage in bytes.

project_id?: string | null

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

OrganizationUsageCodeInterpreterSessionsResult { num_sessions, object, project_id }

The aggregated code interpreter sessions usage details of the specific time bucket.

num_sessions: number

The number of code interpreter sessions.

object: "organization.usage.code_interpreter_sessions.result"
project_id?: string | null

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

OrganizationCostsResult { object, amount, api_key_id, 3 more }

The aggregated costs details of the specific time bucket.

object: "organization.costs.result"
amount?: Amount { currency, value }

The monetary value in its associated currency.

currency?: string

Lowercase ISO-4217 currency e.g. “usd”

value?: number

The numeric value of the cost.

api_key_id?: string | null

When group_by=api_key_id, this field provides the API Key ID of the grouped costs result.

line_item?: string | null

When group_by=line_item, this field provides the line item of the grouped costs result.

project_id?: string | null

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

quantity?: number | null

When group_by=line_item, this field provides the quantity of the grouped costs result.

start_time: number
has_more: boolean
next_page: string | null
object: "page"
UsageEmbeddingsResponse { data, has_more, next_page, object }
data: Array<Data>
end_time: number
object: "bucket"
results: Array<OrganizationUsageCompletionsResult { input_tokens, num_model_requests, object, 10 more } | OrganizationUsageEmbeddingsResult { input_tokens, num_model_requests, object, 4 more } | OrganizationUsageModerationsResult { input_tokens, num_model_requests, object, 4 more } | 6 more>
One of the following:
OrganizationUsageCompletionsResult { input_tokens, num_model_requests, object, 10 more }

The aggregated completions usage details of the specific time bucket.

input_tokens: number

The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.completions.result"
output_tokens: number

The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens.

api_key_id?: string | null

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

batch?: boolean | null

When group_by=batch, this field tells whether the grouped usage result is batch or not.

input_audio_tokens?: number

The aggregated number of audio input tokens used, including cached tokens.

input_cached_tokens?: number

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.

model?: string | null

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

output_audio_tokens?: number

The aggregated number of audio output tokens used.

project_id?: string | null

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

service_tier?: string | null

When group_by=service_tier, this field provides the service tier of the grouped usage result.

user_id?: string | null

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

OrganizationUsageEmbeddingsResult { input_tokens, num_model_requests, object, 4 more }

The aggregated embeddings usage details of the specific time bucket.

input_tokens: number

The aggregated number of input tokens used.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.embeddings.result"
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

user_id?: string | null

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

OrganizationUsageModerationsResult { input_tokens, num_model_requests, object, 4 more }

The aggregated moderations usage details of the specific time bucket.

input_tokens: number

The aggregated number of input tokens used.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.moderations.result"
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

user_id?: string | null

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

OrganizationUsageImagesResult { images, num_model_requests, object, 6 more }

The aggregated images usage details of the specific time bucket.

images: number

The number of images processed.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.images.result"
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

size?: string | null

When group_by=size, this field provides the image size of the grouped usage result.

source?: string | null

When group_by=source, this field provides the source of the grouped usage result, possible values are image.generation, image.edit, image.variation.

user_id?: string | null

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

OrganizationUsageAudioSpeechesResult { characters, num_model_requests, object, 4 more }

The aggregated audio speeches usage details of the specific time bucket.

characters: number

The number of characters processed.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.audio_speeches.result"
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

user_id?: string | null

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

OrganizationUsageAudioTranscriptionsResult { num_model_requests, object, seconds, 4 more }

The aggregated audio transcriptions usage details of the specific time bucket.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.audio_transcriptions.result"
seconds: number

The number of seconds processed.

formatint64
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

user_id?: string | null

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

OrganizationUsageVectorStoresResult { object, usage_bytes, project_id }

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

object: "organization.usage.vector_stores.result"
usage_bytes: number

The vector stores usage in bytes.

project_id?: string | null

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

OrganizationUsageCodeInterpreterSessionsResult { num_sessions, object, project_id }

The aggregated code interpreter sessions usage details of the specific time bucket.

num_sessions: number

The number of code interpreter sessions.

object: "organization.usage.code_interpreter_sessions.result"
project_id?: string | null

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

OrganizationCostsResult { object, amount, api_key_id, 3 more }

The aggregated costs details of the specific time bucket.

object: "organization.costs.result"
amount?: Amount { currency, value }

The monetary value in its associated currency.

currency?: string

Lowercase ISO-4217 currency e.g. “usd”

value?: number

The numeric value of the cost.

api_key_id?: string | null

When group_by=api_key_id, this field provides the API Key ID of the grouped costs result.

line_item?: string | null

When group_by=line_item, this field provides the line item of the grouped costs result.

project_id?: string | null

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

quantity?: number | null

When group_by=line_item, this field provides the quantity of the grouped costs result.

start_time: number
has_more: boolean
next_page: string | null
object: "page"
UsageImagesResponse { data, has_more, next_page, object }
data: Array<Data>
end_time: number
object: "bucket"
results: Array<OrganizationUsageCompletionsResult { input_tokens, num_model_requests, object, 10 more } | OrganizationUsageEmbeddingsResult { input_tokens, num_model_requests, object, 4 more } | OrganizationUsageModerationsResult { input_tokens, num_model_requests, object, 4 more } | 6 more>
One of the following:
OrganizationUsageCompletionsResult { input_tokens, num_model_requests, object, 10 more }

The aggregated completions usage details of the specific time bucket.

input_tokens: number

The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.completions.result"
output_tokens: number

The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens.

api_key_id?: string | null

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

batch?: boolean | null

When group_by=batch, this field tells whether the grouped usage result is batch or not.

input_audio_tokens?: number

The aggregated number of audio input tokens used, including cached tokens.

input_cached_tokens?: number

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.

model?: string | null

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

output_audio_tokens?: number

The aggregated number of audio output tokens used.

project_id?: string | null

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

service_tier?: string | null

When group_by=service_tier, this field provides the service tier of the grouped usage result.

user_id?: string | null

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

OrganizationUsageEmbeddingsResult { input_tokens, num_model_requests, object, 4 more }

The aggregated embeddings usage details of the specific time bucket.

input_tokens: number

The aggregated number of input tokens used.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.embeddings.result"
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

user_id?: string | null

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

OrganizationUsageModerationsResult { input_tokens, num_model_requests, object, 4 more }

The aggregated moderations usage details of the specific time bucket.

input_tokens: number

The aggregated number of input tokens used.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.moderations.result"
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

user_id?: string | null

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

OrganizationUsageImagesResult { images, num_model_requests, object, 6 more }

The aggregated images usage details of the specific time bucket.

images: number

The number of images processed.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.images.result"
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

size?: string | null

When group_by=size, this field provides the image size of the grouped usage result.

source?: string | null

When group_by=source, this field provides the source of the grouped usage result, possible values are image.generation, image.edit, image.variation.

user_id?: string | null

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

OrganizationUsageAudioSpeechesResult { characters, num_model_requests, object, 4 more }

The aggregated audio speeches usage details of the specific time bucket.

characters: number

The number of characters processed.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.audio_speeches.result"
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

user_id?: string | null

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

OrganizationUsageAudioTranscriptionsResult { num_model_requests, object, seconds, 4 more }

The aggregated audio transcriptions usage details of the specific time bucket.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.audio_transcriptions.result"
seconds: number

The number of seconds processed.

formatint64
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

user_id?: string | null

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

OrganizationUsageVectorStoresResult { object, usage_bytes, project_id }

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

object: "organization.usage.vector_stores.result"
usage_bytes: number

The vector stores usage in bytes.

project_id?: string | null

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

OrganizationUsageCodeInterpreterSessionsResult { num_sessions, object, project_id }

The aggregated code interpreter sessions usage details of the specific time bucket.

num_sessions: number

The number of code interpreter sessions.

object: "organization.usage.code_interpreter_sessions.result"
project_id?: string | null

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

OrganizationCostsResult { object, amount, api_key_id, 3 more }

The aggregated costs details of the specific time bucket.

object: "organization.costs.result"
amount?: Amount { currency, value }

The monetary value in its associated currency.

currency?: string

Lowercase ISO-4217 currency e.g. “usd”

value?: number

The numeric value of the cost.

api_key_id?: string | null

When group_by=api_key_id, this field provides the API Key ID of the grouped costs result.

line_item?: string | null

When group_by=line_item, this field provides the line item of the grouped costs result.

project_id?: string | null

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

quantity?: number | null

When group_by=line_item, this field provides the quantity of the grouped costs result.

start_time: number
has_more: boolean
next_page: string | null
object: "page"
UsageModerationsResponse { data, has_more, next_page, object }
data: Array<Data>
end_time: number
object: "bucket"
results: Array<OrganizationUsageCompletionsResult { input_tokens, num_model_requests, object, 10 more } | OrganizationUsageEmbeddingsResult { input_tokens, num_model_requests, object, 4 more } | OrganizationUsageModerationsResult { input_tokens, num_model_requests, object, 4 more } | 6 more>
One of the following:
OrganizationUsageCompletionsResult { input_tokens, num_model_requests, object, 10 more }

The aggregated completions usage details of the specific time bucket.

input_tokens: number

The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.completions.result"
output_tokens: number

The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens.

api_key_id?: string | null

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

batch?: boolean | null

When group_by=batch, this field tells whether the grouped usage result is batch or not.

input_audio_tokens?: number

The aggregated number of audio input tokens used, including cached tokens.

input_cached_tokens?: number

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.

model?: string | null

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

output_audio_tokens?: number

The aggregated number of audio output tokens used.

project_id?: string | null

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

service_tier?: string | null

When group_by=service_tier, this field provides the service tier of the grouped usage result.

user_id?: string | null

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

OrganizationUsageEmbeddingsResult { input_tokens, num_model_requests, object, 4 more }

The aggregated embeddings usage details of the specific time bucket.

input_tokens: number

The aggregated number of input tokens used.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.embeddings.result"
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

user_id?: string | null

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

OrganizationUsageModerationsResult { input_tokens, num_model_requests, object, 4 more }

The aggregated moderations usage details of the specific time bucket.

input_tokens: number

The aggregated number of input tokens used.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.moderations.result"
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

user_id?: string | null

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

OrganizationUsageImagesResult { images, num_model_requests, object, 6 more }

The aggregated images usage details of the specific time bucket.

images: number

The number of images processed.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.images.result"
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

size?: string | null

When group_by=size, this field provides the image size of the grouped usage result.

source?: string | null

When group_by=source, this field provides the source of the grouped usage result, possible values are image.generation, image.edit, image.variation.

user_id?: string | null

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

OrganizationUsageAudioSpeechesResult { characters, num_model_requests, object, 4 more }

The aggregated audio speeches usage details of the specific time bucket.

characters: number

The number of characters processed.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.audio_speeches.result"
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

user_id?: string | null

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

OrganizationUsageAudioTranscriptionsResult { num_model_requests, object, seconds, 4 more }

The aggregated audio transcriptions usage details of the specific time bucket.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.audio_transcriptions.result"
seconds: number

The number of seconds processed.

formatint64
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

user_id?: string | null

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

OrganizationUsageVectorStoresResult { object, usage_bytes, project_id }

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

object: "organization.usage.vector_stores.result"
usage_bytes: number

The vector stores usage in bytes.

project_id?: string | null

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

OrganizationUsageCodeInterpreterSessionsResult { num_sessions, object, project_id }

The aggregated code interpreter sessions usage details of the specific time bucket.

num_sessions: number

The number of code interpreter sessions.

object: "organization.usage.code_interpreter_sessions.result"
project_id?: string | null

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

OrganizationCostsResult { object, amount, api_key_id, 3 more }

The aggregated costs details of the specific time bucket.

object: "organization.costs.result"
amount?: Amount { currency, value }

The monetary value in its associated currency.

currency?: string

Lowercase ISO-4217 currency e.g. “usd”

value?: number

The numeric value of the cost.

api_key_id?: string | null

When group_by=api_key_id, this field provides the API Key ID of the grouped costs result.

line_item?: string | null

When group_by=line_item, this field provides the line item of the grouped costs result.

project_id?: string | null

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

quantity?: number | null

When group_by=line_item, this field provides the quantity of the grouped costs result.

start_time: number
has_more: boolean
next_page: string | null
object: "page"
UsageVectorStoresResponse { data, has_more, next_page, object }
data: Array<Data>
end_time: number
object: "bucket"
results: Array<OrganizationUsageCompletionsResult { input_tokens, num_model_requests, object, 10 more } | OrganizationUsageEmbeddingsResult { input_tokens, num_model_requests, object, 4 more } | OrganizationUsageModerationsResult { input_tokens, num_model_requests, object, 4 more } | 6 more>
One of the following:
OrganizationUsageCompletionsResult { input_tokens, num_model_requests, object, 10 more }

The aggregated completions usage details of the specific time bucket.

input_tokens: number

The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.completions.result"
output_tokens: number

The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens.

api_key_id?: string | null

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

batch?: boolean | null

When group_by=batch, this field tells whether the grouped usage result is batch or not.

input_audio_tokens?: number

The aggregated number of audio input tokens used, including cached tokens.

input_cached_tokens?: number

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.

model?: string | null

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

output_audio_tokens?: number

The aggregated number of audio output tokens used.

project_id?: string | null

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

service_tier?: string | null

When group_by=service_tier, this field provides the service tier of the grouped usage result.

user_id?: string | null

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

OrganizationUsageEmbeddingsResult { input_tokens, num_model_requests, object, 4 more }

The aggregated embeddings usage details of the specific time bucket.

input_tokens: number

The aggregated number of input tokens used.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.embeddings.result"
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

user_id?: string | null

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

OrganizationUsageModerationsResult { input_tokens, num_model_requests, object, 4 more }

The aggregated moderations usage details of the specific time bucket.

input_tokens: number

The aggregated number of input tokens used.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.moderations.result"
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

user_id?: string | null

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

OrganizationUsageImagesResult { images, num_model_requests, object, 6 more }

The aggregated images usage details of the specific time bucket.

images: number

The number of images processed.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.images.result"
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

size?: string | null

When group_by=size, this field provides the image size of the grouped usage result.

source?: string | null

When group_by=source, this field provides the source of the grouped usage result, possible values are image.generation, image.edit, image.variation.

user_id?: string | null

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

OrganizationUsageAudioSpeechesResult { characters, num_model_requests, object, 4 more }

The aggregated audio speeches usage details of the specific time bucket.

characters: number

The number of characters processed.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.audio_speeches.result"
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

user_id?: string | null

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

OrganizationUsageAudioTranscriptionsResult { num_model_requests, object, seconds, 4 more }

The aggregated audio transcriptions usage details of the specific time bucket.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.audio_transcriptions.result"
seconds: number

The number of seconds processed.

formatint64
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

user_id?: string | null

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

OrganizationUsageVectorStoresResult { object, usage_bytes, project_id }

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

object: "organization.usage.vector_stores.result"
usage_bytes: number

The vector stores usage in bytes.

project_id?: string | null

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

OrganizationUsageCodeInterpreterSessionsResult { num_sessions, object, project_id }

The aggregated code interpreter sessions usage details of the specific time bucket.

num_sessions: number

The number of code interpreter sessions.

object: "organization.usage.code_interpreter_sessions.result"
project_id?: string | null

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

OrganizationCostsResult { object, amount, api_key_id, 3 more }

The aggregated costs details of the specific time bucket.

object: "organization.costs.result"
amount?: Amount { currency, value }

The monetary value in its associated currency.

currency?: string

Lowercase ISO-4217 currency e.g. “usd”

value?: number

The numeric value of the cost.

api_key_id?: string | null

When group_by=api_key_id, this field provides the API Key ID of the grouped costs result.

line_item?: string | null

When group_by=line_item, this field provides the line item of the grouped costs result.

project_id?: string | null

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

quantity?: number | null

When group_by=line_item, this field provides the quantity of the grouped costs result.

start_time: number
has_more: boolean
next_page: string | null
object: "page"
UsageCostsResponse { data, has_more, next_page, object }
data: Array<Data>
end_time: number
object: "bucket"
results: Array<OrganizationUsageCompletionsResult { input_tokens, num_model_requests, object, 10 more } | OrganizationUsageEmbeddingsResult { input_tokens, num_model_requests, object, 4 more } | OrganizationUsageModerationsResult { input_tokens, num_model_requests, object, 4 more } | 6 more>
One of the following:
OrganizationUsageCompletionsResult { input_tokens, num_model_requests, object, 10 more }

The aggregated completions usage details of the specific time bucket.

input_tokens: number

The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.completions.result"
output_tokens: number

The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens.

api_key_id?: string | null

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

batch?: boolean | null

When group_by=batch, this field tells whether the grouped usage result is batch or not.

input_audio_tokens?: number

The aggregated number of audio input tokens used, including cached tokens.

input_cached_tokens?: number

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.

model?: string | null

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

output_audio_tokens?: number

The aggregated number of audio output tokens used.

project_id?: string | null

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

service_tier?: string | null

When group_by=service_tier, this field provides the service tier of the grouped usage result.

user_id?: string | null

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

OrganizationUsageEmbeddingsResult { input_tokens, num_model_requests, object, 4 more }

The aggregated embeddings usage details of the specific time bucket.

input_tokens: number

The aggregated number of input tokens used.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.embeddings.result"
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

user_id?: string | null

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

OrganizationUsageModerationsResult { input_tokens, num_model_requests, object, 4 more }

The aggregated moderations usage details of the specific time bucket.

input_tokens: number

The aggregated number of input tokens used.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.moderations.result"
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

user_id?: string | null

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

OrganizationUsageImagesResult { images, num_model_requests, object, 6 more }

The aggregated images usage details of the specific time bucket.

images: number

The number of images processed.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.images.result"
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

size?: string | null

When group_by=size, this field provides the image size of the grouped usage result.

source?: string | null

When group_by=source, this field provides the source of the grouped usage result, possible values are image.generation, image.edit, image.variation.

user_id?: string | null

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

OrganizationUsageAudioSpeechesResult { characters, num_model_requests, object, 4 more }

The aggregated audio speeches usage details of the specific time bucket.

characters: number

The number of characters processed.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.audio_speeches.result"
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

user_id?: string | null

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

OrganizationUsageAudioTranscriptionsResult { num_model_requests, object, seconds, 4 more }

The aggregated audio transcriptions usage details of the specific time bucket.

num_model_requests: number

The count of requests made to the model.

object: "organization.usage.audio_transcriptions.result"
seconds: number

The number of seconds processed.

formatint64
api_key_id?: string | null

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

model?: string | null

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

project_id?: string | null

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

user_id?: string | null

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

OrganizationUsageVectorStoresResult { object, usage_bytes, project_id }

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

object: "organization.usage.vector_stores.result"
usage_bytes: number

The vector stores usage in bytes.

project_id?: string | null

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

OrganizationUsageCodeInterpreterSessionsResult { num_sessions, object, project_id }

The aggregated code interpreter sessions usage details of the specific time bucket.

num_sessions: number

The number of code interpreter sessions.

object: "organization.usage.code_interpreter_sessions.result"
project_id?: string | null

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

OrganizationCostsResult { object, amount, api_key_id, 3 more }

The aggregated costs details of the specific time bucket.

object: "organization.costs.result"
amount?: Amount { currency, value }

The monetary value in its associated currency.

currency?: string

Lowercase ISO-4217 currency e.g. “usd”

value?: number

The numeric value of the cost.

api_key_id?: string | null

When group_by=api_key_id, this field provides the API Key ID of the grouped costs result.

line_item?: string | null

When group_by=line_item, this field provides the line item of the grouped costs result.

project_id?: string | null

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

quantity?: number | null

When group_by=line_item, this field provides the quantity of the grouped costs result.

start_time: number
has_more: boolean
next_page: string | null
object: "page"