Claude Platform Docs

レート制限

ワークスペースのレート制限一覧を取得
client.Organization.Workspaces.RateLimits.List(ctx, workspaceID, query) (*PageCursor[WorkspaceRateLimit], error)
GET/v1/organizations/workspaces/{workspace_id}/rate_limits

ワークスペースのレート制限を一覧表示します。

ワークスペースのレート制限を設定
client.Organization.Workspaces.RateLimits.Update(ctx, rateLimitID, params) (*WorkspaceRateLimit, error)
POST/v1/organizations/workspaces/{workspace_id}/rate_limits/{rate_limit_id}

ワークスペース内の1つのレート制限グループについて、レート制限のオーバーライドを設定またはクリアします。

Models
type WorkspaceRateLimit struct { Type: "workspace_rate_limit"; Group; Limits; /* 3 more */ }
type WorkspaceRateLimitOrganizationSource struct { Type: "organization" }
Type Organization

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

defaultorganization
type WorkspaceRateLimitType string

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:
const WorkspaceRateLimitTypeFastItpmca WorkspaceRateLimitType = "fast_itpmca"
const WorkspaceRateLimitTypeFastOtpm WorkspaceRateLimitType = "fast_otpm"
const WorkspaceRateLimitTypeInputTokensPerMinute WorkspaceRateLimitType = "input_tokens_per_minute"
const WorkspaceRateLimitTypeInputTokensPerMinuteCacheAware WorkspaceRateLimitType = "input_tokens_per_minute_cache_aware"
const WorkspaceRateLimitTypeOutputTokensPerMinute WorkspaceRateLimitType = "output_tokens_per_minute"
const WorkspaceRateLimitTypeRequestsPerMinute WorkspaceRateLimitType = "requests_per_minute"
const WorkspaceRateLimitTypeTokensPerDay WorkspaceRateLimitType = "tokens_per_day"
const WorkspaceRateLimitTypeTokensPerMinute WorkspaceRateLimitType = "tokens_per_minute"
const WorkspaceRateLimitTypeToolUsesPerSecond WorkspaceRateLimitType = "tool_uses_per_second"
type WorkspaceRateLimitUpdateValueParam struct { Type; Value }
type WorkspaceRateLimitValue struct { Type; OrgLimit; Source; Value }
Type string

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

OrgLimit int64

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

Source WorkspaceRateLimitValueSourceUnion

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

One of the following:
type WorkspaceRateLimitWorkspaceSource struct { Type: "workspace" }
Type Workspace

Always workspace: a workspace-level override is stored.

defaultworkspace
type WorkspaceRateLimitOrganizationSource struct { Type: "organization" }
Type Organization

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

defaultorganization
Value int64

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

type WorkspaceRateLimitWorkspaceSource struct { Type: "workspace" }
Type Workspace

Always workspace: a workspace-level override is stored.

defaultworkspace