Skip to content
Primary navigation

Projects

List projects
GET/organization/projects
Create project
POST/organization/projects
Retrieve project
GET/organization/projects/{project_id}
Modify project
POST/organization/projects/{project_id}
Archive project
POST/organization/projects/{project_id}/archive
ModelsExpand Collapse
Project object { id, created_at, object, 4 more }

Represents an individual project.

id: string

The identifier, which can be referenced in API endpoints

created_at: number

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

formatunixtime
object: "organization.project"

The object type, which is always organization.project

archived_at: optional number

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

formatunixtime
external_key_id: optional string

The external key associated with the project.

name: optional string

The name of the project. This appears in reporting.

status: optional string

active or archived

ProjectsUsers

List project users
GET/organization/projects/{project_id}/users
Create project user
POST/organization/projects/{project_id}/users
Retrieve project user
GET/organization/projects/{project_id}/users/{user_id}
Modify project user
POST/organization/projects/{project_id}/users/{user_id}
Delete project user
DELETE/organization/projects/{project_id}/users/{user_id}
ModelsExpand Collapse
ProjectUser object { id, added_at, object, 3 more }

Represents an individual user in a project.

id: string

The identifier, which can be referenced in API endpoints

added_at: number

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

formatunixtime
object: "organization.project.user"

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

role: string

owner or member

email: optional string

The email address of the user

name: optional string

The name of the user

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

ProjectsUsersRoles

List project user role assignments
GET/projects/{project_id}/users/{user_id}/roles
Assign project role to user
POST/projects/{project_id}/users/{user_id}/roles
Retrieve project user role
GET/projects/{project_id}/users/{user_id}/roles/{role_id}
Unassign project role from user
DELETE/projects/{project_id}/users/{user_id}/roles/{role_id}
ModelsExpand Collapse
RoleListResponse object { id, assignment_sources, created_at, 9 more }

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

id: string

Identifier for the role.

assignment_sources: array of object { principal_id, principal_type }

Principals from which the role assignment is inherited, when available.

principal_id: string
principal_type: string
created_at: number

When the role was created.

formatunixtime
created_by: string

Identifier of the actor who created the role.

created_by_user_obj: map[unknown]

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

description: string

Description of the role.

metadata: map[unknown]

Arbitrary metadata stored on the role.

name: string

Name of the role.

permissions: array of string

Permissions associated with the role.

predefined_role: boolean

Whether the role is predefined by OpenAI.

resource_type: string

Resource type the role applies to.

updated_at: number

When the role was last updated.

formatunixtime
RoleCreateResponse object { 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.

RoleRetrieveResponse object { id, assignment_sources, created_at, 9 more }

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

id: string

Identifier for the role.

assignment_sources: array of object { principal_id, principal_type }

Principals from which the role assignment is inherited, when available.

principal_id: string
principal_type: string
created_at: number

When the role was created.

formatunixtime
created_by: string

Identifier of the actor who created the role.

created_by_user_obj: map[unknown]

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

description: string

Description of the role.

metadata: map[unknown]

Arbitrary metadata stored on the role.

name: string

Name of the role.

permissions: array of string

Permissions associated with the role.

predefined_role: boolean

Whether the role is predefined by OpenAI.

resource_type: string

Resource type the role applies to.

updated_at: number

When the role was last updated.

formatunixtime
RoleDeleteResponse object { deleted, object }

Confirmation payload returned after unassigning a role.

deleted: boolean

Whether the assignment was removed.

object: string

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

ProjectsService Accounts

List project service accounts
GET/organization/projects/{project_id}/service_accounts
Create project service account
POST/organization/projects/{project_id}/service_accounts
Retrieve project service account
GET/organization/projects/{project_id}/service_accounts/{service_account_id}
Update project service account
POST/organization/projects/{project_id}/service_accounts/{service_account_id}
Delete project service account
DELETE/organization/projects/{project_id}/service_accounts/{service_account_id}
ModelsExpand Collapse
ProjectServiceAccount object { id, created_at, name, 2 more }

Represents an individual service account in a project.

id: string

The identifier, which can be referenced in API endpoints

created_at: number

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

formatunixtime
name: string

The name of the service account

object: "organization.project.service_account"

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

role: "owner" or "member" or "none"

owner, member, or none

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

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

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

Service accounts created with default project membership have role member. Accounts created with create_service_account_only have role none.

One of the following:
"member"
"none"
ServiceAccountDeleteResponse object { id, deleted, object }
id: string
deleted: boolean
object: "organization.project.service_account.deleted"

ProjectsService AccountsAPI Keys

Create project service account API key
POST/organization/projects/{project_id}/service_accounts/{service_account_id}/api_keys
ModelsExpand Collapse
APIKeyCreateResponse object { id, created_at, name, 2 more }
id: string
created_at: number
formatunixtime
name: string
object: "organization.project.service_account.api_key"

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

value: string

ProjectsAPI Keys

List project API keys
GET/organization/projects/{project_id}/api_keys
Retrieve project API key
GET/organization/projects/{project_id}/api_keys/{api_key_id}
Delete project API key
DELETE/organization/projects/{project_id}/api_keys/{api_key_id}
ModelsExpand Collapse
ProjectAPIKey object { id, created_at, last_used_at, 5 more }

Represents an individual API key in a project.

id: string

The identifier, which can be referenced in API endpoints

created_at: number

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

formatunixtime
last_used_at: number

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: object { service_account, type, user }
service_account: optional object { id, created_at, name, role }

The service account that owns a project API key.

id: string

The identifier, which can be referenced in API endpoints

created_at: number

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

formatunixtime
name: string

The name of the service account.

role: string

The service account’s project role.

type: optional "user" or "service_account"

user or service_account

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

The user that owns a project API key.

id: string

The identifier, which can be referenced in API endpoints

created_at: number

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

formatunixtime
email: string

The email address of the user.

name: string

The name of the user.

role: string

The user’s project role.

owner_project_access: "active" or "inactive"

Whether the API key’s owner currently has effective access to the project.

One of the following:
"active"
"inactive"
redacted_value: string

The redacted value of the API key

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

ProjectsRate Limits

List project rate limits
GET/organization/projects/{project_id}/rate_limits
Modify project rate limit
POST/organization/projects/{project_id}/rate_limits/{rate_limit_id}
ModelsExpand Collapse
ProjectRateLimit object { id, max_requests_per_1_minute, max_tokens_per_1_minute, 6 more }

Represents a project rate limit config.

id: string

The identifier, which can be referenced in API endpoints.

max_requests_per_1_minute: number

The maximum requests per minute.

max_tokens_per_1_minute: number

The maximum tokens per minute.

model: string

The model this rate limit applies to.

object: "project.rate_limit"

The object type, which is always project.rate_limit

batch_1_day_max_input_tokens: optional number

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

max_audio_megabytes_per_1_minute: optional number

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

max_images_per_1_minute: optional number

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

max_requests_per_1_day: optional number

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

ProjectsModel Permissions

Retrieve project model permissions
GET/organization/projects/{project_id}/model_permissions
Modify project model permissions
POST/organization/projects/{project_id}/model_permissions
Delete project model permissions
DELETE/organization/projects/{project_id}/model_permissions
ModelsExpand Collapse
ProjectModelPermissions object { mode, model_ids, object }

Represents the model allowlist or denylist policy for a project.

mode: "allow_list" or "deny_list"

Whether the project uses an allowlist or a denylist.

One of the following:
"allow_list"
"deny_list"
model_ids: array of string

The model IDs included in the model permissions policy.

object: "project.model_permissions"

The object type, which is always project.model_permissions.

ProjectModelPermissionsDeleted object { deleted, object }

Confirmation payload returned after deleting project model permissions.

deleted: boolean

Whether the project model permissions were deleted.

object: "project.model_permissions.deleted"

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

ProjectsHosted Tool Permissions

Retrieve project hosted tool permissions
GET/organization/projects/{project_id}/hosted_tool_permissions
Modify project hosted tool permissions
POST/organization/projects/{project_id}/hosted_tool_permissions
ModelsExpand Collapse
ProjectHostedToolPermissions object { code_interpreter, file_search, image_generation, 2 more }

Represents hosted tool permissions for a project.

code_interpreter: object { enabled }

Permission state for a single hosted tool on a project.

enabled: boolean

Whether the hosted tool is enabled for the project.

image_generation: object { enabled }

Permission state for a single hosted tool on a project.

enabled: boolean

Whether the hosted tool is enabled for the project.

mcp: object { enabled }

Permission state for a single hosted tool on a project.

enabled: boolean

Whether the hosted tool is enabled for the project.

ProjectsGroups

List project groups
GET/organization/projects/{project_id}/groups
Add project group
POST/organization/projects/{project_id}/groups
Retrieve project group
GET/organization/projects/{project_id}/groups/{group_id}
Remove project group
DELETE/organization/projects/{project_id}/groups/{group_id}
ModelsExpand Collapse
ProjectGroup object { created_at, group_id, group_name, 3 more }

Details about a group’s membership in a project.

created_at: number

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

formatunixtime
group_id: string

Identifier of the group that has access to the project.

group_name: string

Display name of the group.

group_type: "group" or "tenant_group"

The type of the group.

One of the following:
"group"
"tenant_group"
object: "project.group"

Always project.group.

project_id: string

Identifier of the project.

GroupDeleteResponse object { deleted, object }

Confirmation payload returned after removing a group from a project.

deleted: boolean

Whether the group membership in the project was removed.

object: "project.group.deleted"

Always project.group.deleted.

ProjectsGroupsRoles

List project group role assignments
GET/projects/{project_id}/groups/{group_id}/roles
Assign project role to group
POST/projects/{project_id}/groups/{group_id}/roles
Retrieve project group role
GET/projects/{project_id}/groups/{group_id}/roles/{role_id}
Unassign project role from group
DELETE/projects/{project_id}/groups/{group_id}/roles/{role_id}
ModelsExpand Collapse
RoleListResponse object { id, assignment_sources, created_at, 9 more }

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

id: string

Identifier for the role.

assignment_sources: array of object { principal_id, principal_type }

Principals from which the role assignment is inherited, when available.

principal_id: string
principal_type: string
created_at: number

When the role was created.

formatunixtime
created_by: string

Identifier of the actor who created the role.

created_by_user_obj: map[unknown]

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

description: string

Description of the role.

metadata: map[unknown]

Arbitrary metadata stored on the role.

name: string

Name of the role.

permissions: array of string

Permissions associated with the role.

predefined_role: boolean

Whether the role is predefined by OpenAI.

resource_type: string

Resource type the role applies to.

updated_at: number

When the role was last updated.

formatunixtime
RoleCreateResponse object { group, object, role }

Role assignment linking a group to a role.

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

Summary information about a group returned in role assignment responses.

id: string

Identifier for the group.

created_at: number

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

formatunixtime
name: string

Display name of the group.

object: "group"

Always group.

scim_managed: boolean

Whether the group is managed through SCIM.

object: "group.role"

Always group.role.

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

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

RoleRetrieveResponse object { id, assignment_sources, created_at, 9 more }

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

id: string

Identifier for the role.

assignment_sources: array of object { principal_id, principal_type }

Principals from which the role assignment is inherited, when available.

principal_id: string
principal_type: string
created_at: number

When the role was created.

formatunixtime
created_by: string

Identifier of the actor who created the role.

created_by_user_obj: map[unknown]

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

description: string

Description of the role.

metadata: map[unknown]

Arbitrary metadata stored on the role.

name: string

Name of the role.

permissions: array of string

Permissions associated with the role.

predefined_role: boolean

Whether the role is predefined by OpenAI.

resource_type: string

Resource type the role applies to.

updated_at: number

When the role was last updated.

formatunixtime
RoleDeleteResponse object { deleted, object }

Confirmation payload returned after unassigning a role.

deleted: boolean

Whether the assignment was removed.

object: string

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

ProjectsRoles

List project roles
GET/projects/{project_id}/roles
Create project role
POST/projects/{project_id}/roles
Retrieve project role
GET/projects/{project_id}/roles/{role_id}
Update project role
POST/projects/{project_id}/roles/{role_id}
Delete project role
DELETE/projects/{project_id}/roles/{role_id}
ModelsExpand Collapse
RoleDeleteResponse object { id, deleted, object }

Confirmation payload returned after deleting a role.

id: string

Identifier of the deleted role.

deleted: boolean

Whether the role was deleted.

object: "role.deleted"

Always role.deleted.

ProjectsData Retention

Retrieve project data retention
GET/organization/projects/{project_id}/data_retention
Update project data retention
POST/organization/projects/{project_id}/data_retention
ModelsExpand Collapse
ProjectDataRetention object { object, type }

Represents a project’s data retention control setting.

object: "project.data_retention"

The object type, which is always project.data_retention.

type: "organization_default" or "none" or "zero_data_retention" or 3 more

The configured project data retention type.

One of the following:
"organization_default"
"none"
"zero_data_retention"
"modified_abuse_monitoring"
"enhanced_zero_data_retention"
"enhanced_modified_abuse_monitoring"

ProjectsSpend Alerts

List project spend alerts
GET/organization/projects/{project_id}/spend_alerts
Create project spend alert
POST/organization/projects/{project_id}/spend_alerts
Retrieve project spend alert
GET/organization/projects/{project_id}/spend_alerts/{alert_id}
Update project spend alert
POST/organization/projects/{project_id}/spend_alerts/{alert_id}
Delete project spend alert
DELETE/organization/projects/{project_id}/spend_alerts/{alert_id}
ModelsExpand Collapse
ProjectSpendAlert object { id, currency, interval, 3 more }

Represents a spend alert configured at the project level.

id: string

The identifier, which can be referenced in API endpoints.

currency: "USD"

The currency for the threshold amount.

interval: "month"

The time interval for evaluating spend against the threshold.

notification_channel: object { recipients, type, subject_prefix }

Email notification settings for a spend alert.

recipients: array of string

Email addresses that receive the spend alert notification.

type: "email"

The notification channel type. Currently only email is supported.

subject_prefix: optional string

Optional subject prefix for alert emails.

object: "project.spend_alert"

The object type, which is always project.spend_alert.

threshold_amount: number

The alert threshold amount, in cents.

ProjectSpendAlertDeleted object { id, deleted, object }

Confirmation payload returned after deleting a project spend alert.

id: string

The deleted spend alert ID.

deleted: boolean

Whether the spend alert was deleted.

object: "project.spend_alert.deleted"

Always project.spend_alert.deleted.

ProjectsCertificates

List project certificates
GET/organization/projects/{project_id}/certificates
Activate certificates for project
POST/organization/projects/{project_id}/certificates/activate
Deactivate certificates for project
POST/organization/projects/{project_id}/certificates/deactivate
ModelsExpand Collapse
CertificateListResponse object { id, active, certificate_details, 3 more }

Represents an individual certificate configured at the project level.

id: string

The identifier, which can be referenced in API endpoints

active: boolean

Whether the certificate is currently active at the project level.

certificate_details: object { expires_at, valid_at }
expires_at: optional number

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

formatunixtime
valid_at: optional number

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

formatunixtime
created_at: number

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

formatunixtime
name: string

The name of the certificate.

object: "organization.project.certificate"

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

CertificateActivateResponse object { id, active, certificate_details, 3 more }

Represents an individual certificate configured at the project level.

id: string

The identifier, which can be referenced in API endpoints

active: boolean

Whether the certificate is currently active at the project level.

certificate_details: object { expires_at, valid_at }
expires_at: optional number

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

formatunixtime
valid_at: optional number

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

formatunixtime
created_at: number

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

formatunixtime
name: string

The name of the certificate.

object: "organization.project.certificate"

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

CertificateDeactivateResponse object { id, active, certificate_details, 3 more }

Represents an individual certificate configured at the project level.

id: string

The identifier, which can be referenced in API endpoints

active: boolean

Whether the certificate is currently active at the project level.

certificate_details: object { expires_at, valid_at }
expires_at: optional number

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

formatunixtime
valid_at: optional number

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

formatunixtime
created_at: number

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

formatunixtime
name: string

The name of the certificate.

object: "organization.project.certificate"

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