OpenAI API

Deletes an API key from the project.

delete
https://api.openai.com/v1/organization/projects/{project_id}/api_keys/{key_id}

Path Parameters

project_idstringrequired

The ID of the project.

key_idstringrequired

The ID of the API key.

Response

application/json

Project API key deleted successfully.

ProjectApiKeyDeleteResponse

objectstringrequired

Allowed values:organization.project.api_key.deleted

idstringrequired
deletedbooleanrequired
delete/organization/projects/{project_id}/api_keys/{key_id}
 
application/json

Archives a project in the organization. Archived projects cannot be used or updated.

post
https://api.openai.com/v1/organization/projects/{project_id}/archive

Path Parameters

project_idstringrequired

The ID of the project.

Response

200 application/json

Project archived successfully.

Project

Represents an individual project.

idstringrequired

The identifier, which can be referenced in API endpoints

objectstringrequired

The object type, which is always organization.project

Allowed values:organization.project

namestringrequired

The name of the project. This appears in reporting.

created_atintegerrequired

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

archived_atinteger | null

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

statusstringrequired

active or archived

Allowed values:activearchived

post/organization/projects/{project_id}/archive
 
200 application/json

Returns the rate limits per model for a project.

get
https://api.openai.com/v1/organization/projects/{project_id}/rate_limits

Query Parameters

limitinteger

A limit on the number of objects to be returned. The default is 100.

Default:100

afterstring

A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.

beforestring

A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, beginning with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.

Path Parameters

project_idstringrequired

The ID of the project.

Response

200 application/json

Project rate limits listed successfully.

ProjectRateLimitListResponse

objectstringrequired

Allowed values:list

dataarray[object]required

Represents a project rate limit config.

Show Child Parameters
first_idstringrequired
last_idstringrequired
has_morebooleanrequired
get/organization/projects/{project_id}/rate_limits
 
200 application/json

Updates a project rate limit.

post
https://api.openai.com/v1/organization/projects/{project_id}/rate_limits/{rate_limit_id}

Path Parameters

project_idstringrequired

The ID of the project.

rate_limit_idstringrequired

The ID of the rate limit.

Body

application/json

The project rate limit update request payload.

ProjectRateLimitUpdateRequest

max_requests_per_1_minuteinteger

The maximum requests per minute.

max_tokens_per_1_minuteinteger

The maximum tokens per minute.

max_images_per_1_minuteinteger

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

max_audio_megabytes_per_1_minuteinteger

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

max_requests_per_1_dayinteger

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

batch_1_day_max_input_tokensinteger

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

Response

application/json

Project rate limit updated successfully.

ProjectRateLimit

Represents a project rate limit config.

objectstringrequired

The object type, which is always project.rate_limit

Allowed values:project.rate_limit

idstringrequired

The identifier, which can be referenced in API endpoints.

modelstringrequired

The model this rate limit applies to.

max_requests_per_1_minuteintegerrequired

The maximum requests per minute.

max_tokens_per_1_minuteintegerrequired

The maximum tokens per minute.

max_images_per_1_minuteinteger

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

max_audio_megabytes_per_1_minuteinteger

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

max_requests_per_1_dayinteger

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

batch_1_day_max_input_tokensinteger

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

post/organization/projects/{project_id}/rate_limits/{rate_limit_id}

Body

{}
 
application/json

Returns a list of service accounts in the project.

get
https://api.openai.com/v1/organization/projects/{project_id}/service_accounts

Query Parameters

limitinteger

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.

Default:20

afterstring

A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.

Path Parameters

project_idstringrequired

The ID of the project.

Response

application/json

Project service accounts listed successfully.

ProjectServiceAccountListResponse

objectstringrequired

Allowed values:list

dataarray[object]required

Represents an individual service account in a project.

Show Child Parameters
first_idstringrequired
last_idstringrequired
has_morebooleanrequired
get/organization/projects/{project_id}/service_accounts
 
application/json