Class: Anthropic::Resources::Beta::Organization::RateLimits
- Inherits:
-
Object
- Object
- Anthropic::Resources::Beta::Organization::RateLimits
- Defined in:
- lib/anthropic/resources/beta/organization/rate_limits.rb,
sig/anthropic/resources/beta/organization/rate_limits.rbs
Instance Method Summary collapse
-
#initialize(client:) ⇒ RateLimits
constructor
private
A new instance of RateLimits.
-
#list(group_type: nil, limit: nil, model: nil, page: nil, request_options: {}) ⇒ Anthropic::Internal::PageCursor<Anthropic::Models::Beta::Organization::BetaOrganizationRateLimit>
List Messages API rate limits for your organization.
Constructor Details
#initialize(client:) ⇒ RateLimits
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of RateLimits.
52 53 54 |
# File 'lib/anthropic/resources/beta/organization/rate_limits.rb', line 52 def initialize(client:) @client = client end |
Instance Method Details
#list(group_type: nil, limit: nil, model: nil, page: nil, request_options: {}) ⇒ Anthropic::Internal::PageCursor<Anthropic::Models::Beta::Organization::BetaOrganizationRateLimit>
List Messages API rate limits for your organization.
Each entry corresponds to one rate-limit group (either a model family or an API-surface category such as the Files API or Message Batches) and contains the set of limiter values that apply to it.
This endpoint currently returns every matching entry in a single page regardless
of limit; follow next_page so that clients keep working when pagination is
enabled.
Some parameter documentations has been truncated, see Models::Beta::Organization::RateLimitListParams for more details.
36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/anthropic/resources/beta/organization/rate_limits.rb', line 36 def list(params = {}) parsed, = Anthropic::Beta::Organization::RateLimitListParams.dump_request(params) query = Anthropic::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "v1/organizations/rate_limits?beta=true", query: query, page: Anthropic::Internal::PageCursor, model: Anthropic::Beta::Organization::BetaOrganizationRateLimit, options: ) end |