Project rate limits

Manage rate limits per model for projects. Rate limits may be configured to be equal to or lower than the organization's rate limits.source

List project rate limits

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

Returns the rate limits per model for a project.source

Path parameters

The ID of the project.source

Query parameters

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

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

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

Returns

A list of ProjectRateLimit objects.source

Example request
1
2
3
curl https://api.openai.com/v1/organization/projects/proj_abc/rate_limits?after=rl_xxx&limit=20 \
  -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \
  -H "Content-Type: application/json"
Response
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
    "object": "list",
    "data": [
        {
          "object": "project.rate_limit",
          "id": "rl-ada",
          "model": "ada",
          "max_requests_per_1_minute": 600,
          "max_tokens_per_1_minute": 150000,
          "max_images_per_1_minute": 10
        }
    ],
    "first_id": "rl-ada",
    "last_id": "rl-ada",
    "has_more": false
}

Modify project rate limit

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

Updates a project rate limit.source

Path parameters

The ID of the project.source

The ID of the rate limit.source

Request body

The maximum requests per minute.source

The maximum tokens per minute.source

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

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

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

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

Returns

The updated ProjectRateLimit object.source

Example request
1
2
3
4
5
6
curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/rate_limits/rl_xxx \
  -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{
      "max_requests_per_1_minute": 500
  }'
Response
1
2
3
4
5
6
7
8
{
    "object": "project.rate_limit",
    "id": "rl-ada",
    "model": "ada",
    "max_requests_per_1_minute": 600,
    "max_tokens_per_1_minute": 150000,
    "max_images_per_1_minute": 10
  }

The project rate limit object

Represents a project rate limit config.source

The object type, which is always project.rate_limitsource

The identifier, which can be referenced in API endpoints.source

The model this rate limit applies to.source

The maximum requests per minute.source

The maximum tokens per minute.source

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

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

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

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

OBJECT The project rate limit object
1
2
3
4
5
6
7
8
{
    "object": "project.rate_limit",
    "id": "rl_ada",
    "model": "ada",
    "max_requests_per_1_minute": 600,
    "max_tokens_per_1_minute": 150000,
    "max_images_per_1_minute": 10
}