Follow Discord
Sweep 24 Nov 2026 · 22:58Z Build v2.1.332 549 read Stable v2.1.326 Latest v2.1.332 Next v2.1.332 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One capture · api

One read of Claude Developer Platformapi-20261124T153717Z

47 pages moved out of 958 read.

Pages moved 47 significant first
Pages read 958 in this capture
Captured 15:37 UTC
Corpus hash c83881861206 corpus-hash

What this read moved

1-25 of 47, page 1 of 2

This capture is too large to show at once. Changes 1-25 of 47 are below, significant first; the rest are on the following screens.

api/errors Changed · +8 / -0 lines

from line 12
1212 
1313* 401 - `authentication_error`: There’s an issue with your [API key](https://platform.claude.com/docs/en/get-api-key) (for example, it’s malformed, revoked, or expired; see [Key expiration](https://platform.claude.com/docs/en/manage-claude/authentication#key-expiration)). On Claude Platform on AWS, this can also indicate a problem with your AWS credentials or SigV4 signature.
1414 
15 On Claude Models on Google Cloud (Anthropic managed), a 401 can mean a problem with your [Google Cloud credentials](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#authentication).
16 
1517 A 401 whose message begins `CORS requests are not allowed for this Organization` is not a problem with your API key. The request included an `Origin` header, which browsers add, and your organization cannot call the Claude API directly from a browser. The message continues `because of custom retention settings` or `because of its settings`. The first appears only for data retention arrangements such as zero data retention (ZDR); the second is the general case, which includes the Compliance API. No change to the browser request fixes it, so send the request from your own back end; see [Browser-based applications](https://platform.claude.com/docs/en/manage-claude/authentication#browser-based-applications).
1618 
1719* 402 - `billing_error`: There’s an issue with your billing or payment information. Check your payment details in the [Claude Console](https://platform.claude.com), or in AWS Marketplace if you’re using Claude Platform on AWS.
1820 
1921* 403 - `permission_error`: Your API key does not have permission to use the specified resource. Check your organization’s access and workspace settings in the [Claude Console](https://platform.claude.com).
22 
23 On Claude Models on Google Cloud (Anthropic managed), Google Cloud checks each request before forwarding it to Anthropic. To fix a 403, do the following:
24 
25 * Check that `claude.googleapis.com` is enabled on your project.
26 * Check that the caller’s [IAM role](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#iam-roles) allows the request.
27 * If the 403 says `Permission 'UNKNOWN' denied`, check the request’s path. Google Cloud doesn’t offer that route, so no IAM role fixes it.
2028 
2129* 404 - `not_found_error`: The requested resource was not found. Check the endpoint path and any resource IDs in the request URL.
2230 

api/ip-addresses Changed · +10 / -5 lines

## Cloud platforms

from line 4
44description: Anthropic services use fixed IP addresses for both inbound and outbound connections. You can use these addresses to configure your firewall rules for secure access to the Claude API and Claude Console. These addresses will not change without notice.
55---
66 
7<Note>
8 **[Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws):** The inbound endpoint (`aws-external-anthropic.{region}.api.aws`) resolves to AWS IP ranges. Outbound tool calls (MCP connector, web search, and web fetch) originate from the Anthropic ranges listed on this page. See the [AWS IP address ranges](https://docs.aws.amazon.com/vpc/latest/userguide/aws-ip-ranges.html) for inbound allowlisting.
9</Note>
10 
117## Inbound IP addresses
128 
13These are the IP addresses where Anthropic services receive incoming connections.
9These are the IP addresses where Anthropic services receive incoming connections, such as your API requests. If your firewall restricts outgoing traffic, allow it to these addresses.
1410 
11If you use Claude Models on Google Cloud (Anthropic managed) or Claude Platform on AWS, these addresses don’t apply to your API requests. See the [Cloud platforms](https://platform.claude.com/docs/en/api/ip-addresses#cloud-platforms) section.
12 
1513### IPv4
1614 
1715`160.79.104.0/23`
from line 41
434134.162.142.92/32
444234.162.183.95/32
4543```
44 
45## Cloud platforms
46 
47On the following platforms, your API requests go to the cloud provider’s endpoint, not to Anthropic’s inbound IP addresses:
48 
49* **[Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws):** The endpoint (`aws-external-anthropic.{region}.api.aws`) resolves to [AWS IP address ranges](https://docs.aws.amazon.com/vpc/latest/userguide/aws-ip-ranges.html).
50* **[Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed):** Requests go to Google Cloud’s gateway at `claude.googleapis.com`, which forwards them to Anthropic.
4651 

api/overview Changed · +5 / -1 lines

from line 166
166166* **Spend limits:** Maximum monthly cost for API usage
167167* **Rate limits:** Maximum number of requests per minute (RPM) and tokens per minute (TPM)
168168 
169You can view your rate limits under [Rate limits in the Claude Console](https://platform.claude.com/usage/limits). Your spend limits are under [Spend limits in the Claude Console](https://platform.claude.com/settings/spend-limits) (`platform.claude.com/settings/spend-limits`). For higher rate limits or a higher monthly spend cap, use **Request tier increase** on the **Rate limits** page.
169To check or raise your limits:
170 
171* **View rate limits:** Go to [Rate limits in the Claude Console](https://platform.claude.com/usage/limits).
172* **View spend limits:** Go to [Spend limits in the Claude Console](https://platform.claude.com/settings/spend-limits).
173* **Request higher limits:** See [Requesting higher limits](https://platform.claude.com/docs/en/api/rate-limits#requesting-higher-limits).
170174 
171175For detailed information about limits, tiers, and the token bucket algorithm used for rate limiting, see [Rate limits](https://platform.claude.com/docs/en/api/rate-limits).
172176 

build-with-claude/claude-models-on-google-cloud/anthropic-managed Changed · +20 / -9 lines

### Claude Code

from line 24
2424 2. Click **Subscribe** and complete the purchase flow.
2525 3. Return to the listing and click **Manage on Console**. This opens the Claude page in the Google Cloud console.
2626 
27 To return to the Claude page later, select your project in the Google Cloud console. Then go to **Agent Platform > Models > Claude Platform** and select **Anthropic managed**.
27 To return later, open the [Claude page in the Google Cloud console](https://console.cloud.google.com/agent-platform/claude-platform). Select your project. Then, select **Anthropic managed**.
2828 </Step>
2929 
3030 <Step title="Enable the services">
from line 406
406406 
407407### API model IDs
408408 
409Claude Models on Google Cloud (Anthropic managed) uses the same model IDs as the Claude API. Available models include the following:
409Claude Models on Google Cloud (Anthropic managed) uses the same model IDs as the Claude API. It offers the following models:
410410 
411411| Model | Model ID |
412412| :---- | :---- |
from line 431
431431 
432432Claude Models on Google Cloud (Anthropic managed) follows the Claude API’s lifecycle schedule. For the dates, see [Model deprecations](https://platform.claude.com/docs/en/about-claude/model-deprecations). To compare models, see [Models overview](https://platform.claude.com/docs/en/models/overview).
433433 
434In Claude Models on Google Cloud (Anthropic managed), a request for a model that isn’t available to your Anthropic organization returns an error. The error message reads `Model {model} is not available for this organization's inference configuration.`
434A request for a model that your Anthropic organization doesn’t have access to returns a [404 `not_found_error`](https://platform.claude.com/docs/en/api/errors#http-errors).
435435 
436436## Project, location, and workspace resolution
437437 
from line 533
533533 
534534* **[Messages API features](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#messages-api-features):** Model capabilities, tools, context management, files, and skills
535535* **[Claude Managed Agents features](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#claude-managed-agents):** Agents, sessions, sandboxes, and scheduled deployments
536* **[Administration and compliance](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#administration-and-compliance):** Workspaces, user profiles, usage and cost reports, the Compliance API setting, encryption keys, and Zero Data Retention
536* **[Claude Code](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#claude-code):** Setup and feature availability
537* **[Administration and compliance](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#administration-and-compliance):** Workspaces, user profiles, usage and cost reports, rate limits, the Compliance API setting and Activity Feed, encryption keys, and zero data retention
537538 
538539For features that aren’t supported, see the [Features not supported](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#features-not-supported) section. If none of these sections lists a feature that you need, ask your Anthropic account representative whether it’s available.
539540 
from line 649
648649 
649650When you remove a user or rotate a service account, review the sessions and deployments that identity created.
650651 
652### Claude Code
653 
654You can use Claude Code with your Google Cloud project. For setup steps and feature availability, see [Claude Code with Claude Models on Google Cloud (Anthropic managed)](https://code.claude.com/docs/en/claude-models-on-google-cloud-anthropic-managed).
655 
651656### Administration and compliance
652657 
653658The following are also available on Claude Models on Google Cloud (Anthropic managed):
654659 
655* [Workspaces](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#workspaces)
660* [Workspaces](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#workspaces), in the Claude Console and through the [Admin API](https://platform.claude.com/docs/en/manage-claude/admin-api#cloud-platforms)
656661* [User profiles for end-customer attribution](https://platform.claude.com/docs/en/manage-claude/user-profiles)
657662* [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api) (beta)
658663* [Usage and Cost API](https://platform.claude.com/docs/en/manage-claude/usage-cost-api) (legacy), usage endpoint only
664* [Rate Limits API](https://platform.claude.com/docs/en/manage-claude/rate-limits-api), for reading limits
659665* [Compliance API setting](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#compliance-api) in the Claude Console
666* [Activity Feed](https://platform.claude.com/docs/en/manage-claude/compliance-activity-feed) through the API (see [Set up the Compliance API](https://platform.claude.com/docs/en/manage-claude/compliance-api-access))
660667* [Customer-managed encryption keys](https://platform.claude.com/docs/en/manage-claude/cmek) (CMEK), with Google Cloud KMS keys
661* [Zero Data Retention](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#data-retention) (ZDR), on request
668* [Zero data retention](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#data-retention) (ZDR), on request
662669 
663The usage and cost endpoints use the [base URL without the workspace](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#making-requests). Of the three predefined [IAM roles](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#iam-roles), only `roles/claude.admin` allows these calls.
670The workspace, usage, cost, and rate limit endpoints and the Activity Feed use the [base URL without the workspace](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#making-requests). Of the three predefined [IAM roles](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#iam-roles), only `roles/claude.admin` allows the usage and cost calls.
664671 
665672#### Compliance API
666673 
from line 713
706713 
707714To see your organization’s rate limits, [open the Claude Console](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#using-the-claude-console) and go to [Rate limits in the Claude Console](https://platform.claude.com/usage/limits) (`platform.claude.com/usage/limits`). The badge on that page shows **Custom tier** for every organization on Claude Models on Google Cloud (Anthropic managed), whatever its [usage tier](https://platform.claude.com/docs/en/api/rate-limits#about-rate-limits).
708715 
716To read your limits from code, use the [Rate Limits API](https://platform.claude.com/docs/en/manage-claude/rate-limits-api).
717 
709718To request higher limits, use the form in the Claude Console:
710719 
7117201. On the **Rate limits** page, click **Request higher limits**.
from line 761
752761 
753762### Monitoring and logging
754763 
755[Cloud Audit Logs](https://cloud.google.com/logging/docs/audit) records API activity for Claude Models on Google Cloud (Anthropic managed) in your project. The entries appear under the `claude.googleapis.com` service. Each API route belongs to one of two log types:
764[Cloud Audit Logs](https://cloud.google.com/logging/docs/audit) records API activity for Claude Models on Google Cloud (Anthropic managed) in your project. The entries appear under the `claude.googleapis.com` service. They cover only requests that pass through that service. They show when someone opens the Claude Console (in the Admin Activity logs), but they can miss what happens after that. To record changes made in the Claude Console, [turn on the Compliance API](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#compliance-api) and read its [Activity Feed](https://platform.claude.com/docs/en/manage-claude/compliance-activity-feed).
765 
766Each API route belongs to one of two log types:
756767 
757768* **Data Access logs:** These cover most routes, including messages, batches, files, skills, models, and Claude Managed Agents resources such as credential vaults. These logs are off by default.
758769* **Admin Activity logs:** These cover the encryption key routes and some other [organization-level routes](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#iam-roles) that the IAM permissions page doesn’t list. Admin Activity logs are always on.

build-with-claude/fallback-credit Changed · +10 / -8 lines

from line 50
5050 </Step>
5151 
5252 <Step title="Build the retry">
53 Start from the refused request body. Set `model` to the fallback model and add the token as the top-level `fallback_credit_token` parameter. Pick the body shape from the following table.
53 Start from the refused request body. Set `model` to the fallback model and add the token as the top-level `fallback_credit_token` parameter. If the request used fast mode, delete `speed` (see [With a manual retry](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#with-a-manual-retry)). Pick the body shape from the following table.
5454 </Step>
5555 
5656 <Step title="Send the retry with the same header">
from line 62
6262 
6363| `fallback_has_prefill_claim` | Retry body |
6464| ----- | ----- |
65| `true` | The refused request body, unchanged, plus one appended assistant message whose `content` echoes the refused response’s `content`. The retry model continues the response from where the refused model stopped, and completed server tool calls are not run again. |
66| `false` | The refused request body, unchanged. |
65| `true` | The body you built, plus one appended assistant message whose `content` echoes the refused response’s `content`. The retry model continues the response from where the refused model stopped, and completed server tool calls are not run again. |
66| `false` | The body you built. |
6767 
6868## Example
6969 
from line 550
550550Most retries redeem on the first attempt. When one does not, the API returns a 400 error that tells you what to try next.
551551 
552552<Steps>
553 <Step title="Continuation rejected: resend the unchanged body">
554 If the retry that appends the assistant message is rejected with a 400 error, resend the refused request body unchanged, still with the token.
553 <Step title="Continuation rejected: remove the assistant message">
554 If the retry that appends the assistant message is rejected with a 400 error, resend it without that message, still with the token. The rest of this page calls this the unchanged body.
555555 </Step>
556556 
557557 <Step title="Token rejected: drop the token">
from line 578
578578 | ----- | ----- |
579579 | Must match exactly | `system`, `messages`, `tools`, `tool_choice`, `thinking`, and `cache_control`, plus `output_config`, `mcp_servers`, `context_management`, and `container` when you use them |
580580 | May change on the retry | `model`, `max_tokens`, `stop_sequences`, `stream`, `metadata`, and `service_tier` |
581 | May be deleted, not added | `speed`: delete it to run at standard speed. `"fast"` can stay only where the retry model has fast mode. [With the SDK middleware](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#with-the-sdk-middleware), set `speed` to null on each fallback entry instead. |
581582 
582583 The continuation shape (`fallback_has_prefill_claim: true`) is the one exception to the `messages` match: it adds exactly one assistant message at the end of `messages`.
583584 
from line 586
585586</Accordion>
586587 
587588<Accordion title="Beta headers must match too">
588 Send the same `anthropic-beta` headers on the retry as on the refused request. A beta header present on one of the two requests but not the other can fail the match even when the bodies are identical. The resulting 400 error carries the same `request body ... does not match` message as a body difference, so a header difference is easy to misread as a body problem. In particular, do not add or drop beta headers based on which model the request targets.
589 Send the same `anthropic-beta` headers on the retry as on the refused request. A beta header present on one of the two requests but not the other can fail the match even when the bodies are identical. The resulting 400 error carries the same `request body ... does not match` message as a body difference. A header difference is therefore easy to misread as a body problem. Apart from the three kinds that follow, do not add or drop beta headers based on which model the request targets.
589590 
590 Two header families are exempt from the match, for the retry’s sake:
591 Three kinds of header are exempt from the match:
591592 
592593 * **`server-side-fallback-*`:** a retry must drop the `fallbacks` parameter, and dropping this header along with it does not cause a mismatch.
593594 * **`fallback-credit-*`:** keep this header on both requests. The retry needs it to redeem the token.
595 * **`fast-mode-2026-02-01`:** on the Claude API, a retry can add or drop this header. On Claude Models on Google Cloud (Google managed), a retry must leave it out.
594596 
595597 <Note>
596598 On models that include the 1M token context window by default, such as Claude Fable 5.2, Claude Fable 5.1, Claude Fable 5, Claude Opus 5.5, Claude Opus 5, Claude Opus 4.8, Claude Sonnet 5.5, and Claude Sonnet 5, the `context-1m-2025-08-07` beta header has no effect. To keep the two requests identical, omit that header on both rather than sending it on one and not the other.

build-with-claude/files Changed · +23 / -1 lines

from line 60
6060 
6161If you are building a multitenant application on the Files API, create a separate [workspace](https://platform.claude.com/docs/en/manage-claude/workspaces) for each tenant. The workspace is the isolation boundary for files, so a workspace for each tenant gives that tenant’s data hard isolation from every other tenant. Each organization can have up to 1,000 workspaces by default. Contact your account team if you need more.
6262 
63On the following platforms, your cloud provider’s IAM controls access to workspaces:
64 
65* **Claude Platform on AWS:** An IAM policy can name a workspace to grant or deny access to it.
66* **Claude Models on Google Cloud (Anthropic managed):** An IAM role applies to every workspace in the Google Cloud project. Workspaces in one project don’t limit who can read, use, or manage their resources.
67 
68Before you rely on workspaces to separate tenants on these platforms, read [Access on cloud platforms](https://platform.claude.com/docs/en/manage-claude/workspaces#access-on-cloud-platforms).
69 
6370## How to use the Files API
6471 
6572### Uploading a file
from line 1035
10281035 
10291036### Audit logging
10301037 
1031If your organization has the [Compliance API](https://platform.claude.com/docs/en/manage-claude/compliance-api) enabled, its [Activity Feed](https://platform.claude.com/docs/en/manage-claude/compliance-activity-feed) records Files API operations made with a Claude API key or from the Claude Console: each upload (`POST /v1/files`), content download (`GET /v1/files/{file_id}/content`), and deletion (`DELETE /v1/files/{file_id}`) appears as a `platform_file_uploaded`, `platform_file_content_downloaded`, or `platform_file_deleted` activity. Listing files and retrieving file metadata are not recorded. Operations that occur while the Compliance API is off are not recorded and cannot be recovered later, so [set up the Compliance API](https://platform.claude.com/docs/en/manage-claude/compliance-api-access) before you rely on this audit trail. On [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#monitoring-and-logging), audit file operations with AWS CloudTrail data events instead.
1038Where you audit Files API requests depends on how you make them.
1039 
1040When the [Compliance API](https://platform.claude.com/docs/en/manage-claude/compliance-api) is on for your organization, its [Activity Feed](https://platform.claude.com/docs/en/manage-claude/compliance-activity-feed) records these operations made with a Claude API key or from the Claude Console:
1041 
1042| Operation | Request | Activity type |
1043| ----- | ----- | ----- |
1044| Upload | `POST /v1/files` | `platform_file_uploaded` |
1045| Content download | `GET /v1/files/{file_id}/content` | `platform_file_content_downloaded` |
1046| Deletion | `DELETE /v1/files/{file_id}` | `platform_file_deleted` |
1047 
1048The Activity Feed doesn’t record listing files or retrieving file metadata. It also doesn’t record operations that occur while the Compliance API is off, and you can’t recover those records later. Before you rely on this audit trail, turn the Compliance API on. [Set up the Compliance API](https://platform.claude.com/docs/en/manage-claude/compliance-api-access) says who can do that.
1049 
1050On the following platforms, turn on the cloud provider’s logs to audit Files API requests:
1051 
1052* **[Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#monitoring-and-logging):** AWS CloudTrail data events.
1053* **[Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#monitoring-and-logging):** Data Access logs in Cloud Audit Logs. These logs can miss actions in the Claude Console. For those, turn on the Compliance API and use its Activity Feed.
10321054 
10331055## Migrate from `files-api-2025-04-14`
10341056 

build-with-claude/refusals-and-fallback Changed · +161 / -3 lines

## Fallback for fast mode requests ### With server-side fallback ### With the SDK middleware ### With a manual retry ### Claude Models on Google Cloud (Google managed) and Microsoft Foundry ### Which speed ran

from line 654
654654* Entries are tried in order. Each must be distinct from the other entries and from the requested model.
655655* Each entry must be one of the requested model’s permitted targets. With the beta header set, that list is published as `allowed_fallback_models` on the [model’s entry in the Models API](https://platform.claude.com/docs/en/api/beta/models/list).
656656* Each entry names a `model` and can override `max_tokens`, `thinking`, `output_config`, and `speed` for that attempt only.
657* The request must be valid as a direct request to every model named. If a fallback model does not support a feature the request uses, the API rejects the request up front. Under the `2026-07-01` header, `thinking: {"type": "between_tools"}` is the exception: when a Claude Sonnet 5.5 request falls back to Claude Sonnet 5, the fallback attempt runs with `thinking: {"type": "disabled"}` and `display: "omitted"`. Under `2026-06-01`, set `thinking` on the Claude Sonnet 5 entry, or the request is rejected up front.
657* The request must be valid as a direct request to every model named, or the API rejects it up front. Under the `server-side-fallback-2026-07-01` header, the request’s `speed`, `output_config.effort`, `output_config.task_budget`, and `thinking` type are the exceptions. Where a fallback model doesn’t support one of those values, its attempt uses the model’s default.
658* When a Claude Sonnet 5.5 request with [`thinking: {"type": "between_tools"}`](https://platform.claude.com/docs/en/build-with-claude/thinking#turning-thinking-off) falls back to Claude Sonnet 5 under that header, the attempt runs with `thinking: {"type": "disabled"}` and `display: "omitted"` instead.
659* Under the `server-side-fallback-2026-06-01` header, a fallback model that doesn’t support the request’s `speed: "fast"` runs at standard speed. For an unsupported `thinking` or `output_config` value, set that whole field on the model’s entry.
658660* As with the default mode, only a safety classifier decline triggers the fallback. A rate limit, overload, or server error on the requested model is returned to you as-is.
659* If a fallback model is rate limited or overloaded, the fallback attempt is not made and the preceding refusal is returned instead. The refusal’s `stop_details.recommended_model` then names a model to retry directly. Size the fallback model’s rate limits for the refusal volume you expect, or fallbacks degrade to refusals under load.
661* If a fallback model is rate limited or overloaded, the API returns the preceding refusal and tries no later entries. At a fast mode limit, the attempt can [run at standard speed](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#with-server-side-fallback) instead. The refusal’s `stop_details.recommended_model` names a model to retry directly. Size the fallback model’s rate limits for the refusals you expect.
660662 
661663The response has the same shape in both modes: the model that served the turn appears in the top-level `model` field, a `fallback` content block marks the handoff, and `usage.iterations` records each attempt.
662664 
from line 1133
11311133 ```
11321134</CodeGroup>
11331135 
1136For fast mode requests, use `null` (python: `None`; go: `ExtraFields: map[string]any{"speed": nil}`; java: `Optional.empty()`; ruby: `nil`) for `speed` on each fallback entry, as [Fallback for fast mode requests](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#falling-back-from-fast-mode) shows.
1137 
11341138### How it behaves
11351139 
11361140* Retries walk your fallback list in order. A fallback model that itself refuses passes the request to the next entry.
from line 1160
11561160 Send the same request with `model` set to a fallback model, such as Claude Opus 4.8. If the refused request sent `thinking: {"type": "between_tools"}`, change `thinking` first: only Claude Sonnet 5.5 accepts that value, so omit `thinking` or set a value the fallback model accepts. [Server-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback) under the `2026-07-01` header makes this change for you when it falls back to Claude Sonnet 5. Another model can normally serve a request that Claude Fable 5.2, Claude Fable 5.1, or Claude Fable 5 declines. How you handle the conversation history depends on whether you redeem a [fallback credit](https://platform.claude.com/docs/en/build-with-claude/fallback-credit):
11571161 
11581162 * **Not redeeming a credit:** you can leave the earlier `thinking` and `redacted_thinking` blocks in place or strip them to save input tokens. The fallback model normally can’t use them either way. Apart from Claude Mythos 5.2, no other model reads Claude Fable 5.2 blocks. Claude Fable 5.1 and Claude Mythos 5.1 [read Claude Fable 5.1 blocks](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#switching-models), and so do Claude Fable 5.2 and Claude Mythos 5.2 on the Claude API and Claude Models on Google Cloud (Google managed). No other model reads them. Only those four models, Claude Fable 5, and Claude Mythos 5 read Claude Fable 5 blocks. The API drops any of these blocks that the fallback model can’t read. It also drops any Claude Opus 5.5 or Claude Sonnet 5.5 block that the fallback model can’t read (see [Switching models mid-conversation](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#switching-models)). A retry after a Claude Haiku 5.5 refusal is always in this case. On the Claude API and Claude Models on Google Cloud (Google managed), Claude Opus 5.5, Claude Sonnet 5.5, Claude Fable 5.2, and Claude Mythos 5.2 read Claude Haiku 5.5 blocks, so leave those blocks in place when you fall back to one of those models there. For a fallback model that can’t read them, the API drops them without billing them.
1159 * **Redeeming a credit:** send the body unchanged, because redemption requires an exact match. The server handles the earlier model’s thinking blocks on a redemption, so do not strip them (see [Fields that must match the refused request](https://platform.claude.com/docs/en/build-with-claude/fallback-credit#reference)).
1163 * **Redeeming a credit:** change only what [Fields that must match the refused request](https://platform.claude.com/docs/en/build-with-claude/fallback-credit#reference) allows, because redemption compares the two requests. Deleting `speed` keeps the credit. The server handles the earlier model’s thinking blocks on a redemption, so do not strip them.
1164 
1165 Delete `speed` if it’s `"fast"`, as [With a manual retry](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#with-a-manual-retry) explains.
11601166 </Step>
11611167 
11621168 <Step title="Stay on the fallback model">
from line 1171
11651171</Steps>
11661172 
11671173A manual retry writes the fallback model’s prompt cache in full, which costs more than reading an existing cache. [Fallback credit](https://platform.claude.com/docs/en/build-with-claude/fallback-credit) refunds that cost; redeem it on every retry you build yourself. A Claude Haiku 5.5 refusal carries no fallback credit, so a retry after one pays the full cost of writing the fallback model’s prompt cache.
1174 
1175## Fallback for fast mode requests
1176 
1177Which speed a fallback runs at, and what you set for [`speed`](https://platform.claude.com/docs/en/api/beta/messages/create#create.speed), depend on how you fall back.
1178 
1179### With server-side fallback
1180 
1181When fast mode requests fall back, each attempt runs, and is billed, at fast speed if you have [fast mode on its model](https://platform.claude.com/docs/en/build-with-claude/fast-mode#feature-availability). Otherwise, or if its fast mode rate limit is reached, it’s tried at standard speed.
1182 
1183A `speed` on the attempt’s `fallbacks` entry overrides this, so you know its speed in advance:
1184 
1185* `null` (python: `None`; go: `ExtraFields: map[string]any{"speed": nil}`; java: `Optional.empty()`; php: `BetaFallbackParam::with(model: $model)->withSpeed(null)`; ruby: `nil`) runs that attempt at standard speed if the request sends the `server-side-fallback-2026-07-01` header.
1186* `"fast"` runs that attempt at fast speed only. Where the model has no fast mode, the API rejects the whole request up front. If your fast mode limit on that model is 0, or you have reached it, you get the previous attempt’s refusal.
1187 
1188With `fallbacks: "default"`, no entry can set `speed`, so name your models to control it.
1189 
1190### With the SDK middleware
1191 
1192Use `null` (python: `None`; go: `ExtraFields: map[string]any{"speed": nil}`; java: `Optional.empty()`; ruby: `nil`), not `"standard"`, for `speed` on each entry in your fallback list. An entry that leaves `speed` out retries at `"fast"`, which can fail with a 400 error.
1193 
1194With this client, a fast mode request on Claude Opus 5.5 that is refused goes to Claude Opus 4.8 at standard speed:
1195 
1196<CodeGroup exclude="shell">
1197 <CodeGroupItem language="cURL">
1198 The refusal-fallback middleware is part of the Anthropic SDK, so a cURL request can’t use it. Use [server-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback) or [a manual retry](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#manual-retry).
1199 </CodeGroupItem>
1200 
1201 <CodeGroupItem language="CLI">
1202 The `ant` CLI doesn’t include the refusal-fallback middleware. Use [server-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback) or [a manual retry](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#manual-retry).
1203 </CodeGroupItem>
1204 
1205 ```python Python
1206 from anthropic import Anthropic, BetaFallbackState, BetaRefusalFallbackMiddleware
1207 
1208 client = Anthropic(
1209 middleware=[
1210 # None removes speed from the retry, which then runs at standard speed.
1211 BetaRefusalFallbackMiddleware([{"model": "claude-opus-4-8", "speed": None}]),
1212 ],
1213 )
1214 ```
1215 
1216 ```typescript TypeScript
1217 import { BetaFallbackState, betaRefusalFallbackMiddleware } from "@anthropic-ai/sdk";
1218 
1219 const client = new Anthropic({
1220 // null removes speed from the retry, which then runs at standard speed.
1221 middleware: [betaRefusalFallbackMiddleware([{ model: "claude-opus-4-8", speed: null }])]
1222 });
1223 ```
1224 
1225 ```csharp C#
1226 using Anthropic.Helpers;
1227 using Anthropic.Models.Beta.Messages;
1228 using Messages = Anthropic.Models.Messages;
1229 
1230 AnthropicClient client = new()
1231 {
1232 Handlers =
1233 [
1234 new BetaRefusalFallbackHandler
1235 {
1236 // A null Speed removes speed from the retry, which then runs at standard speed.
1237 Fallbacks = [new(Messages::Model.ClaudeOpus4_8) { Speed = null }],
1238 },
1239 ],
1240 };
1241 ```
1242 
1243 ```go Go
1244 import (
1245 // ...
1246 "github.com/anthropics/anthropic-sdk-go/v2/lib/betafallback"
1247 "github.com/anthropics/anthropic-sdk-go/v2/option"
1248 )
1249 
1250 func main() {
1251 client := anthropic.NewClient(
1252 option.WithMiddleware(betafallback.BetaRefusalFallbackMiddleware(
1253 []anthropic.BetaFallbackParam{{
1254 Model: anthropic.ModelClaudeOpus4_8,
1255 // The Speed field can't hold nil, so set it here. Nil removes speed from the
1256 // retry, which then runs at standard speed.
1257 ExtraFields: map[string]any{"speed": nil},
1258 }},
1259 )),
1260 )
1261 // ...
1262 }
1263 ```
1264 
1265 ```java Java
1266 import com.anthropic.helpers.BetaRefusalFallbackInterceptor;
1267 import com.anthropic.models.beta.messages.BetaFallbackParam;
1268 // ...
1269 import com.anthropic.models.messages.Model;
1270 import java.util.Optional;
1271 
1272 void main() {
1273 AnthropicClient client = AnthropicOkHttpClient.builder()
1274 .fromEnv()
1275 .addInterceptor(BetaRefusalFallbackInterceptor.builder()
1276 .addFallback(BetaFallbackParam.builder()
1277 .model(Model.CLAUDE_OPUS_4_8)
1278 // An empty speed removes it from the retry, which then runs at standard speed.
1279 .speed(Optional.empty())
1280 .build())
1281 .build())
1282 .build();
1283 // ...
1284 }
1285 ```
1286 
1287 ```php PHP
1288 use Anthropic\Lib\Middleware\RefusalFallbackMiddleware;
1289 use Anthropic\Messages\Model;
1290 
1291 $client = new Client(
1292 requestOptions: [
1293 'middleware' => [
1294 // null runs the retry at standard speed.
1295 // BetaFallbackParam::with(speed: null) loses the null, so the retry stays fast.
1296 new RefusalFallbackMiddleware(fallbacks: [['model' => Model::CLAUDE_OPUS_4_8, 'speed' => null]]),
1297 ],
1298 ],
1299 );
1300 ```
1301 
1302 ```ruby Ruby
1303 client = Anthropic::Client.new(
1304 middleware: [
1305 # nil removes speed from the retry, which then runs at standard speed.
1306 Anthropic::BetaRefusalFallbackMiddleware.new([{model: Anthropic::Model::CLAUDE_OPUS_4_8, speed: nil}])
1307 ]
1308 )
1309 ```
1310</CodeGroup>
1311 
1312### With a manual retry
1313 
1314Delete `speed` to retry at standard speed. Keep it only where the fallback model’s fast mode is available to you, with any beta header it needs.
1315 
1316### Claude Models on Google Cloud (Google managed) and Microsoft Foundry
1317 
1318For the SDK middleware and a manual retry:
1319 
1320* On Claude Models on Google Cloud (Google managed), a standard-speed request with the `fast-mode-2026-02-01` beta header returns a 400 error. Don’t send it on the original request either: fast mode doesn’t need it there, and the middleware’s retry would send it again.
1321* On Microsoft Foundry, [fast mode has its own model IDs](https://platform.claude.com/docs/en/build-with-claude/fast-mode#basic-usage). For each fallback, name a deployment of a model other than the refusing one, without `-fast`.
1322 
1323### Which speed ran
1324 
1325Read `usage.speed`. On a stream, it keeps the value from the first event. No field shows the speed of a fallback model that takes over later.
11681326 
11691327## Refusals in Message Batches
11701328 

build-with-claude/skills-guide Changed · +47 / -7 lines

from line 2
22title: Using Agent Skills with the API
33url: https://platform.claude.com/docs/en/build-with-claude/skills-guide
44description: Learn how to use Agent Skills to extend Claude's capabilities through the API.
5featureMetadata:
6 status: stable
7 zdr:
8 eligibility: not-eligible
9 note: Skill data retained according to standard policy.
10 supportedModels:
11 - claude-fable-5-2
12 - claude-mythos-5-2
13 - claude-fable-5-1
14 - claude-mythos-5-1
15 - claude-fable-5
16 - claude-mythos-5
17 - claude-mythos-preview
18 - claude-opus-5-5
19 - claude-opus-5
20 - claude-sonnet-5-5
21 - claude-sonnet-5
22 - claude-haiku-5-5
23 - claude-haiku-4-5-20251001
24 - claude-opus-4-8
25 - claude-opus-4-7
26 - claude-opus-4-6
27 - claude-sonnet-4-6
28 - claude-opus-4-5-20251101
29 - claude-sonnet-4-5-20250929
30 supportedPlatforms:
31 Claude API: stable
32 Claude Platform on AWS: stable
33 Claude Models on Google Cloud (Anthropic managed): stable
34 Microsoft Foundry (hosted on Anthropic):
35 availability: stable
36 note: Hosted on Anthropic deployments only; the skill version download endpoint (`GET /v1/skills/{skill_id}/versions/{version}/content`) is not supported on Foundry.
537---
638 
7Agent Skills extend Claude’s capabilities through organized folders of instructions, scripts, and resources. This guide shows you how to use both pre-built and custom Skills with the Claude API.
39Agent Skills extend Claude’s capabilities through organized folders of instructions, scripts, and resources. This guide shows you how to use pre-built and custom Skills through the API and how to create and manage custom Skills.
840 
941<Note>
1042 For complete API reference including request/response schemas and all parameters, see:
from line 45
1345 * [Skill versions API reference](https://platform.claude.com/docs/en/api/skills/versions/list) - Version management
1446</Note>
1547 
16<Note>
17 To learn how zero data retention (ZDR) applies to this feature, see [API and data retention](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention).
18</Note>
19 
2048## Quick links
2149 
2250<CardGroup cols={2}>
from line 85
5785 
5886To use Skills, you need:
5987 
601. **Claude API key** from the [Claude Console](https://platform.claude.com/settings/keys)
612. **[Code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool)** enabled in your requests
881. **Credentials** for the Claude API (see [Authentication](https://platform.claude.com/docs/en/manage-claude/authentication)) or for a [cloud platform that offers Skills](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview#feature-availability).
892. **[Code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool)** in your request’s `tools` array.
6290 
6391Skills require the code execution tool, so use a model listed in its [API support section](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool#availability-feature-support).
6492 
from line 1982
19541982 
19551983If you are building a multitenant platform on the Skills API, create a separate [workspace](https://platform.claude.com/docs/en/manage-claude/workspaces) for each tenant. The workspace is the isolation boundary for custom Skills, so a workspace for each tenant gives that tenant’s Skills hard isolation from every other tenant. Each organization can have up to 1,000 workspaces by default (see [How workspaces work](https://platform.claude.com/docs/en/manage-claude/workspaces#how-workspaces-work)). If you need more for tenant isolation, contact your account team.
19561984 
1985On the following platforms, your cloud provider’s IAM controls access to workspaces:
1986 
1987* **Claude Platform on AWS:** An IAM policy can name a workspace to grant or deny access to it.
1988* **Claude Models on Google Cloud (Anthropic managed):** An IAM role applies to every workspace in the Google Cloud project. Workspaces in one project don’t limit who can read, use, or manage their resources.
1989 
1990Before you rely on workspaces to separate tenants on these platforms, read [Access on cloud platforms](https://platform.claude.com/docs/en/manage-claude/workspaces#access-on-cloud-platforms).
1991 
19571992### Creating a Skill
19581993 
19591994A Skill bundle is a directory containing a `SKILL.md` file at the top level with `name` and `description` YAML frontmatter, plus any supporting scripts or resources. See [Skill authoring best practices](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices) to author one, and the **Requirements** list following the examples for the full constraints.
from line 4578
45434578## Audit logging
45444579 
45454580If your organization has the [Compliance API](https://platform.claude.com/docs/en/manage-claude/compliance-api) enabled, its [Activity Feed](https://platform.claude.com/docs/en/manage-claude/compliance-activity-feed) records the creation and deletion of Skills and Skill versions made with a Claude API key or from the Claude Console. Operations that occur while the Compliance API is off are not recorded and cannot be recovered later, so [set up the Compliance API](https://platform.claude.com/docs/en/manage-claude/compliance-api-access) before you rely on this audit trail.
4581 
4582On the following platforms, turn on the cloud provider’s logs to audit Skills API requests:
4583 
4584* **[Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#monitoring-and-logging):** AWS CloudTrail data events.
4585* **[Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#monitoring-and-logging):** Data Access logs in Cloud Audit Logs. These logs can miss actions in the Claude Console. For those, turn on the Compliance API and use its Activity Feed.
45464586 
45474587## Next steps
45484588 

cli-sdks-libraries/cli/authentication Changed · +9 / -0 lines

## Claude Models on Google Cloud (Anthropic managed)

from line 93
9393 --message '{role: user, content: "Hello, Claude"}'
9494```
9595 
96## Claude Models on Google Cloud (Anthropic managed)
97 
98To call [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed), the CLI uses Google Application Default Credentials instead of `ant auth login` or an API key. To set up the CLI, follow these steps:
99 
1001. **Set up the credentials:** See [Authentication on Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#authentication).
1012. **Set your project ID and workspace ID:** Pass `--google-cloud-project` and `--google-cloud-workspace-id`, or set `ANTHROPIC_GOOGLE_CLOUD_PROJECT` and `ANTHROPIC_GOOGLE_CLOUD_WORKSPACE_ID`. For the other settings and their defaults, see [Project, location, and workspace resolution](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#project-location-and-workspace-resolution).
1023. **Leave competing settings unset:** An API key, an authentication token, a configuration profile, or Anthropic’s federation variables can take precedence over these settings. Before you run a command, check [which settings to leave unset](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#credential-precedence).
1034. **Confirm that the CLI uses these settings:** Run `ant auth status` and check that the `Google Cloud` row is marked `(active)`. If you set them with flags, pass the same flags to `ant auth status`.
104 
96105## Check authentication status
97106 
98107`ant auth status` prints the credential source the CLI selected (API key environment variable, OAuth login, federation, Google Cloud, or profile), the active profile, the workspace the active token is bound to, and the configuration directory paths. Use it to diagnose why a workload picked the wrong credential or workspace.

manage-claude/admin-api Changed · +23 / -8 lines

## Cloud platforms

from line 18
1818 
1919For members, invites, groups, and custom roles, see [User management](https://platform.claude.com/docs/en/manage-claude/user-management).
2020 
21On [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), only these Admin API endpoints are available:
21[Cloud platforms](https://platform.claude.com/docs/en/manage-claude/admin-api#cloud-platforms) lists the endpoints you can call on Claude Models on Google Cloud (Anthropic managed) and Claude Platform on AWS.
2222 
23* The workspace endpoints: create, get, list, update, and archive on `/v1/organizations/workspaces`.
24* The external key endpoints, for [CMEK](https://platform.claude.com/docs/en/manage-claude/cmek-claude-platform-on-aws): register, get, list, update, and delete on `/v1/organizations/external_keys`. There is no validate endpoint, because keys are validated when attached to a workspace.
25* The [telemetry destination endpoints](https://platform.claude.com/docs/en/api/claude-platform-on-aws-iam-actions#telemetry-destinations).
26* The [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api) endpoints: `/v1/organizations/analytics/usage` and `/v1/organizations/analytics/cost`.
27 
28Organization members, workspace members, invites, API keys, the legacy [Usage and Cost API](https://platform.claude.com/docs/en/manage-claude/usage-cost-api), and the rate limit reports aren’t available on Claude Platform on AWS.
29 
3023## Authentication
3124 
3225The Admin API accepts any of these three credentials:
from line 1765
17721765## Organization webhooks
17731766 
17741767Register webhook endpoints for events about enforcement actions on your organization’s user profiles with [organization webhooks](https://platform.claude.com/docs/en/manage-claude/organization-webhooks).
1768 
1769## Cloud platforms
1770 
1771On the following cloud platforms, send requests to the platform’s base URL. Use the platform’s credentials instead of the ones under [Authentication](https://platform.claude.com/docs/en/manage-claude/admin-api#authentication).
1772 
1773On [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), only these Admin API endpoints are available:
1774 
1775* The workspace endpoints: create, get, list, update, and archive on `/v1/organizations/workspaces`.
1776* The external key endpoints, for [customer-managed encryption keys (CMEK)](https://platform.claude.com/docs/en/manage-claude/cmek-claude-platform-on-aws): register, get, list, update, and delete on `/v1/organizations/external_keys`. Attaching a key to a workspace validates it.
1777* The [telemetry destination endpoints](https://platform.claude.com/docs/en/api/claude-platform-on-aws-iam-actions#telemetry-destinations).
1778* The compliance settings endpoints, to read and change the [Compliance API](https://platform.claude.com/docs/en/manage-claude/compliance-api) setting: get and update on `/v1/organizations/compliance_settings`.
1779* The [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api) endpoints, which are in beta: `/v1/organizations/analytics/usage` and `/v1/organizations/analytics/cost`.
1780 
1781For the base URL and credentials, see [Making requests on Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#making-requests).
1782 
1783On [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed), use the organization-level base URL that [Making requests on Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#making-requests) describes. You can call these Admin API endpoints:
1784 
1785* The workspace endpoints: create, get, list, update, and archive on `/v1/organizations/workspaces`.
1786* The [external key endpoints](https://platform.claude.com/docs/en/api/claude-models-on-google-cloud-anthropic-managed-iam-permissions#encryption-keys), for CMEK: create, get, list, update, and delete on `/v1/organizations/external_keys`. To verify and attach a key, follow [Set up CMEK with Google Cloud KMS](https://platform.claude.com/docs/en/manage-claude/cmek-google-cloud-kms#register-the-key-with-anthropic).
1787* The [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api) endpoints, which are in beta: `/v1/organizations/analytics/usage` and `/v1/organizations/analytics/cost`.
1788* The usage endpoint of the legacy [Usage and Cost API](https://platform.claude.com/docs/en/manage-claude/usage-cost-api): `/v1/organizations/usage_report/messages`.
1789* The [Rate Limits API](https://platform.claude.com/docs/en/manage-claude/rate-limits-api) endpoints that read limits: `GET /v1/organizations/rate_limits` and `GET /v1/organizations/workspaces/{workspace_id}/rate_limits`.
17751790 
17761791## Best practices
17771792 

manage-claude/cmek-google-cloud-kms Changed · +6 / -2 lines

from line 1
11---
22title: Set up CMEK with Google Cloud KMS
33url: https://platform.claude.com/docs/en/manage-claude/cmek-google-cloud-kms
4description: Create a Google Cloud KMS key, give Anthropic access to it, and put it to use in Claude Platform or Claude Enterprise.
4description: Create a Google Cloud KMS key, give Anthropic access to it, and put it to use in Claude Platform, Claude Enterprise, or Claude Models on Google Cloud (Anthropic managed).
55---
66 
77Let Claude Code set up this feature for you
from line 27
2727* Cloud KMS [Data Access audit logs](https://docs.cloud.google.com/logging/docs/audit/configure-data-access) (Data Read and Data Write) are on, so Cloud Logging records Anthropic’s use of your key. They’re off by default.
2828* If your Google Cloud organization enforces domain restricted sharing (`constraints/iam.allowedPolicyMemberDomains`), it blocks the grant to Anthropic’s service account. Add a project-level exception, or allow Anthropic’s Cloud Identity customer ID. Contact Anthropic for the ID.
2929 
30On [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed), the items for Claude Platform apply, and so do the items that name no product. You need the `roles/claude.admin` IAM role instead of Organization Admin. You [open the Claude Console from Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#using-the-claude-console).
31 
3032## In Google Cloud: create the key
3133 
3234After a failed **Verify** or **Add**, see the [fixes for Google Cloud KMS](https://platform.claude.com/docs/en/manage-claude/cmek-troubleshooting#google-cloud-kms).
from line 194
192194 
193195To script this part on Claude Platform, [use the Admin API](https://platform.claude.com/docs/en/manage-claude/cmek-admin-api) instead.
194196 
197On Claude Models on Google Cloud (Anthropic managed), follow the steps in the **Claude Platform** tab.
198 
195199<Tabs>
196200 <Tab title="Claude Platform">
197201 <Steps>
from line 204
200204 </Step>
201205 
202206 <Step title="Add the key">
203 Under **Encryption keys**, click **Add key**. Enter a **Display name**, select **Google Cloud KMS**, and click **Continue**.
207 Under **Encryption keys**, click **Add key** and enter a **Display name**. If the dialog box asks for a provider, select **Google Cloud KMS** and click **Continue**.
204208 </Step>
205209 
206210 <Step title="Enter the key resource name">

manage-claude/cmek-how-it-works Changed · +13 / -2 lines

## How your key is tied to your organization

from line 18
1818 
1919## What one key protects
2020 
21On Claude Platform and Claude Platform on AWS, a key protects a workspace, and one key can serve several. On Claude Enterprise, a key protects the whole organization, which can have only one key. [Which data your key protects](https://platform.claude.com/docs/en/manage-claude/cmek#what-cmek-protects) depends on your product.
21What one key protects depends on your product:
2222 
23On Claude Platform and Claude Enterprise, your key carries your Anthropic organization ID, which ties the key to your organization. Depending on your KMS, the ID goes in a key policy condition, a label, or a tag. A key without the ID fails verification. A key shared between organizations carries each ID.
23* **Claude Platform, Claude Platform on AWS, and Claude Models on Google Cloud (Anthropic managed):** A key protects a workspace, and one key can serve several workspaces.
24* **Claude Enterprise:** A key protects the whole organization, which can have only one key.
2425 
26[Which data your key protects](https://platform.claude.com/docs/en/manage-claude/cmek#what-cmek-protects) also depends on your product.
27 
2528An AWS KMS key policy can [name workspaces](https://platform.claude.com/docs/en/manage-claude/cmek-aws-kms-workspaces) by their compartment IDs. A compartment ID is the UUID Anthropic gives each workspace for encryption, not the workspace ID that starts with `wrkspc_`.
29 
30## How your key is tied to your organization
31 
32Your key carries your Anthropic organization ID, which ties the key to your organization. Depending on your KMS, the ID goes in a key policy condition, a label, or a tag. [Your setup page](https://platform.claude.com/docs/en/manage-claude/cmek#set-it-up) shows where. On Claude Platform and Claude Enterprise, a key shared between organizations carries each organization’s ID.
33 
34A key without the ID fails Anthropic’s check when you click **Verify** (**Add** on Claude Enterprise).
35 
36On Claude Platform on AWS, the [key policy](https://platform.claude.com/docs/en/manage-claude/cmek-claude-platform-on-aws#prepare-the-key-policy) names your AWS account instead of your organization ID.
2637 
2738## Where your key lives
2839 

manage-claude/compliance-api Changed · +5 / -1 lines

from line 51
5151 
5252## How the Compliance API works
5353 
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).
54Every endpoint lives under `/v1/compliance/*` and takes the `anthropic-version` header ([API versions](https://platform.claude.com/docs/en/api/versioning)) on every request. How you send a request depends on your organization:
55 
56* **Organizations with a Compliance Access Key or an Admin API key:** Send requests to `https://api.anthropic.com` and pass the key in 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).
57* **Claude Models on Google Cloud (Anthropic managed) organizations:** You don’t create these keys. To read the Activity Feed, use the organization-level base URL and the platform’s credentials. See [Making requests on Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#making-requests).
58* **Claude Platform on AWS organizations:** You don’t create these keys. To read the Activity Feed, use the platform’s base URL and credentials. See [Making requests on Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#making-requests).
5559 
5660The 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. The exception is the [Safety Cases API](https://platform.claude.com/docs/en/manage-claude/enterprise-frontier-safeguards/safety-cases-api#get-access): an Admin API key that you create while that API is available to your organization also reaches it.
5761 

manage-claude/compliance-api-access Changed · +14 / -2 lines

from line 31
3131 
3232## Set up the Compliance API
3333 
34Setup is one flow: enable the Compliance API for your organization, then create a Compliance Access Key in claude.ai. A Claude Console organization instead [creates an Admin API key](https://platform.claude.com/docs/en/manage-claude/compliance-api-access#create-an-admin-api-key) after enablement; Admin API keys reach the [Activity Feed](https://platform.claude.com/docs/en/manage-claude/compliance-activity-feed). Accepting the EFS and Enterprise Data Controls terms turns on the Compliance API for your organization.
34Setup starts with enabling the Compliance API. What comes next depends on your organization:
3535 
36* **Claude Enterprise organizations:** Create a Compliance Access Key in claude.ai. The following steps cover this path from start to finish.
37* **Standalone Claude Console organizations on the Claude API:** After the first step, [create a new Admin API key](https://platform.claude.com/docs/en/manage-claude/compliance-api-access#create-an-admin-api-key). Admin API keys reach the [Activity Feed](https://platform.claude.com/docs/en/manage-claude/compliance-activity-feed).
38* **Claude Models on Google Cloud (Anthropic managed) and Claude Platform on AWS organizations:** Complete only the first step. You don’t create either key.
39 
40Accepting the EFS and Enterprise Data Controls terms turns on the Compliance API for your organization.
41 
3642<Warning>
3743 A Compliance Access Key with `read:compliance_user_data` can read every chat, file, project, and session transcript in every linked organization, including content the primary owner has not seen. A key with `delete:compliance_user_data` can permanently delete chats, files, and projects. Treat Compliance Access Keys like production database credentials: store them in a secrets manager, never in source control or SIEM forwarder configuration. Treat Admin API keys the same way: one that you create while the [Safety Cases API](https://platform.claude.com/docs/en/manage-claude/enterprise-frontier-safeguards/safety-cases-api#get-access) is available to your organization can read the prompts and responses of flagged messages.
3844</Warning>
from line 50
4450 * **Claude Enterprise organizations:** The primary owner enables the Compliance API at [claude.ai > Organization settings > API](https://claude.ai/admin-settings/api-access). Enablement occurs at the parent organization level and cascades to every linked organization, both claude.ai and Claude Console.
4551 * **Standalone Claude Console organizations:** An organization admin turns on the **Compliance API** toggle on the [Compliance](https://platform.claude.com/settings/security) page (`platform.claude.com/settings/security`) in the Claude Console. Enablement is self-service for eligible organizations, and the change takes effect immediately. If the page shows a page-not-found error, or doesn’t show the **Compliance API** section, three causes are possible. You might not have the admin role. Your organization might be linked to a parent organization. Or your organization might not be eligible for self-service enablement. For a linked organization, the Compliance API is enabled from the parent organization instead. Contact your account team or [Anthropic support](https://support.claude.com) if you are not sure which cause applies.
4652 * **Claude Console organizations linked to a parent organization:** There is nothing to turn on in Claude Console. Ask whoever manages your parent organization to enable the Compliance API, or contact your account team.
53 * **Claude Platform on AWS organizations:** With the Admin role, [open the Claude Console](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#using-the-claude-console). Then, turn on the **Compliance API** toggle on the [Compliance](https://platform.claude.com/settings/security) page. You can also call [Update Compliance Settings](https://platform.claude.com/docs/en/api/organization/compliance_settings/update) with AWS credentials. Either way, your IAM principal needs the `UpdateComplianceSettings` action on `Resource: "*"`.
54 * **Claude Models on Google Cloud (Anthropic managed) organizations:** With the `roles/claude.admin` IAM role, [open the Claude Console from the Google Cloud console](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#using-the-claude-console). Then, turn on the **Compliance API** toggle on the [Compliance](https://platform.claude.com/settings/security) page.
4755 
4856 Organizations with the Compliance API enabled cannot call the Claude API directly from a browser. When a parent organization enables it, that includes every linked Claude Console organization. Before you enable the Compliance API, ask the teams that use these organizations whether any application calls the Claude API from browser code. See [Browser-based applications](https://platform.claude.com/docs/en/manage-claude/authentication#browser-based-applications).
4957 
from line 59
5159 **Turning the Compliance API off stops activity recording.** To turn it off, use the same **Compliance API** toggle. If you can’t turn it off, ask your Anthropic account team or [Anthropic support](https://support.claude.com). While the Compliance API is off, no activity events are recorded for your organization, so the [Activity Feed](https://platform.claude.com/docs/en/manage-claude/compliance-activity-feed) receives no new events. Activity that is not recorded while the Compliance API is off cannot be recovered later. Turning the Compliance API back on resumes recording from that point forward; activity that was already recorded is not deleted. Access Transparency events are an exception. If your organization is enrolled in [Access Transparency](https://platform.claude.com/docs/en/manage-claude/access-transparency), turning the Compliance API off stops your access to these events, not their recording. They are still recorded while the Compliance API is off, and the Activity Feed returns them after the Compliance API is turned back on. For Claude Enterprise organizations, the Compliance API setting in claude.ai also governs transcript capture for [local sessions](https://platform.claude.com/docs/en/manage-claude/compliance-sessions#retrieve-local-sessions) (sessions on users’ machines). Capture starts when the Compliance API is enabled and stops while it is off. Transcript content from local sessions that run while the Compliance API is off is not captured and cannot be recovered later.
5260 </Warning>
5361 
54 A standalone Claude Console organization uses Admin API keys rather than Compliance Access Keys: after enablement, skip the remaining steps and [create a new Admin API key](https://platform.claude.com/docs/en/manage-claude/compliance-api-access#create-an-admin-api-key) instead. The remaining steps provision Compliance Access Keys, which are available only to organizations that are part of a Claude Enterprise tenant.
62 The remaining steps provision Compliance Access Keys, which are available only to organizations that are part of a Claude Enterprise tenant. The following organizations skip those steps after enablement:
63 
64 * **Standalone Claude Console organizations on the Claude API:** [Create a new Admin API key](https://platform.claude.com/docs/en/manage-claude/compliance-api-access#create-an-admin-api-key) instead.
65 * **Claude Models on Google Cloud (Anthropic managed) organizations:** To read the Activity Feed, send requests to the [organization-level base URL](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#making-requests) with [Google Cloud credentials](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#authentication). Append `/v1/compliance/activities` to that URL, and send the request over HTTP, such as with cURL, not through the SDK client.
66 * **Claude Platform on AWS organizations:** To read the Activity Feed, use [AWS credentials](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#authentication). The calling principal needs the [`ListComplianceActivities` IAM action](https://platform.claude.com/docs/en/api/claude-platform-on-aws-iam-actions#compliance).
5567 </Step>
5668 
5769 <Step title="Decide the key’s scope">

manage-claude/compliance-errors Changed · +6 / -1 lines

from line 281
281281 
282282**Cause:** The request did not carry a credential the Compliance API accepts: no API key was sent, or the key is not a Compliance Access Key (`sk-ant-api01-...`) or Admin API key (`sk-ant-admin01-...`), for example, a Claude API key (`sk-ant-api03-...`). The status, type, and message are the same as for a path that does not exist and do not depend on the endpoint or any resource ID, so list endpoints such as `GET /v1/compliance/activities` return this body too. The one exception apart from Security posture is `GET /v1/compliance/organizations/{organization_id}/settings`, which answers these requests with 401 `authentication_error`. The Security posture endpoint, `GET /v1/compliance/organizations/{organization_id}/security_posture`, answers them the same way. On every endpoint, a Compliance Access Key or Admin API key that does not authenticate returns [401 Unauthorized](https://platform.claude.com/docs/en/manage-claude/compliance-errors#401-unauthorized) instead.
283283 
284**Fix:** Send the key in the `x-api-key` header and check its prefix: the Compliance API accepts only `sk-ant-api01-...` and `sk-ant-admin01-...` keys; see [Which key do you need?](https://platform.claude.com/docs/en/manage-claude/compliance-api-access#which-key-do-you-need). If the header and key are right and one path still returns `Not found` while others succeed, check that path against the [Compliance API reference](https://platform.claude.com/docs/en/api/compliance). For Security posture, see [Errors in the Security posture results reference](https://platform.claude.com/docs/en/manage-claude/compliance-security-posture/results-reference#handle-errors) instead.
284**Fix:** Follow the step for your case:
285 
286* **Missing or wrong key:** Send the key in the `x-api-key` header and check that it starts with `sk-ant-api01-` or `sk-ant-admin01-`. See [Which key do you need?](https://platform.claude.com/docs/en/manage-claude/compliance-api-access#which-key-do-you-need) for the key types.
287* **`Not found` on one path while others succeed:** If the header and key are right, check that path against the [Compliance API reference](https://platform.claude.com/docs/en/api/compliance).
288* **Security posture endpoint:** See [Errors in the Security posture results reference](https://platform.claude.com/docs/en/manage-claude/compliance-security-posture/results-reference#handle-errors) instead.
289* **[Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) and [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws):** Use the platform’s credentials instead of a key. See [How the Compliance API works](https://platform.claude.com/docs/en/manage-claude/compliance-api#how-the-compliance-api-works).
285290 
286291### Chat not found
287292 

manage-claude/workspaces Changed · +24 / -5 lines

### Access on cloud platforms

from line 68
6868 The Workspace Billing role cannot be manually assigned. It’s inherited from having the organization billing role.
6969</Note>
7070 
71### Access on cloud platforms
72 
73On the following platforms, your cloud provider’s identity and access management (IAM) controls who can call the API in a workspace. You don’t assign members or [workspace roles](https://platform.claude.com/docs/en/manage-claude/workspaces#workspace-roles-and-permissions), even in the Claude Console.
74 
75* **Claude Platform on AWS:** A request names its workspace in the `anthropic-workspace-id` header. IAM policies that name the workspace’s [Amazon Resource Name (ARN)](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#workspace-scoping) grant or deny access to that workspace.
76 
77 * If you use a workspace for each of your customers, these policies can limit each IAM principal to one customer’s workspace.
78 * A Claude Console session covers the whole organization, and some Console pages [bypass IAM checks](https://platform.claude.com/docs/en/api/claude-platform-on-aws-iam-actions#console-access).
79 
80* **Claude Models on Google Cloud (Anthropic managed):** A request names its workspace in the [base URL](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#making-requests). You grant [IAM roles](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#iam-roles) on your Google Cloud project, so a role applies to every workspace in that project.
81 
82 * Workspaces in that project keep resources apart, but they don’t limit who can read, use, or manage those resources.
83 * When people or services must not reach certain resources, keep those resources in a separate project. Each project has its own Anthropic organization, so repeat the [account setup](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#set-up-your-account) in each project, starting from step 2 (enabling the services).
84 * If you use a workspace for each of your customers, separation depends on your application sending the right workspace ID.
85 
7186## Managing workspaces
7287 
7388<Note>
from line 170
155170 Admin API endpoints accept an [Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys), an `org:admin` OAuth token, or a personal or service account key that isn’t scoped to a specific workspace. Keys scoped to a single workspace, including [workspace keys](https://platform.claude.com/docs/en/manage-claude/workspaces#api-keys-and-resource-scoping), don’t work there. See [Admin API authentication](https://platform.claude.com/docs/en/manage-claude/admin-api#authentication).
156171</Note>
157172 
173On Claude Models on Google Cloud (Anthropic managed) and Claude Platform on AWS, use the platform’s base URL and credentials instead. See the Admin API page’s [Cloud platforms](https://platform.claude.com/docs/en/manage-claude/admin-api#cloud-platforms) section.
174 
158175The following examples read the Admin API key from the `ANTHROPIC_API_KEY` environment variable. The SDK exposes these endpoints under `client.organization.workspaces` (csharp, go: `client.Organization.Workspaces`; java: `client.organization().workspaces()`; php: `$client->organization->workspaces`).
159176 
160177Create a workspace:
from line 863
846863* A **workspace key** (a legacy key without an owner) belongs to the workspace it was created in and always runs there.
847864* A **personal key** or **service account key** acts as its user or service account. A single-workspace key always runs in the workspace chosen when it was created. A key that isn’t scoped to a workspace runs in the workspace named by each request’s `anthropic-workspace-id` header. Accounts must have access to the workspace to use it.
848865 
866On Claude Models on Google Cloud (Anthropic managed) and Claude Platform on AWS, these key types don’t apply. The request names the workspace, as [Access on cloud platforms](https://platform.claude.com/docs/en/manage-claude/workspaces#access-on-cloud-platforms) describes.
867 
849868Resources scoped to workspaces include:
850869 
851870* **Files** created through the [Files API](https://platform.claude.com/docs/en/build-with-claude/files)
from line 871
852871* **Message Batches** created through the [Batch API](https://platform.claude.com/docs/en/build-with-claude/batch-processing)
853872* **Skills** created through the [Skills API](https://platform.claude.com/docs/en/build-with-claude/skills-guide)
854873 
874[Prompt caches](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) are also isolated by workspace on the Claude API and on [some cloud platforms](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#cache-storage-and-sharing).
875 
855876Some resources are managed differently:
856877 
857878* **[MCP tunnels](https://platform.claude.com/docs/en/agents-and-tools/mcp-tunnels/overview)** are managed with a `workspace:manage_tunnels` OAuth token obtained through [Workload Identity Federation](https://platform.claude.com/docs/en/manage-claude/workload-identity-federation), not an API key.
from line 885
864885 
865886To look up your organization’s workspace IDs, call the [List Workspaces](https://platform.claude.com/docs/en/api/organization/workspaces/list) endpoint (pass `include_default=true` to include the Default Workspace) or find them on the [Workspaces](https://platform.claude.com/settings/workspaces) page in the Claude Console.
866887 
867<Note>
868 [Prompt caches](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) are also isolated by workspace on the Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), and [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry). On Claude Models on Google Cloud (Google managed) and Amazon Bedrock, prompt caches are isolated by organization.
869</Note>
870 
871888## Identify the workspace behind an API response
872889 
873890Claude API responses include an `anthropic-workspace-id` header alongside the `request-id` and `anthropic-organization-id` [response headers](https://platform.claude.com/docs/en/api/overview#response-headers). Its value is the `wrkspc_`-prefixed ID of the workspace that the request’s API key or access token resolved to, including when that workspace is the Default Workspace. For example, a successful response includes headers like these:
from line 1067
10501067* **Rate limits:** Limit requests per minute, input tokens per minute, or output tokens per minute. To set these, go to [Rate limits in the Claude Console](https://platform.claude.com/usage/limits), select the workspace from the **Workspace** dropdown menu, and click **Edit** next to a model.
10511068 
10521069<Note>
1053 - On [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) and [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), you cannot set spend limits on the Default Workspace.
1070 - A spend limit on the default workspace is not available on [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) or [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws).
10541071 - If not set, workspace limits match the organization’s limits.
10551072 - Organization-wide limits always apply, even if workspace limits add up to more.
10561073</Note>
from line 1255
12381255* **Engineering team** with developer access
12391256* **Data science team** with their own API keys
12401257* **Support team** with limited access for customer tools
1258 
1259These examples rely on [workspace roles](https://platform.claude.com/docs/en/manage-claude/workspaces#workspace-roles-and-permissions) and API keys, which work differently on Claude Models on Google Cloud (Anthropic managed) and Claude Platform on AWS. Before you plan your workspaces, read [Access on cloud platforms](https://platform.claude.com/docs/en/manage-claude/workspaces#access-on-cloud-platforms).
12411260 
12421261### Project-based organization
12431262 

managed-agents/choosing-an-environment Changed · +12 / -7 lines

## Differences on cloud platforms ## Differences on Claude Platform on AWS ## Differences on Claude Models on Google Cloud (Anthropic managed)

from line 90
9090* [Environment variable credentials](https://platform.claude.com/docs/en/managed-agents/vaults#add-a-credential) in vaults.
9191* The [preinstalled runtimes and packages](https://platform.claude.com/docs/en/managed-agents/cloud-sandboxes-reference) of a cloud sandbox. A self-hosted sandbox has whatever your worker provides.
9292 
93## Differences on Claude Platform on AWS
93## Differences on cloud platforms
9494 
95If you use Claude Managed Agents through Claude Platform on AWS, Anthropic still operates the service. There, memory stores aren’t available in a self-hosted sandbox, workers don’t use an environment key, and MCP tunnels aren’t available. See [Claude Managed Agents on Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#claude-managed-agents) and [Features not supported](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#features-not-supported).
95Anthropic operates the service when you use Claude Managed Agents through the following cloud platforms. Each platform’s guide describes what differs there:
9696 
97## Differences on Claude Models on Google Cloud (Anthropic managed)
97* [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#feature-support)
98* [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#feature-support)
9899 
99If you use Claude Managed Agents through Claude Models on Google Cloud (Anthropic managed), Anthropic still operates the service. There, memory stores aren’t available in a self-hosted sandbox, and MCP tunnels aren’t available. Workers authenticate with Google Cloud credentials, not an environment key. You write your own worker, because the prebuilt workers in the `ant` CLI and the Python, TypeScript, and Go SDKs don’t work there. See [Feature support](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#feature-support) in the Claude Models on Google Cloud (Anthropic managed) guide.
100On both platforms, these differences affect your choice:
100101 
102* In a self-hosted sandbox, the worker uses the platform’s credentials instead of an environment key. See [Worker authentication on cloud platforms](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes#worker-authentication-on-cloud-platforms).
103* Only sessions in a cloud environment can use memory stores.
104* MCP tunnels are available only on the Claude API, whichever option you choose.
105 
106On Claude Models on Google Cloud (Anthropic managed), you also write your own worker instead of running a [prebuilt worker](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-workers).
107 
101108## Switch from a cloud environment to a self-hosted sandbox
102109 
103110To switch to a self-hosted sandbox, you keep the agent, create a `self_hosted` environment, and reference its ID in new sessions and deployments.
from line 113
106113* **What is new:** A `self_hosted` environment, an environment key that you generate in the Claude Console, and a worker that you run. The [self-hosted sandboxes quickstart](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes#quickstart) covers all three.
107114* **What stops working:** The features listed in [What you take on and give up with a self-hosted sandbox](https://platform.claude.com/docs/en/managed-agents/choosing-an-environment#what-you-take-on-and-give-up-with-a-self-hosted-sandbox).
108115 
109On Claude Platform on AWS, memory stores don’t carry over to a self-hosted sandbox, and the worker doesn’t use an environment key. See [Differences on Claude Platform on AWS](https://platform.claude.com/docs/en/managed-agents/choosing-an-environment#differences-on-claude-platform-on-aws).
110 
111On Claude Models on Google Cloud (Anthropic managed), memory stores aren’t available in a self-hosted sandbox, and you write your own worker, which doesn’t use an environment key. See [Differences on Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/managed-agents/choosing-an-environment#differences-on-claude-models-on-google-cloud-anthropic-managed).
116If you use Managed Agents through a cloud platform, memory stores don’t carry over, and the worker doesn’t use an environment key. See [Differences on cloud platforms](https://platform.claude.com/docs/en/managed-agents/choosing-an-environment#differences-on-cloud-platforms).
112117 

managed-agents/quickstart Changed · +5 / -0 lines

from line 56
5656 
5757## Before you begin
5858 
59The examples use the Claude API. If you use one of the following cloud platforms, follow its setup steps instead and adapt this page’s examples:
60 
61* **Claude Models on Google Cloud (Anthropic managed):** Follow the [setup steps on Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#before-making-api-calls), then see [Making requests on Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#making-requests).
62* **Claude Platform on AWS:** Follow the [setup steps on Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#before-making-api-calls), then see [Making requests on Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#making-requests).
63 
5964<Steps continues>
6065 <Step title="Create a Claude Console account">
6166 [Sign up](https://platform.claude.com/) for a Claude Console account, or sign in to the one you have.

managed-agents/secure-deployment Changed · +9 / -0 lines

## Access through Google Cloud IAM

from line 56
5656 
5757[Security risks and sandbox boundaries](https://platform.claude.com/docs/en/managed-agents/secure-deployment-risks) explains why these settings matter and what they do not protect against. To review and monitor sessions, see [Review and monitor agent sessions](https://platform.claude.com/docs/en/managed-agents/secure-deployment-monitoring).
5858 
59If you use Claude Models on Google Cloud (Anthropic managed), read [Access through Google Cloud IAM](https://platform.claude.com/docs/en/managed-agents/secure-deployment#access-through-google-cloud-iam) before you rely on workspaces to limit access.
60 
5961The [Claude API skill](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/claude-api-skill) that ships with Claude Code has a `managed-agents-secure` command that checks an agent, its environments, and its vaults against this guide:
6062 
6163Let Claude Code check your agent against this guide
from line 890
888890* **Platforms:** IP allowlisting is not available on Claude Models on Google Cloud (Anthropic managed) or Claude Platform on AWS.
889891 
890892See [IP allowlisting limitations](https://platform.claude.com/docs/en/manage-claude/ip-allowlist#limitations).
893 
894## Access through Google Cloud IAM
895 
896On [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#claude-managed-agents), Google Cloud IAM controls access. Keep these two points in mind:
897 
898* **Separating workloads:** An IAM role applies to every workspace in the Google Cloud project. Keep vaults and workloads with different trust levels in separate Google Cloud projects. See [Access on cloud platforms](https://platform.claude.com/docs/en/manage-claude/workspaces#access-on-cloud-platforms).
899* **Stopping an agent:** Revoking Google Cloud access does not stop a running session or a scheduled deployment. To stop them, follow the steps in [Set limits and a way to stop](https://platform.claude.com/docs/en/managed-agents/secure-deployment#set-limits-and-a-way-to-stop).
891900 
892901## Next steps
893902 

managed-agents/self-hosted-sandboxes-custom-tools Changed · +3 / -3 lines

from line 40
4040 
4141The environment key authorizes posting custom tool results, so your Claude API key stays off the worker host.
4242 
43<Note>
44 To serve custom tools, you need the SDK worker. The `ant` CLI worker has no way to register a custom tool implementation. In the sandbox-per-session pattern, [run the SDK worker inside the sandbox](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-per-session#run-the-sdk-worker-inside-the-sandbox).
45</Note>
43To serve custom tools from a prebuilt worker, you need the SDK worker. The `ant` CLI worker has no way to register a custom tool implementation. In the sandbox-per-session pattern, [run the SDK worker inside the sandbox](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-per-session#run-the-sdk-worker-inside-the-sandbox).
4644 
4745## Serve a custom tool
4846 
from line 222
224222</Steps>
225223 
226224The worker answers only the tools registered with it. If you declare a tool on the agent but no worker or client serves it, the session pauses with a `requires_action` stop reason. It stays paused until something posts the result. See [Answer tool calls that pause the session](https://platform.claude.com/docs/en/managed-agents/events-and-streaming#answer-tool-calls-that-pause-the-session) for the event flow.
225 
226On Claude Models on Google Cloud (Anthropic managed), you [write your own worker](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes#worker-authentication-on-cloud-platforms), which uses Google Cloud credentials instead of the environment key. Have it send each custom tool’s result as a `user.custom_tool_result` event, as [Return a custom tool result](https://platform.claude.com/docs/en/managed-agents/events-and-streaming#return-a-custom-tool-result) describes.
227227 
228228## Wrap an MCP server as custom tools
229229 

managed-agents/self-hosted-sandboxes-operations Changed · +6 / -1 lines

from line 41
4141 
4242The queue statistics and stop calls on this page run from your monitoring or operations tooling, authenticated with your organization API key. The worker helpers handle the claim and keep-alive loop, so you don’t call those endpoints directly.
4343 
44For the credentials that replace the organization API key and the environment key on a cloud platform, see [Worker authentication on cloud platforms](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes#worker-authentication-on-cloud-platforms).
45 
4446<Warning>
4547 The queue statistics and stop endpoints accept either your organization API key or the environment key. Call them from outside the worker host with your organization API key. Setting `ANTHROPIC_API_KEY` on the worker host exposes an organization-scoped credential to agent tool calls.
4648</Warning>
from line 350
348350 
349351### The worker doesn’t connect
350352 
351If `workers_polling` (java, php: `workersPolling`; csharp, go: `WorkersPolling`) stays at 0, the worker isn’t reaching the queue. Confirm that `ANTHROPIC_ENVIRONMENT_KEY` and `ANTHROPIC_ENVIRONMENT_ID` are set on the worker host.
353If `workers_polling` (java, php: `workersPolling`; csharp, go: `WorkersPolling`) stays at 0, check each case that applies to your worker:
354 
355* **A worker with an environment key:** Confirm that `ANTHROPIC_ENVIRONMENT_KEY` and `ANTHROPIC_ENVIRONMENT_ID` are set on the worker host.
356* **A worker that you wrote:** Confirm that it sends the `Anthropic-Worker-ID` header when it [polls for work](https://platform.claude.com/docs/en/api/beta/environments/work/poll). The count includes only workers that send this header.
352357 
353358### A session stays queued
354359 

managed-agents/self-hosted-sandboxes-security Changed · +10 / -1 lines

## Worker credentials on cloud platforms

from line 49
4949 
5050* **Service key storage and rotation.** The environment service key (`ANTHROPIC_ENVIRONMENT_KEY`) authorizes polling your environment’s work queue and submitting results back to sessions. Store it in a secrets manager, not in environment files or sandbox images. Rotate it immediately if you suspect exposure.
5151 
52* **Untrusted workload isolation.** The environment service key is scoped to one environment’s work queue. If you run untrusted code inside your sandbox, consider provisioning a separate workspace and environment for each trust boundary. This way, each key reaches only one trust boundary’s sessions, such as one user’s, rather than every session in a shared environment.
52* **Untrusted workload isolation.** The environment service key is scoped to one environment’s work queue. If you run untrusted code inside your sandbox, consider provisioning a separate workspace and environment for each trust boundary. This way, each key reaches only one trust boundary’s sessions, such as one user’s, rather than every session in a shared environment. On a cloud platform, see [Worker credentials on cloud platforms](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-security#worker-credentials-on-cloud-platforms).
5353 
5454* **Per-session credentials.** Each work item your worker claims can carry a per-session `secret` (csharp, go: `Secret`), which the worker uses in place of the environment service key. Access to [memory stores](https://platform.claude.com/docs/en/managed-agents/memory) requires the `secret` (csharp, go: `Secret`): the memory store endpoints reject the environment service key (see [Forward the work item’s secret](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-per-session#forward-the-work-items-secret)). Pass the `secret` (csharp, go: `Secret`) only into the sandbox that serves that session, keep it out of images and shared volumes, and never log it.
5555 
from line 72
7272* **Verify your worker build.** Anthropic does not inspect your sandbox image or runtime. A supply-chain compromise in your image is not detectable from Anthropic’s side.
7373* **Isolate tools inside your sandbox.** Anthropic’s security boundary stops at the sandbox. How you isolate individual tool executions from each other inside that boundary is entirely your responsibility.
7474* **Enforce data retention in your environment.** Once session content reaches your worker, it is outside Anthropic’s data lifecycle controls.
75 
76## Worker credentials on cloud platforms
77 
78If you use Managed Agents through a cloud platform, your worker authenticates with that platform’s credentials instead of the environment service key. See [Worker authentication on cloud platforms](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes#worker-authentication-on-cloud-platforms).
79 
80On Claude Models on Google Cloud (Anthropic managed), take these precautions:
81 
82* **Keep untrusted workloads apart:** The worker’s IAM role applies to every workspace in the Google Cloud project. Separate workspaces in that project don’t limit what the worker can reach. Use a separate project for each untrusted workload. See [Access on cloud platforms](https://platform.claude.com/docs/en/manage-claude/workspaces#access-on-cloud-platforms).
83* **Protect the worker’s credentials:** Run tool calls where they can’t reach the worker’s Google Cloud credentials or the cloud metadata server.
7584 

api/opentelemetry/spans Changed · +2 / -2 lines

from line 71
7171 
7272| Attribute | Type | Description |
7373| ----- | ----- | ----- |
74| `gen_ai.provider.name` | `string` | The platform that serves the request: `aws.bedrock` on Amazon Bedrock (Mantle included), `gcp.vertex_ai` on Google Cloud’s Agent Platform, and `anthropic` everywhere else. On every span. |
74| `gen_ai.provider.name` | `string` | The platform that serves the request: `aws.bedrock` on Amazon Bedrock, including [Amazon Bedrock (`bedrock-mantle`)](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), `gcp.vertex_ai` on Claude Models on Google Cloud (Google managed), and `anthropic` everywhere else. On every span. |
7575| `anthropic.organization.id` | `string` | The organization ID. |
7676| `anthropic.workspace.id` | `string` | The ID of the workspace that the work runs in. |
7777| `user.id` | `string` | Your end user’s ID, if you set it in the W3C [`baggage`](https://www.w3.org/TR/baggage/) header (for example, `baggage: user.id=4f2a`). It appears on the request’s API span and on every API span under it, such as the session turns that the request starts.<br />Use an opaque ID, such as your database’s key for the user.<br />**Do not put an email address in this value.** To protect user privacy, the API drops any `user.id` that contains one. |
from line 451
451451* **Parent:** The span that is current in the application when the environment worker or the work poller gets the work item, or none if no span is current. In `ant beta:worker poll`, the span is a root span.
452452* **Children:** The spans for the requests that the environment worker sends while it handles the work item and the [tool span](https://platform.claude.com/docs/en/api/opentelemetry/spans#anthropic-tool-use-anthropic-mcp-tool-use-and-anthropic-custom-tool-use) for each tool that it runs for the work item.
453453 
454The environment worker and the work poller are the [SDK helpers](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes#sdk-helpers) that claim work items in a self-hosted sandbox. They emit one `anthropic.environment.work` span for each work item, from when a poll returns the work item until its handling ends.
454The environment worker and the work poller are the [SDK helpers](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-reference#sdk-helpers) that claim work items in a self-hosted sandbox. They emit one `anthropic.environment.work` span for each work item, from when a poll returns the work item until its handling ends.
455455 
456456| Attribute | Type | Description |
457457| ----- | ----- | ----- |

api/rate-limits Changed · +3 / -1 lines

from line 281
281281 **[Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws):** On the **Rate limits** page, the button for rate limits and the spend cap is **Request higher limits**. To use it, you need the [Admin role](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#signing-in) in the Claude Console and the `ListAccountRateLimitIncreaseRequests` and `CreateAccountRateLimitIncreaseRequest` IAM actions. For what to include, who can’t use the button, and other ways to ask, see [Rate limits and quotas on Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#rate-limits-and-quotas).
282282</Note>
283283 
284To request higher limits on Claude Models on Google Cloud (Anthropic managed), see [Rate limits on Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#rate-limits).
285 
284286## Setting lower limits for workspaces
285287 
286288For more about workspaces, see [Workspaces](https://platform.claude.com/docs/en/manage-claude/workspaces).
from line 293
291293 
292294Note:
293295 
294* On [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) and [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), you can’t set spend limits on the default workspace.
296* A spend limit on the default workspace is not available on [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) or [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws).
295297* A spend limit on the default workspace might not count or stop some usage in that workspace. This includes usage from the Claude Console (such as playground) and from Claude Managed Agents sessions. It also includes Claude Code or Claude Desktop usage when a member signs in with a Claude Console account and uses the default workspace. Your organization’s [spend limit](https://platform.claude.com/docs/en/api/rate-limits#setting-your-own-spend-limit) applies to all of this usage.
296298* If not set, workspace limits match the organization’s limit.
297299* Workspace limits are set for each limiter type (such as requests per minute, input tokens per minute, or output tokens per minute).

build-with-claude/fast-mode Changed · +2 / -0 lines

from line 389
389389 Falling back from fast to standard speed results in a [prompt cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) miss. Requests at different speeds do not share cached prefixes.
390390</Note>
391391 
392If Claude refuses a fast mode request, [Fallback for fast mode requests](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#falling-back-from-fast-mode) shows how to fall back at standard speed.
393 
392394Because setting `max_retries` (typescript, php: `maxRetries`; java: `.maxRetries()`; csharp: `MaxRetries`; go: `option.WithMaxRetries()`) to `0` also disables retries for other transient errors (overloaded, internal server errors), the following examples resend the request after those errors.
393395 
394396<CodeGroup exclude="shell:cURL, shell:CLI">
Feedback