Skip to content
Primary navigation

Projects

List projects
ProjectListPage admin().organization().projects().list(ProjectListParamsparams = ProjectListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/organization/projects
Create project
Project admin().organization().projects().create(ProjectCreateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/organization/projects
Retrieve project
Project admin().organization().projects().retrieve(ProjectRetrieveParamsparams = ProjectRetrieveParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/organization/projects/{project_id}
Modify project
Project admin().organization().projects().update(ProjectUpdateParamsparams = ProjectUpdateParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
POST/organization/projects/{project_id}
Archive project
Project admin().organization().projects().archive(ProjectArchiveParamsparams = ProjectArchiveParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
POST/organization/projects/{project_id}/archive
ModelsExpand Collapse
class Project:

Represents an individual project.

String id

The identifier, which can be referenced in API endpoints

long createdAt

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

formatunixtime
JsonValue; object_ "organization.project"constant"organization.project"constant

The object type, which is always organization.project

Optional<Long> archivedAt

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

formatunixtime
Optional<String> externalKeyId

The external key associated with the project.

Optional<String> name

The name of the project. This appears in reporting.

Optional<String> status

active or archived

ProjectsUsers

List project users
UserListPage admin().organization().projects().users().list(UserListParamsparams = UserListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/organization/projects/{project_id}/users
Create project user
ProjectUser admin().organization().projects().users().create(UserCreateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/organization/projects/{project_id}/users
Retrieve project user
ProjectUser admin().organization().projects().users().retrieve(UserRetrieveParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
GET/organization/projects/{project_id}/users/{user_id}
Modify project user
ProjectUser admin().organization().projects().users().update(UserUpdateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/organization/projects/{project_id}/users/{user_id}
Delete project user
UserDeleteResponse admin().organization().projects().users().delete(UserDeleteParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
DELETE/organization/projects/{project_id}/users/{user_id}
ModelsExpand Collapse
class ProjectUser:

Represents an individual user in a project.

String id

The identifier, which can be referenced in API endpoints

long addedAt

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

formatunixtime
JsonValue; object_ "organization.project.user"constant"organization.project.user"constant

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

String role

owner or member

Optional<String> email

The email address of the user

Optional<String> name

The name of the user

ProjectsUsersRoles

List project user role assignments
RoleListPage admin().organization().projects().users().roles().list(RoleListParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
GET/projects/{project_id}/users/{user_id}/roles
Assign project role to user
RoleCreateResponse admin().organization().projects().users().roles().create(RoleCreateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/projects/{project_id}/users/{user_id}/roles
Retrieve project user role
RoleRetrieveResponse admin().organization().projects().users().roles().retrieve(RoleRetrieveParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
GET/projects/{project_id}/users/{user_id}/roles/{role_id}
Unassign project role from user
RoleDeleteResponse admin().organization().projects().users().roles().delete(RoleDeleteParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
DELETE/projects/{project_id}/users/{user_id}/roles/{role_id}

ProjectsService Accounts

List project service accounts
ServiceAccountListPage admin().organization().projects().serviceAccounts().list(ServiceAccountListParamsparams = ServiceAccountListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/organization/projects/{project_id}/service_accounts
Create project service account
ServiceAccountCreateResponse admin().organization().projects().serviceAccounts().create(ServiceAccountCreateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/organization/projects/{project_id}/service_accounts
Retrieve project service account
ProjectServiceAccount admin().organization().projects().serviceAccounts().retrieve(ServiceAccountRetrieveParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
GET/organization/projects/{project_id}/service_accounts/{service_account_id}
Update project service account
ProjectServiceAccount admin().organization().projects().serviceAccounts().update(ServiceAccountUpdateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/organization/projects/{project_id}/service_accounts/{service_account_id}
Delete project service account
ServiceAccountDeleteResponse admin().organization().projects().serviceAccounts().delete(ServiceAccountDeleteParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
DELETE/organization/projects/{project_id}/service_accounts/{service_account_id}
ModelsExpand Collapse
class ProjectServiceAccount:

Represents an individual service account in a project.

String id

The identifier, which can be referenced in API endpoints

long createdAt

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

formatunixtime
String name

The name of the service account

JsonValue; object_ "organization.project.service_account"constant"organization.project.service_account"constant

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

Role role

owner or member

One of the following:
OWNER("owner")
MEMBER("member")

ProjectsAPI Keys

List project API keys
ApiKeyListPage admin().organization().projects().apiKeys().list(ApiKeyListParamsparams = ApiKeyListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/organization/projects/{project_id}/api_keys
Retrieve project API key
ProjectApiKey admin().organization().projects().apiKeys().retrieve(ApiKeyRetrieveParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
GET/organization/projects/{project_id}/api_keys/{api_key_id}
Delete project API key
ApiKeyDeleteResponse admin().organization().projects().apiKeys().delete(ApiKeyDeleteParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
DELETE/organization/projects/{project_id}/api_keys/{api_key_id}
ModelsExpand Collapse
class ProjectApiKey:

Represents an individual API key in a project.

String id

The identifier, which can be referenced in API endpoints

long createdAt

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

formatunixtime
Optional<Long> lastUsedAt

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

formatunixtime
String name

The name of the API key

JsonValue; object_ "organization.project.api_key"constant"organization.project.api_key"constant

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

Owner owner
Optional<ServiceAccount> serviceAccount

The service account that owns a project API key.

String id

The identifier, which can be referenced in API endpoints

long createdAt

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

formatunixtime
String name

The name of the service account.

String role

The service account’s project role.

Optional<Type> type

user or service_account

One of the following:
USER("user")
SERVICE_ACCOUNT("service_account")
Optional<User> user

The user that owns a project API key.

String id

The identifier, which can be referenced in API endpoints

long createdAt

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

formatunixtime
String email

The email address of the user.

String name

The name of the user.

String role

The user’s project role.

String redactedValue

The redacted value of the API key

ProjectsRate Limits

List project rate limits
RateLimitListRateLimitsPage admin().organization().projects().rateLimits().listRateLimits(RateLimitListRateLimitsParamsparams = RateLimitListRateLimitsParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/organization/projects/{project_id}/rate_limits
Modify project rate limit
ProjectRateLimit admin().organization().projects().rateLimits().updateRateLimit(RateLimitUpdateRateLimitParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/organization/projects/{project_id}/rate_limits/{rate_limit_id}
ModelsExpand Collapse
class ProjectRateLimit:

Represents a project rate limit config.

String id

The identifier, which can be referenced in API endpoints.

long maxRequestsPer1Minute

The maximum requests per minute.

long maxTokensPer1Minute

The maximum tokens per minute.

String model

The model this rate limit applies to.

JsonValue; object_ "project.rate_limit"constant"project.rate_limit"constant

The object type, which is always project.rate_limit

Optional<Long> batch1DayMaxInputTokens

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

Optional<Long> maxAudioMegabytesPer1Minute

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

Optional<Long> maxImagesPer1Minute

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

Optional<Long> maxRequestsPer1Day

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

ProjectsModel Permissions

Retrieve project model permissions
ProjectModelPermissions admin().organization().projects().modelPermissions().retrieve(ModelPermissionRetrieveParamsparams = ModelPermissionRetrieveParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/organization/projects/{project_id}/model_permissions
Modify project model permissions
ProjectModelPermissions admin().organization().projects().modelPermissions().update(ModelPermissionUpdateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/organization/projects/{project_id}/model_permissions
Delete project model permissions
ProjectModelPermissionsDeleted admin().organization().projects().modelPermissions().delete(ModelPermissionDeleteParamsparams = ModelPermissionDeleteParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
DELETE/organization/projects/{project_id}/model_permissions
ModelsExpand Collapse
class ProjectModelPermissions:

Represents the model allowlist or denylist policy for a project.

Mode mode

Whether the project uses an allowlist or a denylist.

One of the following:
ALLOW_LIST("allow_list")
DENY_LIST("deny_list")
List<String> modelIds

The model IDs included in the model permissions policy.

JsonValue; object_ "project.model_permissions"constant"project.model_permissions"constant

The object type, which is always project.model_permissions.

class ProjectModelPermissionsDeleted:

Confirmation payload returned after deleting project model permissions.

boolean deleted

Whether the project model permissions were deleted.

JsonValue; object_ "project.model_permissions.deleted"constant"project.model_permissions.deleted"constant

The object type, which is always project.model_permissions.deleted.

ProjectsHosted Tool Permissions

Retrieve project hosted tool permissions
ProjectHostedToolPermissions admin().organization().projects().hostedToolPermissions().retrieve(HostedToolPermissionRetrieveParamsparams = HostedToolPermissionRetrieveParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/organization/projects/{project_id}/hosted_tool_permissions
Modify project hosted tool permissions
ProjectHostedToolPermissions admin().organization().projects().hostedToolPermissions().update(HostedToolPermissionUpdateParamsparams = HostedToolPermissionUpdateParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
POST/organization/projects/{project_id}/hosted_tool_permissions
ModelsExpand Collapse
class ProjectHostedToolPermissions:

Represents hosted tool permissions for a project.

CodeInterpreter codeInterpreter

Permission state for a single hosted tool on a project.

boolean enabled

Whether the hosted tool is enabled for the project.

ImageGeneration imageGeneration

Permission state for a single hosted tool on a project.

boolean enabled

Whether the hosted tool is enabled for the project.

Mcp mcp

Permission state for a single hosted tool on a project.

boolean enabled

Whether the hosted tool is enabled for the project.

ProjectsGroups

List project groups
GroupListPage admin().organization().projects().groups().list(GroupListParamsparams = GroupListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/organization/projects/{project_id}/groups
Add project group
ProjectGroup admin().organization().projects().groups().create(GroupCreateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/organization/projects/{project_id}/groups
Retrieve project group
ProjectGroup admin().organization().projects().groups().retrieve(GroupRetrieveParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
GET/organization/projects/{project_id}/groups/{group_id}
Remove project group
GroupDeleteResponse admin().organization().projects().groups().delete(GroupDeleteParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
DELETE/organization/projects/{project_id}/groups/{group_id}
ModelsExpand Collapse
class ProjectGroup:

Details about a group’s membership in a project.

long createdAt

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

formatunixtime
String groupId

Identifier of the group that has access to the project.

String groupName

Display name of the group.

GroupType groupType

The type of the group.

One of the following:
GROUP("group")
TENANT_GROUP("tenant_group")
JsonValue; object_ "project.group"constant"project.group"constant

Always project.group.

String projectId

Identifier of the project.

ProjectsGroupsRoles

List project group role assignments
RoleListPage admin().organization().projects().groups().roles().list(RoleListParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
GET/projects/{project_id}/groups/{group_id}/roles
Assign project role to group
RoleCreateResponse admin().organization().projects().groups().roles().create(RoleCreateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/projects/{project_id}/groups/{group_id}/roles
Retrieve project group role
RoleRetrieveResponse admin().organization().projects().groups().roles().retrieve(RoleRetrieveParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
GET/projects/{project_id}/groups/{group_id}/roles/{role_id}
Unassign project role from group
RoleDeleteResponse admin().organization().projects().groups().roles().delete(RoleDeleteParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
DELETE/projects/{project_id}/groups/{group_id}/roles/{role_id}

ProjectsRoles

List project roles
RoleListPage admin().organization().projects().roles().list(RoleListParamsparams = RoleListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/projects/{project_id}/roles
Create project role
Role admin().organization().projects().roles().create(RoleCreateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/projects/{project_id}/roles
Retrieve project role
Role admin().organization().projects().roles().retrieve(RoleRetrieveParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
GET/projects/{project_id}/roles/{role_id}
Update project role
Role admin().organization().projects().roles().update(RoleUpdateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/projects/{project_id}/roles/{role_id}
Delete project role
RoleDeleteResponse admin().organization().projects().roles().delete(RoleDeleteParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
DELETE/projects/{project_id}/roles/{role_id}

ProjectsData Retention

Retrieve project data retention
ProjectDataRetention admin().organization().projects().dataRetention().retrieve(DataRetentionRetrieveParamsparams = DataRetentionRetrieveParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/organization/projects/{project_id}/data_retention
Update project data retention
ProjectDataRetention admin().organization().projects().dataRetention().update(DataRetentionUpdateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/organization/projects/{project_id}/data_retention
ModelsExpand Collapse
class ProjectDataRetention:

Represents a project’s data retention control setting.

JsonValue; object_ "project.data_retention"constant"project.data_retention"constant

The object type, which is always project.data_retention.

Type type

The configured project data retention type.

One of the following:
ORGANIZATION_DEFAULT("organization_default")
NONE("none")
ZERO_DATA_RETENTION("zero_data_retention")
MODIFIED_ABUSE_MONITORING("modified_abuse_monitoring")
ENHANCED_ZERO_DATA_RETENTION("enhanced_zero_data_retention")
ENHANCED_MODIFIED_ABUSE_MONITORING("enhanced_modified_abuse_monitoring")

ProjectsSpend Alerts

List project spend alerts
SpendAlertListPage admin().organization().projects().spendAlerts().list(SpendAlertListParamsparams = SpendAlertListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/organization/projects/{project_id}/spend_alerts
Create project spend alert
ProjectSpendAlert admin().organization().projects().spendAlerts().create(SpendAlertCreateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/organization/projects/{project_id}/spend_alerts
Retrieve project spend alert
ProjectSpendAlert admin().organization().projects().spendAlerts().retrieve(SpendAlertRetrieveParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
GET/organization/projects/{project_id}/spend_alerts/{alert_id}
Update project spend alert
ProjectSpendAlert admin().organization().projects().spendAlerts().update(SpendAlertUpdateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/organization/projects/{project_id}/spend_alerts/{alert_id}
Delete project spend alert
ProjectSpendAlertDeleted admin().organization().projects().spendAlerts().delete(SpendAlertDeleteParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
DELETE/organization/projects/{project_id}/spend_alerts/{alert_id}
ModelsExpand Collapse
class ProjectSpendAlert:

Represents a spend alert configured at the project level.

String id

The identifier, which can be referenced in API endpoints.

Currency currency

The currency for the threshold amount.

Interval interval

The time interval for evaluating spend against the threshold.

NotificationChannel notificationChannel

Email notification settings for a spend alert.

List<String> recipients

Email addresses that receive the spend alert notification.

JsonValue; type "email"constant"email"constant

The notification channel type. Currently only email is supported.

Optional<String> subjectPrefix

Optional subject prefix for alert emails.

JsonValue; object_ "project.spend_alert"constant"project.spend_alert"constant

The object type, which is always project.spend_alert.

long thresholdAmount

The alert threshold amount, in cents.

class ProjectSpendAlertDeleted:

Confirmation payload returned after deleting a project spend alert.

String id

The deleted spend alert ID.

boolean deleted

Whether the spend alert was deleted.

JsonValue; object_ "project.spend_alert.deleted"constant"project.spend_alert.deleted"constant

Always project.spend_alert.deleted.

ProjectsCertificates

List project certificates
CertificateListPage admin().organization().projects().certificates().list(CertificateListParamsparams = CertificateListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/organization/projects/{project_id}/certificates
Activate certificates for project
CertificateActivatePage admin().organization().projects().certificates().activate(CertificateActivateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/organization/projects/{project_id}/certificates/activate
Deactivate certificates for project
CertificateDeactivatePage admin().organization().projects().certificates().deactivate(CertificateDeactivateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/organization/projects/{project_id}/certificates/deactivate