Claude Platform Docs

速率限制

列出工作區速率限制
RateLimitListPage beta().organization().workspaces().rateLimits().list(params = RateLimitListParams.none(), requestOptions = RequestOptions.none())
GET/v1/organizations/workspaces/{workspace_id}/rate_limits

列出工作區的速率限制。

設定工作區速率限制
BetaWorkspaceRateLimit beta().organization().workspaces().rateLimits().update(params, requestOptions = RequestOptions.none())
POST/v1/organizations/workspaces/{workspace_id}/rate_limits/{rate_limit_id}

為工作區中的單一速率限制群組設定或清除速率限制覆寫。

Models
class BetaWorkspaceRateLimit { type = "workspace_rate_limit"; group; limits; /* 3 more */ }
class BetaWorkspaceRateLimitOrganizationSource { type = "organization"; }
JsonValue type = "organization"

Always organization: no workspace-level override is stored, so the organization's value applies.

enum BetaWorkspaceRateLimitType

Rate limiter type. input_tokens_per_minute counts every input token, cache reads included. input_tokens_per_minute_cache_aware does not count cache reads, and on current models the organization's input-token limit usually has this type. A workspace limit of either type applies alongside the organization's limit, not in place of it. Because cache reads count toward an input_tokens_per_minute limit, it can reject requests that read mostly from the cache while the organization's limit still has room.

FAST_ITPMCA("fast_itpmca")
FAST_OTPM("fast_otpm")
INPUT_TOKENS_PER_MINUTE("input_tokens_per_minute")
INPUT_TOKENS_PER_MINUTE_CACHE_AWARE("input_tokens_per_minute_cache_aware")
OUTPUT_TOKENS_PER_MINUTE("output_tokens_per_minute")
REQUESTS_PER_MINUTE("requests_per_minute")
TOKENS_PER_DAY("tokens_per_day")
TOKENS_PER_MINUTE("tokens_per_minute")
TOOL_USES_PER_SECOND("tool_uses_per_second")
class BetaWorkspaceRateLimitUpdateValue { type; value; }

Rate limiter type. input_tokens_per_minute counts every input token, cache reads included. input_tokens_per_minute_cache_aware does not count cache reads, and on current models the organization's input-token limit usually has this type. A workspace limit of either type applies alongside the organization's limit, not in place of it. Because cache reads count toward an input_tokens_per_minute limit, it can reject requests that read mostly from the cache while the organization's limit still has room.

One of the following:
FAST_ITPMCA("fast_itpmca")
FAST_OTPM("fast_otpm")
INPUT_TOKENS_PER_MINUTE("input_tokens_per_minute")
INPUT_TOKENS_PER_MINUTE_CACHE_AWARE("input_tokens_per_minute_cache_aware")
OUTPUT_TOKENS_PER_MINUTE("output_tokens_per_minute")
REQUESTS_PER_MINUTE("requests_per_minute")
TOKENS_PER_DAY("tokens_per_day")
TOKENS_PER_MINUTE("tokens_per_minute")
TOOL_USES_PER_SECOND("tool_uses_per_second")
Optional<Long> value

New limit value. Set to null to clear the workspace override and fall back to the organization limit.

minimum0
maximum9007199254740991
class BetaWorkspaceRateLimitValue { type; orgLimit; source; value; }
String type

The limiter type (for example, requests_per_minute or input_tokens_per_minute_cache_aware).

Optional<Long> orgLimit

The organization-level value for the same limiter type, for reference. null when the organization has no limit configured for this limiter type.

Source source

Where value comes from. organization values are listed only when include_inherited is true, and then value equals org_limit.

One of the following:
class BetaWorkspaceRateLimitWorkspaceSource { type = "workspace"; }
JsonValue type = "workspace"

Always workspace: a workspace-level override is stored.

class BetaWorkspaceRateLimitOrganizationSource { type = "organization"; }
JsonValue type = "organization"

Always organization: no workspace-level override is stored, so the organization's value applies.

long value

The workspace's value for this limiter type: the workspace-level override when source.type is workspace, otherwise the organization's value.

class BetaWorkspaceRateLimitWorkspaceSource { type = "workspace"; }
JsonValue type = "workspace"

Always workspace: a workspace-level override is stored.