What this read moved
1–15 of 15build-with-claude/prompt-engineering/prompting-claude-fable-5-1 Changed · +4 / -3 lines
from line 553
553553 for (BetaToolUseBlock toolUse : toolUses) {
554554 Map<String, JsonValue> input =
555555 (Map<String, JsonValue>) toolUse._input().asObject().orElseThrow();
556 String path = Optional.ofNullable(input.get("path"))
557 .flatMap(JsonValue::asString)
558 .orElse("");
556 JsonValue pathValue = input.get("path");
557 String path = pathValue != null && pathValue.asString().isPresent()
558 ? pathValue.asStringOrThrow()
559 : "";
559560 String fileText = FILES.get(path);
560561 BetaToolResultBlockParam.Builder result = BetaToolResultBlockParam.builder()
561562 .toolUseId(toolUse.id());
intro Changed · +13 / -14 lines
## Explore the latest generation of Claude models
from line 4
44description: Claude is a highly performant, trustworthy, and intelligent AI platform built by Anthropic. Claude excels at tasks involving language, reasoning, analysis, coding, and more.
55---
66
7<Tip>
8 The latest generation of Claude models:
9
10 **Claude Fable 5.1** - For demanding reasoning and long-horizon agentic work. Read the [Claude Fable 5.1 announcement](https://www.anthropic.com/claude-fable-and-mythos-5-1).
11
12 **Claude Mythos 5.1** - Offers Claude Fable 5.1's capabilities by invitation through [Project Glasswing](https://anthropic.com/glasswing).
13
14 **Claude Opus 5** - For complex agentic coding and enterprise work. Read the [Claude Opus 5 announcement](https://www.anthropic.com/news/claude-opus-5).
15
16 **Claude Sonnet 5** - Frontier intelligence at scale, built for coding, agents, and enterprise workflows. Read the [Claude Sonnet 5 announcement](https://www.anthropic.com/news/claude-sonnet-5).
17
18 **Claude Haiku 4.5** - Fastest model with near-frontier intelligence. Read the [Claude Haiku 4.5 announcement](https://www.anthropic.com/news/claude-haiku-4-5).
19</Tip>
20
217<Note>
228 Looking to chat with Claude? Visit [claude.ai](https://claude.ai).
239</Note>
from line 16
3016| **Best for** | Custom agent loops and fine-grained control | Long-running tasks and asynchronous work |
3117
3218To learn more about each, see [Using the Messages API](https://platform.claude.com/docs/en/build-with-claude/working-with-messages) and the [Claude Managed Agents overview](https://platform.claude.com/docs/en/managed-agents/overview).
19
20## Explore the latest generation of Claude models
21
22If you're unsure which model to use, start with [Claude Opus 5](https://platform.claude.com/docs/en/models/opus-5/overview) for most workloads. Use [Claude Fable 5.1](https://platform.claude.com/docs/en/models/fable-5-1/overview) for demanding reasoning and long-horizon agentic work, or when your evals on Claude Opus 5 at higher effort still fall short. All current models support text and image input, text output, multilingual capabilities, vision, and tool use. Each model's page lists the platforms it's available on.
23
24* [Claude Fable 5.1](https://platform.claude.com/docs/en/models/fable-5-1/overview) (`claude-fable-5-1`) — New — *For demanding reasoning and long-horizon agentic work* — Most capable · Research · Multi-day tasks
25* [Claude Opus 5](https://platform.claude.com/docs/en/models/opus-5/overview) (`claude-opus-5`) — *For complex agentic coding and enterprise work* — Complex projects · Agents · Coding
26* [Claude Sonnet 5](https://platform.claude.com/docs/en/models/sonnet-5/overview) (`claude-sonnet-5`) — *The best combination of speed and intelligence* — Everyday tasks · Writing · Cost-efficient
27* [Claude Haiku 4.5](https://platform.claude.com/docs/en/models/haiku-4-5/overview) (`claude-haiku-4-5`) — *The fastest model with near-frontier intelligence* — Fastest · Lowest cost · High volume
28
29[Compare models](https://platform.claude.com/docs/en/models/overview)
30
31***
3332
3433## Recommended path for new developers
3534
manage-claude/access-transparency Changed · +4 / -2 lines
from line 67
6767 "https://api.anthropic.com/v1/compliance/activities" \
6868 --data-urlencode "activity_types[]=anthropic_access" \
6969 --data-urlencode "limit=50" \
70 --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY"
70 --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \
71 --header "anthropic-version: 2023-06-01"
7172```
7273
7374Pagination, date-range filtering (`created_at.gte` / `.lt`), and the response envelope (`has_more`, `first_id`, `last_id`) are shared with the rest of the Activity Feed. See [Query the Activity Feed](https://platform.claude.com/docs/en/manage-claude/compliance-activity-feed).
from line 122
121122 "https://api.anthropic.com/v1/compliance/activities" \
122123 --data-urlencode "activity_types[]=cmek_preserve" \
123124 --data-urlencode "limit=50" \
124 --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY"
125 --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \
126 --header "anthropic-version: 2023-06-01"
125127```
126128
127129Example JSON message:
manage-claude/analytics-api Changed · +5 / -1 lines
## Versioning
from line 64
6464 </Step>
6565
6666 <Step title="Call the API">
67 Pass the key in the `x-api-key` header. Endpoints live under `https://api.anthropic.com/v1/organizations/analytics/`. For request examples, parameters, and response schemas, see the [Claude Enterprise Analytics API reference](https://platform.claude.com/docs/en/api/admin/analytics).
67 Pass the key in the `x-api-key` header and include the [`anthropic-version`](https://platform.claude.com/docs/en/api/versioning) header on every request. Endpoints live under `https://api.anthropic.com/v1/organizations/analytics/`. For request examples, parameters, and response schemas, see the [Claude Enterprise Analytics API reference](https://platform.claude.com/docs/en/api/admin/analytics).
6868 </Step>
6969</Steps>
7070
from line 106
106106**Amount fields are decimal strings in cents.** Currency amounts are returned as decimal strings such as `"41280.000000"` (which represents $412.80). To convert to dollars, parse as a decimal and divide by 100. Avoid binary floating-point parsing for values that may exceed several million dollars.
107107
108108**Rate limits apply at the organization level**, not per key, with a default of 60 requests per minute across all endpoints in this API. If that is not sufficient for your use case, contact your Anthropic account team to discuss adjusting the limit.
109
110## Versioning
111
112Send the `anthropic-version` header on every request; see [API versions](https://platform.claude.com/docs/en/api/versioning) for the available versions.
109113
110114## Known limitations
111115
manage-claude/compliance-activity-feed Changed · +7 / -3 lines
from line 19
1919```bash cURL
2020curl --fail-with-body -sS \
2121 "https://api.anthropic.com/v1/compliance/activities?limit=1" \
22 --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY"
22 --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \
23 --header "anthropic-version: 2023-06-01"
2324```
2425
2526```json Response
from line 61
6061 --data-urlencode "activity_types[]=claude_file_uploaded" \
6162 --data-urlencode "activity_types[]=claude_chat_created" \
6263 --data-urlencode "created_at.gte=2026-04-01T00:00:00Z" \
63 --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY"
64 --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \
65 --header "anthropic-version: 2023-06-01"
6466```
6567
6668The Activity Feed produces hundreds of distinct activity types. See [Query compliance activities](https://platform.claude.com/docs/en/api/compliance/activities/list) in the API reference for the full list of values that `activity_types[]` accepts.
from line 102
100102# Fetch the first page (newest activities first) and capture its trailing cursor.
101103last_id=$(curl --fail-with-body -sS \
102104 "https://api.anthropic.com/v1/compliance/activities?limit=2" \
103 --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" | jq -er '.last_id')
105 --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \
106 --header "anthropic-version: 2023-06-01" | jq -er '.last_id')
104107
105108# Pass the cursor back unchanged to fetch the next (older) page.
106109curl --fail-with-body -sS -G \
107110 "https://api.anthropic.com/v1/compliance/activities" \
108111 --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \
112 --header "anthropic-version: 2023-06-01" \
109113 --data-urlencode "limit=2" \
110114 --data-urlencode "after_id=${last_id}"
111115```
manage-claude/compliance-api Changed · +9 / -2 lines
## Versioning
from line 15
1515```bash cURL
1616curl --fail-with-body -sS \
1717 "https://api.anthropic.com/v1/compliance/activities?limit=1" \
18 --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY"
18 --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \
19 --header "anthropic-version: 2023-06-01"
1920```
2021
2122A successful response returns a JSON object containing `data` (an array of `Activity` records), `has_more`, `first_id`, and `last_id`:
from line 51
5051
5152## How the Compliance API works
5253
53Every endpoint lives under `/v1/compliance/*` on `https://api.anthropic.com` and authenticates through the `x-api-key` header. To provision a key, see [Set up the Compliance API](https://platform.claude.com/docs/en/manage-claude/compliance-api-access).
54Every endpoint lives under `/v1/compliance/*` on `https://api.anthropic.com`, authenticates through the `x-api-key` header, and takes the [`anthropic-version`](https://platform.claude.com/docs/en/api/versioning) header on every request. To provision a key, see [Set up the Compliance API](https://platform.claude.com/docs/en/manage-claude/compliance-api-access).
5455
5556The Activity Feed (`GET /v1/compliance/activities`) is available to any key that carries the `read:compliance_activities` scope; see [Query the Activity Feed](https://platform.claude.com/docs/en/manage-claude/compliance-activity-feed) for filters, pagination, and the full `Activity` object. The remaining endpoints require a Compliance Access Key carrying the relevant scope.
5657
from line 58
5758A Claude Enterprise tenant has one parent organization (the top-level container that centralizes identity) with linked organizations of two kinds: claude.ai organizations, where users chat and store content, and Claude Console organizations, where users manage Claude API workloads. For a key that covers the parent organization, the directory endpoints (organizations, users, roles, and groups) return data from every linked organization of either kind. The content endpoints (chats, files, projects, project attachments, and sessions) serve Claude Enterprise data only. The chat, file, and project endpoints return claude.ai chats, files, and projects. The session endpoints return transcripts of Cowork, Claude Code, Claude Science, and Claude for Microsoft 365 sessions on users' machines (local sessions), captured while users are signed in with their Claude Enterprise account. They also return transcripts of Cowork sessions started on claude.ai web or mobile, which run in the cloud in Anthropic-managed environments (remote sessions). A standalone Claude Console organization (one with no parent organization) is not part of a Claude Enterprise tenant; it uses Admin API keys and can query the Activity Feed only.
5859
5960All `/v1/compliance/*` endpoints share a rate limit of 600 requests per minute per parent organization (for a standalone Claude Console organization, per organization). The local session endpoints count only against that shared limit, and the remote session endpoints carry a second request budget on top. See [429 Too Many Requests](https://platform.claude.com/docs/en/manage-claude/compliance-errors#429-too-many-requests) for the response headers and retry contract.
61
62***
63
64## Versioning
65
66Send the `anthropic-version` header on every request; see [API versions](https://platform.claude.com/docs/en/api/versioning) for the available versions.
6067
6168***
6269
manage-claude/compliance-content-data Changed · +9 / -3 lines
from line 30
3030curl --fail-with-body -sS -G \
3131 "https://api.anthropic.com/v1/compliance/apps/chats" \
3232 --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \
33 --header "anthropic-version: 2023-06-01" \
3334 --data-urlencode "order_by=updated_at" \
3435 --data-urlencode "updated_at.gte=2025-06-01T00:00:00Z" \
3536 --data-urlencode "limit=100"
from line 73
7273curl --fail-with-body -sS -G \
7374 "https://api.anthropic.com/v1/compliance/apps/chats" \
7475 --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \
76 --header "anthropic-version: 2023-06-01" \
7577 --data-urlencode "user_ids[]=user_01XyDMpzjS89pFZXqSFUBDr6" \
7678 --data-urlencode "created_at.gte=2025-06-01T00:00:00Z" \
7779 --data-urlencode "limit=100"
from line 86
8486
8587curl --fail-with-body -sS \
8688 "https://api.anthropic.com/v1/compliance/apps/chats/$chat_id/messages" \
87 --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY"
89 --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \
90 --header "anthropic-version: 2023-06-01"
8891```
8992
9093The messages endpoint returns the chat's metadata plus a `chat_messages` array sorted by `created_at`. When `limit` is omitted, the full message set is returned in one response; pass `limit`, `after_id`, or `before_id` to page through very long chats. The endpoint also accepts `created_at.*` and `updated_at.*` range bounds (`gt`, `gte`, `lt`, `lte`) and an `order` parameter (`asc` or `desc`). See [Get chat messages](https://platform.claude.com/docs/en/api/compliance/apps/chats/messages/list) for the full parameter list. For user messages, `created_at` is when the message was sent; for assistant messages, it is when Claude finished generating the message. Each message carries its text content and, when present, any uploaded files (typically on user messages), any tool-generated files, and any artifacts the assistant produced or updated (typically on assistant messages):
from line 197
194197
195198curl --fail-with-body -sS -OJ \
196199 --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \
200 --header "anthropic-version: 2023-06-01" \
197201 "https://api.anthropic.com/v1/compliance/apps/chats/files/$file_id/content"
198202```
199203
from line 229
225229
226230curl --fail-with-body -sS -G \
227231 "https://api.anthropic.com/v1/compliance/apps/projects/$project_id/attachments" \
228 --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY"
232 --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \
233 --header "anthropic-version: 2023-06-01"
229234```
230235
231236```json Response
from line 286
281286
282287curl --fail-with-body -sS -X DELETE \
283288 "https://api.anthropic.com/v1/compliance/apps/chats/$chat_id" \
284 --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY"
289 --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \
290 --header "anthropic-version: 2023-06-01"
285291```
286292
287293```json Response
manage-claude/compliance-errors Changed · +3 / -3 lines
from line 377
377377
378378**Cause:** The [local session endpoints](https://platform.claude.com/docs/en/manage-claude/compliance-sessions#retrieve-local-sessions) return 503 with one of these bodies. All three share the `overloaded_error` type, so this is one of the few errors on this page where you need the message text, not `error.type`, to tell the conditions apart:
379379
380* The `index is temporarily unavailable` body means session listings are briefly unavailable because of load or a back-end condition. This is transient.
381* The `Captured content` body means a session's transcript content cannot be returned right now. This is usually transient too. In organizations that use [customer-managed encryption keys](https://platform.claude.com/docs/en/manage-claude/cmek), the messages endpoint also returns this body for every page that contains content your key cannot decrypt, for example because you disabled, revoked, or destroyed the key, or because the key cannot be reached. In that case the error persists for as long as the key cannot be used. The message text is the same either way, so the only signal that the key is the cause is that the error keeps recurring for that organization. An unusable key is never reported as `not_captured`.
380* The `index is temporarily unavailable` body means session listings are briefly unavailable because of load or a backend condition. This is transient.
381* The `Captured content` body means a session's transcript content cannot be returned right now. This is usually transient too. In organizations that use [customer-managed encryption keys](https://platform.claude.com/docs/en/manage-claude/cmek), the messages endpoint also returns this body for every page that contains content your customer-managed key cannot decrypt, for example because you disabled, revoked, or destroyed the key, or because the key cannot be reached. In that case the error persists for as long as the key cannot be used. The message text is the same either way, so the only signal that the key is the cause is that the error keeps recurring for that organization. An unusable key is never reported as `not_captured`.
382382* The `retention overrides` body means a retention or data-handling setting that applies to one or more sessions in the requested range could not be evaluated yet. On the retrieve and messages endpoints it reads `for this session` instead of `for this page`. It depends on the data and settings of the organization that ran the session rather than on load, and it can persist for an extended period.
383383
384384**Fix:** Handle each body as follows:
from line 387
387387* If the `Captured content` body keeps recurring on the messages endpoint for an organization that uses a customer-managed key, treat it as persistent: stop walking that organization's transcripts and check the key's status in your key management service. Transcripts in other linked organizations, and session metadata everywhere, are unaffected. If you retry on a later run, restart each session's walk without `page`, because messages page cursors expire 24 hours after the walk's first page.
388388* For the `Try again later.` body, do not hold a walk open waiting for it to clear. On the list endpoint, either retry later by restarting without the `page` parameter (a list page token older than 24 hours is still accepted but is re-evaluated against the current retention boundary, so a parked walk can skip sessions), or narrow the `created_at.gte` and `created_at.lt` window until the request succeeds and export the skipped range separately on a later run. On the retrieve and messages endpoints, skip that session ID, continue with the rest of your export, and retry the session on a later run. Messages page cursors expire 24 hours after the walk's first page, so restart that session's walk without `page` when you return to it.
389389
390If any of these conditions recurs across runs, contact your Anthropic representative and include the `request-id` response header. For the customer-managed key case, do this only if the error continues while your key is usable.
390If any of these conditions recurs across runs, contact your Anthropic representative and include the `request-id` response header. For the customer-managed key case, do this only if the error continues while that key is usable.
391391
392392For service-wide incidents, check [status.anthropic.com](https://status.anthropic.com).
393393
manage-claude/compliance-org-data Changed · +11 / -5 lines
from line 25
2525```bash cURL
2626curl --fail-with-body -sS \
2727 "https://api.anthropic.com/v1/compliance/organizations" \
28 -H "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY"
28 -H "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \
29 -H "anthropic-version: 2023-06-01"
2930```
3031
3132```json Response
from line 78
7778curl --fail-with-body -sS -G \
7879 "https://api.anthropic.com/v1/compliance/organizations/$org_uuid/users" \
7980 -H "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \
81 -H "anthropic-version: 2023-06-01" \
8082 --data-urlencode "limit=500"
8183```
8284
from line 113
111113
112114curl --fail-with-body -sS \
113115 "https://api.anthropic.com/v1/compliance/organizations/${org_uuid}/roles" \
114 -H "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY"
116 -H "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \
117 -H "anthropic-version: 2023-06-01"
115118```
116119
117120```json Response
from line 148
145148```bash cURL
146149curl --fail-with-body -sS -G \
147150 "https://api.anthropic.com/v1/compliance/groups" \
148 -H "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY"
151 -H "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \
152 -H "anthropic-version: 2023-06-01"
149153```
150154
151155```json Response
from line 177
173177
174178curl --fail-with-body -sS -G \
175179 "https://api.anthropic.com/v1/compliance/groups/$group_id/members" \
176 -H "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY"
180 -H "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \
181 -H "anthropic-version: 2023-06-01"
177182```
178183
179184```json Response
from line 213
208213
209214curl --fail-with-body -sS \
210215 "https://api.anthropic.com/v1/compliance/organizations/$org_uuid/settings" \
211 -H "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY"
216 -H "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \
217 -H "anthropic-version: 2023-06-01"
212218```
213219
214220The response is a list of typed setting rows, and which rows appear varies by organization: a setting the organization's administrators cannot change, because it is controlled by Anthropic policy or not available to the organization, is omitted from the list. Treat a missing row as "not controllable by this organization's administrators", not as "off". The following abridged example shows three of the rows a response can contain:
manage-claude/compliance-sessions Changed · +7 / -3 lines
from line 60
6060
6161For local sessions, Anthropic records each conversation server-side as its requests reach the Claude API; nothing is installed on the device, and nothing is collected beyond the requests the client already sends to the Claude API. Local session transcripts show what Claude was asked to do and what it returned, not what happened on the device. File and network activity is visible only through the tool calls and tool results in the transcript, so activity that never reaches the API (for example, local files the session never sent) is not captured.
6262
63In organizations that use [customer-managed encryption keys](https://platform.claude.com/docs/en/manage-claude/cmek), local session transcripts are encrypted under your key and returned as usual. While your key cannot be used (for example, because you disabled or revoked it, or because it cannot be reached), the messages endpoint returns [503 Service Unavailable](https://platform.claude.com/docs/en/manage-claude/compliance-errors#local-sessions-temporarily-unavailable) for the affected pages instead of transcript content. Those messages are never reported as `not_captured` (see [Retrieve a local session transcript](https://platform.claude.com/docs/en/manage-claude/compliance-sessions#retrieve-a-local-session-transcript)). Listing sessions and retrieving session metadata are not affected.
63In organizations that use [customer-managed encryption keys](https://platform.claude.com/docs/en/manage-claude/cmek), local session transcripts are encrypted under your customer-managed key and returned as usual. While that key cannot be used (for example, because you disabled or revoked it, or because it cannot be reached), the messages endpoint returns [503 Service Unavailable](https://platform.claude.com/docs/en/manage-claude/compliance-errors#local-sessions-temporarily-unavailable) for the affected pages instead of transcript content. Those messages are never reported as `not_captured` (see [Retrieve a local session transcript](https://platform.claude.com/docs/en/manage-claude/compliance-sessions#retrieve-a-local-session-transcript)). Listing sessions and retrieving session metadata are not affected.
6464
6565The list endpoint returns session metadata, with no transcript content, for every linked organization your key can read. Unlike the remote session list, it has no organization or user filters: bound the results in time with the `created_at.gte` and `created_at.lt` parameters. Both take RFC 3339 timestamps with a required UTC offset, and when both are supplied, `created_at.lt` must be strictly after `created_at.gte` or the request returns [400 Bad Request](https://platform.claude.com/docs/en/manage-claude/compliance-errors#400-bad-request). A third time filter, `updated_at.gte`, bounds by last activity instead of first: it returns sessions whose last inference call is at or after the given time and combines with the `created_at` filters without changing the ordering or pagination. Use it to poll for sessions active since a previous pass, as described later in this section. New sessions and messages appear in results after a short processing delay, typically within minutes; a session that is missing immediately after it starts is not necessarily uncaptured. The following request lists sessions created since a given date.
6666
from line 68
6868curl --fail-with-body -sS -G \
6969 "https://api.anthropic.com/v1/compliance/apps/sessions/local" \
7070 --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \
71 --header "anthropic-version: 2023-06-01" \
7172 --data-urlencode "created_at.gte=2026-07-01T00:00:00Z" \
7273 --data-urlencode "limit=100"
7374```
from line 144
143144
144145curl --fail-with-body -sS \
145146 "https://api.anthropic.com/v1/compliance/apps/sessions/local/$session_id/messages" \
146 --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY"
147 --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \
148 --header "anthropic-version: 2023-06-01"
147149```
148150
149151```json Response
from line 289
287289curl --fail-with-body -sS -G \
288290 "https://api.anthropic.com/v1/compliance/apps/sessions/remote" \
289291 --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \
292 --header "anthropic-version: 2023-06-01" \
290293 --data-urlencode "created_at.gte=2026-06-01T00:00:00Z" \
291294 --data-urlencode "limit=100"
292295```
from line 355
352355
353356curl --fail-with-body -sS \
354357 "https://api.anthropic.com/v1/compliance/apps/sessions/remote/$session_id/messages" \
355 --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY"
358 --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \
359 --header "anthropic-version: 2023-06-01"
356360```
357361
358362```json Response
manage-claude/spend-limits-api Changed · +33 / -12 lines
## Versioning
from line 11
1111<Check>
1212 **Scoped Admin API key required**
1313
14 These endpoints require an Admin API key with the `read:spend_limits` scope (for `GET` endpoints) or the `write:spend_limits` scope (for `POST` and `DELETE` endpoints). See [Create an Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys#create-a-key-for-a-claude-enterprise-organization) for where your primary owner creates one and which scopes to select. Pass the key in the `x-api-key` header on every request.
14 These endpoints require an Admin API key with the `read:spend_limits` scope (for `GET` endpoints) or the `write:spend_limits` scope (for `POST` and `DELETE` endpoints). See [Create an Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys#create-a-key-for-a-claude-enterprise-organization) for where your primary owner creates one and which scopes to select. Pass the key in the `x-api-key` header on every request, together with the [`anthropic-version`](https://platform.claude.com/docs/en/api/versioning) header.
1515</Check>
1616
1717<Note>
from line 40
4040
4141```bash cURL
4242curl "https://api.anthropic.com/v1/organizations/spend_limits/effective?limit=20" \
43 --header "x-api-key: $ANTHROPIC_ADMIN_KEY"
43 --header "x-api-key: $ANTHROPIC_ADMIN_KEY" \
44 --header "anthropic-version: 2023-06-01"
4445```
4546
4647## Key concepts
from line 82
8182
8283By default, Anthropic emails the member when their request is approved or denied. Pass `suppress_notification: true` on approve or deny to suppress that email (for example, when your own system notifies the member).
8384
85## Versioning
86
87Send the `anthropic-version` header on every request; see [API versions](https://platform.claude.com/docs/en/api/versioning) for the available versions.
88
8489## Rate limiting
8590
8691All eight endpoints share a single per-organization limit of **60 requests per minute**. Requests over the limit return **429 Too Many Requests**.
from line 118
113118
114119```bash cURL
115120curl "https://api.anthropic.com/v1/organizations/spend_limits/effective?limit=20" \
116 --header "x-api-key: $ANTHROPIC_ADMIN_KEY"
121 --header "x-api-key: $ANTHROPIC_ADMIN_KEY" \
122 --header "anthropic-version: 2023-06-01"
117123```
118124
119125```json
from line 154
148154
149155```bash cURL
150156curl "https://api.anthropic.com/v1/organizations/spend_limits/spl_01AbCdEfGhIjKlMnOpQrSt" \
151 --header "x-api-key: $ANTHROPIC_ADMIN_KEY"
157 --header "x-api-key: $ANTHROPIC_ADMIN_KEY" \
158 --header "anthropic-version: 2023-06-01"
152159```
153160
154161### Set a per-user override
from line 168
161168curl --request POST "https://api.anthropic.com/v1/organizations/spend_limits" \
162169 --header "content-type: application/json" \
163170 --header "x-api-key: $ANTHROPIC_ADMIN_KEY" \
171 --header "anthropic-version: 2023-06-01" \
164172 --data '{"scope": {"type": "user", "user_id": "user_01AbCdEfGh"}, "amount": "75000"}'
165173```
166174
from line 193
185193
186194```bash cURL
187195curl --request DELETE "https://api.anthropic.com/v1/organizations/spend_limits/spl_01RsTuVwXyZaBcDeFgHiJk" \
188 --header "x-api-key: $ANTHROPIC_ADMIN_KEY"
196 --header "x-api-key: $ANTHROPIC_ADMIN_KEY" \
197 --header "anthropic-version: 2023-06-01"
189198```
190199
191200## Spend limit increase requests
from line 207
198207
199208```bash cURL
200209curl --globoff "https://api.anthropic.com/v1/organizations/spend_limit_increase_requests?status[]=pending&limit=50" \
201 --header "x-api-key: $ANTHROPIC_ADMIN_KEY"
210 --header "x-api-key: $ANTHROPIC_ADMIN_KEY" \
211 --header "anthropic-version: 2023-06-01"
202212```
203213
204214Each pending request carries a live `spend_summary` showing the requester's current effective spend limit and period-to-date spend, enough to decide without a separate lookup.
from line 221
211221
212222```bash cURL
213223curl "https://api.anthropic.com/v1/organizations/spend_limit_increase_requests/slir_01AbCdEfGhIjKlMnOpQrSt" \
214 --header "x-api-key: $ANTHROPIC_ADMIN_KEY"
224 --header "x-api-key: $ANTHROPIC_ADMIN_KEY" \
225 --header "anthropic-version: 2023-06-01"
215226```
216227
217228### Approve an increase request
from line 235
224235curl --request POST "https://api.anthropic.com/v1/organizations/spend_limit_increase_requests/slir_01AbCdEfGhIjKlMnOpQrSt/approve" \
225236 --header "content-type: application/json" \
226237 --header "x-api-key: $ANTHROPIC_ADMIN_KEY" \
238 --header "anthropic-version: 2023-06-01" \
227239 --data '{"amount": "75000", "suppress_notification": true}'
228240```
229241
from line 249
237249curl --request POST "https://api.anthropic.com/v1/organizations/spend_limit_increase_requests/slir_01AbCdEfGhIjKlMnOpQrSt/deny" \
238250 --header "content-type: application/json" \
239251 --header "x-api-key: $ANTHROPIC_ADMIN_KEY" \
252 --header "anthropic-version: 2023-06-01" \
240253 --data '{"suppress_notification": true}'
241254```
242255
from line 267
254267
255268 ```bash cURL
256269 curl --globoff "https://api.anthropic.com/v1/organizations/spend_limit_increase_requests?status[]=pending&limit=100" \
257 --header "x-api-key: $ANTHROPIC_ADMIN_KEY"
270 --header "x-api-key: $ANTHROPIC_ADMIN_KEY" \
271 --header "anthropic-version: 2023-06-01"
258272 ```
259273
260274 Each request carries the requester's `actor.user_id` and a live `spend_summary` with their current effective `amount` and `period_to_date_spend`, enough to decide without a separate lookup.
from line 281
267281 curl --request POST "https://api.anthropic.com/v1/organizations/spend_limit_increase_requests/{id}/approve" \
268282 --header "content-type: application/json" \
269283 --header "x-api-key: $ANTHROPIC_ADMIN_KEY" \
284 --header "anthropic-version: 2023-06-01" \
270285 --data '{"amount": "75000", "suppress_notification": true}'
271286 ```
272287
from line 295
280295
281296 ```bash cURL
282297 curl "https://api.anthropic.com/v1/organizations/analytics/user_cost_report?starting_at=2026-06-01T00:00:00Z&limit=1000" \
283 --header "x-api-key: $ANALYTICS_API_KEY"
298 --header "x-api-key: $ANALYTICS_API_KEY" \
299 --header "anthropic-version: 2023-06-01"
284300 ```
285301
286302 Each row carries `actor.user_id`, `actor.email`, and `amount` (the member's spend in cents). Page through `next_page` to cover the whole organization.
from line 305
289305
290306 ```bash cURL
291307 curl --globoff "https://api.anthropic.com/v1/organizations/spend_limits/effective?user_ids[]=user_01Ab...&user_ids[]=user_01Cd...&limit=100" \
292 --header "x-api-key: $ANTHROPIC_ADMIN_KEY"
308 --header "x-api-key: $ANTHROPIC_ADMIN_KEY" \
309 --header "anthropic-version: 2023-06-01"
293310 ```
294311
295312 Each row returns the cap as `amount` (`null` = unlimited, `"0"` = included usage only) alongside `period_to_date_spend`.
from line 323
306323
307324 ```bash cURL
308325 curl "https://api.anthropic.com/v1/organizations/analytics/user_cost_report?starting_at=2026-06-09T00:00:00Z&ending_at=2026-06-23T00:00:00Z&bucket_width=1d&limit=1000" \
309 --header "x-api-key: $ANALYTICS_API_KEY"
326 --header "x-api-key: $ANALYTICS_API_KEY" \
327 --header "anthropic-version: 2023-06-01"
310328 ```
311329
312330 With `bucket_width` set, each member spans one row per day with usage; page through `next_page` to collect every member's full series.
from line 341
323341
324342 ```bash cURL
325343 curl --globoff "https://api.anthropic.com/v1/organizations/spend_limits/effective?user_ids[]=user_01AbCdEfGh&period[]=monthly" \
326 --header "x-api-key: $ANTHROPIC_ADMIN_KEY"
344 --header "x-api-key: $ANTHROPIC_ADMIN_KEY" \
345 --header "anthropic-version: 2023-06-01"
327346 ```
328347
3293482. Raise the cap:
from line 351
332351 curl --request POST "https://api.anthropic.com/v1/organizations/spend_limits" \
333352 --header "content-type: application/json" \
334353 --header "x-api-key: $ANTHROPIC_ADMIN_KEY" \
354 --header "anthropic-version: 2023-06-01" \
335355 --data '{"scope": {"type": "user", "user_id": "user_01AbCdEfGh"}, "amount": "500000", "period": "monthly"}'
336356 ```
337357
from line 361
341361 curl --request POST "https://api.anthropic.com/v1/organizations/rbac_groups/rbac_group_01UvWxYzAbCdEfGhIjKlMn/members" \
342362 --header "content-type: application/json" \
343363 --header "x-api-key: $ANTHROPIC_ADMIN_KEY" \
364 --header "anthropic-version: 2023-06-01" \
344365 --data '{"user_id": "user_01AbCdEfGh"}'
345366 ```
346367
manage-claude/user-management Changed · +25 / -10 lines
## Versioning
from line 27
2727<Check>
2828 **Scoped Admin API key required**
2929
30 These endpoints require an Admin API key with the `read:members` scope (member and invite `GET` endpoints, and all custom-role endpoints; there is no separate role scope), the `write:members` scope (member and invite `POST` and `DELETE` endpoints), the `read:rbac_groups` scope (group `GET` endpoints), or the `write:rbac_groups` scope (group `POST` and `DELETE` endpoints). A key carrying the `read:org_audit` scope (a read-only scope for security-audit integrations) can also call every `GET` endpoint on this page and the [Compliance API](https://platform.claude.com/docs/en/manage-claude/compliance-api) read endpoints. See [Create an Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys#create-a-key-for-a-claude-enterprise-organization) for where your primary owner creates one and which scopes to select. Pass the key in the `x-api-key` header on every request. Member and invite requests also require the `anthropic-version: 2023-06-01` header, as shown in the examples; group and custom-role requests do not.
30 These endpoints require an Admin API key with the `read:members` scope (member and invite `GET` endpoints, and all custom-role endpoints; there is no separate role scope), the `write:members` scope (member and invite `POST` and `DELETE` endpoints), the `read:rbac_groups` scope (group `GET` endpoints), or the `write:rbac_groups` scope (group `POST` and `DELETE` endpoints). A key carrying the `read:org_audit` scope (a read-only scope for security-audit integrations) can also call every `GET` endpoint on this page and the [Compliance API](https://platform.claude.com/docs/en/manage-claude/compliance-api) read endpoints. See [Create an Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys#create-a-key-for-a-claude-enterprise-organization) for where your primary owner creates one and which scopes to select. Pass the key in the `x-api-key` header on every request, together with the [`anthropic-version`](https://platform.claude.com/docs/en/api/versioning) header.
3131</Check>
3232
3333## Overview
from line 98
9898
9999Groups connect members to custom roles (role-based access control, the `rbac` in the endpoint paths and scope names). Groups are owned by your enterprise as a whole (the parent organization together with every organization under it) rather than by a single organization, so the group scopes (`read:rbac_groups` and `write:rbac_groups`) require a key created for all linked organizations. Each group carries a `source_type`: `direct` for groups created in claude.ai, `scim` for groups provisioned by your identity provider. A group's `roles` field lists the IDs of the custom roles attached to it; resolve them to names and permissions with the [custom role endpoints](https://platform.claude.com/docs/en/manage-claude/user-management#custom-roles), noting that the role catalog is per-organization while groups are enterprise-wide, so fetching a role that belongs to a different organization of your enterprise returns 404 for your key. The field is `null` (rather than `[]`) when role data was temporarily unavailable, so retry to distinguish a degraded read from a group with no roles.
100100
101## Versioning
102
103Send the `anthropic-version` header on every request; see [API versions](https://platform.claude.com/docs/en/api/versioning) for the available versions.
104
101105## Rate limits
102106
103107Admin API endpoints share a per-organization limit of **100 requests per minute**; invite creation has its own limit of **1,200 requests per hour** instead. Requests over a limit return **429 Too Many Requests**.
from line 249
245249
246250## Groups
247251
248Groups your enterprise creates directly, in [claude.ai organization settings](https://claude.ai/admin-settings) or through this API (`source_type: "direct"`), support every endpoint in this section. Groups provisioned by your identity provider (`source_type: "scim"`) can be read but not modified: renaming or deleting a SCIM group, or changing its membership, returns 400, because your identity provider owns it. Unlike member and invite requests, group requests do not require the `anthropic-version` header.
252Groups your enterprise creates directly, in [claude.ai organization settings](https://claude.ai/admin-settings) or through this API (`source_type: "direct"`), support every endpoint in this section. Groups provisioned by your identity provider (`source_type: "scim"`) can be read but not modified: renaming or deleting a SCIM group, or changing its membership, returns 400, because your identity provider owns it.
249253
250254### List groups
251255
from line 259
255259
256260```bash cURL
257261curl "https://api.anthropic.com/v1/organizations/rbac_groups?limit=20" \
258 -H "x-api-key: $ANTHROPIC_ADMIN_KEY"
262 -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \
263 -H "anthropic-version: 2023-06-01"
259264```
260265
261266```json
from line 289
284289
285290```bash cURL
286291curl "https://api.anthropic.com/v1/organizations/rbac_groups/rbac_group_01UvWxYzAbCdEfGhIjKlMn" \
287 -H "x-api-key: $ANTHROPIC_ADMIN_KEY"
292 -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \
293 -H "anthropic-version: 2023-06-01"
288294```
289295
290296### Create a group
from line 303
297303curl -X POST "https://api.anthropic.com/v1/organizations/rbac_groups" \
298304 -H "content-type: application/json" \
299305 -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \
306 -H "anthropic-version: 2023-06-01" \
300307 -d '{"name": "Engineering"}'
301308```
302309
from line 329
322329curl -X POST "https://api.anthropic.com/v1/organizations/rbac_groups/rbac_group_01UvWxYzAbCdEfGhIjKlMn" \
323330 -H "content-type: application/json" \
324331 -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \
332 -H "anthropic-version: 2023-06-01" \
325333 -d '{"name": "Platform Engineering"}'
326334```
327335
from line 341
333341
334342```bash cURL
335343curl -X DELETE "https://api.anthropic.com/v1/organizations/rbac_groups/rbac_group_01UvWxYzAbCdEfGhIjKlMn" \
336 -H "x-api-key: $ANTHROPIC_ADMIN_KEY"
344 -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \
345 -H "anthropic-version: 2023-06-01"
337346```
338347
339348```json
from line 360
351360
352361```bash cURL
353362curl "https://api.anthropic.com/v1/organizations/rbac_groups/rbac_group_01UvWxYzAbCdEfGhIjKlMn/members?limit=100" \
354 -H "x-api-key: $ANTHROPIC_ADMIN_KEY"
363 -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \
364 -H "anthropic-version: 2023-06-01"
355365```
356366
357367```json
from line 390
380390curl -X POST "https://api.anthropic.com/v1/organizations/rbac_groups/rbac_group_01UvWxYzAbCdEfGhIjKlMn/members" \
381391 -H "content-type: application/json" \
382392 -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \
393 -H "anthropic-version: 2023-06-01" \
383394 -d '{"user_id": "user_01AbCdEfGhIjKlMnOpQrSt"}'
384395```
385396
from line 412
401412
402413```bash cURL
403414curl -X DELETE "https://api.anthropic.com/v1/organizations/rbac_groups/rbac_group_01UvWxYzAbCdEfGhIjKlMn/members/user_01AbCdEfGhIjKlMnOpQrSt" \
404 -H "x-api-key: $ANTHROPIC_ADMIN_KEY"
415 -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \
416 -H "anthropic-version: 2023-06-01"
405417```
406418
407419```json
from line 436
424436
425437```bash cURL
426438curl "https://api.anthropic.com/v1/organizations/rbac_roles?limit=20" \
427 -H "x-api-key: $ANTHROPIC_ADMIN_KEY"
439 -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \
440 -H "anthropic-version: 2023-06-01"
428441```
429442
430443```json
from line 464
451464
452465```bash cURL
453466curl "https://api.anthropic.com/v1/organizations/rbac_roles/rbac_role_01CdEfGhIjKlMnOpQrStUv" \
454 -H "x-api-key: $ANTHROPIC_ADMIN_KEY"
467 -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \
468 -H "anthropic-version: 2023-06-01"
455469```
456470
457471### List a role's permissions
from line 478
464478
465479```bash cURL
466480curl "https://api.anthropic.com/v1/organizations/rbac_roles/rbac_role_01CdEfGhIjKlMnOpQrStUv/permissions?limit=20" \
467 -H "x-api-key: $ANTHROPIC_ADMIN_KEY"
481 -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \
482 -H "anthropic-version: 2023-06-01"
468483```
469484
470485```json
manage-claude/cmek-aws-kms Changed · +1 / -1 lines
from line 627
627627 * The key is enabled, single-region, and in the same AWS account and region as the workspace.
628628 * The principal you are signed in as has `kms:DescribeKey`, `kms:Encrypt`, and `kms:Decrypt` on the key.
629629 * No service control policy or resource control policy in your AWS organization prevents the service principal or your principal from using the key.
630 * If the policy looks right and the attach still fails, find the denied `kms:` event in CloudTrail in the key's account (it shows the calling principal and, for cryptographic calls, the encryption context), then retry with the `aws:SourceArn` condition temporarily removed to tell a source-ARN mismatch apart from an encryption-context mismatch.
630 * If the policy looks right and the attach still fails, find the denied `kms:` event in CloudTrail in the key's account (it shows the calling principal and, for cryptographic calls, the encryption context), then retry with the `aws:SourceArn` condition temporarily removed to tell a source-ARN mismatch apart from an encryption-context mismatch. Once the key is attached, whether on that retry or after you correct the encryption context, restore the `ArnLike` entry on both service-principal statements with `kms:PutKeyPolicy`, using the account-wide `aws:SourceArn` pattern or the ARN of every workspace the key is attached to.
631631 </Step>
632632</Steps>
633633
manage-claude/compliance-integration-patterns Changed · +2 / -0 lines
from line 44
4444curl --fail-with-body -sS -G \
4545 "https://api.anthropic.com/v1/compliance/activities" \
4646 --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \
47 --header "anthropic-version: 2023-06-01" \
4748 --data-urlencode "created_at.gte=2026-04-20T07:00:00Z" \
4849 --data-urlencode "created_at.lt=2026-04-20T08:00:00Z" \
4950 --data-urlencode "limit=5000"
from line 66
6566curl --fail-with-body -sS -G \
6667 "https://api.anthropic.com/v1/compliance/activities" \
6768 --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \
69 --header "anthropic-version: 2023-06-01" \
6870 --data-urlencode "limit=5000" \
6971 --data-urlencode "before_id=$first_id"
7072```
release-notes/overview Changed · +1 / -0 lines
from line 23
2323* `thinking.display` accepts a third value, `"updates"`, in beta (`thinking-display-updates-2026-08-18` header). Reasoning comes back with an empty `thinking` field, as under `"omitted"`, and the short progress updates that Claude Fable 5.1, Claude Mythos 5.1, and Claude Fable 5 write between tool calls come back as text, at most one `thinking` block before a tool call. See [Progress updates between tool calls](https://platform.claude.com/docs/en/build-with-claude/thinking#progress-updates).
2424* Text generated by Claude Fable 5.1 and Claude Mythos 5.1 carries Anthropic's text watermark, and supported image and video files that Claude produces through the [code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool) carry C2PA Content Credentials when you retrieve them through the [Files API](https://platform.claude.com/docs/en/build-with-claude/files) on the Claude API. Marking requires no changes to your requests or response handling.
2525* Like Claude Fable 5, both models require 30-day data retention and aren't available under zero data retention unless expressly authorized by Anthropic. See [Model-specific data retention requirements](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#model-specific-data-retention-requirements).
26* The guides for the Claude Enterprise endpoints of the [Admin API](https://platform.claude.com/docs/en/api/admin) ([user management](https://platform.claude.com/docs/en/manage-claude/user-management) and [spend limits](https://platform.claude.com/docs/en/manage-claude/spend-limits-api)), the [Claude Enterprise Analytics API](https://platform.claude.com/docs/en/manage-claude/analytics-api), and the [Compliance API](https://platform.claude.com/docs/en/manage-claude/compliance-api) now show the `anthropic-version` header; send it on every request to these endpoints, as in the rest of the Claude API. See [API versions](https://platform.claude.com/docs/en/api/versioning).
2627
2728### August 27, 2026
2829