OpenAI API

Returns a list of API keys in the project.

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

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

200 application/json

Project API keys listed successfully.

ProjectApiKeyListResponse

objectstringrequired

Allowed values:list

dataarray[object]required

Represents an individual API key in a project.

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

Retrieves an API key in the project.

get
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

200 application/json

Project API key retrieved successfully.

ProjectApiKey

Represents an individual API key in a project.

objectstringrequired

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

Allowed values:organization.project.api_key

redacted_valuestringrequired

The redacted value of the API key

namestringrequired

The name of the API key

created_atintegerrequired

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

idstringrequired

The identifier, which can be referenced in API endpoints

ownerobjectrequired
Show Child Parameters
get/organization/projects/{project_id}/api_keys/{key_id}
 
200 application/json

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