rate-limits-api changedmanage-claude/rate-limits-api
Nearest release: v2.1.315, published under an hour before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+236added
Lines−5removed
From line
1
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits21to this page, all time
### Set workspace rate limits
The whole hunk
from line 1, old and new numbered
/
from line 1
11---
22title: Rate Limits API
33url: https://platform.claude.com/docs/en/manage-claude/rate-limits-api
4description: Programmatically query your organization's API rate limits with the Rate Limits API.
4description: Programmatically read your organization's API rate limits and set workspace rate limits with the Rate Limits API.
55---
66
77<Tip>
from line 8
88 **The Admin API is unavailable for individual accounts.** To collaborate with teammates and add members, set up your organization on the [Organization](https://platform.claude.com/settings/organization) page (`platform.claude.com/settings/organization`) in the Claude Console.
99</Tip>
1010
11The Rate Limits API provides programmatic access to the rate limits configured for your organization and its workspaces. This is the same information shown on the [Rate limits](https://platform.claude.com/usage/limits) page in the Claude Console.
11The Rate Limits API provides programmatic access to the rate limits configured for your organization and its workspaces. This is the same information shown on the [Rate limits](https://platform.claude.com/usage/limits) page in the Claude Console. You can also use it to set and clear a workspace’s rate limits.
1212
1313Use this API to:
1414
from line 15
1515* **Keep gateways and proxies in sync:** Read your current limits at startup and on a schedule instead of hardcoding values that drift when Anthropic adjusts them.
1616* **Power internal alerting:** Compare usage data from the [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api) against your configured limits.
1717* **Audit workspace configuration:** Verify that workspace overrides match what your provisioning automation expects.
18* **Manage workspace limits from code:** Set and clear each workspace’s limits from your provisioning automation instead of editing them in the Console.
1819
1920<Check>
2021 **Admin API credentials required.** These endpoints are part of the Admin API. You can access them using an [Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys), an OAuth token with the `org:admin` scope, or a personal or service account key that isn’t scoped to a workspace; workspace API keys don’t work. See [Authentication](https://platform.claude.com/docs/en/manage-claude/admin-api#authentication) for details.
from line 483
482483
483484## Workspace rate limits
484485
485The `/v1/organizations/workspaces/{workspace_id}/rate_limits` endpoint returns the rate limit overrides configured for a single workspace. To also see the values the workspace inherits, pass `include_inherited=true` (see [Include inherited values](https://platform.claude.com/docs/en/manage-claude/rate-limits-api#include-inherited-values)).
486The `/v1/organizations/workspaces/{workspace_id}/rate_limits` endpoint returns the rate limit overrides configured for a single workspace. To also see the values the workspace inherits, pass `include_inherited=true` (see [Include inherited values](https://platform.claude.com/docs/en/manage-claude/rate-limits-api#include-inherited-values)). To change the overrides, see [Set workspace rate limits](https://platform.claude.com/docs/en/manage-claude/rate-limits-api#set-workspace-rate-limits).
486487
487488By default, the response only includes overrides, so anything missing from it is inherited from the organization:
488489
from line 948
947948}
948949```
949950
951### Set workspace rate limits
952
953To set or clear a workspace’s rate limits for one rate limit group, send a `POST` request to `/v1/organizations/workspaces/{workspace_id}/rate_limits/{rate_limit_id}`. For `rate_limit_id`, pass the `id` of the group’s entry from the organization endpoint, or the `rate_limit_id` of the group’s entry from the workspace list endpoint. To find the ID of a group the workspace doesn’t override yet, call the workspace list endpoint with `include_inherited=true`, which returns the groups you can set limits for. These IDs differ among organizations, so look them up in each organization you manage.
954
955The request body has a `limits` array of one or more `{type, value}` entries, each for a different limiter type:
956
957* A `value` that is an integer, zero or greater, sets the workspace’s override for that limiter type.
958* A `value` of `null` clears the override, so the workspace inherits the organization’s value again. Clearing a limiter type that has no override changes nothing.
959* Limiter types that the request doesn’t name keep their current values.
960
961You can set these limiter types: `requests_per_minute`, `input_tokens_per_minute`, `output_tokens_per_minute`, `input_tokens_per_minute_cache_aware`, `tokens_per_minute`, `tokens_per_day`, `tool_uses_per_second`, and, where the list endpoints show them for your organization, the [fast mode](https://platform.claude.com/docs/en/build-with-claude/fast-mode) limits `fast_itpmca` (input tokens per minute, cache-aware) and `fast_otpm` (output tokens per minute). Which of them a group accepts depends on its `group.type`:
962
963* `model_group`: every type except `tool_uses_per_second`
964* `web_search`: `tool_uses_per_second` only
965* `batch`: `requests_per_minute` only
966
967Other group types don’t accept any limiter type. You can clear any of the limiter types listed earlier on any group. The list endpoints can return limiter types that you can’t set, such as `enqueued_batch_requests`; sending one returns a 400 error.
968
969The API stores a value above the organization’s limit for the same limiter type, but it enforces the lower of the two. The response’s `org_limit` shows the organization’s value.
970
971Changes take effect within about an hour. Until a change takes effect, the workspace’s requests are still limited by the previous values.
972
973The API checks the whole request before it changes anything, so an invalid entry fails the request with a 400 error and changes nothing. If a request passes validation, the API then applies the entries one at a time. If applying one fails, the request returns an error and the entries before it stay applied. Each entry sets or clears an absolute value, so you can safely send the same request again. A resend replaces any change that someone else made in between to the limiter types it names.
974
975<Note>
976 Setting workspace rate limits isn’t available on [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) yet.
977</Note>
978
979Raise the workspace’s requests per minute for the Claude Opus 5.5 group to 2,000 and clear its input tokens per minute override:
980
981<CodeGroup>
982 ```bash cURL
983 curl "https://api.anthropic.com/v1/organizations/workspaces/wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ/rate_limits/rlt_01NwFawrTvAijwqn8AjKVBPS" \
984 -H "x-api-key: $ANTHROPIC_API_KEY" \
985 -H "anthropic-version: 2023-06-01" \
986 -H "content-type: application/json" \
987 -d '{
988 "limits": [
989 {"type": "requests_per_minute", "value": 2000},
990 {"type": "input_tokens_per_minute", "value": null}
991 ]
992 }'
993 ```
994
995 ```bash CLI
996 ant organization:workspaces:rate-limits update \
997 --workspace-id wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ \
998 --rate-limit-id rlt_01NwFawrTvAijwqn8AjKVBPS <<'YAML'
999 limits:
1000 - type: requests_per_minute
1001 value: 2000
1002 - type: input_tokens_per_minute
1003 value: null
1004 YAML
1005 ```
1006
1007 ```python Python
1008 client = anthropic.Anthropic()
1009
1010 entry = client.organization.workspaces.rate_limits.update(
1011 "rlt_01NwFawrTvAijwqn8AjKVBPS",
1012 workspace_id="wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
1013 limits=[
1014 {"type": "requests_per_minute", "value": 2000},
1015 {"type": "input_tokens_per_minute", "value": None},
1016 ],
1017 )
1018
1019 for limit in entry.limits:
1020 print(f"{limit.type}: {limit.value}")
1021 ```
1022
1023 ```typescript TypeScript
1024 const client = new Anthropic();
1025
1026 const entry = await client.organization.workspaces.rateLimits.update(
1027 "rlt_01NwFawrTvAijwqn8AjKVBPS",
1028 {
1029 workspace_id: "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
1030 limits: [
1031 { type: "requests_per_minute", value: 2000 },
1032 { type: "input_tokens_per_minute", value: null }
1033 ]
1034 }
1035 );
1036
1037 for (const limit of entry.limits) {
1038 console.log(`${limit.type}: ${limit.value}`);
1039 }
1040 ```
1041
1042 ```csharp C#
1043 AnthropicClient client = new();
1044
1045 var entry = await client.Organization.Workspaces.RateLimits.Update(
1046 "rlt_01NwFawrTvAijwqn8AjKVBPS",
1047 new()
1048 {
1049 WorkspaceID = "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
1050 Limits =
1051 [
1052 new() { Type = "requests_per_minute", Value = 2000 },
1053 new() { Type = "input_tokens_per_minute", Value = null },
1054 ],
1055 }
1056 );
1057
1058 foreach (var limit in entry.Limits)
1059 {
1060 Console.WriteLine($"{limit.Type}: {limit.Value}");
1061 }
1062 ```
1063
1064 ```go Go
1065 client := anthropic.NewClient()
1066
1067 entry, err := client.Organization.Workspaces.RateLimits.Update(
1068 context.Background(),
1069 "rlt_01NwFawrTvAijwqn8AjKVBPS",
1070 anthropic.OrganizationWorkspaceRateLimitUpdateParams{
1071 WorkspaceID: "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
1072 Limits: []anthropic.WorkspaceRateLimitUpdateValueParam{
1073 {Type: "requests_per_minute", Value: anthropic.Int(2000)},
1074 {Type: "input_tokens_per_minute", Value: param.Null[int64]()},
1075 },
1076 },
1077 )
1078 if err != nil {
1079 log.Fatal(err)
1080 }
1081
1082 for _, limit := range entry.Limits {
1083 fmt.Printf("%s: %d\n", limit.Type, limit.Value)
1084 }
1085 ```
1086
1087 ```java Java
1088 import com.anthropic.models.organization.workspaces.ratelimits.RateLimitUpdateParams;
1089 import com.anthropic.models.organization.workspaces.ratelimits.WorkspaceRateLimitType;
1090 import com.anthropic.models.organization.workspaces.ratelimits.WorkspaceRateLimitUpdateValue;
1091 import java.util.Optional;
1092
1093 void main() {
1094 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
1095
1096 var entry = client.organization().workspaces().rateLimits().update(
1097 "rlt_01NwFawrTvAijwqn8AjKVBPS",
1098 RateLimitUpdateParams.builder()
1099 .workspaceId("wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ")
1100 .addLimit(WorkspaceRateLimitUpdateValue.builder()
1101 .type(WorkspaceRateLimitType.REQUESTS_PER_MINUTE)
1102 .value(2000L)
1103 .build())
1104 .addLimit(WorkspaceRateLimitUpdateValue.builder()
1105 .type(WorkspaceRateLimitType.INPUT_TOKENS_PER_MINUTE)
1106 .value(Optional.empty())
1107 .build())
1108 .build()
1109 );
1110
1111 for (var limit : entry.limits()) {
1112 IO.println(limit.type() + ": " + limit.value());
1113 }
1114 }
1115 ```
1116
1117 ```php PHP
1118 use Anthropic\Organization\Workspaces\RateLimits\WorkspaceRateLimitUpdateValue;
1119
1120 $client = new Client();
1121
1122 $entry = $client->organization->workspaces->rateLimits->update(
1123 'rlt_01NwFawrTvAijwqn8AjKVBPS',
1124 workspaceID: 'wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ',
1125 limits: [
1126 WorkspaceRateLimitUpdateValue::with(type: 'requests_per_minute', value: 2000),
1127 WorkspaceRateLimitUpdateValue::with(type: 'input_tokens_per_minute', value: null),
1128 ],
1129 );
1130
1131 foreach ($entry->limits as $limit) {
1132 echo "{$limit->type}: {$limit->value}\n";
1133 }
1134 ```
1135
1136 ```ruby Ruby
1137 client = Anthropic::Client.new
1138
1139 entry = client.organization.workspaces.rate_limits.update(
1140 "rlt_01NwFawrTvAijwqn8AjKVBPS",
1141 workspace_id: "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
1142 limits: [
1143 { type: :requests_per_minute, value: 2000 },
1144 { type: :input_tokens_per_minute, value: nil }
1145 ]
1146 )
1147
1148 entry.limits.each do |limit|
1149 puts "#{limit.type}: #{limit.value}"
1150 end
1151 ```
1152</CodeGroup>
1153
1154The response is the group’s entry, in the shape of one entry in the workspace list endpoint’s `data` list. Its `limits` lists the workspace’s overrides on that group after the change: a cleared limiter type isn’t listed, and `limits` is empty when no override remains. The response includes the request’s changes even when a list request made right afterward doesn’t show them yet.
1155
1156```json
1157{
1158 "workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
1159 "rate_limit_id": "rlt_01NwFawrTvAijwqn8AjKVBPS",
1160 "type": "workspace_rate_limit",
1161 "group_type": "model_group",
1162 "group": {
1163 "type": "model_group",
1164 "id": "rlg_01Hq7YkP3mZ9dTwRx4cVbN2s",
1165 "display_name": "Claude Opus 5.5"
1166 },
1167 "models": ["claude-opus-5-5"],
1168 "limits": [
1169 {
1170 "type": "requests_per_minute",
1171 "value": 2000,
1172 "org_limit": 4000,
1173 "source": { "type": "workspace" }
1174 }
1175 ]
1176}
1177```
1178
1179The endpoint returns a 400 error for an invalid request or an archived workspace. It returns a 404 error when the workspace isn’t found, or when `rate_limit_id` names a group that the workspace can’t use.
1180
9501181## Filtering by group type
9511182
952Both endpoints accept an optional `group_type` query parameter that restricts the response to a single category:
1183Both list endpoints accept an optional `group_type` query parameter that restricts the response to a single category:
9531184
9541185<CodeGroup>
9551186 ```bash cURL
from line 1340
11091340
11101341### Can I update rate limits with this API?
11111342
1112**For a workspace:** Yes. The [Set Workspace Rate Limits](https://platform.claude.com/docs/en/api/organization/workspaces/rate_limits/update) endpoint sets or clears a workspace’s overrides for one rate limit group. Pass the top-level `id` of the matching entry in the [organization endpoint’s response](https://platform.claude.com/docs/en/manage-claude/rate-limits-api#list-all-organization-rate-limits) as `rate_limit_id`, not the `rlg_` `id` inside its `group`. The lower of the workspace override and the organization-level limit applies, and a change takes effect within about an hour. You can also set workspace rate limits on the [Rate limits](https://platform.claude.com/usage/limits) page in the Claude Console: select the workspace from the **Workspace** dropdown menu, and click **Edit** next to a model.
1343**For a workspace:** Yes. The [Set Workspace Rate Limits](https://platform.claude.com/docs/en/api/organization/workspaces/rate_limits/update) endpoint sets or clears a workspace’s overrides for one rate limit group. Pass the top-level `id` of the matching entry in the [organization endpoint’s response](https://platform.claude.com/docs/en/manage-claude/rate-limits-api#list-all-organization-rate-limits) as `rate_limit_id`, not the `rlg_` `id` inside its `group`. The lower of the workspace override and the organization-level limit applies, and a change takes effect within about an hour. For the request body and an example, see [this page’s section on setting workspace rate limits](https://platform.claude.com/docs/en/manage-claude/rate-limits-api#set-workspace-rate-limits). You can also set workspace rate limits on the [Rate limits](https://platform.claude.com/usage/limits) page in the Claude Console: select the workspace from the **Workspace** dropdown menu, and click **Edit** next to a model.
11131344
11141345**For an organization:** No. To request higher limits, see [Requesting higher limits](https://platform.claude.com/docs/en/api/rate-limits#requesting-higher-limits).
11151346
No line in this hunk matches that.