OpenAI API

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

Creates a new service account in the project. This also returns an unredacted API key for the service account.

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

Path Parameters

project_idstringrequired

The ID of the project.

Body

application/json

The project service account create request payload.

ProjectServiceAccountCreateRequest

namestringrequired

The name of the service account being created.

Response

application/json

Project service account created successfully.

ProjectServiceAccountCreateResponse

objectstringrequired

Allowed values:organization.project.service_account

idstringrequired
namestringrequired
rolestringrequired

Service accounts can only have one role of type member

Allowed values:member

created_atintegerrequired
api_keyobjectrequired
Show Child Parameters
post/organization/projects/{project_id}/service_accounts

Body

{ "name": "name" }
 
application/json

Retrieves a service account in the project.

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

Path Parameters

project_idstringrequired

The ID of the project.

service_account_idstringrequired

The ID of the service account.

Response

200 application/json

Project service account retrieved successfully.

ProjectServiceAccount

Represents an individual service account in a project.

objectstringrequired

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

Allowed values:organization.project.service_account

idstringrequired

The identifier, which can be referenced in API endpoints

namestringrequired

The name of the service account

rolestringrequired

owner or member

Allowed values:ownermember

created_atintegerrequired

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

get/organization/projects/{project_id}/service_accounts/{service_account_id}
 
200 application/json