Skip to content
Primary navigation

Organization

OrganizationAudit Logs

List user actions and configuration changes within this organization.

List audit logs
admin.organization.audit_logs.list(**kwargs) -> ConversationCursorPage<AuditLogListResponse { id, effective_at, type, 49 more } >
GET/organization/audit_logs
ModelsExpand Collapse
class 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: Integer

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{ api_key, session, type}

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, name}]
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, name}]
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: untyped

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{ id, name}]

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{ id, name}]

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: untyped

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: untyped

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: Integer

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

max_audio_megabytes_per_1_minute: Integer

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

max_images_per_1_minute: Integer

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

max_requests_per_1_day: Integer

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

max_requests_per_1_minute: Integer

The maximum requests per minute.

max_tokens_per_1_minute: Integer

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: untyped

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.

OrganizationAdmin API Keys

List all organization and project API keys.
admin.organization.admin_api_keys.list(**kwargs) -> CursorPage<AdminAPIKey { id, created_at, object, 4 more } >
GET/organization/admin_api_keys
Create admin API key
admin.organization.admin_api_keys.create(**kwargs) -> AdminAPIKeyCreateResponse { value }
POST/organization/admin_api_keys
Retrieve admin API key
admin.organization.admin_api_keys.retrieve(key_id) -> AdminAPIKey { id, created_at, object, 4 more }
GET/organization/admin_api_keys/{key_id}
Delete admin API key
admin.organization.admin_api_keys.delete(key_id) -> AdminAPIKeyDeleteResponse { id, deleted, object }
DELETE/organization/admin_api_keys/{key_id}
ModelsExpand Collapse
class 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: Integer

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: Integer

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: Integer

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

formatunixtime
name: String

The name of the API key

class AdminAPIKeyCreateResponse { value }

Represents an individual Admin API key in an org.

value: String

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

class AdminAPIKeyDeleteResponse { id, deleted, object }
id: String
deleted: bool
object: :"organization.admin_api_key.deleted"

OrganizationUsage

Audio speeches
admin.organization.usage.audio_speeches(**kwargs) -> UsageAudioSpeechesResponse { data, has_more, next_page, object }
GET/organization/usage/audio_speeches
Audio transcriptions
admin.organization.usage.audio_transcriptions(**kwargs) -> UsageAudioTranscriptionsResponse { data, has_more, next_page, object }
GET/organization/usage/audio_transcriptions
Code interpreter sessions
admin.organization.usage.code_interpreter_sessions(**kwargs) -> UsageCodeInterpreterSessionsResponse { data, has_more, next_page, object }
GET/organization/usage/code_interpreter_sessions
Completions
admin.organization.usage.completions(**kwargs) -> UsageCompletionsResponse { data, has_more, next_page, object }
GET/organization/usage/completions
Embeddings
admin.organization.usage.embeddings(**kwargs) -> UsageEmbeddingsResponse { data, has_more, next_page, object }
GET/organization/usage/embeddings
Images
admin.organization.usage.images(**kwargs) -> UsageImagesResponse { data, has_more, next_page, object }
GET/organization/usage/images
Moderations
admin.organization.usage.moderations(**kwargs) -> UsageModerationsResponse { data, has_more, next_page, object }
GET/organization/usage/moderations
Vector stores
admin.organization.usage.vector_stores(**kwargs) -> UsageVectorStoresResponse { data, has_more, next_page, object }
GET/organization/usage/vector_stores
Costs
admin.organization.usage.costs(**kwargs) -> UsageCostsResponse { data, has_more, next_page, object }
GET/organization/costs
ModelsExpand Collapse
class UsageAudioSpeechesResponse { data, has_more, next_page, object }
data: Array[Data{ end_time, object, results, start_time}]
end_time: Integer
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:
class OrganizationUsageCompletionsResult { input_tokens, num_model_requests, object, 10 more }

The aggregated completions usage details of the specific time bucket.

input_tokens: Integer

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: Integer

The count of requests made to the model.

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

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

api_key_id: String

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

batch: bool

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

input_audio_tokens: Integer

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

input_cached_tokens: Integer

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

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

output_audio_tokens: Integer

The aggregated number of audio output tokens used.

project_id: String

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

service_tier: String

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

user_id: String

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

class OrganizationUsageEmbeddingsResult { input_tokens, num_model_requests, object, 4 more }

The aggregated embeddings usage details of the specific time bucket.

input_tokens: Integer

The aggregated number of input tokens used.

num_model_requests: Integer

The count of requests made to the model.

object: :"organization.usage.embeddings.result"
api_key_id: String

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

model: String

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

project_id: String

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

user_id: String

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

class OrganizationUsageModerationsResult { input_tokens, num_model_requests, object, 4 more }

The aggregated moderations usage details of the specific time bucket.

input_tokens: Integer

The aggregated number of input tokens used.

num_model_requests: Integer

The count of requests made to the model.

object: :"organization.usage.moderations.result"
api_key_id: String

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

model: String

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

project_id: String

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

user_id: String

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

class OrganizationUsageImagesResult { images, num_model_requests, object, 6 more }

The aggregated images usage details of the specific time bucket.

images: Integer

The number of images processed.

num_model_requests: Integer

The count of requests made to the model.

object: :"organization.usage.images.result"
api_key_id: String

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

model: String

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

project_id: String

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

size: String

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

source: String

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

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

class OrganizationUsageAudioSpeechesResult { characters, num_model_requests, object, 4 more }

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

characters: Integer

The number of characters processed.

num_model_requests: Integer

The count of requests made to the model.

object: :"organization.usage.audio_speeches.result"
api_key_id: String

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

model: String

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

project_id: String

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

user_id: String

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

class OrganizationUsageAudioTranscriptionsResult { num_model_requests, object, seconds, 4 more }

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

num_model_requests: Integer

The count of requests made to the model.

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

The number of seconds processed.

formatint64
api_key_id: String

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

model: String

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

project_id: String

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

user_id: String

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

class 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: Integer

The vector stores usage in bytes.

project_id: String

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

class OrganizationUsageCodeInterpreterSessionsResult { num_sessions, object, project_id }

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

num_sessions: Integer

The number of code interpreter sessions.

object: :"organization.usage.code_interpreter_sessions.result"
project_id: String

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

class 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: Float

The numeric value of the cost.

api_key_id: String

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

line_item: String

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

project_id: String

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

quantity: Float

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

start_time: Integer
has_more: bool
next_page: String
object: :page
class UsageAudioTranscriptionsResponse { data, has_more, next_page, object }
data: Array[Data{ end_time, object, results, start_time}]
end_time: Integer
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:
class OrganizationUsageCompletionsResult { input_tokens, num_model_requests, object, 10 more }

The aggregated completions usage details of the specific time bucket.

input_tokens: Integer

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: Integer

The count of requests made to the model.

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

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

api_key_id: String

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

batch: bool

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

input_audio_tokens: Integer

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

input_cached_tokens: Integer

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

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

output_audio_tokens: Integer

The aggregated number of audio output tokens used.

project_id: String

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

service_tier: String

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

user_id: String

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

class OrganizationUsageEmbeddingsResult { input_tokens, num_model_requests, object, 4 more }

The aggregated embeddings usage details of the specific time bucket.

input_tokens: Integer

The aggregated number of input tokens used.

num_model_requests: Integer

The count of requests made to the model.

object: :"organization.usage.embeddings.result"
api_key_id: String

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

model: String

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

project_id: String

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

user_id: String

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

class OrganizationUsageModerationsResult { input_tokens, num_model_requests, object, 4 more }

The aggregated moderations usage details of the specific time bucket.

input_tokens: Integer

The aggregated number of input tokens used.

num_model_requests: Integer

The count of requests made to the model.

object: :"organization.usage.moderations.result"
api_key_id: String

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

model: String

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

project_id: String

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

user_id: String

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

class OrganizationUsageImagesResult { images, num_model_requests, object, 6 more }

The aggregated images usage details of the specific time bucket.

images: Integer

The number of images processed.

num_model_requests: Integer

The count of requests made to the model.

object: :"organization.usage.images.result"
api_key_id: String

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

model: String

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

project_id: String

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

size: String

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

source: String

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

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

class OrganizationUsageAudioSpeechesResult { characters, num_model_requests, object, 4 more }

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

characters: Integer

The number of characters processed.

num_model_requests: Integer

The count of requests made to the model.

object: :"organization.usage.audio_speeches.result"
api_key_id: String

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

model: String

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

project_id: String

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

user_id: String

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

class OrganizationUsageAudioTranscriptionsResult { num_model_requests, object, seconds, 4 more }

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

num_model_requests: Integer

The count of requests made to the model.

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

The number of seconds processed.

formatint64
api_key_id: String

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

model: String

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

project_id: String

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

user_id: String

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

class 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: Integer

The vector stores usage in bytes.

project_id: String

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

class OrganizationUsageCodeInterpreterSessionsResult { num_sessions, object, project_id }

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

num_sessions: Integer

The number of code interpreter sessions.

object: :"organization.usage.code_interpreter_sessions.result"
project_id: String

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

class 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: Float

The numeric value of the cost.

api_key_id: String

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

line_item: String

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

project_id: String

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

quantity: Float

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

start_time: Integer
has_more: bool
next_page: String
object: :page
class UsageCodeInterpreterSessionsResponse { data, has_more, next_page, object }
data: Array[Data{ end_time, object, results, start_time}]
end_time: Integer
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:
class OrganizationUsageCompletionsResult { input_tokens, num_model_requests, object, 10 more }

The aggregated completions usage details of the specific time bucket.

input_tokens: Integer

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: Integer

The count of requests made to the model.

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

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

api_key_id: String

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

batch: bool

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

input_audio_tokens: Integer

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

input_cached_tokens: Integer

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

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

output_audio_tokens: Integer

The aggregated number of audio output tokens used.

project_id: String

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

service_tier: String

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

user_id: String

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

class OrganizationUsageEmbeddingsResult { input_tokens, num_model_requests, object, 4 more }

The aggregated embeddings usage details of the specific time bucket.

input_tokens: Integer

The aggregated number of input tokens used.

num_model_requests: Integer

The count of requests made to the model.

object: :"organization.usage.embeddings.result"
api_key_id: String

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

model: String

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

project_id: String

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

user_id: String

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

class OrganizationUsageModerationsResult { input_tokens, num_model_requests, object, 4 more }

The aggregated moderations usage details of the specific time bucket.

input_tokens: Integer

The aggregated number of input tokens used.

num_model_requests: Integer

The count of requests made to the model.

object: :"organization.usage.moderations.result"
api_key_id: String

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

model: String

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

project_id: String

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

user_id: String

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

class OrganizationUsageImagesResult { images, num_model_requests, object, 6 more }

The aggregated images usage details of the specific time bucket.

images: Integer

The number of images processed.

num_model_requests: Integer

The count of requests made to the model.

object: :"organization.usage.images.result"
api_key_id: String

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

model: String

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

project_id: String

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

size: String

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

source: String

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

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

class OrganizationUsageAudioSpeechesResult { characters, num_model_requests, object, 4 more }

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

characters: Integer

The number of characters processed.

num_model_requests: Integer

The count of requests made to the model.

object: :"organization.usage.audio_speeches.result"
api_key_id: String

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

model: String

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

project_id: String

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

user_id: String

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

class OrganizationUsageAudioTranscriptionsResult { num_model_requests, object, seconds, 4 more }

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

num_model_requests: Integer

The count of requests made to the model.

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

The number of seconds processed.

formatint64
api_key_id: String

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

model: String

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

project_id: String

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

user_id: String

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

class 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: Integer

The vector stores usage in bytes.

project_id: String

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

class OrganizationUsageCodeInterpreterSessionsResult { num_sessions, object, project_id }

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

num_sessions: Integer

The number of code interpreter sessions.

object: :"organization.usage.code_interpreter_sessions.result"
project_id: String

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

class 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: Float

The numeric value of the cost.

api_key_id: String

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

line_item: String

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

project_id: String

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

quantity: Float

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

start_time: Integer
has_more: bool
next_page: String
object: :page
class UsageCompletionsResponse { data, has_more, next_page, object }
data: Array[Data{ end_time, object, results, start_time}]
end_time: Integer
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:
class OrganizationUsageCompletionsResult { input_tokens, num_model_requests, object, 10 more }

The aggregated completions usage details of the specific time bucket.

input_tokens: Integer

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: Integer

The count of requests made to the model.

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

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

api_key_id: String

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

batch: bool

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

input_audio_tokens: Integer

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

input_cached_tokens: Integer

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

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

output_audio_tokens: Integer

The aggregated number of audio output tokens used.

project_id: String

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

service_tier: String

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

user_id: String

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

class OrganizationUsageEmbeddingsResult { input_tokens, num_model_requests, object, 4 more }

The aggregated embeddings usage details of the specific time bucket.

input_tokens: Integer

The aggregated number of input tokens used.

num_model_requests: Integer

The count of requests made to the model.

object: :"organization.usage.embeddings.result"
api_key_id: String

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

model: String

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

project_id: String

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

user_id: String

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

class OrganizationUsageModerationsResult { input_tokens, num_model_requests, object, 4 more }

The aggregated moderations usage details of the specific time bucket.

input_tokens: Integer

The aggregated number of input tokens used.

num_model_requests: Integer

The count of requests made to the model.

object: :"organization.usage.moderations.result"
api_key_id: String

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

model: String

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

project_id: String

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

user_id: String

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

class OrganizationUsageImagesResult { images, num_model_requests, object, 6 more }

The aggregated images usage details of the specific time bucket.

images: Integer

The number of images processed.

num_model_requests: Integer

The count of requests made to the model.

object: :"organization.usage.images.result"
api_key_id: String

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

model: String

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

project_id: String

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

size: String

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

source: String

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

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

class OrganizationUsageAudioSpeechesResult { characters, num_model_requests, object, 4 more }

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

characters: Integer

The number of characters processed.

num_model_requests: Integer

The count of requests made to the model.

object: :"organization.usage.audio_speeches.result"
api_key_id: String

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

model: String

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

project_id: String

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

user_id: String

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

class OrganizationUsageAudioTranscriptionsResult { num_model_requests, object, seconds, 4 more }

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

num_model_requests: Integer

The count of requests made to the model.

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

The number of seconds processed.

formatint64
api_key_id: String

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

model: String

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

project_id: String

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

user_id: String

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

class 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: Integer

The vector stores usage in bytes.

project_id: String

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

class OrganizationUsageCodeInterpreterSessionsResult { num_sessions, object, project_id }

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

num_sessions: Integer

The number of code interpreter sessions.

object: :"organization.usage.code_interpreter_sessions.result"
project_id: String

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

class 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: Float

The numeric value of the cost.

api_key_id: String

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

line_item: String

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

project_id: String

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

quantity: Float

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

start_time: Integer
has_more: bool
next_page: String
object: :page
class UsageEmbeddingsResponse { data, has_more, next_page, object }
data: Array[Data{ end_time, object, results, start_time}]
end_time: Integer
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:
class OrganizationUsageCompletionsResult { input_tokens, num_model_requests, object, 10 more }

The aggregated completions usage details of the specific time bucket.

input_tokens: Integer

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: Integer

The count of requests made to the model.

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

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

api_key_id: String

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

batch: bool

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

input_audio_tokens: Integer

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

input_cached_tokens: Integer

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

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

output_audio_tokens: Integer

The aggregated number of audio output tokens used.

project_id: String

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

service_tier: String

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

user_id: String

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

class OrganizationUsageEmbeddingsResult { input_tokens, num_model_requests, object, 4 more }

The aggregated embeddings usage details of the specific time bucket.

input_tokens: Integer

The aggregated number of input tokens used.

num_model_requests: Integer

The count of requests made to the model.

object: :"organization.usage.embeddings.result"
api_key_id: String

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

model: String

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

project_id: String

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

user_id: String

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

class OrganizationUsageModerationsResult { input_tokens, num_model_requests, object, 4 more }

The aggregated moderations usage details of the specific time bucket.

input_tokens: Integer

The aggregated number of input tokens used.

num_model_requests: Integer

The count of requests made to the model.

object: :"organization.usage.moderations.result"
api_key_id: String

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

model: String

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

project_id: String

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

user_id: String

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

class OrganizationUsageImagesResult { images, num_model_requests, object, 6 more }

The aggregated images usage details of the specific time bucket.

images: Integer

The number of images processed.

num_model_requests: Integer

The count of requests made to the model.

object: :"organization.usage.images.result"
api_key_id: String

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

model: String

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

project_id: String

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

size: String

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

source: String

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

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

class OrganizationUsageAudioSpeechesResult { characters, num_model_requests, object, 4 more }

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

characters: Integer

The number of characters processed.

num_model_requests: Integer

The count of requests made to the model.

object: :"organization.usage.audio_speeches.result"
api_key_id: String

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

model: String

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

project_id: String

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

user_id: String

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

class OrganizationUsageAudioTranscriptionsResult { num_model_requests, object, seconds, 4 more }

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

num_model_requests: Integer

The count of requests made to the model.

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

The number of seconds processed.

formatint64
api_key_id: String

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

model: String

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

project_id: String

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

user_id: String

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

class 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: Integer

The vector stores usage in bytes.

project_id: String

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

class OrganizationUsageCodeInterpreterSessionsResult { num_sessions, object, project_id }

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

num_sessions: Integer

The number of code interpreter sessions.

object: :"organization.usage.code_interpreter_sessions.result"
project_id: String

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

class 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: Float

The numeric value of the cost.

api_key_id: String

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

line_item: String

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

project_id: String

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

quantity: Float

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

start_time: Integer
has_more: bool
next_page: String
object: :page
class UsageImagesResponse { data, has_more, next_page, object }
data: Array[Data{ end_time, object, results, start_time}]
end_time: Integer
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:
class OrganizationUsageCompletionsResult { input_tokens, num_model_requests, object, 10 more }

The aggregated completions usage details of the specific time bucket.

input_tokens: Integer

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: Integer

The count of requests made to the model.

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

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

api_key_id: String

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

batch: bool

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

input_audio_tokens: Integer

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

input_cached_tokens: Integer

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

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

output_audio_tokens: Integer

The aggregated number of audio output tokens used.

project_id: String

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

service_tier: String

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

user_id: String

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

class OrganizationUsageEmbeddingsResult { input_tokens, num_model_requests, object, 4 more }

The aggregated embeddings usage details of the specific time bucket.

input_tokens: Integer

The aggregated number of input tokens used.

num_model_requests: Integer

The count of requests made to the model.

object: :"organization.usage.embeddings.result"
api_key_id: String

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

model: String

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

project_id: String

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

user_id: String

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

class OrganizationUsageModerationsResult { input_tokens, num_model_requests, object, 4 more }

The aggregated moderations usage details of the specific time bucket.

input_tokens: Integer

The aggregated number of input tokens used.

num_model_requests: Integer

The count of requests made to the model.

object: :"organization.usage.moderations.result"
api_key_id: String

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

model: String

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

project_id: String

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

user_id: String

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

class OrganizationUsageImagesResult { images, num_model_requests, object, 6 more }

The aggregated images usage details of the specific time bucket.

images: Integer

The number of images processed.

num_model_requests: Integer

The count of requests made to the model.

object: :"organization.usage.images.result"
api_key_id: String

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

model: String

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

project_id: String

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

size: String

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

source: String

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

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

class OrganizationUsageAudioSpeechesResult { characters, num_model_requests, object, 4 more }

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

characters: Integer

The number of characters processed.

num_model_requests: Integer

The count of requests made to the model.

object: :"organization.usage.audio_speeches.result"
api_key_id: String

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

model: String

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

project_id: String

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

user_id: String

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

class OrganizationUsageAudioTranscriptionsResult { num_model_requests, object, seconds, 4 more }

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

num_model_requests: Integer

The count of requests made to the model.

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

The number of seconds processed.

formatint64
api_key_id: String

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

model: String

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

project_id: String

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

user_id: String

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

class 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: Integer

The vector stores usage in bytes.

project_id: String

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

class OrganizationUsageCodeInterpreterSessionsResult { num_sessions, object, project_id }

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

num_sessions: Integer

The number of code interpreter sessions.

object: :"organization.usage.code_interpreter_sessions.result"
project_id: String

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

class 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: Float

The numeric value of the cost.

api_key_id: String

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

line_item: String

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

project_id: String

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

quantity: Float

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

start_time: Integer
has_more: bool
next_page: String
object: :page
class UsageModerationsResponse { data, has_more, next_page, object }
data: Array[Data{ end_time, object, results, start_time}]
end_time: Integer
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:
class OrganizationUsageCompletionsResult { input_tokens, num_model_requests, object, 10 more }

The aggregated completions usage details of the specific time bucket.

input_tokens: Integer

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: Integer

The count of requests made to the model.

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

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

api_key_id: String

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

batch: bool

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

input_audio_tokens: Integer

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

input_cached_tokens: Integer

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

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

output_audio_tokens: Integer

The aggregated number of audio output tokens used.

project_id: String

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

service_tier: String

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

user_id: String

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

class OrganizationUsageEmbeddingsResult { input_tokens, num_model_requests, object, 4 more }

The aggregated embeddings usage details of the specific time bucket.

input_tokens: Integer

The aggregated number of input tokens used.

num_model_requests: Integer

The count of requests made to the model.

object: :"organization.usage.embeddings.result"
api_key_id: String

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

model: String

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

project_id: String

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

user_id: String

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

class OrganizationUsageModerationsResult { input_tokens, num_model_requests, object, 4 more }

The aggregated moderations usage details of the specific time bucket.

input_tokens: Integer

The aggregated number of input tokens used.

num_model_requests: Integer

The count of requests made to the model.

object: :"organization.usage.moderations.result"
api_key_id: String

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

model: String

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

project_id: String

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

user_id: String

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

class OrganizationUsageImagesResult { images, num_model_requests, object, 6 more }

The aggregated images usage details of the specific time bucket.

images: Integer

The number of images processed.

num_model_requests: Integer

The count of requests made to the model.

object: :"organization.usage.images.result"
api_key_id: String

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

model: String

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

project_id: String

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

size: String

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

source: String

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

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

class OrganizationUsageAudioSpeechesResult { characters, num_model_requests, object, 4 more }

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

characters: Integer

The number of characters processed.

num_model_requests: Integer

The count of requests made to the model.

object: :"organization.usage.audio_speeches.result"
api_key_id: String

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

model: String

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

project_id: String

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

user_id: String

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

class OrganizationUsageAudioTranscriptionsResult { num_model_requests, object, seconds, 4 more }

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

num_model_requests: Integer

The count of requests made to the model.

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

The number of seconds processed.

formatint64
api_key_id: String

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

model: String

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

project_id: String

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

user_id: String

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

class 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: Integer

The vector stores usage in bytes.

project_id: String

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

class OrganizationUsageCodeInterpreterSessionsResult { num_sessions, object, project_id }

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

num_sessions: Integer

The number of code interpreter sessions.

object: :"organization.usage.code_interpreter_sessions.result"
project_id: String

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

class 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: Float

The numeric value of the cost.

api_key_id: String

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

line_item: String

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

project_id: String

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

quantity: Float

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

start_time: Integer
has_more: bool
next_page: String
object: :page
class UsageVectorStoresResponse { data, has_more, next_page, object }
data: Array[Data{ end_time, object, results, start_time}]
end_time: Integer
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:
class OrganizationUsageCompletionsResult { input_tokens, num_model_requests, object, 10 more }

The aggregated completions usage details of the specific time bucket.

input_tokens: Integer

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: Integer

The count of requests made to the model.

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

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

api_key_id: String

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

batch: bool

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

input_audio_tokens: Integer

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

input_cached_tokens: Integer

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

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

output_audio_tokens: Integer

The aggregated number of audio output tokens used.

project_id: String

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

service_tier: String

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

user_id: String

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

class OrganizationUsageEmbeddingsResult { input_tokens, num_model_requests, object, 4 more }

The aggregated embeddings usage details of the specific time bucket.

input_tokens: Integer

The aggregated number of input tokens used.

num_model_requests: Integer

The count of requests made to the model.

object: :"organization.usage.embeddings.result"
api_key_id: String

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

model: String

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

project_id: String

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

user_id: String

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

class OrganizationUsageModerationsResult { input_tokens, num_model_requests, object, 4 more }

The aggregated moderations usage details of the specific time bucket.

input_tokens: Integer

The aggregated number of input tokens used.

num_model_requests: Integer

The count of requests made to the model.

object: :"organization.usage.moderations.result"
api_key_id: String

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

model: String

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

project_id: String

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

user_id: String

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

class OrganizationUsageImagesResult { images, num_model_requests, object, 6 more }

The aggregated images usage details of the specific time bucket.

images: Integer

The number of images processed.

num_model_requests: Integer

The count of requests made to the model.

object: :"organization.usage.images.result"
api_key_id: String

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

model: String

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

project_id: String

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

size: String

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

source: String

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

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

class OrganizationUsageAudioSpeechesResult { characters, num_model_requests, object, 4 more }

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

characters: Integer

The number of characters processed.

num_model_requests: Integer

The count of requests made to the model.

object: :"organization.usage.audio_speeches.result"
api_key_id: String

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

model: String

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

project_id: String

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

user_id: String

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

class OrganizationUsageAudioTranscriptionsResult { num_model_requests, object, seconds, 4 more }

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

num_model_requests: Integer

The count of requests made to the model.

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

The number of seconds processed.

formatint64
api_key_id: String

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

model: String

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

project_id: String

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

user_id: String

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

class 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: Integer

The vector stores usage in bytes.

project_id: String

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

class OrganizationUsageCodeInterpreterSessionsResult { num_sessions, object, project_id }

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

num_sessions: Integer

The number of code interpreter sessions.

object: :"organization.usage.code_interpreter_sessions.result"
project_id: String

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

class 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: Float

The numeric value of the cost.

api_key_id: String

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

line_item: String

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

project_id: String

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

quantity: Float

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

start_time: Integer
has_more: bool
next_page: String
object: :page
class UsageCostsResponse { data, has_more, next_page, object }
data: Array[Data{ end_time, object, results, start_time}]
end_time: Integer
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:
class OrganizationUsageCompletionsResult { input_tokens, num_model_requests, object, 10 more }

The aggregated completions usage details of the specific time bucket.

input_tokens: Integer

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: Integer

The count of requests made to the model.

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

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

api_key_id: String

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

batch: bool

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

input_audio_tokens: Integer

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

input_cached_tokens: Integer

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

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

output_audio_tokens: Integer

The aggregated number of audio output tokens used.

project_id: String

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

service_tier: String

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

user_id: String

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

class OrganizationUsageEmbeddingsResult { input_tokens, num_model_requests, object, 4 more }

The aggregated embeddings usage details of the specific time bucket.

input_tokens: Integer

The aggregated number of input tokens used.

num_model_requests: Integer

The count of requests made to the model.

object: :"organization.usage.embeddings.result"
api_key_id: String

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

model: String

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

project_id: String

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

user_id: String

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

class OrganizationUsageModerationsResult { input_tokens, num_model_requests, object, 4 more }

The aggregated moderations usage details of the specific time bucket.

input_tokens: Integer

The aggregated number of input tokens used.

num_model_requests: Integer

The count of requests made to the model.

object: :"organization.usage.moderations.result"
api_key_id: String

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

model: String

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

project_id: String

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

user_id: String

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

class OrganizationUsageImagesResult { images, num_model_requests, object, 6 more }

The aggregated images usage details of the specific time bucket.

images: Integer

The number of images processed.

num_model_requests: Integer

The count of requests made to the model.

object: :"organization.usage.images.result"
api_key_id: String

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

model: String

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

project_id: String

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

size: String

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

source: String

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

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

class OrganizationUsageAudioSpeechesResult { characters, num_model_requests, object, 4 more }

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

characters: Integer

The number of characters processed.

num_model_requests: Integer

The count of requests made to the model.

object: :"organization.usage.audio_speeches.result"
api_key_id: String

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

model: String

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

project_id: String

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

user_id: String

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

class OrganizationUsageAudioTranscriptionsResult { num_model_requests, object, seconds, 4 more }

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

num_model_requests: Integer

The count of requests made to the model.

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

The number of seconds processed.

formatint64
api_key_id: String

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

model: String

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

project_id: String

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

user_id: String

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

class 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: Integer

The vector stores usage in bytes.

project_id: String

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

class OrganizationUsageCodeInterpreterSessionsResult { num_sessions, object, project_id }

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

num_sessions: Integer

The number of code interpreter sessions.

object: :"organization.usage.code_interpreter_sessions.result"
project_id: String

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

class 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: Float

The numeric value of the cost.

api_key_id: String

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

line_item: String

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

project_id: String

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

quantity: Float

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

start_time: Integer
has_more: bool
next_page: String
object: :page

OrganizationInvites

List invites
admin.organization.invites.list(**kwargs) -> ConversationCursorPage<Invite { id, created_at, email, 6 more } >
GET/organization/invites
Create invite
admin.organization.invites.create(**kwargs) -> Invite { id, created_at, email, 6 more }
POST/organization/invites
Retrieve invite
admin.organization.invites.retrieve(invite_id) -> Invite { id, created_at, email, 6 more }
GET/organization/invites/{invite_id}
Delete invite
admin.organization.invites.delete(invite_id) -> InviteDeleteResponse { id, deleted, object }
DELETE/organization/invites/{invite_id}
ModelsExpand Collapse
class 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: Integer

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{ id, role}]

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: Integer

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

formatunixtime
expires_at: Integer

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

formatunixtime
class InviteDeleteResponse { id, deleted, object }
id: String
deleted: bool
object: :"organization.invite.deleted"

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

OrganizationUsers

List users
admin.organization.users.list(**kwargs) -> ConversationCursorPage<OrganizationUser { id, added_at, object, 13 more } >
GET/organization/users
Retrieve user
admin.organization.users.retrieve(user_id) -> OrganizationUser { id, added_at, object, 13 more }
GET/organization/users/{user_id}
Modify user
admin.organization.users.update(user_id, **kwargs) -> OrganizationUser { id, added_at, object, 13 more }
POST/organization/users/{user_id}
Delete user
admin.organization.users.delete(user_id) -> UserDeleteResponse { id, deleted, object }
DELETE/organization/users/{user_id}
ModelsExpand Collapse
class 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: Integer

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: Integer

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

formatunixtime
created: Integer

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

formatunixtime
developer_persona: String

The developer persona metadata for the user.

email: String

The email address of the user

is_default: bool

Whether this is the organization’s default user.

is_scale_tier_authorized_purchaser: bool

Whether the user is an authorized purchaser for Scale Tier.

is_scim_managed: bool

Whether the user is managed through SCIM.

is_service_account: bool

Whether the user is a service account.

name: String

The name of the user

projects: Projects{ data, object}

Projects associated with the user, if included.

data: Array[Data{ id, name, role}]
id: String
name: String
role: String
object: :list
role: String

owner or reader

technical_level: String

The technical level metadata for the user.

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

Nested user details.

id: String
object: :user
banned: bool
banned_at: Integer
formatunixtime
email: String
enabled: bool
name: String
picture: String
class UserDeleteResponse { id, deleted, object }
id: String
deleted: bool
object: :"organization.user.deleted"

OrganizationUsersRoles

List user organization role assignments
admin.organization.users.roles.list(user_id, **kwargs) -> NextCursorPage<RoleListResponse { id, created_at, created_by, 8 more } >
GET/organization/users/{user_id}/roles
Assign organization role to user
admin.organization.users.roles.create(user_id, **kwargs) -> RoleCreateResponse { object, role, user }
POST/organization/users/{user_id}/roles
Unassign organization role from user
admin.organization.users.roles.delete(role_id, **kwargs) -> RoleDeleteResponse { deleted, object }
DELETE/organization/users/{user_id}/roles/{role_id}
ModelsExpand Collapse
class 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: Integer

When the role was created.

formatunixtime
created_by: String

Identifier of the actor who created the role.

created_by_user_obj: Hash[Symbol, untyped]

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

description: String

Description of the role.

metadata: Hash[Symbol, untyped]

Arbitrary metadata stored on the role.

name: String

Name of the role.

permissions: Array[String]

Permissions associated with the role.

predefined_role: bool

Whether the role is predefined by OpenAI.

resource_type: String

Resource type the role applies to.

updated_at: Integer

When the role was last updated.

formatint64
class 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.

class RoleDeleteResponse { deleted, object }

Confirmation payload returned after unassigning a role.

deleted: bool

Whether the assignment was removed.

object: String

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

OrganizationGroups

List groups
admin.organization.groups.list(**kwargs) -> NextCursorPage<Group { id, created_at, group_type, 2 more } >
GET/organization/groups
Create group
admin.organization.groups.create(**kwargs) -> Group { id, created_at, group_type, 2 more }
POST/organization/groups
Update group
admin.organization.groups.update(group_id, **kwargs) -> GroupUpdateResponse { id, created_at, is_scim_managed, name }
POST/organization/groups/{group_id}
Delete group
admin.organization.groups.delete(group_id) -> GroupDeleteResponse { id, deleted, object }
DELETE/organization/groups/{group_id}
ModelsExpand Collapse
class Group { id, created_at, group_type, 2 more }

Details about an organization group.

id: String

Identifier for the group.

created_at: Integer

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

formatunixtime
group_type: String

The type of the group.

is_scim_managed: bool

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

name: String

Display name of the group.

class GroupUpdateResponse { id, created_at, is_scim_managed, name }

Response returned after updating a group.

id: String

Identifier for the group.

created_at: Integer

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

formatunixtime
is_scim_managed: bool

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

name: String

Updated display name for the group.

class GroupDeleteResponse { id, deleted, object }

Confirmation payload returned after deleting a group.

id: String

Identifier of the deleted group.

deleted: bool

Whether the group was deleted.

object: :"group.deleted"

Always group.deleted.

OrganizationGroupsUsers

List group users
admin.organization.groups.users.list(group_id, **kwargs) -> NextCursorPage<OrganizationGroupUser { id, email, name } >
GET/organization/groups/{group_id}/users
Add group user
admin.organization.groups.users.create(group_id, **kwargs) -> UserCreateResponse { group_id, object, user_id }
POST/organization/groups/{group_id}/users
Remove group user
admin.organization.groups.users.delete(user_id, **kwargs) -> UserDeleteResponse { deleted, object }
DELETE/organization/groups/{group_id}/users/{user_id}
ModelsExpand Collapse
class 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

The email address of the user.

name: String

The name of the user.

class 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.

class UserDeleteResponse { deleted, object }

Confirmation payload returned after removing a user from a group.

deleted: bool

Whether the group membership was removed.

object: :"group.user.deleted"

Always group.user.deleted.

OrganizationGroupsRoles

List group organization role assignments
admin.organization.groups.roles.list(group_id, **kwargs) -> NextCursorPage<RoleListResponse { id, created_at, created_by, 8 more } >
GET/organization/groups/{group_id}/roles
Assign organization role to group
admin.organization.groups.roles.create(group_id, **kwargs) -> RoleCreateResponse { group, object, role }
POST/organization/groups/{group_id}/roles
Unassign organization role from group
admin.organization.groups.roles.delete(role_id, **kwargs) -> RoleDeleteResponse { deleted, object }
DELETE/organization/groups/{group_id}/roles/{role_id}
ModelsExpand Collapse
class 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: Integer

When the role was created.

formatunixtime
created_by: String

Identifier of the actor who created the role.

created_by_user_obj: Hash[Symbol, untyped]

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

description: String

Description of the role.

metadata: Hash[Symbol, untyped]

Arbitrary metadata stored on the role.

name: String

Name of the role.

permissions: Array[String]

Permissions associated with the role.

predefined_role: bool

Whether the role is predefined by OpenAI.

resource_type: String

Resource type the role applies to.

updated_at: Integer

When the role was last updated.

formatint64
class 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: Integer

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

formatunixtime
name: String

Display name of the group.

object: :group

Always group.

scim_managed: bool

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.

class RoleDeleteResponse { deleted, object }

Confirmation payload returned after unassigning a role.

deleted: bool

Whether the assignment was removed.

object: String

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

OrganizationRoles

List organization roles
admin.organization.roles.list(**kwargs) -> NextCursorPage<Role { id, description, name, 4 more } >
GET/organization/roles
Create organization role
admin.organization.roles.create(**kwargs) -> Role { id, description, name, 4 more }
POST/organization/roles
Update organization role
admin.organization.roles.update(role_id, **kwargs) -> Role { id, description, name, 4 more }
POST/organization/roles/{role_id}
Delete organization role
admin.organization.roles.delete(role_id) -> RoleDeleteResponse { id, deleted, object }
DELETE/organization/roles/{role_id}
ModelsExpand Collapse
class 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

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: bool

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).

class RoleDeleteResponse { id, deleted, object }

Confirmation payload returned after deleting a role.

id: String

Identifier of the deleted role.

deleted: bool

Whether the role was deleted.

object: :"role.deleted"

Always role.deleted.

OrganizationCertificates

List organization certificates
admin.organization.certificates.list(**kwargs) -> ConversationCursorPage<CertificateListResponse { id, active, certificate_details, 3 more } >
GET/organization/certificates
Upload certificate
admin.organization.certificates.create(**kwargs) -> Certificate { id, certificate_details, created_at, 3 more }
POST/organization/certificates
Get certificate
admin.organization.certificates.retrieve(certificate_id, **kwargs) -> Certificate { id, certificate_details, created_at, 3 more }
GET/organization/certificates/{certificate_id}
Modify certificate
admin.organization.certificates.update(certificate_id, **kwargs) -> Certificate { id, certificate_details, created_at, 3 more }
POST/organization/certificates/{certificate_id}
Delete certificate
admin.organization.certificates.delete(certificate_id) -> CertificateDeleteResponse { id, object }
DELETE/organization/certificates/{certificate_id}
Activate certificates for organization
admin.organization.certificates.activate(**kwargs) -> Page<CertificateActivateResponse { id, active, certificate_details, 3 more } >
POST/organization/certificates/activate
Deactivate certificates for organization
admin.organization.certificates.deactivate(**kwargs) -> Page<CertificateDeactivateResponse { id, active, certificate_details, 3 more } >
POST/organization/certificates/deactivate
ModelsExpand Collapse
class 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: Integer

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

formatunixtime
valid_at: Integer

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

formatunixtime
created_at: Integer

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

formatunixtime
name: String

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: bool

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

class 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: bool

Whether the certificate is currently active at the organization level.

certificate_details: CertificateDetails{ expires_at, valid_at}
expires_at: Integer

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

formatunixtime
valid_at: Integer

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

formatunixtime
created_at: Integer

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

formatunixtime
name: String

The name of the certificate.

object: :"organization.certificate"

The object type, which is always organization.certificate.

class CertificateDeleteResponse { id, object }
id: String

The ID of the certificate that was deleted.

object: :"certificate.deleted"

The object type, must be certificate.deleted.

class 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: bool

Whether the certificate is currently active at the organization level.

certificate_details: CertificateDetails{ expires_at, valid_at}
expires_at: Integer

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

formatunixtime
valid_at: Integer

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

formatunixtime
created_at: Integer

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

formatunixtime
name: String

The name of the certificate.

object: :"organization.certificate"

The object type, which is always organization.certificate.

class 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: bool

Whether the certificate is currently active at the organization level.

certificate_details: CertificateDetails{ expires_at, valid_at}
expires_at: Integer

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

formatunixtime
valid_at: Integer

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

formatunixtime
created_at: Integer

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

formatunixtime
name: String

The name of the certificate.

object: :"organization.certificate"

The object type, which is always organization.certificate.

OrganizationProjects

List projects
admin.organization.projects.list(**kwargs) -> ConversationCursorPage<Project { id, created_at, object, 4 more } >
GET/organization/projects
Create project
admin.organization.projects.create(**kwargs) -> Project { id, created_at, object, 4 more }
POST/organization/projects
Retrieve project
admin.organization.projects.retrieve(project_id) -> Project { id, created_at, object, 4 more }
GET/organization/projects/{project_id}
Modify project
admin.organization.projects.update(project_id, **kwargs) -> Project { id, created_at, object, 4 more }
POST/organization/projects/{project_id}
Archive project
admin.organization.projects.archive(project_id) -> Project { id, created_at, object, 4 more }
POST/organization/projects/{project_id}/archive
ModelsExpand Collapse
class Project { id, created_at, object, 4 more }

Represents an individual project.

id: String

The identifier, which can be referenced in API endpoints

created_at: Integer

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: Integer

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

formatunixtime
external_key_id: String

The external key associated with the project.

name: String

The name of the project. This appears in reporting.

status: String

active or archived

OrganizationProjectsUsers

List project users
admin.organization.projects.users.list(project_id, **kwargs) -> ConversationCursorPage<ProjectUser { id, added_at, object, 3 more } >
GET/organization/projects/{project_id}/users
Create project user
admin.organization.projects.users.create(project_id, **kwargs) -> ProjectUser { id, added_at, object, 3 more }
POST/organization/projects/{project_id}/users
Retrieve project user
admin.organization.projects.users.retrieve(user_id, **kwargs) -> ProjectUser { id, added_at, object, 3 more }
GET/organization/projects/{project_id}/users/{user_id}
Modify project user
admin.organization.projects.users.update(user_id, **kwargs) -> ProjectUser { id, added_at, object, 3 more }
POST/organization/projects/{project_id}/users/{user_id}
Delete project user
admin.organization.projects.users.delete(user_id, **kwargs) -> UserDeleteResponse { id, deleted, object }
DELETE/organization/projects/{project_id}/users/{user_id}
ModelsExpand Collapse
class 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: Integer

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

The email address of the user

name: String

The name of the user

class UserDeleteResponse { id, deleted, object }
id: String
deleted: bool
object: :"organization.project.user.deleted"

OrganizationProjectsUsersRoles

List project user role assignments
admin.organization.projects.users.roles.list(user_id, **kwargs) -> NextCursorPage<RoleListResponse { id, created_at, created_by, 8 more } >
GET/projects/{project_id}/users/{user_id}/roles
Assign project role to user
admin.organization.projects.users.roles.create(user_id, **kwargs) -> RoleCreateResponse { object, role, user }
POST/projects/{project_id}/users/{user_id}/roles
Unassign project role from user
admin.organization.projects.users.roles.delete(role_id, **kwargs) -> RoleDeleteResponse { deleted, object }
DELETE/projects/{project_id}/users/{user_id}/roles/{role_id}
ModelsExpand Collapse
class 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: Integer

When the role was created.

formatunixtime
created_by: String

Identifier of the actor who created the role.

created_by_user_obj: Hash[Symbol, untyped]

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

description: String

Description of the role.

metadata: Hash[Symbol, untyped]

Arbitrary metadata stored on the role.

name: String

Name of the role.

permissions: Array[String]

Permissions associated with the role.

predefined_role: bool

Whether the role is predefined by OpenAI.

resource_type: String

Resource type the role applies to.

updated_at: Integer

When the role was last updated.

formatint64
class 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.

class RoleDeleteResponse { deleted, object }

Confirmation payload returned after unassigning a role.

deleted: bool

Whether the assignment was removed.

object: String

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

OrganizationProjectsService Accounts

List project service accounts
admin.organization.projects.service_accounts.list(project_id, **kwargs) -> ConversationCursorPage<ProjectServiceAccount { id, created_at, name, 2 more } >
GET/organization/projects/{project_id}/service_accounts
Create project service account
admin.organization.projects.service_accounts.create(project_id, **kwargs) -> ServiceAccountCreateResponse { id, api_key, created_at, 3 more }
POST/organization/projects/{project_id}/service_accounts
Retrieve project service account
admin.organization.projects.service_accounts.retrieve(service_account_id, **kwargs) -> ProjectServiceAccount { id, created_at, name, 2 more }
GET/organization/projects/{project_id}/service_accounts/{service_account_id}
Delete project service account
admin.organization.projects.service_accounts.delete(service_account_id, **kwargs) -> ServiceAccountDeleteResponse { id, deleted, object }
DELETE/organization/projects/{project_id}/service_accounts/{service_account_id}
ModelsExpand Collapse
class 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: Integer

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
class ServiceAccountCreateResponse { id, api_key, created_at, 3 more }
id: String
api_key: APIKey{ id, created_at, name, 2 more}
id: String
created_at: Integer
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: Integer
formatunixtime
name: String
object: :"organization.project.service_account"
role: :member

Service accounts can only have one role of type member

class ServiceAccountDeleteResponse { id, deleted, object }
id: String
deleted: bool
object: :"organization.project.service_account.deleted"

OrganizationProjectsAPI Keys

List project API keys
admin.organization.projects.api_keys.list(project_id, **kwargs) -> ConversationCursorPage<ProjectAPIKey { id, created_at, last_used_at, 4 more } >
GET/organization/projects/{project_id}/api_keys
Retrieve project API key
admin.organization.projects.api_keys.retrieve(api_key_id, **kwargs) -> ProjectAPIKey { id, created_at, last_used_at, 4 more }
GET/organization/projects/{project_id}/api_keys/{api_key_id}
Delete project API key
admin.organization.projects.api_keys.delete(api_key_id, **kwargs) -> APIKeyDeleteResponse { id, deleted, object }
DELETE/organization/projects/{project_id}/api_keys/{api_key_id}
ModelsExpand Collapse
class 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: Integer

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

formatunixtime
last_used_at: Integer

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: Integer

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: Integer

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

class APIKeyDeleteResponse { id, deleted, object }
id: String
deleted: bool
object: :"organization.project.api_key.deleted"

OrganizationProjectsRate Limits

List project rate limits
admin.organization.projects.rate_limits.list_rate_limits(project_id, **kwargs) -> 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
admin.organization.projects.rate_limits.update_rate_limit(rate_limit_id, **kwargs) -> 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
class 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: Integer

The maximum requests per minute.

max_tokens_per_1_minute: Integer

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: Integer

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

max_audio_megabytes_per_1_minute: Integer

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

max_images_per_1_minute: Integer

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

max_requests_per_1_day: Integer

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

OrganizationProjectsGroups

List project groups
admin.organization.projects.groups.list(project_id, **kwargs) -> NextCursorPage<ProjectGroup { created_at, group_id, group_name, 3 more } >
GET/organization/projects/{project_id}/groups
Add project group
admin.organization.projects.groups.create(project_id, **kwargs) -> ProjectGroup { created_at, group_id, group_name, 3 more }
POST/organization/projects/{project_id}/groups
Remove project group
admin.organization.projects.groups.delete(group_id, **kwargs) -> GroupDeleteResponse { deleted, object }
DELETE/organization/projects/{project_id}/groups/{group_id}
ModelsExpand Collapse
class ProjectGroup { created_at, group_id, group_name, 3 more }

Details about a group’s membership in a project.

created_at: Integer

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.

class GroupDeleteResponse { deleted, object }

Confirmation payload returned after removing a group from a project.

deleted: bool

Whether the group membership in the project was removed.

object: :"project.group.deleted"

Always project.group.deleted.

OrganizationProjectsGroupsRoles

List project group role assignments
admin.organization.projects.groups.roles.list(group_id, **kwargs) -> NextCursorPage<RoleListResponse { id, created_at, created_by, 8 more } >
GET/projects/{project_id}/groups/{group_id}/roles
Assign project role to group
admin.organization.projects.groups.roles.create(group_id, **kwargs) -> RoleCreateResponse { group, object, role }
POST/projects/{project_id}/groups/{group_id}/roles
Unassign project role from group
admin.organization.projects.groups.roles.delete(role_id, **kwargs) -> RoleDeleteResponse { deleted, object }
DELETE/projects/{project_id}/groups/{group_id}/roles/{role_id}
ModelsExpand Collapse
class 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: Integer

When the role was created.

formatunixtime
created_by: String

Identifier of the actor who created the role.

created_by_user_obj: Hash[Symbol, untyped]

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

description: String

Description of the role.

metadata: Hash[Symbol, untyped]

Arbitrary metadata stored on the role.

name: String

Name of the role.

permissions: Array[String]

Permissions associated with the role.

predefined_role: bool

Whether the role is predefined by OpenAI.

resource_type: String

Resource type the role applies to.

updated_at: Integer

When the role was last updated.

formatint64
class 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: Integer

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

formatunixtime
name: String

Display name of the group.

object: :group

Always group.

scim_managed: bool

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.

class RoleDeleteResponse { deleted, object }

Confirmation payload returned after unassigning a role.

deleted: bool

Whether the assignment was removed.

object: String

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

OrganizationProjectsRoles

List project roles
admin.organization.projects.roles.list(project_id, **kwargs) -> NextCursorPage<Role { id, description, name, 4 more } >
GET/projects/{project_id}/roles
Create project role
admin.organization.projects.roles.create(project_id, **kwargs) -> Role { id, description, name, 4 more }
POST/projects/{project_id}/roles
Update project role
admin.organization.projects.roles.update(role_id, **kwargs) -> Role { id, description, name, 4 more }
POST/projects/{project_id}/roles/{role_id}
Delete project role
admin.organization.projects.roles.delete(role_id, **kwargs) -> RoleDeleteResponse { id, deleted, object }
DELETE/projects/{project_id}/roles/{role_id}
ModelsExpand Collapse
class RoleDeleteResponse { id, deleted, object }

Confirmation payload returned after deleting a role.

id: String

Identifier of the deleted role.

deleted: bool

Whether the role was deleted.

object: :"role.deleted"

Always role.deleted.

OrganizationProjectsCertificates

List project certificates
admin.organization.projects.certificates.list(project_id, **kwargs) -> ConversationCursorPage<CertificateListResponse { id, active, certificate_details, 3 more } >
GET/organization/projects/{project_id}/certificates
Activate certificates for project
admin.organization.projects.certificates.activate(project_id, **kwargs) -> Page<CertificateActivateResponse { id, active, certificate_details, 3 more } >
POST/organization/projects/{project_id}/certificates/activate
Deactivate certificates for project
admin.organization.projects.certificates.deactivate(project_id, **kwargs) -> Page<CertificateDeactivateResponse { id, active, certificate_details, 3 more } >
POST/organization/projects/{project_id}/certificates/deactivate
ModelsExpand Collapse
class 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: bool

Whether the certificate is currently active at the project level.

certificate_details: CertificateDetails{ expires_at, valid_at}
expires_at: Integer

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

formatunixtime
valid_at: Integer

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

formatunixtime
created_at: Integer

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

formatunixtime
name: String

The name of the certificate.

object: :"organization.project.certificate"

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

class 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: bool

Whether the certificate is currently active at the project level.

certificate_details: CertificateDetails{ expires_at, valid_at}
expires_at: Integer

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

formatunixtime
valid_at: Integer

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

formatunixtime
created_at: Integer

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

formatunixtime
name: String

The name of the certificate.

object: :"organization.project.certificate"

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

class 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: bool

Whether the certificate is currently active at the project level.

certificate_details: CertificateDetails{ expires_at, valid_at}
expires_at: Integer

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

formatunixtime
valid_at: Integer

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

formatunixtime
created_at: Integer

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

formatunixtime
name: String

The name of the certificate.

object: :"organization.project.certificate"

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