OpenAIAdmin

Organization management client. Use an Admin API key, separately from application credentials.

Functions

Link copied to clipboard

Atomically activates one to ten organization certificates.

Link copied to clipboard
open suspend fun activateProjectCertificates(projectId: String, request: CertificateActivationRequest, requestOptions: RequestOptions? = null): CertificateActivationResult

Atomically activates one to ten certificates for a project.

Link copied to clipboard

Add group user.

Link copied to clipboard
open suspend fun archiveOrganizationProject(projectId: String, requestOptions: RequestOptions? = null): OrganizationProject

Archive project.

Link copied to clipboard

Assign organization role to group.

Link copied to clipboard

Assign organization role to user.

Link copied to clipboard
open suspend fun assignProjectGroupRole(projectId: String, groupId: String, request: OrganizationRoleAssignmentRequest, requestOptions: RequestOptions? = null): OrganizationGroupRoleAssignment

Assign project role to group.

Link copied to clipboard
open suspend fun assignProjectUserRole(projectId: String, userId: String, request: OrganizationRoleAssignmentRequest, requestOptions: RequestOptions? = null): OrganizationUserRoleAssignment

Assign project role to user.

Link copied to clipboard
open suspend fun auditLogs(query: AuditLogQuery = AuditLogQuery(), requestOptions: RequestOptions? = null): PaginatedList<AuditLog>

Lists audit events while preserving evolving event details.

Link copied to clipboard
expect abstract fun close()
Link copied to clipboard

Grants checkpoint-model access to the supplied projects and returns created permissions.

Link copied to clipboard

Create admin API key.

Link copied to clipboard
open suspend fun createOrganizationGroup(request: OrganizationGroupRequest, requestOptions: RequestOptions? = null): OrganizationGroup

Create group.

Link copied to clipboard
open suspend fun createOrganizationInvite(request: OrganizationInviteRequest, requestOptions: RequestOptions? = null): OrganizationInvite

Create invite.

Link copied to clipboard
open suspend fun createOrganizationProject(request: OrganizationProjectRequest, requestOptions: RequestOptions? = null): OrganizationProject

Create project.

Link copied to clipboard
open suspend fun createOrganizationRole(request: OrganizationRoleRequest, requestOptions: RequestOptions? = null): OrganizationRole

Create organization role.

Link copied to clipboard
open suspend fun createOrganizationSpendAlert(request: SpendAlertRequest, requestOptions: RequestOptions? = null): SpendAlert

Creates an organization-level spend notification alert.

Link copied to clipboard
open suspend fun createProjectGroup(projectId: String, request: OrganizationProjectGroupRequest, requestOptions: RequestOptions? = null): OrganizationProjectGroup

Add project group.

Link copied to clipboard
open suspend fun createProjectRole(projectId: String, request: OrganizationRoleRequest, requestOptions: RequestOptions? = null): OrganizationRole

Create project role.

Link copied to clipboard

Create project service account.

Link copied to clipboard
open suspend fun createProjectServiceAccountAPIKey(projectId: String, serviceAccountId: String, request: OrganizationServiceAccountAPIKeyRequest, requestOptions: RequestOptions? = null): OrganizationServiceAccountAPIKey

Create an API key for a service account.

Link copied to clipboard
open suspend fun createProjectSpendAlert(projectId: String, request: SpendAlertRequest, requestOptions: RequestOptions? = null): SpendAlert

Creates a spend notification alert for a project.

Link copied to clipboard
open suspend fun createProjectUser(projectId: String, request: OrganizationProjectUserRequest, requestOptions: RequestOptions? = null): OrganizationProjectUser

Create project user.

Link copied to clipboard

Atomically deactivates one to ten organization certificates.

Link copied to clipboard

Atomically deactivates one to ten certificates for a project.

Link copied to clipboard
open suspend fun deleteExternalKey(id: String, requestOptions: RequestOptions? = null): ExternalKey

Removes a registration and returns the removed configuration, not a deletion boolean.

Link copied to clipboard
open suspend fun deleteExternalStorage(id: String, requestOptions: RequestOptions? = null): ExternalStorageDeletion

Removes an external-storage registration.

Link copied to clipboard
open suspend fun deleteFineTuningCheckpointPermission(checkpoint: ModelId, permissionId: String, requestOptions: RequestOptions? = null): FineTuningPermissionDeletion

Removes one checkpoint-model permission and retains the deletion result.

Link copied to clipboard
open suspend fun deleteOrganizationAdminAPIKey(keyId: String, requestOptions: RequestOptions? = null): AdministrationDeletion

Delete admin API key.

Link copied to clipboard
open suspend fun deleteOrganizationCertificate(id: String, requestOptions: RequestOptions? = null): CertificateDeletion

Deletes an inactive certificate and preserves its deletion envelope.

Link copied to clipboard
open suspend fun deleteOrganizationGroup(groupId: String, requestOptions: RequestOptions? = null): AdministrationDeletion

Delete group.

Link copied to clipboard
open suspend fun deleteOrganizationInvite(inviteId: String, requestOptions: RequestOptions? = null): AdministrationDeletion

Delete invite.

Link copied to clipboard
open suspend fun deleteOrganizationRole(roleId: String, requestOptions: RequestOptions? = null): AdministrationDeletion

Delete organization role.

Link copied to clipboard
open suspend fun deleteOrganizationSpendAlert(alertId: String, requestOptions: RequestOptions? = null): SpendAlertDeleted

Deletes an organization-level alert and returns its ID and service confirmation.

Link copied to clipboard
open suspend fun deleteOrganizationSpendLimit(requestOptions: RequestOptions? = null): SpendLimitDeleted

Deletes the organization's hard spend limit and returns the service confirmation.

Link copied to clipboard
open suspend fun deleteOrganizationUser(userId: String, requestOptions: RequestOptions? = null): AdministrationDeletion

Delete user.

Link copied to clipboard
open suspend fun deleteProjectAPIKey(projectId: String, apiKeyId: String, requestOptions: RequestOptions? = null): AdministrationDeletion

Delete project API key.

Link copied to clipboard
open suspend fun deleteProjectGroup(projectId: String, groupId: String, requestOptions: RequestOptions? = null): AdministrationDeletion

Remove project group.

Link copied to clipboard
open suspend fun deleteProjectModelPermissions(projectId: String, requestOptions: RequestOptions? = null): ProjectModelPermissionsDeletion

Deletes a project model permission override.

Link copied to clipboard
open suspend fun deleteProjectRole(projectId: String, roleId: String, requestOptions: RequestOptions? = null): AdministrationDeletion

Delete project role.

Link copied to clipboard
open suspend fun deleteProjectServiceAccount(projectId: String, serviceAccountId: String, requestOptions: RequestOptions? = null): AdministrationDeletion

Delete project service account.

Link copied to clipboard
open suspend fun deleteProjectSpendAlert(projectId: String, alertId: String, requestOptions: RequestOptions? = null): SpendAlertDeleted

Deletes a project's alert and returns its ID and service confirmation.

Link copied to clipboard
open suspend fun deleteProjectSpendLimit(projectId: String, requestOptions: RequestOptions? = null): SpendLimitDeleted

Deletes a project's hard spend limit and returns the service confirmation.

Link copied to clipboard
open suspend fun deleteProjectUser(projectId: String, userId: String, requestOptions: RequestOptions? = null): AdministrationDeletion

Delete project user.

Link copied to clipboard
open suspend fun externalKey(id: String, requestOptions: RequestOptions? = null): ExternalKey?

Retrieves an external-key registration; returns null on HTTP 404.

Link copied to clipboard
open suspend fun externalKeys(query: ExternalKeyListQuery = ExternalKeyListQuery(), requestOptions: RequestOptions? = null): PaginatedList<ExternalKey>

Lists external-key registrations and preserves cursor metadata.

Link copied to clipboard
open suspend fun externalStorage(id: String, requestOptions: RequestOptions? = null): ExternalStorageConfiguration?

Retrieves external-storage registration; returns null on HTTP 404.

Link copied to clipboard
open suspend fun externalStorageConfigurations(query: ExternalStorageListQuery = ExternalStorageListQuery(), requestOptions: RequestOptions? = null): PaginatedList<ExternalStorageConfiguration>

Lists storage registrations with project filtering and cursor metadata.

Link copied to clipboard
open suspend fun fineTuningCheckpointPermissions(checkpoint: ModelId, after: String? = null, limit: Int? = null, order: FineTuningPermissionOrder? = null, projectId: String? = null, requestOptions: RequestOptions? = null): FineTuningPage<FineTuningCheckpointPermission>

Lists checkpoint-model permissions with optional project filtering and cursor pagination.

Link copied to clipboard
open suspend fun organizationAdminAPIKey(keyId: String, requestOptions: RequestOptions? = null): OrganizationAdminAPIKey?

Retrieve admin API key.

Link copied to clipboard
open suspend fun organizationAdminAPIKeys(after: String? = null, limit: Int? = null, order: SortOrder? = null, requestOptions: RequestOptions? = null): AdministrationPage<OrganizationAdminAPIKey>

List all organization and project API keys..

Link copied to clipboard

Retrieves audio speeches buckets with their pagination cursor.

Link copied to clipboard

Retrieves audio transcriptions buckets with their pagination cursor.

Link copied to clipboard
open suspend fun organizationCertificate(id: String, include: List<String>? = null, requestOptions: RequestOptions? = null): OrganizationCertificate?

Retrieves a certificate, optionally including content; returns null on HTTP 404.

Link copied to clipboard
open suspend fun organizationCertificates(query: CertificateListQuery = CertificateListQuery(), requestOptions: RequestOptions? = null): PaginatedList<OrganizationCertificate>

Lists organization certificates and their scoped activation states.

Link copied to clipboard

Retrieves code interpreter sessions buckets with their pagination cursor.

Link copied to clipboard

Retrieves completions buckets with their pagination cursor.

Link copied to clipboard
open suspend fun organizationCosts(query: OrganizationUsageQuery, requestOptions: RequestOptions? = null): OrganizationUsagePage

Retrieves costs buckets with their pagination cursor.

Link copied to clipboard
open suspend fun organizationDataRetention(requestOptions: RequestOptions? = null): DataRetentionSetting

Retrieves organization data-retention controls.

Link copied to clipboard

Retrieves decisions buckets with their pagination cursor.

Link copied to clipboard

Retrieves embeddings buckets with their pagination cursor.

Link copied to clipboard

Retrieves file search calls buckets with their pagination cursor.

Link copied to clipboard
open suspend fun organizationGroup(groupId: String, requestOptions: RequestOptions? = null): OrganizationGroup?

Retrieve group.

Link copied to clipboard
open suspend fun organizationGroupRole(groupId: String, roleId: String, requestOptions: RequestOptions? = null): OrganizationAssignedRole?

Retrieve group organization role.

Link copied to clipboard
open suspend fun organizationGroupRoles(groupId: String, after: String? = null, limit: Int? = null, order: SortOrder? = null, requestOptions: RequestOptions? = null): AdministrationPage<OrganizationAssignedRole>

List group organization role assignments.

Link copied to clipboard
open suspend fun organizationGroups(after: String? = null, limit: Int? = null, order: SortOrder? = null, requestOptions: RequestOptions? = null): AdministrationPage<OrganizationGroup>

List groups.

Link copied to clipboard
open suspend fun organizationGroupUser(groupId: String, userId: String, requestOptions: RequestOptions? = null): OrganizationGroupUser?

Retrieve group user.

Link copied to clipboard
open suspend fun organizationGroupUsers(groupId: String, after: String? = null, limit: Int? = null, order: SortOrder? = null, requestOptions: RequestOptions? = null): AdministrationPage<OrganizationGroupUser>

List group users.

Link copied to clipboard
open suspend fun organizationImagesUsage(query: OrganizationUsageQuery, requestOptions: RequestOptions? = null): OrganizationUsagePage

Retrieves images buckets with their pagination cursor.

Link copied to clipboard
open suspend fun organizationInvite(inviteId: String, requestOptions: RequestOptions? = null): OrganizationInvite?

Retrieve invite.

Link copied to clipboard
open suspend fun organizationInvites(after: String? = null, limit: Int? = null, requestOptions: RequestOptions? = null): AdministrationPage<OrganizationInvite>

List invites.

Link copied to clipboard

Retrieves moderations buckets with their pagination cursor.

Link copied to clipboard
open suspend fun organizationProject(projectId: String, requestOptions: RequestOptions? = null): OrganizationProject?

Retrieve project.

Link copied to clipboard
open suspend fun organizationProjects(after: String? = null, includeArchived: Boolean? = null, limit: Int? = null, requestOptions: RequestOptions? = null): AdministrationPage<OrganizationProject>

List projects.

Link copied to clipboard
open suspend fun organizationRole(roleId: String, requestOptions: RequestOptions? = null): OrganizationRole?

Retrieve organization role.

Link copied to clipboard
open suspend fun organizationRoles(after: String? = null, limit: Int? = null, order: SortOrder? = null, requestOptions: RequestOptions? = null): AdministrationPage<OrganizationRole>

List organization roles.

Link copied to clipboard
open suspend fun organizationSpendAlert(alertId: String, requestOptions: RequestOptions? = null): SpendAlert

Retrieves one organization-level spend alert.

Link copied to clipboard
open suspend fun organizationSpendAlerts(after: String? = null, before: String? = null, limit: Int? = null, order: SortOrder? = null, requestOptions: RequestOptions? = null): SpendAlertPage

Lists organization alerts with forward or backward cursors and optional sort order.

Link copied to clipboard
open suspend fun organizationSpendLimit(requestOptions: RequestOptions? = null): SpendLimit

Retrieves the organization's hard spend limit and enforcement state.

Link copied to clipboard
open suspend fun organizationUser(userId: String, requestOptions: RequestOptions? = null): OrganizationUser?

Retrieve user.

Link copied to clipboard
open suspend fun organizationUserRole(userId: String, roleId: String, requestOptions: RequestOptions? = null): OrganizationAssignedRole?

Retrieve user organization role.

Link copied to clipboard
open suspend fun organizationUserRoles(userId: String, after: String? = null, limit: Int? = null, order: SortOrder? = null, requestOptions: RequestOptions? = null): AdministrationPage<OrganizationAssignedRole>

List user organization role assignments.

Link copied to clipboard
open suspend fun organizationUsers(after: String? = null, emails: List<String>? = null, limit: Int? = null, requestOptions: RequestOptions? = null): AdministrationPage<OrganizationUser>

List users.

Link copied to clipboard

Retrieves vector stores buckets with their pagination cursor.

Link copied to clipboard

Retrieves web search calls buckets with their pagination cursor.

Link copied to clipboard
open suspend fun projectAPIKey(projectId: String, apiKeyId: String, requestOptions: RequestOptions? = null): OrganizationProjectAPIKey?

Retrieve project API key.

Link copied to clipboard
open suspend fun projectAPIKeys(projectId: String, after: String? = null, limit: Int? = null, ownerProjectAccess: String? = null, requestOptions: RequestOptions? = null): AdministrationPage<OrganizationProjectAPIKey>

List project API keys.

Link copied to clipboard
open suspend fun projectCertificates(projectId: String, query: CertificateListQuery = CertificateListQuery(), requestOptions: RequestOptions? = null): PaginatedList<OrganizationCertificate>

Lists certificates and activation states for a project.

Link copied to clipboard
open suspend fun projectDataRetention(projectId: String, requestOptions: RequestOptions? = null): DataRetentionSetting

Retrieves project data-retention controls.

Link copied to clipboard
open suspend fun projectGroup(projectId: String, groupId: String, groupType: String? = null, requestOptions: RequestOptions? = null): OrganizationProjectGroup?

Retrieve project group.

Link copied to clipboard
open suspend fun projectGroupRole(projectId: String, groupId: String, roleId: String, requestOptions: RequestOptions? = null): OrganizationAssignedRole?

Retrieve project group role.

Link copied to clipboard
open suspend fun projectGroupRoles(projectId: String, groupId: String, after: String? = null, limit: Int? = null, order: SortOrder? = null, requestOptions: RequestOptions? = null): AdministrationPage<OrganizationAssignedRole>

List project group role assignments.

Link copied to clipboard
open suspend fun projectGroups(projectId: String, after: String? = null, limit: Int? = null, order: SortOrder? = null, requestOptions: RequestOptions? = null): AdministrationPage<OrganizationProjectGroup>

List project groups.

Link copied to clipboard
open suspend fun projectHostedToolPermissions(projectId: String, requestOptions: RequestOptions? = null): ProjectHostedToolPermissions

Retrieves project hosted-tool enablement states.

Link copied to clipboard
open suspend fun projectModelPermissions(projectId: String, requestOptions: RequestOptions? = null): ProjectModelPermissions?

Retrieves an explicit project model policy; returns null on HTTP 404.

Link copied to clipboard
open suspend fun projectRateLimits(projectId: String, query: ProjectRateLimitQuery = ProjectRateLimitQuery(), requestOptions: RequestOptions? = null): PaginatedList<ProjectRateLimit>

Lists per-model rate limits with forward or backward cursor metadata.

Link copied to clipboard
open suspend fun projectRole(projectId: String, roleId: String, requestOptions: RequestOptions? = null): OrganizationRole?

Retrieve project role.

Link copied to clipboard
open suspend fun projectRoles(projectId: String, after: String? = null, limit: Int? = null, order: SortOrder? = null, requestOptions: RequestOptions? = null): AdministrationPage<OrganizationRole>

List project roles.

Link copied to clipboard
open suspend fun projectServiceAccount(projectId: String, serviceAccountId: String, requestOptions: RequestOptions? = null): OrganizationServiceAccount?

Retrieve project service account.

Link copied to clipboard
open suspend fun projectServiceAccounts(projectId: String, after: String? = null, limit: Int? = null, requestOptions: RequestOptions? = null): AdministrationPage<OrganizationServiceAccount>

List project service accounts.

Link copied to clipboard
open suspend fun projectSpendAlert(projectId: String, alertId: String, requestOptions: RequestOptions? = null): SpendAlert

Retrieves one project's spend alert.

Link copied to clipboard
open suspend fun projectSpendAlerts(projectId: String, after: String? = null, before: String? = null, limit: Int? = null, order: SortOrder? = null, requestOptions: RequestOptions? = null): SpendAlertPage

Lists project alerts with forward or backward cursors and optional sort order.

Link copied to clipboard
open suspend fun projectSpendLimit(projectId: String, requestOptions: RequestOptions? = null): SpendLimit

Retrieves a project's hard spend limit and enforcement state.

Link copied to clipboard
open suspend fun projectUser(projectId: String, userId: String, requestOptions: RequestOptions? = null): OrganizationProjectUser?

Retrieve project user.

Link copied to clipboard
open suspend fun projectUserRole(projectId: String, userId: String, roleId: String, requestOptions: RequestOptions? = null): OrganizationAssignedRole?

Retrieve project user role.

Link copied to clipboard
open suspend fun projectUserRoles(projectId: String, userId: String, after: String? = null, limit: Int? = null, order: SortOrder? = null, requestOptions: RequestOptions? = null): AdministrationPage<OrganizationAssignedRole>

List project user role assignments.

Link copied to clipboard
open suspend fun projectUsers(projectId: String, after: String? = null, limit: Int? = null, requestOptions: RequestOptions? = null): AdministrationPage<OrganizationProjectUser>

List project users.

Link copied to clipboard
open suspend fun registerExternalKey(request: ExternalKeyRequest, requestOptions: RequestOptions? = null): ExternalKey

Registers customer-managed key configuration for the organization.

Link copied to clipboard

Registers customer-managed storage for a project.

Link copied to clipboard
open suspend fun removeOrganizationGroupRole(groupId: String, roleId: String, requestOptions: RequestOptions? = null): AdministrationDeletion

Unassign organization role from group.

Link copied to clipboard
open suspend fun removeOrganizationGroupUser(groupId: String, userId: String, requestOptions: RequestOptions? = null): AdministrationDeletion

Remove group user.

Link copied to clipboard
open suspend fun removeOrganizationUserRole(userId: String, roleId: String, requestOptions: RequestOptions? = null): AdministrationDeletion

Unassign organization role from user.

Link copied to clipboard
open suspend fun removeProjectGroupRole(projectId: String, groupId: String, roleId: String, requestOptions: RequestOptions? = null): AdministrationDeletion

Unassign project role from group.

Link copied to clipboard
open suspend fun removeProjectUserRole(projectId: String, userId: String, roleId: String, requestOptions: RequestOptions? = null): AdministrationDeletion

Unassign project role from user.

Link copied to clipboard

Updates the supplied certificate name.

Link copied to clipboard

Updates organization data-retention controls.

Link copied to clipboard
open suspend fun updateOrganizationGroup(groupId: String, request: OrganizationGroupRequest, requestOptions: RequestOptions? = null): OrganizationGroup

Update group.

Link copied to clipboard
open suspend fun updateOrganizationProject(projectId: String, request: OrganizationProjectUpdateRequest, requestOptions: RequestOptions? = null): OrganizationProject

Modify project.

Link copied to clipboard
open suspend fun updateOrganizationRole(roleId: String, request: OrganizationRoleUpdateRequest, requestOptions: RequestOptions? = null): OrganizationRole

Update organization role.

Link copied to clipboard
open suspend fun updateOrganizationSpendAlert(alertId: String, request: SpendAlertRequest, requestOptions: RequestOptions? = null): SpendAlert

Replaces an organization's alert configuration, including its complete notification channel.

Link copied to clipboard
open suspend fun updateOrganizationSpendLimit(request: SpendLimitRequest, requestOptions: RequestOptions? = null): SpendLimit

Creates or completely replaces the organization's hard spend limit. Amounts are in cents.

Link copied to clipboard
open suspend fun updateOrganizationUser(userId: String, request: OrganizationUserUpdateRequest, requestOptions: RequestOptions? = null): OrganizationUser

Modify user.

Link copied to clipboard
open suspend fun updateProjectAPIKey(projectId: String, apiKeyId: String, request: OrganizationProjectAPIKeyUpdateRequest, requestOptions: RequestOptions? = null): OrganizationProjectAPIKey

Update project API key.

Link copied to clipboard
open suspend fun updateProjectDataRetention(projectId: String, request: ProjectRetentionRequest, requestOptions: RequestOptions? = null): DataRetentionSetting

Updates project data-retention controls.

Link copied to clipboard

Updates only supplied tool permissions, preserving explicit JSON null selections.

Link copied to clipboard
open suspend fun updateProjectModelPermissions(projectId: String, request: ProjectModelPermissionsRequest, requestOptions: RequestOptions? = null): ProjectModelPermissions

Replaces a project model allowlist or denylist.

Link copied to clipboard
open suspend fun updateProjectRateLimit(projectId: String, id: String, request: ProjectRateLimitRequest, requestOptions: RequestOptions? = null): ProjectRateLimit

Updates only supplied fields of a project rate limit.

Link copied to clipboard
open suspend fun updateProjectRole(projectId: String, roleId: String, request: OrganizationRoleUpdateRequest, requestOptions: RequestOptions? = null): OrganizationRole

Update project role.

Link copied to clipboard
open suspend fun updateProjectServiceAccount(projectId: String, serviceAccountId: String, request: OrganizationServiceAccountUpdateRequest, requestOptions: RequestOptions? = null): OrganizationServiceAccount

Update project service account.

Link copied to clipboard
open suspend fun updateProjectSpendAlert(projectId: String, alertId: String, request: SpendAlertRequest, requestOptions: RequestOptions? = null): SpendAlert

Replaces a project's alert configuration, including its complete notification channel.

Link copied to clipboard
open suspend fun updateProjectSpendLimit(projectId: String, request: SpendLimitRequest, requestOptions: RequestOptions? = null): SpendLimit

Creates or completely replaces a project's hard spend limit. Amounts are in cents.

Link copied to clipboard
open suspend fun updateProjectUser(projectId: String, userId: String, request: OrganizationProjectUserUpdateRequest, requestOptions: RequestOptions? = null): OrganizationProjectUser

Modify project user.

Link copied to clipboard

Uploads PEM content without activating it.

Link copied to clipboard
open suspend fun validateExternalKey(id: String, requestOptions: RequestOptions? = null): ExternalKeyValidation

Validates a registered external-key configuration.

Link copied to clipboard
open suspend fun validateExternalStorage(id: String, requestOptions: RequestOptions? = null): ExternalStorageConfiguration

Validates an external-storage registration and returns its updated state.