rate_limits
Creates, updates, deletes, gets or lists a rate_limits resource.
Overview
| Name | rate_limits |
| Type | Resource |
| Id | openai_admin.projects.rate_limits |
Fields
The following fields are returned by SELECT queries:
- list
Project rate limits listed successfully.
| Name | Datatype | Description |
|---|---|---|
id | string | The identifier, which can be referenced in API endpoints. |
batch_1_day_max_input_tokens | integer | The maximum batch input tokens per day. Only present for relevant models. |
max_audio_megabytes_per_1_minute | integer | The maximum audio megabytes per minute. Only present for relevant models. |
max_images_per_1_minute | integer | The maximum images per minute. Only present for relevant models. |
max_requests_per_1_day | integer | The maximum requests per day. Only present for relevant models. |
max_requests_per_1_minute | integer | The maximum requests per minute. |
max_tokens_per_1_minute | integer | The maximum tokens per minute. |
model | string | The model this rate limit applies to. |
object | string | The object type, which is always project.rate_limit (project.rate_limit) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | project_id | limit, after, before | |
update | update | project_id, rate_limit_id |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
project_id | string | The ID of the project. |
rate_limit_id | string | The ID of the rate limit. |
after | string | 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. |
before | string | 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. |
limit | integer | A limit on the number of objects to be returned. The default is 100. |
SELECT examples
- list
Project rate limits listed successfully.
SELECT
id,
batch_1_day_max_input_tokens,
max_audio_megabytes_per_1_minute,
max_images_per_1_minute,
max_requests_per_1_day,
max_requests_per_1_minute,
max_tokens_per_1_minute,
model,
object
FROM openai_admin.projects.rate_limits
WHERE project_id = '{{ project_id }}' -- required
AND limit = '{{ limit }}'
AND after = '{{ after }}'
AND before = '{{ before }}'
;
UPDATE examples
- update
No description available.
UPDATE openai_admin.projects.rate_limits
SET
max_requests_per_1_minute = {{ max_requests_per_1_minute }},
max_tokens_per_1_minute = {{ max_tokens_per_1_minute }},
max_images_per_1_minute = {{ max_images_per_1_minute }},
max_audio_megabytes_per_1_minute = {{ max_audio_megabytes_per_1_minute }},
max_requests_per_1_day = {{ max_requests_per_1_day }},
batch_1_day_max_input_tokens = {{ batch_1_day_max_input_tokens }}
WHERE
project_id = '{{ project_id }}' --required
AND rate_limit_id = '{{ rate_limit_id }}' --required
RETURNING
id,
batch_1_day_max_input_tokens,
max_audio_megabytes_per_1_minute,
max_images_per_1_minute,
max_requests_per_1_day,
max_requests_per_1_minute,
max_tokens_per_1_minute,
model,
object;