Skip to content
Primary navigation

Admin

AdminOrganization

AdminOrganizationAudit Logs

List user actions and configuration changes within this organization.

List audit logs
client.admin.organization.auditLogs.list(AuditLogListParams { actor_emails, actor_ids, after, 6 more } query?, RequestOptionsoptions?): ConversationCursorPage<AuditLogListResponse { id, effective_at, type, 49 more } >
GET/organization/audit_logs
ModelsExpand Collapse
AuditLogListResponse { id, effective_at, type, 49 more }

A log of a user action or configuration change within this organization.

id: string

The ID of this log.

effective_at: number

The Unix timestamp (in seconds) of the event.

formatunixtime
type: "api_key.created" | "api_key.updated" | "api_key.deleted" | 48 more

The event type.

One of the following:
"api_key.created"
"api_key.updated"
"api_key.deleted"
"certificate.created"
"certificate.updated"
"certificate.deleted"
"certificates.activated"
"certificates.deactivated"
"checkpoint.permission.created"
"checkpoint.permission.deleted"
"external_key.registered"
"external_key.removed"
"group.created"
"group.updated"
"group.deleted"
"invite.sent"
"invite.accepted"
"invite.deleted"
"ip_allowlist.created"
"ip_allowlist.updated"
"ip_allowlist.deleted"
"ip_allowlist.config.activated"
"ip_allowlist.config.deactivated"
"login.succeeded"
"login.failed"
"logout.succeeded"
"logout.failed"
"organization.updated"
"project.created"
"project.updated"
"project.archived"
"project.deleted"
"rate_limit.updated"
"rate_limit.deleted"
"resource.deleted"
"tunnel.created"
"tunnel.updated"
"tunnel.deleted"
"role.created"
"role.updated"
"role.deleted"
"role.assignment.created"
"role.assignment.deleted"
"scim.enabled"
"scim.disabled"
"service_account.created"
"service_account.updated"
"service_account.deleted"
"user.added"
"user.updated"
"user.deleted"
actor?: Actor | null

The actor who performed the audit logged action.

api_key?: APIKey { id, service_account, type, user }

The API Key used to perform the audit logged action.

id?: string

The tracking id of the API key.

service_account?: ServiceAccount { id }

The service account that performed the audit logged action.

id?: string

The service account id.

type?: "user" | "service_account"

The type of API key. Can be either user or service_account.

One of the following:
"user"
"service_account"
user?: User { id, email }

The user who performed the audit logged action.

id?: string

The user id.

email?: string

The user email.

session?: Session { ip_address, user }

The session in which the audit logged action was performed.

ip_address?: string

The IP address from which the action was performed.

user?: User { id, email }

The user who performed the audit logged action.

id?: string

The user id.

email?: string

The user email.

type?: "session" | "api_key"

The type of actor. Is either session or api_key.

One of the following:
"session"
"api_key"
"api_key.created"?: APIKeyCreated { id, data }

The details for events with this type.

id?: string

The tracking ID of the API key.

data?: Data { scopes }

The payload used to create the API key.

scopes?: Array<string>

A list of scopes allowed for the API key, e.g. ["api.model.request"]

"api_key.deleted"?: APIKeyDeleted { id }

The details for events with this type.

id?: string

The tracking ID of the API key.

"api_key.updated"?: APIKeyUpdated { id, changes_requested }

The details for events with this type.

id?: string

The tracking ID of the API key.

changes_requested?: ChangesRequested { scopes }

The payload used to update the API key.

scopes?: Array<string>

A list of scopes allowed for the API key, e.g. ["api.model.request"]

"certificate.created"?: CertificateCreated { id, name }

The details for events with this type.

id?: string

The certificate ID.

name?: string

The name of the certificate.

"certificate.deleted"?: CertificateDeleted { id, certificate, name }

The details for events with this type.

id?: string

The certificate ID.

certificate?: string

The certificate content in PEM format.

name?: string

The name of the certificate.

"certificate.updated"?: CertificateUpdated { id, name }

The details for events with this type.

id?: string

The certificate ID.

name?: string

The name of the certificate.

"certificates.activated"?: CertificatesActivated { certificates }

The details for events with this type.

certificates?: Array<Certificate>
id?: string

The certificate ID.

name?: string

The name of the certificate.

"certificates.deactivated"?: CertificatesDeactivated { certificates }

The details for events with this type.

certificates?: Array<Certificate>
id?: string

The certificate ID.

name?: string

The name of the certificate.

"checkpoint.permission.created"?: CheckpointPermissionCreated { id, data }

The project and fine-tuned model checkpoint that the checkpoint permission was created for.

id?: string

The ID of the checkpoint permission.

data?: Data { fine_tuned_model_checkpoint, project_id }

The payload used to create the checkpoint permission.

fine_tuned_model_checkpoint?: string

The ID of the fine-tuned model checkpoint.

project_id?: string

The ID of the project that the checkpoint permission was created for.

"checkpoint.permission.deleted"?: CheckpointPermissionDeleted { id }

The details for events with this type.

id?: string

The ID of the checkpoint permission.

"external_key.registered"?: ExternalKeyRegistered { id, data }

The details for events with this type.

id?: string

The ID of the external key configuration.

data?: unknown

The configuration for the external key.

"external_key.removed"?: ExternalKeyRemoved { id }

The details for events with this type.

id?: string

The ID of the external key configuration.

"group.created"?: GroupCreated { id, data }

The details for events with this type.

id?: string

The ID of the group.

data?: Data { group_name }

Information about the created group.

group_name?: string

The group name.

"group.deleted"?: GroupDeleted { id }

The details for events with this type.

id?: string

The ID of the group.

"group.updated"?: GroupUpdated { id, changes_requested }

The details for events with this type.

id?: string

The ID of the group.

changes_requested?: ChangesRequested { group_name }

The payload used to update the group.

group_name?: string

The updated group name.

"invite.accepted"?: InviteAccepted { id }

The details for events with this type.

id?: string

The ID of the invite.

"invite.deleted"?: InviteDeleted { id }

The details for events with this type.

id?: string

The ID of the invite.

"invite.sent"?: InviteSent { id, data }

The details for events with this type.

id?: string

The ID of the invite.

data?: Data { email, role }

The payload used to create the invite.

email?: string

The email invited to the organization.

role?: string

The role the email was invited to be. Is either owner or member.

"ip_allowlist.config.activated"?: IPAllowlistConfigActivated { configs }

The details for events with this type.

configs?: Array<Config>

The configurations that were activated.

id?: string

The ID of the IP allowlist configuration.

name?: string

The name of the IP allowlist configuration.

"ip_allowlist.config.deactivated"?: IPAllowlistConfigDeactivated { configs }

The details for events with this type.

configs?: Array<Config>

The configurations that were deactivated.

id?: string

The ID of the IP allowlist configuration.

name?: string

The name of the IP allowlist configuration.

"ip_allowlist.created"?: IPAllowlistCreated { id, allowed_ips, name }

The details for events with this type.

id?: string

The ID of the IP allowlist configuration.

allowed_ips?: Array<string>

The IP addresses or CIDR ranges included in the configuration.

name?: string

The name of the IP allowlist configuration.

"ip_allowlist.deleted"?: IPAllowlistDeleted { id, allowed_ips, name }

The details for events with this type.

id?: string

The ID of the IP allowlist configuration.

allowed_ips?: Array<string>

The IP addresses or CIDR ranges that were in the configuration.

name?: string

The name of the IP allowlist configuration.

"ip_allowlist.updated"?: IPAllowlistUpdated { id, allowed_ips }

The details for events with this type.

id?: string

The ID of the IP allowlist configuration.

allowed_ips?: Array<string>

The updated set of IP addresses or CIDR ranges in the configuration.

"login.failed"?: LoginFailed { error_code, error_message }

The details for events with this type.

error_code?: string

The error code of the failure.

error_message?: string

The error message of the failure.

"login.succeeded"?: unknown

This event has no additional fields beyond the standard audit log attributes.

"logout.failed"?: LogoutFailed { error_code, error_message }

The details for events with this type.

error_code?: string

The error code of the failure.

error_message?: string

The error message of the failure.

"logout.succeeded"?: unknown

This event has no additional fields beyond the standard audit log attributes.

"organization.updated"?: OrganizationUpdated { id, changes_requested }

The details for events with this type.

id?: string

The organization ID.

changes_requested?: ChangesRequested { api_call_logging, api_call_logging_project_ids, description, 4 more }

The payload used to update the organization settings.

api_call_logging?: string

How your organization logs data from supported API calls. One of disabled, enabled_per_call, enabled_for_all_projects, or enabled_for_selected_projects

api_call_logging_project_ids?: string

The list of project ids if api_call_logging is set to enabled_for_selected_projects

description?: string

The organization description.

name?: string

The organization name.

threads_ui_visibility?: string

Visibility of the threads page which shows messages created with the Assistants API and Playground. One of ANY_ROLE, OWNERS, or NONE.

title?: string

The organization title.

usage_dashboard_visibility?: string

Visibility of the usage dashboard which shows activity and costs for your organization. One of ANY_ROLE or OWNERS.

project?: Project { id, name }

The project that the action was scoped to. Absent for actions not scoped to projects. Note that any admin actions taken via Admin API keys are associated with the default project.

id?: string

The project ID.

name?: string

The project title.

"project.archived"?: ProjectArchived { id }

The details for events with this type.

id?: string

The project ID.

"project.created"?: ProjectCreated { id, data }

The details for events with this type.

id?: string

The project ID.

data?: Data { name, title }

The payload used to create the project.

name?: string

The project name.

title?: string

The title of the project as seen on the dashboard.

"project.deleted"?: ProjectDeleted { id }

The details for events with this type.

id?: string

The project ID.

"project.updated"?: ProjectUpdated { id, changes_requested }

The details for events with this type.

id?: string

The project ID.

changes_requested?: ChangesRequested { title }

The payload used to update the project.

title?: string

The title of the project as seen on the dashboard.

"rate_limit.deleted"?: RateLimitDeleted { id }

The details for events with this type.

id?: string

The rate limit ID

"rate_limit.updated"?: RateLimitUpdated { id, changes_requested }

The details for events with this type.

id?: string

The rate limit ID

changes_requested?: ChangesRequested { batch_1_day_max_input_tokens, max_audio_megabytes_per_1_minute, max_images_per_1_minute, 3 more }

The payload used to update the rate limits.

batch_1_day_max_input_tokens?: number

The maximum batch input tokens per day. Only relevant for certain models.

max_audio_megabytes_per_1_minute?: number

The maximum audio megabytes per minute. Only relevant for certain models.

max_images_per_1_minute?: number

The maximum images per minute. Only relevant for certain models.

max_requests_per_1_day?: number

The maximum requests per day. Only relevant for certain models.

max_requests_per_1_minute?: number

The maximum requests per minute.

max_tokens_per_1_minute?: number

The maximum tokens per minute.

"role.assignment.created"?: RoleAssignmentCreated { id, principal_id, principal_type, 2 more }

The details for events with this type.

id?: string

The identifier of the role assignment.

principal_id?: string

The principal (user or group) that received the role.

principal_type?: string

The type of principal (user or group) that received the role.

resource_id?: string

The resource the role assignment is scoped to.

resource_type?: string

The type of resource the role assignment is scoped to.

"role.assignment.deleted"?: RoleAssignmentDeleted { id, principal_id, principal_type, 2 more }

The details for events with this type.

id?: string

The identifier of the role assignment.

principal_id?: string

The principal (user or group) that had the role removed.

principal_type?: string

The type of principal (user or group) that had the role removed.

resource_id?: string

The resource the role assignment was scoped to.

resource_type?: string

The type of resource the role assignment was scoped to.

"role.created"?: RoleCreated { id, permissions, resource_id, 2 more }

The details for events with this type.

id?: string

The role ID.

permissions?: Array<string>

The permissions granted by the role.

resource_id?: string

The resource the role is scoped to.

resource_type?: string

The type of resource the role belongs to.

role_name?: string

The name of the role.

"role.deleted"?: RoleDeleted { id }

The details for events with this type.

id?: string

The role ID.

"role.updated"?: RoleUpdated { id, changes_requested }

The details for events with this type.

id?: string

The role ID.

changes_requested?: ChangesRequested { description, metadata, permissions_added, 4 more }

The payload used to update the role.

description?: string

The updated role description, when provided.

metadata?: unknown

Additional metadata stored on the role.

permissions_added?: Array<string>

The permissions added to the role.

permissions_removed?: Array<string>

The permissions removed from the role.

resource_id?: string

The resource the role is scoped to.

resource_type?: string

The type of resource the role belongs to.

role_name?: string

The updated role name, when provided.

"scim.disabled"?: ScimDisabled { id }

The details for events with this type.

id?: string

The ID of the SCIM was disabled for.

"scim.enabled"?: ScimEnabled { id }

The details for events with this type.

id?: string

The ID of the SCIM was enabled for.

"service_account.created"?: ServiceAccountCreated { id, data }

The details for events with this type.

id?: string

The service account ID.

data?: Data { role }

The payload used to create the service account.

role?: string

The role of the service account. Is either owner or member.

"service_account.deleted"?: ServiceAccountDeleted { id }

The details for events with this type.

id?: string

The service account ID.

"service_account.updated"?: ServiceAccountUpdated { id, changes_requested }

The details for events with this type.

id?: string

The service account ID.

changes_requested?: ChangesRequested { role }

The payload used to updated the service account.

role?: string

The role of the service account. Is either owner or member.

"user.added"?: UserAdded { id, data }

The details for events with this type.

id?: string

The user ID.

data?: Data { role }

The payload used to add the user to the project.

role?: string

The role of the user. Is either owner or member.

"user.deleted"?: UserDeleted { id }

The details for events with this type.

id?: string

The user ID.

"user.updated"?: UserUpdated { id, changes_requested }

The details for events with this type.

id?: string

The project ID.

changes_requested?: ChangesRequested { role }

The payload used to update the user.

role?: string

The role of the user. Is either owner or member.

AdminOrganizationAdmin API Keys

List all organization and project API keys.
client.admin.organization.adminAPIKeys.list(AdminAPIKeyListParams { after, limit, order } query?, RequestOptionsoptions?): CursorPage<AdminAPIKey { id, created_at, object, 4 more } >
GET/organization/admin_api_keys
Create admin API key
client.admin.organization.adminAPIKeys.create(AdminAPIKeyCreateParams { name } body, RequestOptionsoptions?): AdminAPIKeyCreateResponse { value }
POST/organization/admin_api_keys
Retrieve admin API key
client.admin.organization.adminAPIKeys.retrieve(stringkeyID, RequestOptionsoptions?): AdminAPIKey { id, created_at, object, 4 more }
GET/organization/admin_api_keys/{key_id}
Delete admin API key
client.admin.organization.adminAPIKeys.delete(stringkeyID, RequestOptionsoptions?): AdminAPIKeyDeleteResponse { id, deleted, object }
DELETE/organization/admin_api_keys/{key_id}
ModelsExpand Collapse
AdminAPIKey { id, created_at, object, 4 more }

Represents an individual Admin API key in an org.

id: string

The identifier, which can be referenced in API endpoints

created_at: number

The Unix timestamp (in seconds) of when the API key was created

formatunixtime
object: "organization.admin_api_key"

The object type, which is always organization.admin_api_key

owner: Owner { id, created_at, name, 3 more }
id?: string

The identifier, which can be referenced in API endpoints

created_at?: number

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

formatunixtime
name?: string

The name of the user

object?: string

The object type, which is always organization.user

role?: string

Always owner

type?: string

Always user

redacted_value: string

The redacted value of the API key

last_used_at?: number | null

The Unix timestamp (in seconds) of when the API key was last used

formatunixtime
name?: string | null

The name of the API key

AdminAPIKeyCreateResponse extends AdminAPIKey { id, created_at, object, 4 more } { value }

Represents an individual Admin API key in an org.

value: string

The value of the API key. Only shown on create.

AdminAPIKeyDeleteResponse { id, deleted, object }
id: string
deleted: boolean
object: "organization.admin_api_key.deleted"

AdminOrganizationUsage

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"

AdminOrganizationInvites

List invites
client.admin.organization.invites.list(InviteListParams { after, limit } query?, RequestOptionsoptions?): ConversationCursorPage<Invite { id, created_at, email, 6 more } >
GET/organization/invites
Create invite
client.admin.organization.invites.create(InviteCreateParams { email, role, projects } body, RequestOptionsoptions?): Invite { id, created_at, email, 6 more }
POST/organization/invites
Retrieve invite
client.admin.organization.invites.retrieve(stringinviteID, RequestOptionsoptions?): Invite { id, created_at, email, 6 more }
GET/organization/invites/{invite_id}
Delete invite
client.admin.organization.invites.delete(stringinviteID, RequestOptionsoptions?): InviteDeleteResponse { id, deleted, object }
DELETE/organization/invites/{invite_id}
ModelsExpand Collapse
Invite { id, created_at, email, 6 more }

Represents an individual invite to the organization.

id: string

The identifier, which can be referenced in API endpoints

created_at: number

The Unix timestamp (in seconds) of when the invite was sent.

formatunixtime
email: string

The email address of the individual to whom the invite was sent

object: "organization.invite"

The object type, which is always organization.invite

projects: Array<Project>

The projects that were granted membership upon acceptance of the invite.

id: string

Project’s public ID

role: "member" | "owner"

Project membership role

One of the following:
"member"
"owner"
role: "owner" | "reader"

owner or reader

One of the following:
"owner"
"reader"
status: "accepted" | "expired" | "pending"

accepted,expired, or pending

One of the following:
"accepted"
"expired"
"pending"
accepted_at?: number | null

The Unix timestamp (in seconds) of when the invite was accepted.

formatunixtime
expires_at?: number | null

The Unix timestamp (in seconds) of when the invite expires.

formatunixtime
InviteDeleteResponse { id, deleted, object }
id: string
deleted: boolean
object: "organization.invite.deleted"

The object type, which is always organization.invite.deleted

AdminOrganizationUsers

List users
client.admin.organization.users.list(UserListParams { after, emails, limit } query?, RequestOptionsoptions?): ConversationCursorPage<OrganizationUser { id, added_at, object, 13 more } >
GET/organization/users
Retrieve user
client.admin.organization.users.retrieve(stringuserID, RequestOptionsoptions?): OrganizationUser { id, added_at, object, 13 more }
GET/organization/users/{user_id}
Modify user
client.admin.organization.users.update(stringuserID, UserUpdateParams { developer_persona, role, role_id, technical_level } body, RequestOptionsoptions?): OrganizationUser { id, added_at, object, 13 more }
POST/organization/users/{user_id}
Delete user
client.admin.organization.users.delete(stringuserID, RequestOptionsoptions?): UserDeleteResponse { id, deleted, object }
DELETE/organization/users/{user_id}
ModelsExpand Collapse
OrganizationUser { id, added_at, object, 13 more }

Represents an individual user within an organization.

id: string

The identifier, which can be referenced in API endpoints

added_at: number

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

formatunixtime
object: "organization.user"

The object type, which is always organization.user

api_key_last_used_at?: number | null

The Unix timestamp (in seconds) of the user’s last API key usage.

formatunixtime
created?: number

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

formatunixtime
developer_persona?: string | null

The developer persona metadata for the user.

email?: string | null

The email address of the user

is_default?: boolean

Whether this is the organization’s default user.

is_scale_tier_authorized_purchaser?: boolean | null

Whether the user is an authorized purchaser for Scale Tier.

is_scim_managed?: boolean

Whether the user is managed through SCIM.

is_service_account?: boolean

Whether the user is a service account.

name?: string | null

The name of the user

projects?: Projects | null

Projects associated with the user, if included.

data: Array<Data>
id?: string | null
name?: string | null
role?: string | null
object: "list"
role?: string | null

owner or reader

technical_level?: string | null

The technical level metadata for the user.

user?: User { id, object, banned, 5 more }

Nested user details.

id: string
object: "user"
banned?: boolean | null
banned_at?: number | null
formatunixtime
email?: string | null
enabled?: boolean | null
name?: string | null
picture?: string | null
UserDeleteResponse { id, deleted, object }
id: string
deleted: boolean
object: "organization.user.deleted"

AdminOrganizationUsersRoles

List user organization role assignments
client.admin.organization.users.roles.list(stringuserID, RoleListParams { after, limit, order } query?, RequestOptionsoptions?): NextCursorPage<RoleListResponse { id, created_at, created_by, 8 more } >
GET/organization/users/{user_id}/roles
Assign organization role to user
client.admin.organization.users.roles.create(stringuserID, RoleCreateParams { role_id } body, RequestOptionsoptions?): RoleCreateResponse { object, role, user }
POST/organization/users/{user_id}/roles
Unassign organization role from user
client.admin.organization.users.roles.delete(stringroleID, RoleDeleteParams { user_id } params, RequestOptionsoptions?): RoleDeleteResponse { deleted, object }
DELETE/organization/users/{user_id}/roles/{role_id}
ModelsExpand Collapse
RoleListResponse { id, created_at, created_by, 8 more }

Detailed information about a role assignment entry returned when listing assignments.

id: string

Identifier for the role.

created_at: number | null

When the role was created.

formatunixtime
created_by: string | null

Identifier of the actor who created the role.

created_by_user_obj: Record<string, unknown> | null

User details for the actor that created the role, when available.

description: string | null

Description of the role.

metadata: Record<string, unknown> | null

Arbitrary metadata stored on the role.

name: string

Name of the role.

permissions: Array<string>

Permissions associated with the role.

predefined_role: boolean

Whether the role is predefined by OpenAI.

resource_type: string

Resource type the role applies to.

updated_at: number | null

When the role was last updated.

formatint64
RoleCreateResponse { object, role, user }

Role assignment linking a user to a role.

object: "user.role"

Always user.role.

role: Role { id, description, name, 4 more }

Details about a role that can be assigned through the public Roles API.

user: OrganizationUser { id, added_at, object, 13 more }

Represents an individual user within an organization.

RoleDeleteResponse { deleted, object }

Confirmation payload returned after unassigning a role.

deleted: boolean

Whether the assignment was removed.

object: string

Identifier for the deleted assignment, such as group.role.deleted or user.role.deleted.

AdminOrganizationGroups

List groups
client.admin.organization.groups.list(GroupListParams { after, limit, order } query?, RequestOptionsoptions?): NextCursorPage<Group { id, created_at, group_type, 2 more } >
GET/organization/groups
Create group
client.admin.organization.groups.create(GroupCreateParams { name } body, RequestOptionsoptions?): Group { id, created_at, group_type, 2 more }
POST/organization/groups
Update group
client.admin.organization.groups.update(stringgroupID, GroupUpdateParams { name } body, RequestOptionsoptions?): GroupUpdateResponse { id, created_at, is_scim_managed, name }
POST/organization/groups/{group_id}
Delete group
client.admin.organization.groups.delete(stringgroupID, RequestOptionsoptions?): GroupDeleteResponse { id, deleted, object }
DELETE/organization/groups/{group_id}
ModelsExpand Collapse
Group { id, created_at, group_type, 2 more }

Details about an organization group.

id: string

Identifier for the group.

created_at: number

Unix timestamp (in seconds) when the group was created.

formatunixtime
group_type: string

The type of the group.

is_scim_managed: boolean

Whether the group is managed through SCIM and controlled by your identity provider.

name: string

Display name of the group.

GroupUpdateResponse { id, created_at, is_scim_managed, name }

Response returned after updating a group.

id: string

Identifier for the group.

created_at: number

Unix timestamp (in seconds) when the group was created.

formatunixtime
is_scim_managed: boolean

Whether the group is managed through SCIM and controlled by your identity provider.

name: string

Updated display name for the group.

GroupDeleteResponse { id, deleted, object }

Confirmation payload returned after deleting a group.

id: string

Identifier of the deleted group.

deleted: boolean

Whether the group was deleted.

object: "group.deleted"

Always group.deleted.

AdminOrganizationGroupsUsers

List group users
client.admin.organization.groups.users.list(stringgroupID, UserListParams { after, limit, order } query?, RequestOptionsoptions?): NextCursorPage<OrganizationGroupUser { id, email, name } >
GET/organization/groups/{group_id}/users
Add group user
client.admin.organization.groups.users.create(stringgroupID, UserCreateParams { user_id } body, RequestOptionsoptions?): UserCreateResponse { group_id, object, user_id }
POST/organization/groups/{group_id}/users
Remove group user
client.admin.organization.groups.users.delete(stringuserID, UserDeleteParams { group_id } params, RequestOptionsoptions?): UserDeleteResponse { deleted, object }
DELETE/organization/groups/{group_id}/users/{user_id}
ModelsExpand Collapse
OrganizationGroupUser { id, email, name }

Represents an individual user returned when inspecting group membership.

id: string

The identifier, which can be referenced in API endpoints

email: string | null

The email address of the user.

name: string

The name of the user.

UserCreateResponse { group_id, object, user_id }

Confirmation payload returned after adding a user to a group.

group_id: string

Identifier of the group the user was added to.

object: "group.user"

Always group.user.

user_id: string

Identifier of the user that was added.

UserDeleteResponse { deleted, object }

Confirmation payload returned after removing a user from a group.

deleted: boolean

Whether the group membership was removed.

object: "group.user.deleted"

Always group.user.deleted.

AdminOrganizationGroupsRoles

List group organization role assignments
client.admin.organization.groups.roles.list(stringgroupID, RoleListParams { after, limit, order } query?, RequestOptionsoptions?): NextCursorPage<RoleListResponse { id, created_at, created_by, 8 more } >
GET/organization/groups/{group_id}/roles
Assign organization role to group
client.admin.organization.groups.roles.create(stringgroupID, RoleCreateParams { role_id } body, RequestOptionsoptions?): RoleCreateResponse { group, object, role }
POST/organization/groups/{group_id}/roles
Unassign organization role from group
client.admin.organization.groups.roles.delete(stringroleID, RoleDeleteParams { group_id } params, RequestOptionsoptions?): RoleDeleteResponse { deleted, object }
DELETE/organization/groups/{group_id}/roles/{role_id}
ModelsExpand Collapse
RoleListResponse { id, created_at, created_by, 8 more }

Detailed information about a role assignment entry returned when listing assignments.

id: string

Identifier for the role.

created_at: number | null

When the role was created.

formatunixtime
created_by: string | null

Identifier of the actor who created the role.

created_by_user_obj: Record<string, unknown> | null

User details for the actor that created the role, when available.

description: string | null

Description of the role.

metadata: Record<string, unknown> | null

Arbitrary metadata stored on the role.

name: string

Name of the role.

permissions: Array<string>

Permissions associated with the role.

predefined_role: boolean

Whether the role is predefined by OpenAI.

resource_type: string

Resource type the role applies to.

updated_at: number | null

When the role was last updated.

formatint64
RoleCreateResponse { group, object, role }

Role assignment linking a group to a role.

group: Group { id, created_at, name, 2 more }

Summary information about a group returned in role assignment responses.

id: string

Identifier for the group.

created_at: number

Unix timestamp (in seconds) when the group was created.

formatunixtime
name: string

Display name of the group.

object: "group"

Always group.

scim_managed: boolean

Whether the group is managed through SCIM.

object: "group.role"

Always group.role.

role: Role { id, description, name, 4 more }

Details about a role that can be assigned through the public Roles API.

RoleDeleteResponse { deleted, object }

Confirmation payload returned after unassigning a role.

deleted: boolean

Whether the assignment was removed.

object: string

Identifier for the deleted assignment, such as group.role.deleted or user.role.deleted.

AdminOrganizationRoles

List organization roles
client.admin.organization.roles.list(RoleListParams { after, limit, order } query?, RequestOptionsoptions?): NextCursorPage<Role { id, description, name, 4 more } >
GET/organization/roles
Create organization role
client.admin.organization.roles.create(RoleCreateParams { permissions, role_name, description } body, RequestOptionsoptions?): Role { id, description, name, 4 more }
POST/organization/roles
Update organization role
client.admin.organization.roles.update(stringroleID, RoleUpdateParams { description, permissions, role_name } body, RequestOptionsoptions?): Role { id, description, name, 4 more }
POST/organization/roles/{role_id}
Delete organization role
client.admin.organization.roles.delete(stringroleID, RequestOptionsoptions?): RoleDeleteResponse { id, deleted, object }
DELETE/organization/roles/{role_id}
ModelsExpand Collapse
Role { id, description, name, 4 more }

Details about a role that can be assigned through the public Roles API.

id: string

Identifier for the role.

description: string | null

Optional description of the role.

name: string

Unique name for the role.

object: "role"

Always role.

permissions: Array<string>

Permissions granted by the role.

predefined_role: boolean

Whether the role is predefined and managed by OpenAI.

resource_type: string

Resource type the role is bound to (for example api.organization or api.project).

RoleDeleteResponse { id, deleted, object }

Confirmation payload returned after deleting a role.

id: string

Identifier of the deleted role.

deleted: boolean

Whether the role was deleted.

object: "role.deleted"

Always role.deleted.

AdminOrganizationCertificates

List organization certificates
client.admin.organization.certificates.list(CertificateListParams { after, limit, order } query?, RequestOptionsoptions?): ConversationCursorPage<CertificateListResponse { id, active, certificate_details, 3 more } >
GET/organization/certificates
Upload certificate
client.admin.organization.certificates.create(CertificateCreateParams { certificate, name } body, RequestOptionsoptions?): Certificate { id, certificate_details, created_at, 3 more }
POST/organization/certificates
Get certificate
client.admin.organization.certificates.retrieve(stringcertificateID, CertificateRetrieveParams { include } query?, RequestOptionsoptions?): Certificate { id, certificate_details, created_at, 3 more }
GET/organization/certificates/{certificate_id}
Modify certificate
client.admin.organization.certificates.update(stringcertificateID, CertificateUpdateParams { name } body, RequestOptionsoptions?): Certificate { id, certificate_details, created_at, 3 more }
POST/organization/certificates/{certificate_id}
Delete certificate
client.admin.organization.certificates.delete(stringcertificateID, RequestOptionsoptions?): CertificateDeleteResponse { id, object }
DELETE/organization/certificates/{certificate_id}
Activate certificates for organization
client.admin.organization.certificates.activate(CertificateActivateParams { certificate_ids } body, RequestOptionsoptions?): Page<CertificateActivateResponse { id, active, certificate_details, 3 more } >
POST/organization/certificates/activate
Deactivate certificates for organization
client.admin.organization.certificates.deactivate(CertificateDeactivateParams { certificate_ids } body, RequestOptionsoptions?): Page<CertificateDeactivateResponse { id, active, certificate_details, 3 more } >
POST/organization/certificates/deactivate
ModelsExpand Collapse
Certificate { id, certificate_details, created_at, 3 more }

Represents an individual certificate uploaded to the organization.

id: string

The identifier, which can be referenced in API endpoints

certificate_details: CertificateDetails { content, expires_at, valid_at }
content?: string

The content of the certificate in PEM format.

expires_at?: number

The Unix timestamp (in seconds) of when the certificate expires.

formatunixtime
valid_at?: number

The Unix timestamp (in seconds) of when the certificate becomes valid.

formatunixtime
created_at: number

The Unix timestamp (in seconds) of when the certificate was uploaded.

formatunixtime
name: string | null

The name of the certificate.

object: "certificate" | "organization.certificate" | "organization.project.certificate"

The object type.

  • If creating, updating, or getting a specific certificate, the object type is certificate.
  • If listing, activating, or deactivating certificates for the organization, the object type is organization.certificate.
  • If listing, activating, or deactivating certificates for a project, the object type is organization.project.certificate.
One of the following:
"certificate"
"organization.certificate"
"organization.project.certificate"
active?: boolean

Whether the certificate is currently active at the specified scope. Not returned when getting details for a specific certificate.

CertificateListResponse { id, active, certificate_details, 3 more }

Represents an individual certificate configured at the organization level.

id: string

The identifier, which can be referenced in API endpoints

active: boolean

Whether the certificate is currently active at the organization level.

certificate_details: CertificateDetails { expires_at, valid_at }
expires_at?: number

The Unix timestamp (in seconds) of when the certificate expires.

formatunixtime
valid_at?: number

The Unix timestamp (in seconds) of when the certificate becomes valid.

formatunixtime
created_at: number

The Unix timestamp (in seconds) of when the certificate was uploaded.

formatunixtime
name: string | null

The name of the certificate.

object: "organization.certificate"

The object type, which is always organization.certificate.

CertificateDeleteResponse { id, object }
id: string

The ID of the certificate that was deleted.

object: "certificate.deleted"

The object type, must be certificate.deleted.

CertificateActivateResponse { id, active, certificate_details, 3 more }

Represents an individual certificate configured at the organization level.

id: string

The identifier, which can be referenced in API endpoints

active: boolean

Whether the certificate is currently active at the organization level.

certificate_details: CertificateDetails { expires_at, valid_at }
expires_at?: number

The Unix timestamp (in seconds) of when the certificate expires.

formatunixtime
valid_at?: number

The Unix timestamp (in seconds) of when the certificate becomes valid.

formatunixtime
created_at: number

The Unix timestamp (in seconds) of when the certificate was uploaded.

formatunixtime
name: string | null

The name of the certificate.

object: "organization.certificate"

The object type, which is always organization.certificate.

CertificateDeactivateResponse { id, active, certificate_details, 3 more }

Represents an individual certificate configured at the organization level.

id: string

The identifier, which can be referenced in API endpoints

active: boolean

Whether the certificate is currently active at the organization level.

certificate_details: CertificateDetails { expires_at, valid_at }
expires_at?: number

The Unix timestamp (in seconds) of when the certificate expires.

formatunixtime
valid_at?: number

The Unix timestamp (in seconds) of when the certificate becomes valid.

formatunixtime
created_at: number

The Unix timestamp (in seconds) of when the certificate was uploaded.

formatunixtime
name: string | null

The name of the certificate.

object: "organization.certificate"

The object type, which is always organization.certificate.

AdminOrganizationProjects

List projects
client.admin.organization.projects.list(ProjectListParams { after, include_archived, limit } query?, RequestOptionsoptions?): ConversationCursorPage<Project { id, created_at, object, 4 more } >
GET/organization/projects
Create project
client.admin.organization.projects.create(ProjectCreateParams { name, external_key_id, geography } body, RequestOptionsoptions?): Project { id, created_at, object, 4 more }
POST/organization/projects
Retrieve project
client.admin.organization.projects.retrieve(stringprojectID, RequestOptionsoptions?): Project { id, created_at, object, 4 more }
GET/organization/projects/{project_id}
Modify project
client.admin.organization.projects.update(stringprojectID, ProjectUpdateParams { external_key_id, geography, name } body, RequestOptionsoptions?): Project { id, created_at, object, 4 more }
POST/organization/projects/{project_id}
Archive project
client.admin.organization.projects.archive(stringprojectID, RequestOptionsoptions?): Project { id, created_at, object, 4 more }
POST/organization/projects/{project_id}/archive
ModelsExpand Collapse
Project { id, created_at, object, 4 more }

Represents an individual project.

id: string

The identifier, which can be referenced in API endpoints

created_at: number

The Unix timestamp (in seconds) of when the project was created.

formatunixtime
object: "organization.project"

The object type, which is always organization.project

archived_at?: number | null

The Unix timestamp (in seconds) of when the project was archived or null.

formatunixtime
external_key_id?: string | null

The external key associated with the project.

name?: string | null

The name of the project. This appears in reporting.

status?: string | null

active or archived

AdminOrganizationProjectsUsers

List project users
client.admin.organization.projects.users.list(stringprojectID, UserListParams { after, limit } query?, RequestOptionsoptions?): ConversationCursorPage<ProjectUser { id, added_at, object, 3 more } >
GET/organization/projects/{project_id}/users
Create project user
client.admin.organization.projects.users.create(stringprojectID, UserCreateParams { role, email, user_id } body, RequestOptionsoptions?): ProjectUser { id, added_at, object, 3 more }
POST/organization/projects/{project_id}/users
Retrieve project user
client.admin.organization.projects.users.retrieve(stringuserID, UserRetrieveParams { project_id } params, RequestOptionsoptions?): ProjectUser { id, added_at, object, 3 more }
GET/organization/projects/{project_id}/users/{user_id}
Modify project user
client.admin.organization.projects.users.update(stringuserID, UserUpdateParams { project_id, role } params, RequestOptionsoptions?): ProjectUser { id, added_at, object, 3 more }
POST/organization/projects/{project_id}/users/{user_id}
Delete project user
client.admin.organization.projects.users.delete(stringuserID, UserDeleteParams { project_id } params, RequestOptionsoptions?): UserDeleteResponse { id, deleted, object }
DELETE/organization/projects/{project_id}/users/{user_id}
ModelsExpand Collapse
ProjectUser { id, added_at, object, 3 more }

Represents an individual user in a project.

id: string

The identifier, which can be referenced in API endpoints

added_at: number

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

formatunixtime
object: "organization.project.user"

The object type, which is always organization.project.user

role: string

owner or member

email?: string | null

The email address of the user

name?: string | null

The name of the user

UserDeleteResponse { id, deleted, object }
id: string
deleted: boolean
object: "organization.project.user.deleted"

AdminOrganizationProjectsUsersRoles

List project user role assignments
client.admin.organization.projects.users.roles.list(stringuserID, RoleListParams { project_id, after, limit, order } params, RequestOptionsoptions?): NextCursorPage<RoleListResponse { id, created_at, created_by, 8 more } >
GET/projects/{project_id}/users/{user_id}/roles
Assign project role to user
client.admin.organization.projects.users.roles.create(stringuserID, RoleCreateParams { project_id, role_id } params, RequestOptionsoptions?): RoleCreateResponse { object, role, user }
POST/projects/{project_id}/users/{user_id}/roles
Unassign project role from user
client.admin.organization.projects.users.roles.delete(stringroleID, RoleDeleteParams { project_id, user_id } params, RequestOptionsoptions?): RoleDeleteResponse { deleted, object }
DELETE/projects/{project_id}/users/{user_id}/roles/{role_id}
ModelsExpand Collapse
RoleListResponse { id, created_at, created_by, 8 more }

Detailed information about a role assignment entry returned when listing assignments.

id: string

Identifier for the role.

created_at: number | null

When the role was created.

formatunixtime
created_by: string | null

Identifier of the actor who created the role.

created_by_user_obj: Record<string, unknown> | null

User details for the actor that created the role, when available.

description: string | null

Description of the role.

metadata: Record<string, unknown> | null

Arbitrary metadata stored on the role.

name: string

Name of the role.

permissions: Array<string>

Permissions associated with the role.

predefined_role: boolean

Whether the role is predefined by OpenAI.

resource_type: string

Resource type the role applies to.

updated_at: number | null

When the role was last updated.

formatint64
RoleCreateResponse { object, role, user }

Role assignment linking a user to a role.

object: "user.role"

Always user.role.

role: Role { id, description, name, 4 more }

Details about a role that can be assigned through the public Roles API.

user: OrganizationUser { id, added_at, object, 13 more }

Represents an individual user within an organization.

RoleDeleteResponse { deleted, object }

Confirmation payload returned after unassigning a role.

deleted: boolean

Whether the assignment was removed.

object: string

Identifier for the deleted assignment, such as group.role.deleted or user.role.deleted.

AdminOrganizationProjectsService Accounts

List project service accounts
client.admin.organization.projects.serviceAccounts.list(stringprojectID, ServiceAccountListParams { after, limit } query?, RequestOptionsoptions?): ConversationCursorPage<ProjectServiceAccount { id, created_at, name, 2 more } >
GET/organization/projects/{project_id}/service_accounts
Create project service account
client.admin.organization.projects.serviceAccounts.create(stringprojectID, ServiceAccountCreateParams { name } body, RequestOptionsoptions?): ServiceAccountCreateResponse { id, api_key, created_at, 3 more }
POST/organization/projects/{project_id}/service_accounts
Retrieve project service account
client.admin.organization.projects.serviceAccounts.retrieve(stringserviceAccountID, ServiceAccountRetrieveParams { project_id } params, RequestOptionsoptions?): ProjectServiceAccount { id, created_at, name, 2 more }
GET/organization/projects/{project_id}/service_accounts/{service_account_id}
Delete project service account
client.admin.organization.projects.serviceAccounts.delete(stringserviceAccountID, ServiceAccountDeleteParams { project_id } params, RequestOptionsoptions?): ServiceAccountDeleteResponse { id, deleted, object }
DELETE/organization/projects/{project_id}/service_accounts/{service_account_id}
ModelsExpand Collapse
ProjectServiceAccount { id, created_at, name, 2 more }

Represents an individual service account in a project.

id: string

The identifier, which can be referenced in API endpoints

created_at: number

The Unix timestamp (in seconds) of when the service account was created

formatunixtime
name: string

The name of the service account

object: "organization.project.service_account"

The object type, which is always organization.project.service_account

role: "owner" | "member"

owner or member

One of the following:
"owner"
"member"
ServiceAccountCreateResponse { id, api_key, created_at, 3 more }
id: string
api_key: APIKey | null
id: string
created_at: number
formatunixtime
name: string
object: "organization.project.service_account.api_key"

The object type, which is always organization.project.service_account.api_key

value: string
created_at: number
formatunixtime
name: string
object: "organization.project.service_account"
role: "member"

Service accounts can only have one role of type member

ServiceAccountDeleteResponse { id, deleted, object }
id: string
deleted: boolean
object: "organization.project.service_account.deleted"

AdminOrganizationProjectsAPI Keys

List project API keys
client.admin.organization.projects.apiKeys.list(stringprojectID, APIKeyListParams { after, limit } query?, RequestOptionsoptions?): ConversationCursorPage<ProjectAPIKey { id, created_at, last_used_at, 4 more } >
GET/organization/projects/{project_id}/api_keys
Retrieve project API key
client.admin.organization.projects.apiKeys.retrieve(stringapiKeyID, APIKeyRetrieveParams { project_id } params, RequestOptionsoptions?): ProjectAPIKey { id, created_at, last_used_at, 4 more }
GET/organization/projects/{project_id}/api_keys/{api_key_id}
Delete project API key
client.admin.organization.projects.apiKeys.delete(stringapiKeyID, APIKeyDeleteParams { project_id } params, RequestOptionsoptions?): APIKeyDeleteResponse { id, deleted, object }
DELETE/organization/projects/{project_id}/api_keys/{api_key_id}
ModelsExpand Collapse
ProjectAPIKey { id, created_at, last_used_at, 4 more }

Represents an individual API key in a project.

id: string

The identifier, which can be referenced in API endpoints

created_at: number

The Unix timestamp (in seconds) of when the API key was created

formatunixtime
last_used_at: number | null

The Unix timestamp (in seconds) of when the API key was last used.

formatunixtime
name: string

The name of the API key

object: "organization.project.api_key"

The object type, which is always organization.project.api_key

owner: Owner { service_account, type, user }
service_account?: ServiceAccount { id, created_at, name, role }

The service account that owns a project API key.

id: string

The identifier, which can be referenced in API endpoints

created_at: number

The Unix timestamp (in seconds) of when the service account was created.

formatunixtime
name: string

The name of the service account.

role: string

The service account’s project role.

type?: "user" | "service_account"

user or service_account

One of the following:
"user"
"service_account"
user?: User { id, created_at, email, 2 more }

The user that owns a project API key.

id: string

The identifier, which can be referenced in API endpoints

created_at: number

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

formatunixtime
email: string

The email address of the user.

name: string

The name of the user.

role: string

The user’s project role.

redacted_value: string

The redacted value of the API key

APIKeyDeleteResponse { id, deleted, object }
id: string
deleted: boolean
object: "organization.project.api_key.deleted"

AdminOrganizationProjectsRate Limits

List project rate limits
client.admin.organization.projects.rateLimits.listRateLimits(stringprojectID, RateLimitListRateLimitsParams { after, before, limit } query?, RequestOptionsoptions?): ConversationCursorPage<ProjectRateLimit { id, max_requests_per_1_minute, max_tokens_per_1_minute, 6 more } >
GET/organization/projects/{project_id}/rate_limits
Modify project rate limit
client.admin.organization.projects.rateLimits.updateRateLimit(stringrateLimitID, RateLimitUpdateRateLimitParams { project_id, batch_1_day_max_input_tokens, max_audio_megabytes_per_1_minute, 4 more } params, RequestOptionsoptions?): ProjectRateLimit { id, max_requests_per_1_minute, max_tokens_per_1_minute, 6 more }
POST/organization/projects/{project_id}/rate_limits/{rate_limit_id}
ModelsExpand Collapse
ProjectRateLimit { id, max_requests_per_1_minute, max_tokens_per_1_minute, 6 more }

Represents a project rate limit config.

id: string

The identifier, which can be referenced in API endpoints.

max_requests_per_1_minute: number

The maximum requests per minute.

max_tokens_per_1_minute: number

The maximum tokens per minute.

model: string

The model this rate limit applies to.

object: "project.rate_limit"

The object type, which is always project.rate_limit

batch_1_day_max_input_tokens?: number

The maximum batch input tokens per day. Only present for relevant models.

max_audio_megabytes_per_1_minute?: number

The maximum audio megabytes per minute. Only present for relevant models.

max_images_per_1_minute?: number

The maximum images per minute. Only present for relevant models.

max_requests_per_1_day?: number

The maximum requests per day. Only present for relevant models.

AdminOrganizationProjectsGroups

List project groups
client.admin.organization.projects.groups.list(stringprojectID, GroupListParams { after, limit, order } query?, RequestOptionsoptions?): NextCursorPage<ProjectGroup { created_at, group_id, group_name, 3 more } >
GET/organization/projects/{project_id}/groups
Add project group
client.admin.organization.projects.groups.create(stringprojectID, GroupCreateParams { group_id, role } body, RequestOptionsoptions?): ProjectGroup { created_at, group_id, group_name, 3 more }
POST/organization/projects/{project_id}/groups
Remove project group
client.admin.organization.projects.groups.delete(stringgroupID, GroupDeleteParams { project_id } params, RequestOptionsoptions?): GroupDeleteResponse { deleted, object }
DELETE/organization/projects/{project_id}/groups/{group_id}
ModelsExpand Collapse
ProjectGroup { created_at, group_id, group_name, 3 more }

Details about a group’s membership in a project.

created_at: number

Unix timestamp (in seconds) when the group was granted project access.

formatunixtime
group_id: string

Identifier of the group that has access to the project.

group_name: string

Display name of the group.

group_type: string

The type of the group.

object: "project.group"

Always project.group.

project_id: string

Identifier of the project.

GroupDeleteResponse { deleted, object }

Confirmation payload returned after removing a group from a project.

deleted: boolean

Whether the group membership in the project was removed.

object: "project.group.deleted"

Always project.group.deleted.

AdminOrganizationProjectsGroupsRoles

List project group role assignments
client.admin.organization.projects.groups.roles.list(stringgroupID, RoleListParams { project_id, after, limit, order } params, RequestOptionsoptions?): NextCursorPage<RoleListResponse { id, created_at, created_by, 8 more } >
GET/projects/{project_id}/groups/{group_id}/roles
Assign project role to group
client.admin.organization.projects.groups.roles.create(stringgroupID, RoleCreateParams { project_id, role_id } params, RequestOptionsoptions?): RoleCreateResponse { group, object, role }
POST/projects/{project_id}/groups/{group_id}/roles
Unassign project role from group
client.admin.organization.projects.groups.roles.delete(stringroleID, RoleDeleteParams { project_id, group_id } params, RequestOptionsoptions?): RoleDeleteResponse { deleted, object }
DELETE/projects/{project_id}/groups/{group_id}/roles/{role_id}
ModelsExpand Collapse
RoleListResponse { id, created_at, created_by, 8 more }

Detailed information about a role assignment entry returned when listing assignments.

id: string

Identifier for the role.

created_at: number | null

When the role was created.

formatunixtime
created_by: string | null

Identifier of the actor who created the role.

created_by_user_obj: Record<string, unknown> | null

User details for the actor that created the role, when available.

description: string | null

Description of the role.

metadata: Record<string, unknown> | null

Arbitrary metadata stored on the role.

name: string

Name of the role.

permissions: Array<string>

Permissions associated with the role.

predefined_role: boolean

Whether the role is predefined by OpenAI.

resource_type: string

Resource type the role applies to.

updated_at: number | null

When the role was last updated.

formatint64
RoleCreateResponse { group, object, role }

Role assignment linking a group to a role.

group: Group { id, created_at, name, 2 more }

Summary information about a group returned in role assignment responses.

id: string

Identifier for the group.

created_at: number

Unix timestamp (in seconds) when the group was created.

formatunixtime
name: string

Display name of the group.

object: "group"

Always group.

scim_managed: boolean

Whether the group is managed through SCIM.

object: "group.role"

Always group.role.

role: Role { id, description, name, 4 more }

Details about a role that can be assigned through the public Roles API.

RoleDeleteResponse { deleted, object }

Confirmation payload returned after unassigning a role.

deleted: boolean

Whether the assignment was removed.

object: string

Identifier for the deleted assignment, such as group.role.deleted or user.role.deleted.

AdminOrganizationProjectsRoles

List project roles
client.admin.organization.projects.roles.list(stringprojectID, RoleListParams { after, limit, order } query?, RequestOptionsoptions?): NextCursorPage<Role { id, description, name, 4 more } >
GET/projects/{project_id}/roles
Create project role
client.admin.organization.projects.roles.create(stringprojectID, RoleCreateParams { permissions, role_name, description } body, RequestOptionsoptions?): Role { id, description, name, 4 more }
POST/projects/{project_id}/roles
Update project role
client.admin.organization.projects.roles.update(stringroleID, RoleUpdateParams { project_id, description, permissions, role_name } params, RequestOptionsoptions?): Role { id, description, name, 4 more }
POST/projects/{project_id}/roles/{role_id}
Delete project role
client.admin.organization.projects.roles.delete(stringroleID, RoleDeleteParams { project_id } params, RequestOptionsoptions?): RoleDeleteResponse { id, deleted, object }
DELETE/projects/{project_id}/roles/{role_id}
ModelsExpand Collapse
RoleDeleteResponse { id, deleted, object }

Confirmation payload returned after deleting a role.

id: string

Identifier of the deleted role.

deleted: boolean

Whether the role was deleted.

object: "role.deleted"

Always role.deleted.

AdminOrganizationProjectsCertificates

List project certificates
client.admin.organization.projects.certificates.list(stringprojectID, CertificateListParams { after, limit, order } query?, RequestOptionsoptions?): ConversationCursorPage<CertificateListResponse { id, active, certificate_details, 3 more } >
GET/organization/projects/{project_id}/certificates
Activate certificates for project
client.admin.organization.projects.certificates.activate(stringprojectID, CertificateActivateParams { certificate_ids } body, RequestOptionsoptions?): Page<CertificateActivateResponse { id, active, certificate_details, 3 more } >
POST/organization/projects/{project_id}/certificates/activate
Deactivate certificates for project
client.admin.organization.projects.certificates.deactivate(stringprojectID, CertificateDeactivateParams { certificate_ids } body, RequestOptionsoptions?): Page<CertificateDeactivateResponse { id, active, certificate_details, 3 more } >
POST/organization/projects/{project_id}/certificates/deactivate
ModelsExpand Collapse
CertificateListResponse { id, active, certificate_details, 3 more }

Represents an individual certificate configured at the project level.

id: string

The identifier, which can be referenced in API endpoints

active: boolean

Whether the certificate is currently active at the project level.

certificate_details: CertificateDetails { expires_at, valid_at }
expires_at?: number

The Unix timestamp (in seconds) of when the certificate expires.

formatunixtime
valid_at?: number

The Unix timestamp (in seconds) of when the certificate becomes valid.

formatunixtime
created_at: number

The Unix timestamp (in seconds) of when the certificate was uploaded.

formatunixtime
name: string | null

The name of the certificate.

object: "organization.project.certificate"

The object type, which is always organization.project.certificate.

CertificateActivateResponse { id, active, certificate_details, 3 more }

Represents an individual certificate configured at the project level.

id: string

The identifier, which can be referenced in API endpoints

active: boolean

Whether the certificate is currently active at the project level.

certificate_details: CertificateDetails { expires_at, valid_at }
expires_at?: number

The Unix timestamp (in seconds) of when the certificate expires.

formatunixtime
valid_at?: number

The Unix timestamp (in seconds) of when the certificate becomes valid.

formatunixtime
created_at: number

The Unix timestamp (in seconds) of when the certificate was uploaded.

formatunixtime
name: string | null

The name of the certificate.

object: "organization.project.certificate"

The object type, which is always organization.project.certificate.

CertificateDeactivateResponse { id, active, certificate_details, 3 more }

Represents an individual certificate configured at the project level.

id: string

The identifier, which can be referenced in API endpoints

active: boolean

Whether the certificate is currently active at the project level.

certificate_details: CertificateDetails { expires_at, valid_at }
expires_at?: number

The Unix timestamp (in seconds) of when the certificate expires.

formatunixtime
valid_at?: number

The Unix timestamp (in seconds) of when the certificate becomes valid.

formatunixtime
created_at: number

The Unix timestamp (in seconds) of when the certificate was uploaded.

formatunixtime
name: string | null

The name of the certificate.

object: "organization.project.certificate"

The object type, which is always organization.project.certificate.