Skip to content
Primary navigation

Projects

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

ProjectsUsers

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"

ProjectsUsersRoles

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.

ProjectsService 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"

ProjectsAPI 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"

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

ProjectsGroups

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.

ProjectsGroupsRoles

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.

ProjectsRoles

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.

ProjectsCertificates

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.