Follow Discord
Sweep 08 Oct 2026 · 18:53Z Build v2.1.295 516 read Stable v2.1.286 Latest v2.1.295 Next v2.1.295 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One capture · api

One read of Claude Developer Platformapi-20261007T043713Z

30 pages moved out of 754 read.

Pages moved 30 significant first
Pages read 754 in this capture
Captured 04:37 UTC
Corpus hash 962bd0dfb3a3 corpus-hash

What this read moved

1-25 of 30, page 1 of 2

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

about-claude/pricing Changed · +6 / -6 lines

from line 15
1515| Model | Base input tokens | 5m cache writes | 1h cache writes | Cache hits and refreshes | Output tokens |
1616| :------------------------------------------------------------------------------------------------------------------------------------ | :-------------------- | :-------------- | :-------------- | :----------------------- | :--------------------- |
1717| Claude Fable 5.1 | $10 / MTok | $12.50 / MTok | $20 / MTok | $0.25 / MTok<sup>1</sup> | $50 / MTok |
18| Claude Mythos 5.1 ([limited availability](https://anthropic.com/glasswing)) | $10 / MTok | $12.50 / MTok | $20 / MTok | $0.25 / MTok<sup>1</sup> | $50 / MTok |
18| Claude Mythos 5.1 ([limited availability](https://support.claude.com/en/articles/14604842)) | $10 / MTok | $12.50 / MTok | $20 / MTok | $0.25 / MTok<sup>1</sup> | $50 / MTok |
1919| Claude Fable 5 | $10 / MTok | $12.50 / MTok | $20 / MTok | $1 / MTok | $50 / MTok |
20| Claude Mythos 5 ([limited availability](https://anthropic.com/glasswing)) | $10 / MTok | $12.50 / MTok | $20 / MTok | $1 / MTok | $50 / MTok |
20| Claude Mythos 5 ([limited availability](https://support.claude.com/en/articles/14604842)) | $10 / MTok | $12.50 / MTok | $20 / MTok | $1 / MTok | $50 / MTok |
2121| Claude Opus 5.5 | $4 / MTok | $5 / MTok | $8 / MTok | $0.20 / MTok<sup>2</sup> | $20 / MTok |
2222| Claude Opus 5 | $5 / MTok | $6.25 / MTok | $10 / MTok | $0.50 / MTok | $25 / MTok |
2323| Claude Opus 4.8 | $5 / MTok | $6.25 / MTok | $10 / MTok | $0.50 / MTok | $25 / MTok |
from line 46
4646* **5m cache writes:** Writing a prompt prefix to the 5-minute prompt cache.
4747* **1h cache writes:** Writing a prompt prefix to the 1-hour prompt cache.
4848* **Cache hits and refreshes:** Reading a prompt prefix from the prompt cache, which also refreshes it.
49* **Limited access:** Offered separately, by invitation only, as part of [Project Glasswing](https://anthropic.com/glasswing). For access, contact your Anthropic, AWS, or Google Cloud account team.
49* **Limited access:** Available only to organizations verified through Anthropic’s verification programs, such as the [Cyber Verification Program](https://support.claude.com/en/articles/14604842). To request access, apply to the program that covers your use case.
5050* **Retired:** May still be available on other cloud platforms. See [Model deprecations](https://platform.claude.com/docs/en/about-claude/model-deprecations) for more.
5151 
5252Claude 4.7 and later models and Claude Mythos Preview use a newer tokenizer that contributes to their improved performance on a wide range of tasks. This tokenizer produces approximately 30% more tokens for the same text. The exact increase depends on the content and workload shape. Claude Sonnet 4.6 and earlier models use the previous tokenizer.
from line 188
188188| Model | Batch input | Batch output |
189189| :------------------------------------------------------------------------------------------------------------------------------------ | :----------- | :------------ |
190190| Claude Fable 5.1 | $5 / MTok | $25 / MTok |
191| Claude Mythos 5.1 ([limited availability](https://anthropic.com/glasswing)) | $5 / MTok | $25 / MTok |
191| Claude Mythos 5.1 ([limited availability](https://support.claude.com/en/articles/14604842)) | $5 / MTok | $25 / MTok |
192192| Claude Fable 5 | $5 / MTok | $25 / MTok |
193| Claude Mythos 5 ([limited availability](https://anthropic.com/glasswing)) | $5 / MTok | $25 / MTok |
193| Claude Mythos 5 ([limited availability](https://support.claude.com/en/articles/14604842)) | $5 / MTok | $25 / MTok |
194194| Claude Opus 5.5 | $2 / MTok | $10 / MTok |
195195| Claude Opus 5 | $2.50 / MTok | $12.50 / MTok |
196196| Claude Opus 4.8 | $2.50 / MTok | $12.50 / MTok |
from line 208
208208| Claude Haiku 3.5 ([retired, except on Bedrock and Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | $0.40 / MTok | $2 / MTok |
209209 
210210* **MTok:** Million tokens. $5 / MTok is $5 for every million tokens.
211* **Limited access:** Offered separately, by invitation only, as part of [Project Glasswing](https://anthropic.com/glasswing). For access, contact your Anthropic, AWS, or Google Cloud account team.
211* **Limited access:** Available only to organizations verified through Anthropic’s verification programs, such as the [Cyber Verification Program](https://support.claude.com/en/articles/14604842). To request access, apply to the program that covers your use case.
212212* **Retired:** May still be available on other cloud platforms. See [Model deprecations](https://platform.claude.com/docs/en/about-claude/model-deprecations) for more.
213213 
214214For more information about batch processing, see [Batch processing](https://platform.claude.com/docs/en/build-with-claude/batch-processing).

agents-and-tools/tool-use/define-tools Changed · +4 / -4 lines

from line 558
558558 
559559Not every model and setting supports forced tool use. Where it isn't supported, `tool_choice: {"type": "any"}` and `tool_choice: {"type": "tool", "name": "..."}` fail, while `tool_choice: {"type": "auto"}` (the default) and `tool_choice: {"type": "none"}` still work:
560560 
561| Model or setting | Restriction | What to use instead |
562| ----------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
563| Manual [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) (`thinking: {type: "enabled"}`) | `any` and `tool` are not supported and result in an error | `auto` or `none`. [Adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) itself doesn't block forced tool use (Claude Opus 5 supports it with thinking on); the models in the next row reject forced tool use regardless of thinking settings |
564| Claude Opus 5.5, Claude Sonnet 5.5, Claude Fable 5.1, and [Claude Mythos 5.1](https://anthropic.com/glasswing) | `any` and `tool` return a [400 error](https://platform.claude.com/docs/en/api/errors#forced-tool-use-not-supported) | `auto` with [strict tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/strict-tool-use) to guarantee schema-valid tool inputs, or [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) when you need a response in a fixed JSON shape. Prompting still influences which tool `auto` picks. `none` is also supported |
561| Model or setting | Restriction | What to use instead |
562| --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
563| Manual [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) (`thinking: {type: "enabled"}`) | `any` and `tool` are not supported and result in an error | `auto` or `none`. [Adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) itself doesn't block forced tool use (Claude Opus 5 supports it with thinking on); the models in the next row reject forced tool use regardless of thinking settings |
564| Claude Opus 5.5, Claude Sonnet 5.5, Claude Fable 5.1, and [Claude Mythos 5.1](https://platform.claude.com/docs/en/models/mythos-5-1/overview) | `any` and `tool` return a [400 error](https://platform.claude.com/docs/en/api/errors#forced-tool-use-not-supported) | `auto` with [strict tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/strict-tool-use) to guarantee schema-valid tool inputs, or [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) when you need a response in a fixed JSON shape. Prompting still influences which tool `auto` picks. `none` is also supported |
565565 
566566On models that support it, the highlighted lines are the only difference from a standard tool use request:
567567 

build-with-claude/batch-processing Changed · +3 / -3 lines

from line 84
8484| Model | Batch input | Batch output |
8585| :------------------------------------------------------------------------------------------------------------------------------------ | :----------- | :------------ |
8686| Claude Fable 5.1 | $5 / MTok | $25 / MTok |
87| Claude Mythos 5.1 ([limited availability](https://anthropic.com/glasswing)) | $5 / MTok | $25 / MTok |
87| Claude Mythos 5.1 ([limited availability](https://support.claude.com/en/articles/14604842)) | $5 / MTok | $25 / MTok |
8888| Claude Fable 5 | $5 / MTok | $25 / MTok |
89| Claude Mythos 5 ([limited availability](https://anthropic.com/glasswing)) | $5 / MTok | $25 / MTok |
89| Claude Mythos 5 ([limited availability](https://support.claude.com/en/articles/14604842)) | $5 / MTok | $25 / MTok |
9090| Claude Opus 5.5 | $2 / MTok | $10 / MTok |
9191| Claude Opus 5 | $2.50 / MTok | $12.50 / MTok |
9292| Claude Opus 4.8 | $2.50 / MTok | $12.50 / MTok |
from line 104
104104| Claude Haiku 3.5 ([retired, except on Bedrock and Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | $0.40 / MTok | $2 / MTok |
105105 
106106* **MTok:** Million tokens. $5 / MTok is $5 for every million tokens.
107* **Limited access:** Offered separately, by invitation only, as part of [Project Glasswing](https://anthropic.com/glasswing). For access, contact your Anthropic, AWS, or Google Cloud account team.
107* **Limited access:** Available only to organizations verified through Anthropic’s verification programs, such as the [Cyber Verification Program](https://support.claude.com/en/articles/14604842). To request access, apply to the program that covers your use case.
108108* **Retired:** May still be available on other cloud platforms. See [Model deprecations](https://platform.claude.com/docs/en/about-claude/model-deprecations) for more.
109109 
110110## How to use the Message Batches API

build-with-claude/claude-in-amazon-bedrock Changed · +14 / -14 lines

from line 332
332332 
333333Model IDs in Claude in Amazon Bedrock carry an `anthropic.` provider prefix. Model capabilities and behaviors are documented on the [Models overview](https://platform.claude.com/docs/en/models/overview) page.
334334 
335| Model | Model ID | Access |
336| :------------------------------------------------------------------------------ | :-------------------------------- | :-------------------------------------------------------------------------------------------------- |
337| Claude Fable 5.1 | `anthropic.claude-fable-5-1` | Open |
338| Claude Mythos 5.1 ([limited availability](https://anthropic.com/glasswing)) | `anthropic.claude-mythos-5-1` | Invitation only |
339| Claude Fable 5 | `anthropic.claude-fable-5` | Open |
340| Claude Mythos 5 ([limited availability](https://anthropic.com/glasswing)) | `anthropic.claude-mythos-5` | Invitation only |
341| Claude Mythos Preview ([limited availability](https://anthropic.com/glasswing)) | `anthropic.claude-mythos-preview` | Invitation only |
342| Claude Opus 5.5 | `anthropic.claude-opus-5-5` | [See Access](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock#access) |
343| Claude Opus 5 | `anthropic.claude-opus-5` | [See Access](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock#access) |
344| Claude Opus 4.8 | `anthropic.claude-opus-4-8` | Open |
345| Claude Opus 4.7 | `anthropic.claude-opus-4-7` | Open |
346| Claude Sonnet 5.5 | `anthropic.claude-sonnet-5-5` | [See Access](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock#access) |
347| Claude Sonnet 5 | `anthropic.claude-sonnet-5` | Open |
348| Claude Haiku 4.5 | `anthropic.claude-haiku-4-5` | Open |
335| Model | Model ID | Access |
336| :------------------------------------------------------------------------------------------ | :-------------------------------- | :-------------------------------------------------------------------------------------------------- |
337| Claude Fable 5.1 | `anthropic.claude-fable-5-1` | Open |
338| Claude Mythos 5.1 ([limited availability](https://support.claude.com/en/articles/14604842)) | `anthropic.claude-mythos-5-1` | Active (verification required) |
339| Claude Fable 5 | `anthropic.claude-fable-5` | Open |
340| Claude Mythos 5 ([limited availability](https://support.claude.com/en/articles/14604842)) | `anthropic.claude-mythos-5` | Active (verification required) |
341| Claude Mythos Preview ([limited availability](https://anthropic.com/glasswing)) | `anthropic.claude-mythos-preview` | Invitation only |
342| Claude Opus 5.5 | `anthropic.claude-opus-5-5` | [See Access](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock#access) |
343| Claude Opus 5 | `anthropic.claude-opus-5` | [See Access](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock#access) |
344| Claude Opus 4.8 | `anthropic.claude-opus-4-8` | Open |
345| Claude Opus 4.7 | `anthropic.claude-opus-4-7` | Open |
346| Claude Sonnet 5.5 | `anthropic.claude-sonnet-5-5` | [See Access](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock#access) |
347| Claude Sonnet 5 | `anthropic.claude-sonnet-5` | Open |
348| Claude Haiku 4.5 | `anthropic.claude-haiku-4-5` | Open |
349349 
350350Use Claude Code 2.1.255 or later with Claude Fable 5.1 on Amazon Bedrock, and 2.1.280 or later with Claude Opus 5.5; run `claude update` to upgrade.
351351 

build-with-claude/prompt-caching Changed · +4 / -4 lines

from line 234
234234| Model | Base input tokens | 5m cache writes | 1h cache writes | Cache hits and refreshes | Output tokens |
235235| :------------------------------------------------------------------------------------------------------------------------------------ | :---------------- | :-------------- | :-------------- | :----------------------- | :------------ |
236236| Claude Fable 5.1 | $10 / MTok | $12.50 / MTok | $20 / MTok | $0.25 / MTok<sup>1</sup> | $50 / MTok |
237| Claude Mythos 5.1 ([limited availability](https://anthropic.com/glasswing)) | $10 / MTok | $12.50 / MTok | $20 / MTok | $0.25 / MTok<sup>1</sup> | $50 / MTok |
237| Claude Mythos 5.1 ([limited availability](https://support.claude.com/en/articles/14604842)) | $10 / MTok | $12.50 / MTok | $20 / MTok | $0.25 / MTok<sup>1</sup> | $50 / MTok |
238238| Claude Fable 5 | $10 / MTok | $12.50 / MTok | $20 / MTok | $1 / MTok | $50 / MTok |
239| Claude Mythos 5 ([limited availability](https://anthropic.com/glasswing)) | $10 / MTok | $12.50 / MTok | $20 / MTok | $1 / MTok | $50 / MTok |
239| Claude Mythos 5 ([limited availability](https://support.claude.com/en/articles/14604842)) | $10 / MTok | $12.50 / MTok | $20 / MTok | $1 / MTok | $50 / MTok |
240240| Claude Opus 5.5 | $4 / MTok | $5 / MTok | $8 / MTok | $0.20 / MTok<sup>2</sup> | $20 / MTok |
241241| Claude Opus 5 | $5 / MTok | $6.25 / MTok | $10 / MTok | $0.50 / MTok | $25 / MTok |
242242| Claude Opus 4.8 | $5 / MTok | $6.25 / MTok | $10 / MTok | $0.50 / MTok | $25 / MTok |
from line 603
603603 
604604On the Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), and [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), the minimum cacheable prompt length is:
605605 
606* 512 tokens for Claude Fable 5.1, Claude Mythos 5.1, Claude Opus 5.5, Claude Opus 5, Claude Sonnet 5.5, Claude Fable 5, and [Claude Mythos 5](https://anthropic.com/glasswing)
606* 512 tokens for Claude Fable 5.1, [Claude Mythos 5.1](https://platform.claude.com/docs/en/models/mythos-5-1/overview), Claude Opus 5.5, Claude Opus 5, Claude Sonnet 5.5, Claude Fable 5, and [Claude Mythos 5](https://platform.claude.com/docs/en/models/mythos-5/overview)
607607* 2,048 tokens for [Claude Mythos Preview](https://anthropic.com/glasswing) and Claude Opus 4.7
608608* 4,096 tokens for Claude Opus 4.6 and Claude Opus 4.5
609609* 1,024 tokens for Claude Opus 4.8, Claude Sonnet 5, Claude Sonnet 4.6, Claude Sonnet 4.5, Claude Opus 4.1 ([retired, except on Bedrock and Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)), Claude Opus 4 ([retired, except on Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)), and Claude Sonnet 4 ([retired, except on Bedrock and Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations))
from line 672
672672On models that support [mid-conversation tool changes](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages#mid-conversation-tool-changes), the `inline-tools-2026-09-15` beta header lets you add a tool, or change a tool's definition, partway through a conversation without editing `tools`. Send the definition in a `tool_addition` block in a mid-conversation system message and leave `tools` exactly as you first sent it. The cached prefix still matches, so only the appended message is processed as new input. The one exception is a `tools` array with no non-deferred tool, where the first tool defined this way costs one full cache miss on that request. See [Define tools in a message](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages#define-tools-in-a-message-beta).
673673 
674674<Note>
675 On Claude Fable 5.1, Claude Mythos 5.1, Claude Fable 5, [Claude Mythos 5](https://anthropic.com/glasswing), Claude Opus 5.5, Claude Opus 4.8, Claude Opus 5, and Claude Sonnet 5.5, you can add a new system instruction partway through a conversation without invalidating the system or message caches. Append a `{"role": "system"}` message to `messages` instead of editing the top-level `system` field, so the cached prefix stays unchanged. This feature is not available on Claude Sonnet 5. Use the top-level `system` field instead. See [Mid-conversation system messages](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages).
675 On Claude Fable 5.1, [Claude Mythos 5.1](https://platform.claude.com/docs/en/models/mythos-5-1/overview), Claude Fable 5, [Claude Mythos 5](https://platform.claude.com/docs/en/models/mythos-5/overview), Claude Opus 5.5, Claude Opus 4.8, Claude Opus 5, and Claude Sonnet 5.5, you can add a new system instruction partway through a conversation without invalidating the system or message caches. Append a `{"role": "system"}` message to `messages` instead of editing the top-level `system` field, so the cached prefix stays unchanged. This feature is not available on Claude Sonnet 5. Use the top-level `system` field instead. See [Mid-conversation system messages](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages).
676676</Note>
677677 
678678### Tracking cache performance

manage-claude/admin-api Changed · +170 / -179 lines

from line 8
88 **The Admin API is unavailable for individual accounts.** To collaborate with teammates and add members, set up your organization in **Console → Settings → Organization**.
99</Tip>
1010 
11The [Admin API](https://platform.claude.com/docs/en/api/beta/organization) lets you manage your organization's members, workspaces, invites, and API keys programmatically instead of by hand in the [Claude Console](https://platform.claude.com/).
11The [Admin API](https://platform.claude.com/docs/en/api/organization) lets you manage your organization's members, workspaces, invites, and API keys programmatically instead of by hand in the [Claude Console](https://platform.claude.com/).
1212 
1313<Check>
1414 **The Admin API requires special access**
from line 32
3232 
3333Authenticate with any of the three credentials. An Admin API key covers most endpoints. The service-account, federation-issuer, and federation-rule endpoints accept only an `org:admin` OAuth token. Send a personal key or service account key in the `x-api-key` header, as you would an Admin API key. The following examples call the [organization info endpoint](https://platform.claude.com/docs/en/manage-claude/admin-api#accessing-organization-info) with an OAuth token and with an Admin API key.
3434 
35The Python, TypeScript, C#, Go, Java, PHP, and Ruby SDKs expose the Admin API under `client.beta.organization`, and the `ant` CLI under `ant beta:organization`. The examples on this page use the default client, which reads an Admin API key from `ANTHROPIC_API_KEY` or an OAuth bearer token from `ANTHROPIC_AUTH_TOKEN`. SDK list methods in Python, TypeScript, C#, Go, and Java return an iterator that fetches more pages on demand, so `limit` sets the page size, not the total. The PHP, Ruby, and curl examples return one page. In the CLI, `--limit` caps the results on the member, invite, workspace, workspace-member, and API-key lists. For each endpoint's parameters and responses, see the [Admin API reference](https://platform.claude.com/docs/en/api/beta/organization).
35The Python, TypeScript, C#, Go, Java, PHP, and Ruby SDKs expose the endpoints on this page under `client.organization` (csharp, go: `client.Organization`; java: `client.organization()`; php: `$client->organization`), and the `ant` CLI under `ant organization`. The examples on this page use the default client, which reads an Admin API key from `ANTHROPIC_API_KEY` or an OAuth bearer token from `ANTHROPIC_AUTH_TOKEN`. SDK list methods in Python, TypeScript, C#, Go, and Java return an iterator that fetches more pages on demand, so `limit` sets the page size, not the total. The PHP, Ruby, and curl examples return one page. In the CLI, `--limit` caps the results on the member, invite, workspace, workspace-member, and API-key lists. For each endpoint's parameters and responses, see the [Admin API reference](https://platform.claude.com/docs/en/api/organization).
3636 
3737### OAuth bearer token
3838 
from line 57
5757 ```
5858 
5959 ```bash CLI
60 ant beta:organization retrieve
60 ant organization retrieve
6161 ```
6262 
6363 ```python Python
6464 client = anthropic.Anthropic()
6565 
66 organization = client.beta.organization.retrieve()
66 organization = client.organization.retrieve()
6767 
6868 print(f"id: {organization.id}")
6969 print(f"name: {organization.name}")
from line 72
7272 ```typescript TypeScript
7373 const client = new Anthropic();
7474 
75 const organization = await client.beta.organization.retrieve();
75 const organization = await client.organization.retrieve();
7676 
7777 console.log(`id: ${organization.id}`);
7878 console.log(`name: ${organization.name}`);
from line 81
8181 ```csharp C#
8282 AnthropicClient client = new();
8383 
84 var organization = await client.Beta.Organization.Retrieve();
84 var organization = await client.Organization.Retrieve();
8585 
8686 Console.WriteLine($"id: {organization.ID}");
8787 Console.WriteLine($"name: {organization.Name}");
from line 90
9090 ```go Go
9191 client := anthropic.NewClient()
9292 
93 organization, err := client.Beta.Organization.Get(context.Background())
93 organization, err := client.Organization.Get(context.Background())
9494 if err != nil {
9595 log.Fatal(err)
9696 }
from line 102
102102 ```java Java
103103 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
104104 
105 var organization = client.beta().organization().retrieve();
105 var organization = client.organization().retrieve();
106106 
107107 IO.println("id: " + organization.id());
108108 IO.println("name: " + organization.name());
from line 111
111111 ```php PHP
112112 $client = new Client();
113113 
114 $organization = $client->beta->organization->retrieve();
114 $organization = $client->organization->retrieve();
115115 
116116 echo "id: {$organization->id}\n";
117117 echo "name: {$organization->name}\n";
from line 120
120120 ```ruby Ruby
121121 client = Anthropic::Client.new
122122 
123 organization = client.beta.organization.retrieve
123 organization = client.organization.retrieve
124124 
125125 puts "id: #{organization.id}"
126126 puts "name: #{organization.name}"
from line 143
143143 ```
144144 
145145 ```bash CLI
146 ant beta:organization retrieve
146 ant organization retrieve
147147 ```
148148 
149149 ```python Python
150150 client = anthropic.Anthropic()
151151 
152 organization = client.beta.organization.retrieve()
152 organization = client.organization.retrieve()
153153 
154154 print(f"id: {organization.id}")
155155 print(f"name: {organization.name}")
from line 158
158158 ```typescript TypeScript
159159 const client = new Anthropic();
160160 
161 const organization = await client.beta.organization.retrieve();
161 const organization = await client.organization.retrieve();
162162 
163163 console.log(`id: ${organization.id}`);
164164 console.log(`name: ${organization.name}`);
from line 167
167167 ```csharp C#
168168 AnthropicClient client = new();
169169 
170 var organization = await client.Beta.Organization.Retrieve();
170 var organization = await client.Organization.Retrieve();
171171 
172172 Console.WriteLine($"id: {organization.ID}");
173173 Console.WriteLine($"name: {organization.Name}");
from line 176
176176 ```go Go
177177 client := anthropic.NewClient()
178178 
179 organization, err := client.Beta.Organization.Get(context.Background())
179 organization, err := client.Organization.Get(context.Background())
180180 if err != nil {
181181 log.Fatal(err)
182182 }
from line 188
188188 ```java Java
189189 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
190190 
191 var organization = client.beta().organization().retrieve();
191 var organization = client.organization().retrieve();
192192 
193193 IO.println("id: " + organization.id());
194194 IO.println("name: " + organization.name());
from line 197
197197 ```php PHP
198198 $client = new Client();
199199 
200 $organization = $client->beta->organization->retrieve();
200 $organization = $client->organization->retrieve();
201201 
202202 echo "id: {$organization->id}\n";
203203 echo "name: {$organization->name}\n";
from line 206
206206 ```ruby Ruby
207207 client = Anthropic::Client.new
208208 
209 organization = client.beta.organization.retrieve
209 organization = client.organization.retrieve
210210 
211211 puts "id: #{organization.id}"
212212 puts "name: #{organization.name}"
from line 243
243243 
244244### Organization members
245245 
246List [organization members](https://platform.claude.com/docs/en/api/beta/organization/users/retrieve), update their roles, and remove them.
246List [organization members](https://platform.claude.com/docs/en/api/organization/users/retrieve), update their roles, and remove them.
247247 
248248List the members of your organization:
249249 
from line 255
255255 ```
256256 
257257 ```bash CLI
258 ant beta:organization:users list --limit 10
258 ant organization:users list --limit 10
259259 ```
260260 
261261 ```python Python
262262 client = anthropic.Anthropic()
263263 
264 users = client.beta.organization.users.list(limit=10)
264 users = client.organization.users.list(limit=10)
265265 
266266 # Automatically fetches more pages as needed.
267267 for user in users:
from line 271
271271 ```typescript TypeScript
272272 const client = new Anthropic();
273273 
274 const users = await client.beta.organization.users.list({ limit: 10 });
274 const users = await client.organization.users.list({ limit: 10 });
275275 
276276 for await (const user of users) {
277277 console.log(`${user.id}: ${user.email} (${user.role})`);
from line 281
281281 ```csharp C#
282282 AnthropicClient client = new();
283283 
284 var page = await client.Beta.Organization.Users.List(new() { Limit = 10 });
284 var page = await client.Organization.Users.List(new() { Limit = 10 });
285285 
286286 await foreach (var user in page.Paginate())
287287 {
from line 292
292292 ```go Go
293293 client := anthropic.NewClient()
294294 
295 users := client.Beta.Organization.Users.ListAutoPaging(context.Background(), anthropic.BetaOrganizationUserListParams{
295 users := client.Organization.Users.ListAutoPaging(context.Background(), anthropic.OrganizationUserListParams{
296296 Limit: anthropic.Int(10),
297297 })
298298 
from line 306
306306 ```
307307 
308308 ```java Java
309 import com.anthropic.models.beta.organization.users.UserListParams;
309 import com.anthropic.models.organization.users.UserListParams;
310310 
311311 void main() {
312312 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
from line 314
314314 var params = UserListParams.builder()
315315 .limit(10)
316316 .build();
317 var users = client.beta().organization().users().list(params);
317 var users = client.organization().users().list(params);
318318 
319319 for (var user : users.autoPager()) {
320320 IO.println(user.id() + ": " + user.email() + " (" + user.role().asString() + ")");
from line 325
325325 ```php PHP
326326 $client = new Client();
327327 
328 $users = $client->beta->organization->users->list(limit: 10);
328 $users = $client->organization->users->list(limit: 10);
329329 
330330 foreach ($users->getItems() as $user) {
331331 echo "{$user->id}: {$user->email} ({$user->role})\n";
from line 335
335335 ```ruby Ruby
336336 client = Anthropic::Client.new
337337 
338 users = client.beta.organization.users.list(limit: 10)
338 users = client.organization.users.list(limit: 10)
339339 
340340 users.data.each do |user|
341341 puts "#{user.id}: #{user.email} (#{user.role})"
from line 355
355355 ```
356356 
357357 ```bash CLI
358 ant beta:organization:users update \
358 ant organization:users update \
359359 --user-id user_01XyDMpzjS89pFZXqSFUBDr6 \
360360 --role developer
361361 ```
from line 363
363363 ```python Python
364364 client = anthropic.Anthropic()
365365 
366 user = client.beta.organization.users.update(
366 user = client.organization.users.update(
367367 "user_01XyDMpzjS89pFZXqSFUBDr6", role="developer"
368368 )
369369 
from line 374
374374 ```typescript TypeScript
375375 const client = new Anthropic();
376376 
377 const user = await client.beta.organization.users.update("user_01XyDMpzjS89pFZXqSFUBDr6", {
377 const user = await client.organization.users.update("user_01XyDMpzjS89pFZXqSFUBDr6", {
378378 role: "developer"
379379 });
380380 
from line 383
383383 ```
384384 
385385 ```csharp C#
386 using Anthropic.Models.Beta.Organization.Users;
386 using Anthropic.Models.Organization.Users;
387387 // ...
388388 
389389 AnthropicClient client = new();
390390 
391 var user = await client.Beta.Organization.Users.Update(
391 var user = await client.Organization.Users.Update(
392392 "user_01XyDMpzjS89pFZXqSFUBDr6",
393393 new() { Role = Role.Developer }
394394 );
from line 400
400400 ```go Go
401401 client := anthropic.NewClient()
402402 
403 user, err := client.Beta.Organization.Users.Update(
403 user, err := client.Organization.Users.Update(
404404 context.Background(),
405405 "user_01XyDMpzjS89pFZXqSFUBDr6",
406 anthropic.BetaOrganizationUserUpdateParams{
407 Role: anthropic.BetaOrganizationUserUpdateParamsRoleDeveloper,
406 anthropic.OrganizationUserUpdateParams{
407 Role: anthropic.OrganizationUserUpdateParamsRoleDeveloper,
408408 },
409409 )
410410 if err != nil {
from line 416
416416 ```
417417 
418418 ```java Java
419 import com.anthropic.models.beta.organization.users.UserUpdateParams;
419 import com.anthropic.models.organization.users.UserUpdateParams;
420420 
421421 void main() {
422422 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
from line 424
424424 var params = UserUpdateParams.builder()
425425 .role(UserUpdateParams.Role.DEVELOPER)
426426 .build();
427 var user = client.beta().organization().users()
427 var user = client.organization().users()
428428 .update("user_01XyDMpzjS89pFZXqSFUBDr6", params);
429429 
430430 IO.println("id: " + user.id());
from line 433
433433 ```
434434 
435435 ```php PHP
436 use Anthropic\Beta\Organization\Users\UserUpdateParams\Role;
436 use Anthropic\Organization\Users\UserUpdateParams\Role;
437437 // ...
438438 
439439 $client = new Client();
440440 
441 $user = $client->beta->organization->users->update(
441 $user = $client->organization->users->update(
442442 userID: 'user_01XyDMpzjS89pFZXqSFUBDr6',
443443 role: Role::DEVELOPER,
444444 );
from line 451
451451 client = Anthropic::Client.new
452452 
453453 user_id = "user_01XyDMpzjS89pFZXqSFUBDr6"
454 user = client.beta.organization.users.update(user_id, role: :developer)
454 user = client.organization.users.update(user_id, role: :developer)
455455 
456456 puts "id: #{user.id}"
457457 puts "role: #{user.role}"
from line 468
468468 ```
469469 
470470 ```bash CLI
471 ant beta:organization:users remove --user-id user_01XyDMpzjS89pFZXqSFUBDr6
471 ant organization:users remove --user-id user_01XyDMpzjS89pFZXqSFUBDr6
472472 ```
473473 
474474 ```python Python
475475 client = anthropic.Anthropic()
476476 
477 removed_user = client.beta.organization.users.remove("user_01XyDMpzjS89pFZXqSFUBDr6")
477 removed_user = client.organization.users.remove("user_01XyDMpzjS89pFZXqSFUBDr6")
478478 
479479 print(f"id: {removed_user.id}")
480480 ```
from line 482
482482 ```typescript TypeScript
483483 const client = new Anthropic();
484484 
485 const removedUser = await client.beta.organization.users.remove(
486 "user_01XyDMpzjS89pFZXqSFUBDr6"
487 );
485 const removedUser = await client.organization.users.remove("user_01XyDMpzjS89pFZXqSFUBDr6");
488486 
489487 console.log(`id: ${removedUser.id}`);
490488 ```
from line 490
492490 ```csharp C#
493491 AnthropicClient client = new();
494492 
495 var removedUser = await client.Beta.Organization.Users.Remove("user_01XyDMpzjS89pFZXqSFUBDr6");
493 var removedUser = await client.Organization.Users.Remove("user_01XyDMpzjS89pFZXqSFUBDr6");
496494 
497495 Console.WriteLine($"id: {removedUser.ID}");
498496 ```
from line 498
500498 ```go Go
501499 client := anthropic.NewClient()
502500 
503 removedUser, err := client.Beta.Organization.Users.Remove(context.Background(), "user_01XyDMpzjS89pFZXqSFUBDr6")
501 removedUser, err := client.Organization.Users.Remove(context.Background(), "user_01XyDMpzjS89pFZXqSFUBDr6")
504502 if err != nil {
505503 log.Fatal(err)
506504 }
from line 509
511509 ```java Java
512510 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
513511 
514 var removedUser = client.beta().organization().users()
512 var removedUser = client.organization().users()
515513 .remove("user_01XyDMpzjS89pFZXqSFUBDr6");
516514 
517515 IO.println("id: " + removedUser.id());
from line 518
520518 ```php PHP
521519 $client = new Client();
522520 
523 $removedUser = $client->beta->organization->users->remove(
521 $removedUser = $client->organization->users->remove(
524522 userID: 'user_01XyDMpzjS89pFZXqSFUBDr6',
525523 );
526524 
from line 529
531529 client = Anthropic::Client.new
532530 
533531 user_id = "user_01XyDMpzjS89pFZXqSFUBDr6"
534 removed_user = client.beta.organization.users.remove(user_id)
532 removed_user = client.organization.users.remove(user_id)
535533 
536534 puts "id: #{removed_user.id}"
537535 ```
from line 537
539537 
540538### Organization invites
541539 
542Invite users to your organization and manage pending [invites](https://platform.claude.com/docs/en/api/beta/organization/invites/retrieve).
540Invite users to your organization and manage pending [invites](https://platform.claude.com/docs/en/api/organization/invites/retrieve).
543541 
544542Invite a user to your organization:
545543 
from line 554
556554 ```
557555 
558556 ```bash CLI
559 ant beta:organization:invites create --email [email protected] --role developer
557 ant organization:invites create --email [email protected] --role developer
560558 ```
561559 
562560 ```python Python
563561 client = anthropic.Anthropic()
564562 
565 invite = client.beta.organization.invites.create(
566 email="[email protected]", role="developer"
567 )
563 invite = client.organization.invites.create(email="[email protected]", role="developer")
568564 
569565 print(f"id: {invite.id}")
570566 print(f"email: {invite.email}")
from line 571
575571 ```typescript TypeScript
576572 const client = new Anthropic();
577573 
578 const invite = await client.beta.organization.invites.create({
574 const invite = await client.organization.invites.create({
579575 email: "[email protected]",
580576 role: "developer"
581577 });
from line 583
587583 ```
588584 
589585 ```csharp C#
590 using Anthropic.Models.Beta.Organization.Invites;
586 using Anthropic.Models.Organization.Invites;
591587 // ...
592588 
593589 AnthropicClient client = new();
594590 
595 var invite = await client.Beta.Organization.Invites.Create(new()
591 var invite = await client.Organization.Invites.Create(new()
596592 {
597593 Email = "[email protected]",
598594 Role = Role.Developer
from line 603
607603 ```go Go
608604 client := anthropic.NewClient()
609605 
610 invite, err := client.Beta.Organization.Invites.New(context.Background(), anthropic.BetaOrganizationInviteNewParams{
606 invite, err := client.Organization.Invites.New(context.Background(), anthropic.OrganizationInviteNewParams{
611607 Email: "[email protected]",
612 Role: anthropic.BetaOrganizationInviteNewParamsRoleDeveloper,
608 Role: anthropic.OrganizationInviteNewParamsRoleDeveloper,
613609 })
614610 if err != nil {
615611 log.Fatal(err)
from line 618
622618 ```
623619 
624620 ```java Java
625 import com.anthropic.models.beta.organization.invites.InviteCreateParams;
621 import com.anthropic.models.organization.invites.InviteCreateParams;
626622 
627623 void main() {
628624 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
from line 627
631627 .email("[email protected]")
632628 .role(InviteCreateParams.Role.DEVELOPER)
633629 .build();
634 var invite = client.beta().organization().invites().create(params);
630 var invite = client.organization().invites().create(params);
635631 
636632 IO.println("id: " + invite.id());
637633 IO.println("email: " + invite.email());
from line 637
641637 ```
642638 
643639 ```php PHP
644 use Anthropic\Beta\Organization\Invites\InviteCreateParams\Role;
640 use Anthropic\Organization\Invites\InviteCreateParams\Role;
645641 // ...
646642 
647643 $client = new Client();
648644 
649 $invite = $client->beta->organization->invites->create(
645 $invite = $client->organization->invites->create(
650646 email: '[email protected]',
651647 role: Role::DEVELOPER,
652648 );
from line 656
660656 ```ruby Ruby
661657 client = Anthropic::Client.new
662658 
663 invite = client.beta.organization.invites.create(email: "[email protected]", role: :developer)
659 invite = client.organization.invites.create(email: "[email protected]", role: :developer)
664660 
665661 puts "id: #{invite.id}"
666662 puts "email: #{invite.email}"
from line 675
679675 ```
680676 
681677 ```bash CLI
682 ant beta:organization:invites list --limit 10
678 ant organization:invites list --limit 10
683679 ```
684680 
685681 ```python Python
686682 client = anthropic.Anthropic()
687683 
688 invites = client.beta.organization.invites.list(limit=10)
684 invites = client.organization.invites.list(limit=10)
689685 
690686 # Automatically fetches more pages as needed.
691687 for invite in invites:
from line 691
695691 ```typescript TypeScript
696692 const client = new Anthropic();
697693 
698 const invites = await client.beta.organization.invites.list({ limit: 10 });
694 const invites = await client.organization.invites.list({ limit: 10 });
699695 
700696 for await (const invite of invites) {
701697 console.log(`${invite.id}: ${invite.email} (${invite.status})`);
from line 701
705701 ```csharp C#
706702 AnthropicClient client = new();
707703 
708 var page = await client.Beta.Organization.Invites.List(new() { Limit = 10 });
704 var page = await client.Organization.Invites.List(new() { Limit = 10 });
709705 
710706 await foreach (var invite in page.Paginate())
711707 {
from line 712
716712 ```go Go
717713 client := anthropic.NewClient()
718714 
719 invites := client.Beta.Organization.Invites.ListAutoPaging(context.Background(), anthropic.BetaOrganizationInviteListParams{
715 invites := client.Organization.Invites.ListAutoPaging(context.Background(), anthropic.OrganizationInviteListParams{
720716 Limit: anthropic.Int(10),
721717 })
722718 
from line 726
730726 ```
731727 
732728 ```java Java
733 import com.anthropic.models.beta.organization.invites.InviteListParams;
729 import com.anthropic.models.organization.invites.InviteListParams;
734730 
735731 void main() {
736732 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
from line 734
738734 var params = InviteListParams.builder()
739735 .limit(10)
740736 .build();
741 var invites = client.beta().organization().invites().list(params);
737 var invites = client.organization().invites().list(params);
742738 
743739 for (var invite : invites.autoPager()) {
744740 IO.println(invite.id() + ": " + invite.email() + " (" + invite.status().asString() + ")");
from line 745
749745 ```php PHP
750746 $client = new Client();
751747 
752 $invites = $client->beta->organization->invites->list(limit: 10);
748 $invites = $client->organization->invites->list(limit: 10);
753749 
754750 foreach ($invites->getItems() as $invite) {
755751 echo "{$invite->id}: {$invite->email} ({$invite->status})\n";
from line 755
759755 ```ruby Ruby
760756 client = Anthropic::Client.new
761757 
762 invites = client.beta.organization.invites.list(limit: 10)
758 invites = client.organization.invites.list(limit: 10)
763759 
764760 invites.data.each do |invite|
765761 puts "#{invite.id}: #{invite.email} (#{invite.status})"
from line 773
777773 ```
778774 
779775 ```bash CLI
780 ant beta:organization:invites delete --invite-id invite_015gWxHNr6h6TdRPZTmuCGnn
776 ant organization:invites delete --invite-id invite_015gWxHNr6h6TdRPZTmuCGnn
781777 ```
782778 
783779 ```python Python
784780 client = anthropic.Anthropic()
785781 
786 deleted_invite = client.beta.organization.invites.delete(
787 "invite_015gWxHNr6h6TdRPZTmuCGnn"
788 )
782 deleted_invite = client.organization.invites.delete("invite_015gWxHNr6h6TdRPZTmuCGnn")
789783 
790784 print(f"id: {deleted_invite.id}")
791785 ```
from line 787
793787 ```typescript TypeScript
794788 const client = new Anthropic();
795789 
796 const deletedInvite = await client.beta.organization.invites.delete(
790 const deletedInvite = await client.organization.invites.delete(
797791 "invite_015gWxHNr6h6TdRPZTmuCGnn"
798792 );
799793 
from line 797
803797 ```csharp C#
804798 AnthropicClient client = new();
805799 
806 var deletedInvite = await client.Beta.Organization.Invites.Delete(
800 var deletedInvite = await client.Organization.Invites.Delete(
807801 "invite_015gWxHNr6h6TdRPZTmuCGnn"
808802 );
809803 
from line 807
813807 ```go Go
814808 client := anthropic.NewClient()
815809 
816 deletedInvite, err := client.Beta.Organization.Invites.Delete(context.Background(), "invite_015gWxHNr6h6TdRPZTmuCGnn")
810 deletedInvite, err := client.Organization.Invites.Delete(context.Background(), "invite_015gWxHNr6h6TdRPZTmuCGnn")
817811 if err != nil {
818812 log.Fatal(err)
819813 }
from line 818
824818 ```java Java
825819 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
826820 
827 var deletedInvite = client.beta().organization().invites()
821 var deletedInvite = client.organization().invites()
828822 .delete("invite_015gWxHNr6h6TdRPZTmuCGnn");
829823 
830824 IO.println("id: " + deletedInvite.id());
from line 827
833827 ```php PHP
834828 $client = new Client();
835829 
836 $deletedInvite = $client->beta->organization->invites->delete(
830 $deletedInvite = $client->organization->invites->delete(
837831 inviteID: 'invite_015gWxHNr6h6TdRPZTmuCGnn',
838832 );
839833 
from line 838
844838 client = Anthropic::Client.new
845839 
846840 invite_id = "invite_015gWxHNr6h6TdRPZTmuCGnn"
847 deleted_invite = client.beta.organization.invites.delete(invite_id)
841 deleted_invite = client.organization.invites.delete(invite_id)
848842 
849843 puts "id: #{deleted_invite.id}"
850844 ```
from line 850
856850 
857851### Workspace members
858852 
859Manage [user access to specific workspaces](https://platform.claude.com/docs/en/api/beta/organization/workspaces/members/retrieve):
853Manage [user access to specific workspaces](https://platform.claude.com/docs/en/api/organization/workspaces/members/retrieve):
860854 
861855Add a member to a workspace:
862856 
from line 867
873867 ```
874868 
875869 ```bash CLI
876 ant beta:organization:workspaces:members add \
870 ant organization:workspaces:members add \
877871 --workspace-id wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ \
878872 --user-id user_01XyDMpzjS89pFZXqSFUBDr6 \
879873 --workspace-role workspace_developer
from line 876
882876 ```python Python
883877 client = anthropic.Anthropic()
884878 
885 member = client.beta.organization.workspaces.members.add(
879 member = client.organization.workspaces.members.add(
886880 "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
887881 user_id="user_01XyDMpzjS89pFZXqSFUBDr6",
888882 workspace_role="workspace_developer",
from line 889
895889 ```typescript TypeScript
896890 const client = new Anthropic();
897891 
898 const member = await client.beta.organization.workspaces.members.add(
892 const member = await client.organization.workspaces.members.add(
899893 "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
900894 {
901895 user_id: "user_01XyDMpzjS89pFZXqSFUBDr6",
from line 902
908902 ```
909903 
910904 ```csharp C#
911 using Anthropic.Models.Beta.Organization.Workspaces;
905 using Anthropic.Models.Organization.Workspaces;
912906 
913907 AnthropicClient client = new();
914908 
915 var member = await client.Beta.Organization.Workspaces.Members.Add(
909 var member = await client.Organization.Workspaces.Members.Add(
916910 "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
917911 new()
918912 {
919913 UserID = "user_01XyDMpzjS89pFZXqSFUBDr6",
920 WorkspaceRole = BetaNoBillingWorkspaceRole.WorkspaceDeveloper
914 WorkspaceRole = NoBillingWorkspaceRole.WorkspaceDeveloper
921915 }
922916 );
923917 
from line 922
928922 ```go Go
929923 client := anthropic.NewClient()
930924 
931 member, err := client.Beta.Organization.Workspaces.Members.Add(
925 member, err := client.Organization.Workspaces.Members.Add(
932926 context.Background(),
933927 "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
934 anthropic.BetaOrganizationWorkspaceMemberAddParams{
928 anthropic.OrganizationWorkspaceMemberAddParams{
935929 UserID: "user_01XyDMpzjS89pFZXqSFUBDr6",
936 WorkspaceRole: anthropic.BetaNoBillingWorkspaceRoleWorkspaceDeveloper,
930 WorkspaceRole: anthropic.NoBillingWorkspaceRoleWorkspaceDeveloper,
937931 },
938932 )
939933 if err != nil {
from line 939
945939 ```
946940 
947941 ```java Java
948 import com.anthropic.models.beta.organization.workspaces.BetaNoBillingWorkspaceRole;
949 import com.anthropic.models.beta.organization.workspaces.members.MemberAddParams;
942 import com.anthropic.models.organization.workspaces.NoBillingWorkspaceRole;
943 import com.anthropic.models.organization.workspaces.members.MemberAddParams;
950944 
951945 void main() {
952946 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
from line 947
953947 
954948 var params = MemberAddParams.builder()
955949 .userId("user_01XyDMpzjS89pFZXqSFUBDr6")
956 .workspaceRole(BetaNoBillingWorkspaceRole.WORKSPACE_DEVELOPER)
950 .workspaceRole(NoBillingWorkspaceRole.WORKSPACE_DEVELOPER)
957951 .build();
958 var member = client.beta().organization().workspaces().members()
952 var member = client.organization().workspaces().members()
959953 .add("wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ", params);
960954 
961955 IO.println("user_id: " + member.userId());
from line 958
964958 ```
965959 
966960 ```php PHP
967 use Anthropic\Beta\Organization\Workspaces\NoBillingWorkspaceRole;
961 use Anthropic\Organization\Workspaces\NoBillingWorkspaceRole;
968962 // ...
969963 
970964 $client = new Client();
971965 
972 $member = $client->beta->organization->workspaces->members->add(
966 $member = $client->organization->workspaces->members->add(
973967 workspaceID: 'wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ',
974968 userID: 'user_01XyDMpzjS89pFZXqSFUBDr6',
975969 workspaceRole: NoBillingWorkspaceRole::WORKSPACE_DEVELOPER,
from line 977
983977 client = Anthropic::Client.new
984978 
985979 workspace_id = "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
986 member = client.beta.organization.workspaces.members.add(
980 member = client.organization.workspaces.members.add(
987981 workspace_id,
988982 user_id: "user_01XyDMpzjS89pFZXqSFUBDr6",
989983 workspace_role: :workspace_developer
from line 998
1004998 ```
1005999 
10061000 ```bash CLI
1007 ant beta:organization:workspaces:members list \
1001 ant organization:workspaces:members list \
10081002 --workspace-id wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ \
10091003 --limit 10
10101004 ```
from line 1006
10121006 ```python Python
10131007 client = anthropic.Anthropic()
10141008 
1015 members = client.beta.organization.workspaces.members.list(
1009 members = client.organization.workspaces.members.list(
10161010 "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ", limit=10
10171011 )
10181012 
from line 1018
10241018 ```typescript TypeScript
10251019 const client = new Anthropic();
10261020 
1027 const members = await client.beta.organization.workspaces.members.list(
1021 const members = await client.organization.workspaces.members.list(
10281022 "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
10291023 { limit: 10 }
10301024 );
from line 1031
10371031 ```csharp C#
10381032 AnthropicClient client = new();
10391033 
1040 var page = await client.Beta.Organization.Workspaces.Members.List(
1034 var page = await client.Organization.Workspaces.Members.List(
10411035 "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
10421036 new() { Limit = 10 }
10431037 );
from line 1045
10511045 ```go Go
10521046 client := anthropic.NewClient()
10531047 
1054 members := client.Beta.Organization.Workspaces.Members.ListAutoPaging(
1048 members := client.Organization.Workspaces.Members.ListAutoPaging(
10551049 context.Background(),
10561050 "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
1057 anthropic.BetaOrganizationWorkspaceMemberListParams{
1051 anthropic.OrganizationWorkspaceMemberListParams{
10581052 Limit: anthropic.Int(10),
10591053 },
10601054 )
from line 1063
10691063 ```
10701064 
10711065 ```java Java
1072 import com.anthropic.models.beta.organization.workspaces.members.MemberListParams;
1066 import com.anthropic.models.organization.workspaces.members.MemberListParams;
10731067 
10741068 void main() {
10751069 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
from line 1071
10771071 var params = MemberListParams.builder()
10781072 .limit(10)
10791073 .build();
1080 var members = client.beta().organization().workspaces().members()
1074 var members = client.organization().workspaces().members()
10811075 .list("wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ", params);
10821076 
10831077 for (var member : members.autoPager()) {
from line 1083
10891083 ```php PHP
10901084 $client = new Client();
10911085 
1092 $members = $client->beta->organization->workspaces->members->list(
1086 $members = $client->organization->workspaces->members->list(
10931087 workspaceID: 'wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ',
10941088 limit: 10,
10951089 );
from line 1097
11031097 client = Anthropic::Client.new
11041098 
11051099 workspace_id = "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
1106 members = client.beta.organization.workspaces.members.list(workspace_id, limit: 10)
1100 members = client.organization.workspaces.members.list(workspace_id, limit: 10)
11071101 
11081102 members.data.each do |member|
11091103 puts "#{member.user_id}: #{member.workspace_role}"
from line 1117
11231117 ```
11241118 
11251119 ```bash CLI
1126 ant beta:organization:workspaces:members update \
1120 ant organization:workspaces:members update \
11271121 --user-id user_01XyDMpzjS89pFZXqSFUBDr6 \
11281122 --workspace-id wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ \
11291123 --workspace-role workspace_admin
from line 1126
11321126 ```python Python
11331127 client = anthropic.Anthropic()
11341128 
1135 member = client.beta.organization.workspaces.members.update(
1129 member = client.organization.workspaces.members.update(
11361130 "user_01XyDMpzjS89pFZXqSFUBDr6",
11371131 workspace_id="wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
11381132 workspace_role="workspace_admin",
from line 1139
11451139 ```typescript TypeScript
11461140 const client = new Anthropic();
11471141 
1148 const member = await client.beta.organization.workspaces.members.update(
1142 const member = await client.organization.workspaces.members.update(
11491143 "user_01XyDMpzjS89pFZXqSFUBDr6",
11501144 {
11511145 workspace_id: "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
from line 1152
11581152 ```
11591153 
11601154 ```csharp C#
1161 using Anthropic.Models.Beta.Organization.Workspaces;
1155 using Anthropic.Models.Organization.Workspaces;
11621156 
11631157 AnthropicClient client = new();
11641158 
1165 var member = await client.Beta.Organization.Workspaces.Members.Update(
1159 var member = await client.Organization.Workspaces.Members.Update(
11661160 "user_01XyDMpzjS89pFZXqSFUBDr6",
11671161 new()
11681162 {
11691163 WorkspaceID = "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
1170 WorkspaceRole = BetaWorkspaceRole.WorkspaceAdmin
1164 WorkspaceRole = WorkspaceRole.WorkspaceAdmin
11711165 }
11721166 );
11731167 
from line 1172
11781172 ```go Go
11791173 client := anthropic.NewClient()
11801174 
1181 member, err := client.Beta.Organization.Workspaces.Members.Update(
1175 member, err := client.Organization.Workspaces.Members.Update(
11821176 context.Background(),
11831177 "user_01XyDMpzjS89pFZXqSFUBDr6",
1184 anthropic.BetaOrganizationWorkspaceMemberUpdateParams{
1178 anthropic.OrganizationWorkspaceMemberUpdateParams{
11851179 WorkspaceID: "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
1186 WorkspaceRole: anthropic.BetaWorkspaceRoleWorkspaceAdmin,
1180 WorkspaceRole: anthropic.WorkspaceRoleWorkspaceAdmin,
11871181 },
11881182 )
11891183 if err != nil {
from line 1189
11951189 ```
11961190 
11971191 ```java Java
1198 import com.anthropic.models.beta.organization.workspaces.BetaWorkspaceRole;
1199 import com.anthropic.models.beta.organization.workspaces.members.MemberUpdateParams;
1192 import com.anthropic.models.organization.workspaces.WorkspaceRole;
1193 import com.anthropic.models.organization.workspaces.members.MemberUpdateParams;
12001194 
12011195 void main() {
12021196 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
from line 1197
12031197 
12041198 var params = MemberUpdateParams.builder()
12051199 .workspaceId("wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ")
1206 .workspaceRole(BetaWorkspaceRole.WORKSPACE_ADMIN)
1200 .workspaceRole(WorkspaceRole.WORKSPACE_ADMIN)
12071201 .build();
1208 var member = client.beta().organization().workspaces().members()
1202 var member = client.organization().workspaces().members()
12091203 .update("user_01XyDMpzjS89pFZXqSFUBDr6", params);
12101204 
12111205 IO.println("user_id: " + member.userId());
from line 1208
12141208 ```
12151209 
12161210 ```php PHP
1217 use Anthropic\Beta\Organization\Workspaces\WorkspaceRole;
1211 use Anthropic\Organization\Workspaces\WorkspaceRole;
12181212 // ...
12191213 
12201214 $client = new Client();
12211215 
1222 $member = $client->beta->organization->workspaces->members->update(
1216 $member = $client->organization->workspaces->members->update(
12231217 userID: 'user_01XyDMpzjS89pFZXqSFUBDr6',
12241218 workspaceID: 'wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ',
12251219 workspaceRole: WorkspaceRole::WORKSPACE_ADMIN,
from line 1227
12331227 client = Anthropic::Client.new
12341228 
12351229 user_id = "user_01XyDMpzjS89pFZXqSFUBDr6"
1236 member = client.beta.organization.workspaces.members.update(
1230 member = client.organization.workspaces.members.update(
12371231 user_id,
12381232 workspace_id: "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
12391233 workspace_role: :workspace_admin
from line 1248
12541248 ```
12551249 
12561250 ```bash CLI
1257 ant beta:organization:workspaces:members remove \
1251 ant organization:workspaces:members remove \
12581252 --user-id user_01XyDMpzjS89pFZXqSFUBDr6 \
12591253 --workspace-id wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ
12601254 ```
from line 1256
12621256 ```python Python
12631257 client = anthropic.Anthropic()
12641258 
1265 removed_member = client.beta.organization.workspaces.members.remove(
1259 removed_member = client.organization.workspaces.members.remove(
12661260 "user_01XyDMpzjS89pFZXqSFUBDr6", workspace_id="wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
12671261 )
12681262 
from line 1266
12721266 ```typescript TypeScript
12731267 const client = new Anthropic();
12741268 
1275 const removedMember = await client.beta.organization.workspaces.members.remove(
1269 const removedMember = await client.organization.workspaces.members.remove(
12761270 "user_01XyDMpzjS89pFZXqSFUBDr6",
12771271 { workspace_id: "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ" }
12781272 );
from line 1277
12831277 ```csharp C#
12841278 AnthropicClient client = new();
12851279 
1286 var removedMember = await client.Beta.Organization.Workspaces.Members.Remove(
1280 var removedMember = await client.Organization.Workspaces.Members.Remove(
12871281 "user_01XyDMpzjS89pFZXqSFUBDr6",
12881282 new() { WorkspaceID = "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ" }
12891283 );
from line 1288
12941288 ```go Go
12951289 client := anthropic.NewClient()
12961290 
1297 removedMember, err := client.Beta.Organization.Workspaces.Members.Remove(
1291 removedMember, err := client.Organization.Workspaces.Members.Remove(
12981292 context.Background(),
12991293 "user_01XyDMpzjS89pFZXqSFUBDr6",
1300 anthropic.BetaOrganizationWorkspaceMemberRemoveParams{
1294 anthropic.OrganizationWorkspaceMemberRemoveParams{
13011295 WorkspaceID: "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
13021296 },
13031297 )
from line 1303
13091303 ```
13101304 
13111305 ```java Java
1312 import com.anthropic.models.beta.organization.workspaces.members.MemberRemoveParams;
1306 import com.anthropic.models.organization.workspaces.members.MemberRemoveParams;
13131307 
13141308 void main() {
13151309 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
from line 1311
13171311 var params = MemberRemoveParams.builder()
13181312 .workspaceId("wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ")
13191313 .build();
1320 var removedMember = client.beta().organization().workspaces().members()
1314 var removedMember = client.organization().workspaces().members()
13211315 .remove("user_01XyDMpzjS89pFZXqSFUBDr6", params);
13221316 
13231317 IO.println("user_id: " + removedMember.userId());
from line 1321
13271321 ```php PHP
13281322 $client = new Client();
13291323 
1330 $removedMember = $client->beta->organization->workspaces->members->remove(
1324 $removedMember = $client->organization->workspaces->members->remove(
13311325 userID: 'user_01XyDMpzjS89pFZXqSFUBDr6',
13321326 workspaceID: 'wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ',
13331327 );
from line 1333
13391333 client = Anthropic::Client.new
13401334 
13411335 user_id = "user_01XyDMpzjS89pFZXqSFUBDr6"
1342 removed_member = client.beta.organization.workspaces.members.remove(
1336 removed_member = client.organization.workspaces.members.remove(
13431337 user_id,
13441338 workspace_id: "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
13451339 )
from line 1344
13501344 
13511345### API keys
13521346 
1353Monitor and manage [API keys](https://platform.claude.com/docs/en/api/beta/organization/api_keys/list). Each key in the response includes its `expires_at` timestamp (`null` for keys without an [expiration](https://platform.claude.com/docs/en/manage-claude/authentication#key-expiration)) and `principal`, the identity it acts as (see [Key types](https://platform.claude.com/docs/en/manage-claude/authentication#key-types)). For a personal key, `principal` is `{"type": "user_actor", "user_id": "user_..."}`; for a service account key, `{"type": "service_account_actor", "service_account_id": "svac_..."}`; and for a workspace key, `null`. Each key also has a `scope` object: `{"type": "workspace", "workspace_id": "wrkspc_..."}` for a key bound to one workspace, or `{"type": "organization"}` for a key that can work across any workspace the account has access to. The top-level `workspace_id` field is deprecated and is `null` both for keys bound to the Default Workspace and for keys without a workspace scope; use `scope` to tell them apart. Filtering the list by `workspace_id` with the Default Workspace's ID returns only keys bound to the Default Workspace; keys without a workspace scope aren't returned under any `workspace_id` filter.
1347Monitor and manage [API keys](https://platform.claude.com/docs/en/api/organization/api_keys/list). Each key in the response includes its `expires_at` timestamp (`null` for keys without an [expiration](https://platform.claude.com/docs/en/manage-claude/authentication#key-expiration)) and `principal`, the identity it acts as (see [Key types](https://platform.claude.com/docs/en/manage-claude/authentication#key-types)). For a personal key, `principal` is `{"type": "user_actor", "user_id": "user_..."}`; for a service account key, `{"type": "service_account_actor", "service_account_id": "svac_..."}`; and for a workspace key, `null`. Each key also has a `scope` object: `{"type": "workspace", "workspace_id": "wrkspc_..."}` for a key bound to one workspace, or `{"type": "organization"}` for a key that can work across any workspace the account has access to. The top-level `workspace_id` field is deprecated and is `null` both for keys bound to the Default Workspace and for keys without a workspace scope; use `scope` to tell them apart. Filtering the list by `workspace_id` with the Default Workspace's ID returns only keys bound to the Default Workspace; keys without a workspace scope aren't returned under any `workspace_id` filter.
13541348 
13551349List the active API keys in a workspace:
13561350 
from line 1356
13621356 ```
13631357 
13641358 ```bash CLI
1365 ant beta:organization:api-keys list \
1359 ant organization:api-keys list \
13661360 --limit 10 \
13671361 --status active \
13681362 --workspace-id wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ
from line 1365
13711365 ```python Python
13721366 client = anthropic.Anthropic()
13731367 
1374 api_keys = client.beta.organization.api_keys.list(
1368 api_keys = client.organization.api_keys.list(
13751369 limit=10, status="active", workspace_id="wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
13761370 )
13771371 
from line 1377
13831377 ```typescript TypeScript
13841378 const client = new Anthropic();
13851379 
1386 const apiKeys = await client.beta.organization.apiKeys.list({
1380 const apiKeys = await client.organization.apiKeys.list({
13871381 limit: 10,
13881382 status: "active",
13891383 workspace_id: "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
from line 1389
13951389 ```
13961390 
13971391 ```csharp C#
1398 using Anthropic.Models.Beta.Organization.ApiKeys;
1392 using Anthropic.Models.Organization.ApiKeys;
13991393 
14001394 AnthropicClient client = new();
14011395 
1402 var page = await client.Beta.Organization.ApiKeys.List(new()
1396 var page = await client.Organization.ApiKeys.List(new()
14031397 {
14041398 Limit = 10,
14051399 Status = ApiKeyListParamsStatus.Active,
from line 1409
14151409 ```go Go
14161410 client := anthropic.NewClient()
14171411 
1418 apiKeys := client.Beta.Organization.APIKeys.ListAutoPaging(context.Background(), anthropic.BetaOrganizationAPIKeyListParams{
1412 apiKeys := client.Organization.APIKeys.ListAutoPaging(context.Background(), anthropic.OrganizationAPIKeyListParams{
14191413 Limit: anthropic.Int(10),
1420 Status: anthropic.BetaOrganizationAPIKeyListParamsStatusActive,
1414 Status: anthropic.OrganizationAPIKeyListParamsStatusActive,
14211415 WorkspaceID: anthropic.String("wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"),
14221416 })
14231417 
from line 1425
14311425 ```
14321426 
14331427 ```java Java
1434 import com.anthropic.models.beta.organization.apikeys.ApiKeyListParams;
1428 import com.anthropic.models.organization.apikeys.ApiKeyListParams;
14351429 
14361430 void main() {
14371431 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
from line 1435
14411435 .status(ApiKeyListParams.Status.ACTIVE)
14421436 .workspaceId("wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ")
14431437 .build();
1444 var apiKeys = client.beta().organization().apiKeys().list(params);
1438 var apiKeys = client.organization().apiKeys().list(params);
14451439 
14461440 for (var apiKey : apiKeys.autoPager()) {
14471441 IO.println(apiKey.id() + ": " + apiKey.name() + " (" + apiKey.status().asString() + ")");
from line 1444
14501444 ```
14511445 
14521446 ```php PHP
1453 use Anthropic\Beta\Organization\APIKeys\APIKeyListParams\Status;
1447 use Anthropic\Organization\APIKeys\APIKeyListParams\Status;
14541448 // ...
14551449 
14561450 $client = new Client();
14571451 
1458 $apiKeys = $client->beta->organization->apiKeys->list(
1452 $apiKeys = $client->organization->apiKeys->list(
14591453 limit: 10,
14601454 status: Status::ACTIVE,
14611455 workspaceID: 'wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ',
from line 1463
14691463 ```ruby Ruby
14701464 client = Anthropic::Client.new
14711465 
1472 api_keys = client.beta.organization.api_keys.list(
1466 api_keys = client.organization.api_keys.list(
14731467 limit: 10,
14741468 status: :active,
14751469 workspace_id: "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
from line 1490
14961490 ```
14971491 
14981492 ```bash CLI
1499 ant beta:organization:api-keys update \
1493 ant organization:api-keys update \
15001494 --api-key-id apikey_01Rj2N8SVvo6BePZj99NhmiT \
15011495 --status inactive \
15021496 --name "New Key Name"
from line 1499
15051499 ```python Python
15061500 client = anthropic.Anthropic()
15071501 
1508 api_key = client.beta.organization.api_keys.update(
1502 api_key = client.organization.api_keys.update(
15091503 "apikey_01Rj2N8SVvo6BePZj99NhmiT", status="inactive", name="New Key Name"
15101504 )
15111505 
from line 1511
15171511 ```typescript TypeScript
15181512 const client = new Anthropic();
15191513 
1520 const apiKey = await client.beta.organization.apiKeys.update(
1521 "apikey_01Rj2N8SVvo6BePZj99NhmiT",
1522 {
1523 status: "inactive",
1524 name: "New Key Name"
1525 }
1526 );
1514 const apiKey = await client.organization.apiKeys.update("apikey_01Rj2N8SVvo6BePZj99NhmiT", {
1515 status: "inactive",
1516 name: "New Key Name"
1517 });
15271518 
15281519 console.log(`id: ${apiKey.id}`);
15291520 console.log(`name: ${apiKey.name}`);
from line 1522
15311522 ```
15321523 
15331524 ```csharp C#
1534 using Anthropic.Models.Beta.Organization.ApiKeys;
1525 using Anthropic.Models.Organization.ApiKeys;
15351526 
15361527 AnthropicClient client = new();
15371528 
1538 var apiKey = await client.Beta.Organization.ApiKeys.Update(
1529 var apiKey = await client.Organization.ApiKeys.Update(
15391530 "apikey_01Rj2N8SVvo6BePZj99NhmiT",
15401531 new()
15411532 {
from line 1543
15521543 ```go Go
15531544 client := anthropic.NewClient()
15541545 
1555 apiKey, err := client.Beta.Organization.APIKeys.Update(
1546 apiKey, err := client.Organization.APIKeys.Update(
15561547 context.Background(),
15571548 "apikey_01Rj2N8SVvo6BePZj99NhmiT",
1558 anthropic.BetaOrganizationAPIKeyUpdateParams{
1559 Status: anthropic.BetaOrganizationAPIKeyUpdateParamsStatusInactive,
1549 anthropic.OrganizationAPIKeyUpdateParams{
1550 Status: anthropic.OrganizationAPIKeyUpdateParamsStatusInactive,
15601551 Name: anthropic.String("New Key Name"),
15611552 },
15621553 )
from line 1561
15701561 ```
15711562 
15721563 ```java Java
1573 import com.anthropic.models.beta.organization.apikeys.ApiKeyUpdateParams;
1564 import com.anthropic.models.organization.apikeys.ApiKeyUpdateParams;
15741565 
15751566 void main() {
15761567 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
from line 1570
15791570 .status(ApiKeyUpdateParams.Status.INACTIVE)
15801571 .name("New Key Name")
15811572 .build();
1582 var apiKey = client.beta().organization().apiKeys()
1573 var apiKey = client.organization().apiKeys()
15831574 .update("apikey_01Rj2N8SVvo6BePZj99NhmiT", params);
15841575 
15851576 IO.println("id: " + apiKey.id());
from line 1580
15891580 ```
15901581 
15911582 ```php PHP
1592 use Anthropic\Beta\Organization\APIKeys\APIKeyUpdateParams\Status;
1583 use Anthropic\Organization\APIKeys\APIKeyUpdateParams\Status;
15931584 // ...
15941585 
15951586 $client = new Client();
15961587 
1597 $apiKey = $client->beta->organization->apiKeys->update(
1588 $apiKey = $client->organization->apiKeys->update(
15981589 apiKeyID: 'apikey_01Rj2N8SVvo6BePZj99NhmiT',
15991590 status: Status::INACTIVE,
16001591 name: 'New Key Name',
from line 1600
16091600 client = Anthropic::Client.new
16101601 
16111602 api_key_id = "apikey_01Rj2N8SVvo6BePZj99NhmiT"
1612 api_key = client.beta.organization.api_keys.update(
1603 api_key = client.organization.api_keys.update(
16131604 api_key_id,
16141605 status: :inactive,
16151606 name: "New Key Name"
from line 1636
16451636 ```
16461637 
16471638 ```bash CLI
1648 ant beta:organization retrieve
1639 ant organization retrieve
16491640 ```
16501641 
16511642 ```python Python
16521643 client = anthropic.Anthropic()
16531644 
1654 organization = client.beta.organization.retrieve()
1645 organization = client.organization.retrieve()
16551646 
16561647 print(f"id: {organization.id}")
16571648 print(f"name: {organization.name}")
from line 1651
16601651 ```typescript TypeScript
16611652 const client = new Anthropic();
16621653 
1663 const organization = await client.beta.organization.retrieve();
1654 const organization = await client.organization.retrieve();
16641655 
16651656 console.log(`id: ${organization.id}`);
16661657 console.log(`name: ${organization.name}`);
from line 1660
16691660 ```csharp C#
16701661 AnthropicClient client = new();
16711662 
1672 var organization = await client.Beta.Organization.Retrieve();
1663 var organization = await client.Organization.Retrieve();
16731664 
16741665 Console.WriteLine($"id: {organization.ID}");
16751666 Console.WriteLine($"name: {organization.Name}");
from line 1669
16781669 ```go Go
16791670 client := anthropic.NewClient()
16801671 
1681 organization, err := client.Beta.Organization.Get(context.Background())
1672 organization, err := client.Organization.Get(context.Background())
16821673 if err != nil {
16831674 log.Fatal(err)
16841675 }
from line 1681
16901681 ```java Java
16911682 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
16921683 
1693 var organization = client.beta().organization().retrieve();
1684 var organization = client.organization().retrieve();
16941685 
16951686 IO.println("id: " + organization.id());
16961687 IO.println("name: " + organization.name());
from line 1690
16991690 ```php PHP
17001691 $client = new Client();
17011692 
1702 $organization = $client->beta->organization->retrieve();
1693 $organization = $client->organization->retrieve();
17031694 
17041695 echo "id: {$organization->id}\n";
17051696 echo "name: {$organization->name}\n";
from line 1699
17081699 ```ruby Ruby
17091700 client = Anthropic::Client.new
17101701 
1711 organization = client.beta.organization.retrieve
1702 organization = client.organization.retrieve
17121703 
17131704 puts "id: #{organization.id}"
17141705 puts "name: #{organization.name}"
from line 1714
17231714}
17241715```
17251716 
1726For parameter details and response schemas, see the [Organization Info API reference](https://platform.claude.com/docs/en/api/beta/organization/retrieve).
1717For parameter details and response schemas, see the [Organization Info API reference](https://platform.claude.com/docs/en/api/organization/retrieve).
17271718 
17281719## Usage and cost reports
17291720 

manage-claude/cmek-aws-kms Changed · +38 / -38 lines

from line 55
5555 In the policy, replace `<AWS_ACCOUNT_ID>` with your AWS account ID and `<ORGANIZATION_UUID>` with your organization ID. The `StringEquals` condition on `kms:EncryptionContext:anthropic:org_uuid` binds the key to your Anthropic organization, and validation refuses a key without it. To share one key among several Anthropic organizations, list each organization ID in the condition value.
5656 
5757 <Note>
58 **Finding your organization ID:** Copy the **Organization ID** field under **Settings > Organization** in the Claude Console, or under **Organization settings > Organization** in claude.ai, or read the `id` field from the [Organization Info](https://platform.claude.com/docs/en/api/beta/organization/retrieve) endpoint. Use the bare UUID, not the `org_`-prefixed ID.
58 **Finding your organization ID:** Copy the **Organization ID** field under **Settings > Organization** in the Claude Console, or under **Organization settings > Organization** in claude.ai, or read the `id` field from the [Organization Info](https://platform.claude.com/docs/en/api/organization/retrieve) endpoint. Use the bare UUID, not the `org_`-prefixed ID.
5959 </Note>
6060 
6161 Save the policy as `key-policy.json`. To create the key in the AWS Console instead, paste the policy there, as described later in this step.
from line 196
196196 </Note>
197197 
198198 <Note>
199 **Finding your compartment ID:** Each workspace has a compartment ID that scopes its CMEK data. To find it in the Claude Console, go to [Manage > Security](https://platform.claude.com/settings/workspaces/default/security-compliance) and select the workspace in the workspace picker at the top of the sidebar. The ID is under **Encryption key**, in the **Compartment ID** field. You can also read the `compartment_id` field returned by the [Get Workspace](https://platform.claude.com/docs/en/api/beta/organization/workspaces/retrieve) endpoint.
199 **Finding your compartment ID:** Each workspace has a compartment ID that scopes its CMEK data. To find it in the Claude Console, go to [Manage > Security](https://platform.claude.com/settings/workspaces/default/security-compliance) and select the workspace in the workspace picker at the top of the sidebar. The ID is under **Encryption key**, in the **Compartment ID** field. You can also read the `compartment_id` field returned by the [Get Workspace](https://platform.claude.com/docs/en/api/organization/workspaces/retrieve) endpoint.
200200 </Note>
201201 
202202 You can set up the key in the Claude Console or through the Admin API, with the same result.
from line 242
242242 ```
243243 
244244 ```bash CLI
245 ant beta:organization:external-keys create <<'YAML'
245 ant organization:external-keys create <<'YAML'
246246 display_name: "<friendly-name>"
247247 geo: us
248248 provider_config:
from line 254
254254 ```python Python
255255 client = anthropic.Anthropic()
256256 
257 external_key = client.beta.organization.external_keys.create(
257 external_key = client.organization.external_keys.create(
258258 display_name="<friendly-name>",
259259 geo="us",
260260 provider_config={"type": "aws", "kms_arn": "<key-arn-from-create-key-step>"},
from line 267
267267 ```typescript TypeScript
268268 const client = new Anthropic();
269269 
270 const externalKey = await client.beta.organization.externalKeys.create({
270 const externalKey = await client.organization.externalKeys.create({
271271 display_name: "<friendly-name>",
272272 geo: "us",
273273 provider_config: {
from line 281
281281 ```
282282 
283283 ```csharp C#
284 using Anthropic.Models.Beta.Organization.ExternalKeys;
284 using Anthropic.Models.Organization.ExternalKeys;
285285 
286286 AnthropicClient client = new();
287287 
288 var externalKey = await client.Beta.Organization.ExternalKeys.Create(new()
288 var externalKey = await client.Organization.ExternalKeys.Create(new()
289289 {
290290 DisplayName = "<friendly-name>",
291291 Geo = Geo.Us,
292 ProviderConfig = new BetaAwsExternalKeyConfig
292 ProviderConfig = new AwsExternalKeyConfig
293293 {
294294 KmsArn = "<key-arn-from-create-key-step>"
295295 }
from line 302
302302 ```go Go
303303 client := anthropic.NewClient()
304304 
305 externalKey, err := client.Beta.Organization.ExternalKeys.New(context.Background(), anthropic.BetaOrganizationExternalKeyNewParams{
305 externalKey, err := client.Organization.ExternalKeys.New(context.Background(), anthropic.OrganizationExternalKeyNewParams{
306306 DisplayName: anthropic.String("<friendly-name>"),
307 Geo: anthropic.BetaOrganizationExternalKeyNewParamsGeoUs,
308 ProviderConfig: anthropic.BetaOrganizationExternalKeyNewParamsProviderConfigUnion{
309 OfAWS: &anthropic.BetaAWSExternalKeyConfigParam{
307 Geo: anthropic.OrganizationExternalKeyNewParamsGeoUs,
308 ProviderConfig: anthropic.OrganizationExternalKeyNewParamsProviderConfigUnion{
309 OfAWS: &anthropic.AWSExternalKeyConfigParam{
310310 KMSARN: "<key-arn-from-create-key-step>",
311311 },
312312 },
from line 320
320320 ```
321321 
322322 ```java Java
323 import com.anthropic.models.beta.organization.externalkeys.BetaAwsExternalKeyConfig;
324 import com.anthropic.models.beta.organization.externalkeys.ExternalKeyCreateParams;
323 import com.anthropic.models.organization.externalkeys.AwsExternalKeyConfig;
324 import com.anthropic.models.organization.externalkeys.ExternalKeyCreateParams;
325325 
326326 void main() {
327327 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
from line 329
329329 var params = ExternalKeyCreateParams.builder()
330330 .displayName("<friendly-name>")
331331 .geo(ExternalKeyCreateParams.Geo.US)
332 .providerConfig(BetaAwsExternalKeyConfig.builder()
332 .providerConfig(AwsExternalKeyConfig.builder()
333333 .kmsArn("<key-arn-from-create-key-step>")
334334 .build())
335335 .build();
336 var externalKey = client.beta().organization().externalKeys().create(params);
336 var externalKey = client.organization().externalKeys().create(params);
337337 
338338 IO.println("id: " + externalKey.id());
339339 IO.println("display_name: " + externalKey.displayName().orElseThrow());
from line 341
341341 ```
342342 
343343 ```php PHP
344 use Anthropic\Beta\Organization\ExternalKeys\ExternalKeyCreateParams\Geo;
344 use Anthropic\Organization\ExternalKeys\ExternalKeyCreateParams\Geo;
345345 // ...
346346 
347347 $client = new Client();
348348 
349 $externalKey = $client->beta->organization->externalKeys->create(
349 $externalKey = $client->organization->externalKeys->create(
350350 displayName: '<friendly-name>',
351351 geo: Geo::US,
352352 providerConfig: [
from line 362
362362 ```ruby Ruby
363363 client = Anthropic::Client.new
364364 
365 external_key = client.beta.organization.external_keys.create(
365 external_key = client.organization.external_keys.create(
366366 display_name: "<friendly-name>",
367367 geo: :us,
368368 provider_config: {
from line 398
398398 ```
399399 
400400 ```bash CLI
401 ant beta:organization:external-keys validate --external-key-id "ekey_<id>"
401 ant organization:external-keys validate --external-key-id "ekey_<id>"
402402 ```
403403 
404404 ```python Python
405405 client = anthropic.Anthropic()
406406 
407 validation = client.beta.organization.external_keys.validate("ekey_<id>")
407 validation = client.organization.external_keys.validate("ekey_<id>")
408408 
409409 print(f"status: {validation.status}")
410410 print(f"error: {validation.error}")
from line 413
413413 ```typescript TypeScript
414414 const client = new Anthropic();
415415 
416 const validation = await client.beta.organization.externalKeys.validate("ekey_<id>");
416 const validation = await client.organization.externalKeys.validate("ekey_<id>");
417417 
418418 console.log(`status: ${validation.status}`);
419419 console.log(`error: ${validation.error}`);
from line 422
422422 ```csharp C#
423423 AnthropicClient client = new();
424424 
425 var validation = await client.Beta.Organization.ExternalKeys.Validate("ekey_<id>");
425 var validation = await client.Organization.ExternalKeys.Validate("ekey_<id>");
426426 
427427 Console.WriteLine($"status: {validation.Status.Raw()}");
428428 Console.WriteLine($"error: {validation.Error}");
from line 431
431431 ```go Go
432432 client := anthropic.NewClient()
433433 
434 validation, err := client.Beta.Organization.ExternalKeys.Validate(context.Background(), "ekey_<id>")
434 validation, err := client.Organization.ExternalKeys.Validate(context.Background(), "ekey_<id>")
435435 if err != nil {
436436 log.Fatal(err)
437437 }
from line 443
443443 ```java Java
444444 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
445445 
446 var validation = client.beta().organization().externalKeys().validate("ekey_<id>");
446 var validation = client.organization().externalKeys().validate("ekey_<id>");
447447 
448448 IO.println("status: " + validation.status().asString());
449449 IO.println("error: " + validation.error().orElse(""));
from line 452
452452 ```php PHP
453453 $client = new Client();
454454 
455 $validation = $client->beta->organization->externalKeys->validate(
455 $validation = $client->organization->externalKeys->validate(
456456 externalKeyID: 'ekey_<id>',
457457 );
458458 
from line 464
464464 client = Anthropic::Client.new
465465 
466466 external_key_id = "ekey_<id>"
467 validation = client.beta.organization.external_keys.validate(external_key_id)
467 validation = client.organization.external_keys.validate(external_key_id)
468468 
469469 puts "status: #{validation.status}"
470470 puts "error: #{validation.error}"
from line 500
500500 ```
501501 
502502 ```bash CLI
503 ant beta:organization:workspaces update \
503 ant organization:workspaces update \
504504 --workspace-id "<workspace-id>" \
505505 --external-key-id "ekey_<id>"
506506 ```
from line 508
508508 ```python Python
509509 client = anthropic.Anthropic()
510510 
511 workspace = client.beta.organization.workspaces.update(
511 workspace = client.organization.workspaces.update(
512512 "<workspace-id>", external_key_id="ekey_<id>"
513513 )
514514 
from line 519
519519 ```typescript TypeScript
520520 const client = new Anthropic();
521521 
522 const workspace = await client.beta.organization.workspaces.update("<workspace-id>", {
522 const workspace = await client.organization.workspaces.update("<workspace-id>", {
523523 external_key_id: "ekey_<id>"
524524 });
525525 
from line 530
530530 ```csharp C#
531531 AnthropicClient client = new();
532532 
533 var workspace = await client.Beta.Organization.Workspaces.Update("<workspace-id>", new()
533 var workspace = await client.Organization.Workspaces.Update("<workspace-id>", new()
534534 {
535535 ExternalKeyID = "ekey_<id>"
536536 });
from line 542
542542 ```go Go
543543 client := anthropic.NewClient()
544544 
545 workspace, err := client.Beta.Organization.Workspaces.Update(
545 workspace, err := client.Organization.Workspaces.Update(
546546 context.Background(),
547547 "<workspace-id>",
548 anthropic.BetaOrganizationWorkspaceUpdateParams{
548 anthropic.OrganizationWorkspaceUpdateParams{
549549 ExternalKeyID: anthropic.String("ekey_<id>"),
550550 },
551551 )
from line 558
558558 ```
559559 
560560 ```java Java
561 import com.anthropic.models.beta.organization.workspaces.WorkspaceUpdateParams;
561 import com.anthropic.models.organization.workspaces.WorkspaceUpdateParams;
562562 
563563 void main() {
564564 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
from line 566
566566 var params = WorkspaceUpdateParams.builder()
567567 .externalKeyId("ekey_<id>")
568568 .build();
569 var workspace = client.beta().organization().workspaces().update("<workspace-id>", params);
569 var workspace = client.organization().workspaces().update("<workspace-id>", params);
570570 
571571 IO.println("id: " + workspace.id());
572572 IO.println("external_key_id: " + workspace.externalKeyId().orElseThrow());
from line 576
576576 ```php PHP
577577 $client = new Client();
578578 
579 $workspace = $client->beta->organization->workspaces->update(
579 $workspace = $client->organization->workspaces->update(
580580 workspaceID: '<workspace-id>',
581581 externalKeyID: 'ekey_<id>',
582582 );
from line 589
589589 client = Anthropic::Client.new
590590 
591591 workspace_id = "<workspace-id>"
592 workspace = client.beta.organization.workspaces.update(
592 workspace = client.organization.workspaces.update(
593593 workspace_id,
594594 external_key_id: "ekey_<id>"
595595 )
from line 638
638638 
639639The key policy has three statements: your account's root admin statement; a statement that lets the Claude Platform on AWS service principal encrypt, decrypt, and generate data keys; and a separate statement for `kms:DescribeKey`. The crypto statement carries an optional `EncryptionContext` condition that binds the key to the workspaces you list. `DescribeKey` is granted separately because it has no `EncryptionContext` parameter, so an `EncryptionContext` condition on that action would always deny.
640640 
641If you plan to use the optional `EncryptionContext` condition shown here, create the workspace first (without a key), copy its compartment ID, and substitute it for `<compartment-uuid>`. To find the ID in the Claude Console, go to [Manage > Security](https://platform.claude.com/settings/workspaces/default/security-compliance) and select the workspace in the workspace picker at the top of the sidebar. The ID is under **Encryption key**, in the **Compartment ID** field. You can also read it from the `compartment_id` field returned by the [Get Workspace](https://platform.claude.com/docs/en/api/beta/organization/workspaces/retrieve) endpoint. If you don't plan to use the condition, delete the `Condition` block from that statement.
641If you plan to use the optional `EncryptionContext` condition shown here, create the workspace first (without a key), copy its compartment ID, and substitute it for `<compartment-uuid>`. To find the ID in the Claude Console, go to [Manage > Security](https://platform.claude.com/settings/workspaces/default/security-compliance) and select the workspace in the workspace picker at the top of the sidebar. The ID is under **Encryption key**, in the **Compartment ID** field. You can also read it from the `compartment_id` field returned by the [Get Workspace](https://platform.claude.com/docs/en/api/organization/workspaces/retrieve) endpoint. If you don't plan to use the condition, delete the `Condition` block from that statement.
642642 
643643```bash
644644export YOUR_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)

manage-claude/cmek-azure-key-vault Changed · +36 / -36 lines

from line 76
7676 The `--tags` option adds the organization tag, `anthropic-org-<ORGANIZATION_UUID>` with the value `true`, where `<ORGANIZATION_UUID>` is your Anthropic organization ID in lowercase. The tag is required for Anthropic to validate the key.
7777 
7878 <Note>
79 **Finding your organization ID:** Copy the **Organization ID** field under **Settings > Organization** in the Claude Console, or under **Organization settings > Organization** in claude.ai, or read the `id` field from the [Organization Info](https://platform.claude.com/docs/en/api/beta/organization/retrieve) endpoint. Use the bare UUID, not the `org_`-prefixed ID.
79 **Finding your organization ID:** Copy the **Organization ID** field under **Settings > Organization** in the Claude Console, or under **Organization settings > Organization** in claude.ai, or read the `id` field from the [Organization Info](https://platform.claude.com/docs/en/api/organization/retrieve) endpoint. Use the bare UUID, not the `org_`-prefixed ID.
8080 </Note>
8181 
8282 ```bash
from line 203
203203 ```
204204 
205205 ```bash CLI
206 ant beta:organization:external-keys create <<'YAML'
206 ant organization:external-keys create <<'YAML'
207207 display_name: "<friendly-name>"
208208 geo: us
209209 provider_config:
from line 217
217217 ```python Python
218218 client = anthropic.Anthropic()
219219 
220 external_key = client.beta.organization.external_keys.create(
220 external_key = client.organization.external_keys.create(
221221 display_name="<friendly-name>",
222222 geo="us",
223223 provider_config={
from line 235
235235 ```typescript TypeScript
236236 const client = new Anthropic();
237237 
238 const externalKey = await client.beta.organization.externalKeys.create({
238 const externalKey = await client.organization.externalKeys.create({
239239 display_name: "<friendly-name>",
240240 geo: "us",
241241 provider_config: {
from line 251
251251 ```
252252 
253253 ```csharp C#
254 using Anthropic.Models.Beta.Organization.ExternalKeys;
254 using Anthropic.Models.Organization.ExternalKeys;
255255 
256256 AnthropicClient client = new();
257257 
258 var externalKey = await client.Beta.Organization.ExternalKeys.Create(new()
258 var externalKey = await client.Organization.ExternalKeys.Create(new()
259259 {
260260 DisplayName = "<friendly-name>",
261261 Geo = Geo.Us,
262 ProviderConfig = new BetaAzureExternalKeyConfigParam
262 ProviderConfig = new AzureExternalKeyConfigParam
263263 {
264264 VaultUri = "https://<your-vault-name>.vault.azure.net/",
265265 KeyName = "<your-key-name>",
from line 274
274274 ```go Go
275275 client := anthropic.NewClient()
276276 
277 externalKey, err := client.Beta.Organization.ExternalKeys.New(context.Background(), anthropic.BetaOrganizationExternalKeyNewParams{
277 externalKey, err := client.Organization.ExternalKeys.New(context.Background(), anthropic.OrganizationExternalKeyNewParams{
278278 DisplayName: anthropic.String("<friendly-name>"),
279 Geo: anthropic.BetaOrganizationExternalKeyNewParamsGeoUs,
280 ProviderConfig: anthropic.BetaOrganizationExternalKeyNewParamsProviderConfigUnion{
281 OfAzure: &anthropic.BetaAzureExternalKeyConfigParam{
279 Geo: anthropic.OrganizationExternalKeyNewParamsGeoUs,
280 ProviderConfig: anthropic.OrganizationExternalKeyNewParamsProviderConfigUnion{
281 OfAzure: &anthropic.AzureExternalKeyConfigParam{
282282 VaultURI: "https://<your-vault-name>.vault.azure.net/",
283283 KeyName: "<your-key-name>",
284284 TenantID: "<your-tenant-id>",
from line 294
294294 ```
295295 
296296 ```java Java
297 import com.anthropic.models.beta.organization.externalkeys.BetaAzureExternalKeyConfigParam;
298 import com.anthropic.models.beta.organization.externalkeys.ExternalKeyCreateParams;
297 import com.anthropic.models.organization.externalkeys.AzureExternalKeyConfigParam;
298 import com.anthropic.models.organization.externalkeys.ExternalKeyCreateParams;
299299 
300300 void main() {
301301 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
from line 303
303303 var params = ExternalKeyCreateParams.builder()
304304 .displayName("<friendly-name>")
305305 .geo(ExternalKeyCreateParams.Geo.US)
306 .providerConfig(BetaAzureExternalKeyConfigParam.builder()
306 .providerConfig(AzureExternalKeyConfigParam.builder()
307307 .vaultUri("https://<your-vault-name>.vault.azure.net/")
308308 .keyName("<your-key-name>")
309309 .tenantId("<your-tenant-id>")
310310 .build())
311311 .build();
312 var externalKey = client.beta().organization().externalKeys().create(params);
312 var externalKey = client.organization().externalKeys().create(params);
313313 
314314 IO.println("id: " + externalKey.id());
315315 IO.println("display_name: " + externalKey.displayName().orElseThrow());
from line 317
317317 ```
318318 
319319 ```php PHP
320 use Anthropic\Beta\Organization\ExternalKeys\ExternalKeyCreateParams\Geo;
320 use Anthropic\Organization\ExternalKeys\ExternalKeyCreateParams\Geo;
321321 // ...
322322 
323323 $client = new Client();
324324 
325 $externalKey = $client->beta->organization->externalKeys->create(
325 $externalKey = $client->organization->externalKeys->create(
326326 displayName: '<friendly-name>',
327327 geo: Geo::US,
328328 providerConfig: [
from line 340
340340 ```ruby Ruby
341341 client = Anthropic::Client.new
342342 
343 external_key = client.beta.organization.external_keys.create(
343 external_key = client.organization.external_keys.create(
344344 display_name: "<friendly-name>",
345345 geo: :us,
346346 provider_config: {
from line 378
378378 ```
379379 
380380 ```bash CLI
381 ant beta:organization:external-keys validate --external-key-id "ekey_<id>"
381 ant organization:external-keys validate --external-key-id "ekey_<id>"
382382 ```
383383 
384384 ```python Python
385385 client = anthropic.Anthropic()
386386 
387 validation = client.beta.organization.external_keys.validate("ekey_<id>")
387 validation = client.organization.external_keys.validate("ekey_<id>")
388388 
389389 print(f"status: {validation.status}")
390390 print(f"error: {validation.error}")
from line 393
393393 ```typescript TypeScript
394394 const client = new Anthropic();
395395 
396 const validation = await client.beta.organization.externalKeys.validate("ekey_<id>");
396 const validation = await client.organization.externalKeys.validate("ekey_<id>");
397397 
398398 console.log(`status: ${validation.status}`);
399399 console.log(`error: ${validation.error}`);
from line 402
402402 ```csharp C#
403403 AnthropicClient client = new();
404404 
405 var validation = await client.Beta.Organization.ExternalKeys.Validate("ekey_<id>");
405 var validation = await client.Organization.ExternalKeys.Validate("ekey_<id>");
406406 
407407 Console.WriteLine($"status: {validation.Status.Raw()}");
408408 Console.WriteLine($"error: {validation.Error}");
from line 411
411411 ```go Go
412412 client := anthropic.NewClient()
413413 
414 validation, err := client.Beta.Organization.ExternalKeys.Validate(context.Background(), "ekey_<id>")
414 validation, err := client.Organization.ExternalKeys.Validate(context.Background(), "ekey_<id>")
415415 if err != nil {
416416 log.Fatal(err)
417417 }
from line 423
423423 ```java Java
424424 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
425425 
426 var validation = client.beta().organization().externalKeys().validate("ekey_<id>");
426 var validation = client.organization().externalKeys().validate("ekey_<id>");
427427 
428428 IO.println("status: " + validation.status().asString());
429429 IO.println("error: " + validation.error().orElse(""));
from line 432
432432 ```php PHP
433433 $client = new Client();
434434 
435 $validation = $client->beta->organization->externalKeys->validate(
435 $validation = $client->organization->externalKeys->validate(
436436 externalKeyID: 'ekey_<id>',
437437 );
438438 
from line 443
443443 ```ruby Ruby
444444 client = Anthropic::Client.new
445445 
446 validation = client.beta.organization.external_keys.validate("ekey_<id>")
446 validation = client.organization.external_keys.validate("ekey_<id>")
447447 
448448 puts "status: #{validation.status}"
449449 puts "error: #{validation.error}"
from line 478
478478 ```
479479 
480480 ```bash CLI
481 ant beta:organization:workspaces update \
481 ant organization:workspaces update \
482482 --workspace-id "<workspace-id>" \
483483 --external-key-id "ekey_<id>"
484484 ```
from line 486
486486 ```python Python
487487 client = anthropic.Anthropic()
488488 
489 workspace = client.beta.organization.workspaces.update(
489 workspace = client.organization.workspaces.update(
490490 "<workspace-id>", external_key_id="ekey_<id>"
491491 )
492492 
from line 497
497497 ```typescript TypeScript
498498 const client = new Anthropic();
499499 
500 const workspace = await client.beta.organization.workspaces.update("<workspace-id>", {
500 const workspace = await client.organization.workspaces.update("<workspace-id>", {
501501 external_key_id: "ekey_<id>"
502502 });
503503 
from line 508
508508 ```csharp C#
509509 AnthropicClient client = new();
510510 
511 var workspace = await client.Beta.Organization.Workspaces.Update("<workspace-id>", new()
511 var workspace = await client.Organization.Workspaces.Update("<workspace-id>", new()
512512 {
513513 ExternalKeyID = "ekey_<id>"
514514 });
from line 520
520520 ```go Go
521521 client := anthropic.NewClient()
522522 
523 workspace, err := client.Beta.Organization.Workspaces.Update(
523 workspace, err := client.Organization.Workspaces.Update(
524524 context.Background(),
525525 "<workspace-id>",
526 anthropic.BetaOrganizationWorkspaceUpdateParams{
526 anthropic.OrganizationWorkspaceUpdateParams{
527527 ExternalKeyID: anthropic.String("ekey_<id>"),
528528 },
529529 )
from line 536
536536 ```
537537 
538538 ```java Java
539 import com.anthropic.models.beta.organization.workspaces.WorkspaceUpdateParams;
539 import com.anthropic.models.organization.workspaces.WorkspaceUpdateParams;
540540 
541541 void main() {
542542 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
from line 544
544544 var params = WorkspaceUpdateParams.builder()
545545 .externalKeyId("ekey_<id>")
546546 .build();
547 var workspace = client.beta().organization().workspaces().update("<workspace-id>", params);
547 var workspace = client.organization().workspaces().update("<workspace-id>", params);
548548 
549549 IO.println("id: " + workspace.id());
550550 IO.println("external_key_id: " + workspace.externalKeyId().orElseThrow());
from line 554
554554 ```php PHP
555555 $client = new Client();
556556 
557 $workspace = $client->beta->organization->workspaces->update(
557 $workspace = $client->organization->workspaces->update(
558558 workspaceID: '<workspace-id>',
559559 externalKeyID: 'ekey_<id>',
560560 );
from line 566
566566 ```ruby Ruby
567567 client = Anthropic::Client.new
568568 
569 workspace = client.beta.organization.workspaces.update(
569 workspace = client.organization.workspaces.update(
570570 "<workspace-id>",
571571 external_key_id: "ekey_<id>"
572572 )

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

from line 58
5858 The `--labels` option adds the organization label, `anthropic-org-<ORGANIZATION_UUID>` with the value `true`, where `<ORGANIZATION_UUID>` is your Anthropic organization ID in lowercase. The label is required for Anthropic to validate the key.
5959 
6060 <Note>
61 **Finding your organization ID:** Copy the **Organization ID** field under **Settings > Organization** in the Claude Console, or under **Organization settings > Organization** in claude.ai, or read the `id` field from the [Organization Info](https://platform.claude.com/docs/en/api/beta/organization/retrieve) endpoint. Use the bare UUID, not the `org_`-prefixed ID.
61 **Finding your organization ID:** Copy the **Organization ID** field under **Settings > Organization** in the Claude Console, or under **Organization settings > Organization** in claude.ai, or read the `id` field from the [Organization Info](https://platform.claude.com/docs/en/api/organization/retrieve) endpoint. Use the bare UUID, not the `org_`-prefixed ID.
6262 </Note>
6363 
6464 ```bash
from line 192
192192 ```
193193 
194194 ```bash CLI
195 ant beta:organization:external-keys create <<'YAML'
195 ant organization:external-keys create <<'YAML'
196196 display_name: "<friendly-name>"
197197 geo: us
198198 provider_config:
from line 204
204204 ```python Python
205205 client = anthropic.Anthropic()
206206 
207 external_key = client.beta.organization.external_keys.create(
207 external_key = client.organization.external_keys.create(
208208 display_name="<friendly-name>",
209209 geo="us",
210210 provider_config={
from line 220
220220 ```typescript TypeScript
221221 const client = new Anthropic();
222222 
223 const externalKey = await client.beta.organization.externalKeys.create({
223 const externalKey = await client.organization.externalKeys.create({
224224 display_name: "<friendly-name>",
225225 geo: "us",
226226 provider_config: {
from line 235
235235 ```
236236 
237237 ```csharp C#
238 using Anthropic.Models.Beta.Organization.ExternalKeys;
238 using Anthropic.Models.Organization.ExternalKeys;
239239 
240240 AnthropicClient client = new();
241241 
242 var externalKey = await client.Beta.Organization.ExternalKeys.Create(new()
242 var externalKey = await client.Organization.ExternalKeys.Create(new()
243243 {
244244 DisplayName = "<friendly-name>",
245245 Geo = Geo.Us,
246 ProviderConfig = new BetaGcpExternalKeyConfig
246 ProviderConfig = new GcpExternalKeyConfig
247247 {
248248 KeyName = "projects/<your-project-id>/locations/<region>/keyRings/<your-keyring-name>/cryptoKeys/<your-key-name>"
249249 }
from line 256
256256 ```go Go
257257 client := anthropic.NewClient()
258258 
259 externalKey, err := client.Beta.Organization.ExternalKeys.New(context.Background(), anthropic.BetaOrganizationExternalKeyNewParams{
259 externalKey, err := client.Organization.ExternalKeys.New(context.Background(), anthropic.OrganizationExternalKeyNewParams{
260260 DisplayName: anthropic.String("<friendly-name>"),
261 Geo: anthropic.BetaOrganizationExternalKeyNewParamsGeoUs,
262 ProviderConfig: anthropic.BetaOrganizationExternalKeyNewParamsProviderConfigUnion{
263 OfGCP: &anthropic.BetaGCPExternalKeyConfigParam{
261 Geo: anthropic.OrganizationExternalKeyNewParamsGeoUs,
262 ProviderConfig: anthropic.OrganizationExternalKeyNewParamsProviderConfigUnion{
263 OfGCP: &anthropic.GCPExternalKeyConfigParam{
264264 KeyName: "projects/<your-project-id>/locations/<region>/keyRings/<your-keyring-name>/cryptoKeys/<your-key-name>",
265265 },
266266 },
from line 274
274274 ```
275275 
276276 ```java Java
277 import com.anthropic.models.beta.organization.externalkeys.ExternalKeyCreateParams;
277 import com.anthropic.models.organization.externalkeys.ExternalKeyCreateParams;
278278 
279279 void main() {
280280 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
from line 284
284284 .geo(ExternalKeyCreateParams.Geo.US)
285285 .gcpProviderConfig("projects/<your-project-id>/locations/<region>/keyRings/<your-keyring-name>/cryptoKeys/<your-key-name>")
286286 .build();
287 var externalKey = client.beta().organization().externalKeys().create(params);
287 var externalKey = client.organization().externalKeys().create(params);
288288 
289289 IO.println("id: " + externalKey.id());
290290 IO.println("display_name: " + externalKey.displayName().orElseThrow());
from line 292
292292 ```
293293 
294294 ```php PHP
295 use Anthropic\Beta\Organization\ExternalKeys\ExternalKeyCreateParams\Geo;
295 use Anthropic\Organization\ExternalKeys\ExternalKeyCreateParams\Geo;
296296 // ...
297297 
298298 $client = new Client();
299299 
300 $externalKey = $client->beta->organization->externalKeys->create(
300 $externalKey = $client->organization->externalKeys->create(
301301 displayName: '<friendly-name>',
302302 geo: Geo::US,
303303 providerConfig: [
from line 313
313313 ```ruby Ruby
314314 client = Anthropic::Client.new
315315 
316 external_key = client.beta.organization.external_keys.create(
316 external_key = client.organization.external_keys.create(
317317 display_name: "<friendly-name>",
318318 geo: :us,
319319 provider_config: {
from line 349
349349 ```
350350 
351351 ```bash CLI
352 ant beta:organization:external-keys validate --external-key-id "ekey_<id>"
352 ant organization:external-keys validate --external-key-id "ekey_<id>"
353353 ```
354354 
355355 ```python Python
356356 client = anthropic.Anthropic()
357357 
358 validation = client.beta.organization.external_keys.validate("ekey_<id>")
358 validation = client.organization.external_keys.validate("ekey_<id>")
359359 
360360 print(f"status: {validation.status}")
361361 print(f"error: {validation.error}")
from line 364
364364 ```typescript TypeScript
365365 const client = new Anthropic();
366366 
367 const validation = await client.beta.organization.externalKeys.validate("ekey_<id>");
367 const validation = await client.organization.externalKeys.validate("ekey_<id>");
368368 
369369 console.log(`status: ${validation.status}`);
370370 console.log(`error: ${validation.error}`);
from line 373
373373 ```csharp C#
374374 AnthropicClient client = new();
375375 
376 var validation = await client.Beta.Organization.ExternalKeys.Validate("ekey_<id>");
376 var validation = await client.Organization.ExternalKeys.Validate("ekey_<id>");
377377 
378378 Console.WriteLine($"status: {validation.Status.Raw()}");
379379 Console.WriteLine($"error: {validation.Error}");
from line 382
382382 ```go Go
383383 client := anthropic.NewClient()
384384 
385 validation, err := client.Beta.Organization.ExternalKeys.Validate(context.Background(), "ekey_<id>")
385 validation, err := client.Organization.ExternalKeys.Validate(context.Background(), "ekey_<id>")
386386 if err != nil {
387387 log.Fatal(err)
388388 }
from line 394
394394 ```java Java
395395 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
396396 
397 var validation = client.beta().organization().externalKeys().validate("ekey_<id>");
397 var validation = client.organization().externalKeys().validate("ekey_<id>");
398398 
399399 IO.println("status: " + validation.status().asString());
400400 IO.println("error: " + validation.error().orElse(""));
from line 403
403403 ```php PHP
404404 $client = new Client();
405405 
406 $validation = $client->beta->organization->externalKeys->validate(
406 $validation = $client->organization->externalKeys->validate(
407407 externalKeyID: 'ekey_<id>',
408408 );
409409 
from line 415
415415 client = Anthropic::Client.new
416416 
417417 external_key_id = "ekey_<id>"
418 validation = client.beta.organization.external_keys.validate(external_key_id)
418 validation = client.organization.external_keys.validate(external_key_id)
419419 
420420 puts "status: #{validation.status}"
421421 puts "error: #{validation.error}"
from line 450
450450 ```
451451 
452452 ```bash CLI
453 ant beta:organization:workspaces update \
453 ant organization:workspaces update \
454454 --workspace-id "<workspace-id>" \
455455 --external-key-id "ekey_<id>"
456456 ```
from line 458
458458 ```python Python
459459 client = anthropic.Anthropic()
460460 
461 workspace = client.beta.organization.workspaces.update(
461 workspace = client.organization.workspaces.update(
462462 "<workspace-id>", external_key_id="ekey_<id>"
463463 )
464464 
from line 469
469469 ```typescript TypeScript
470470 const client = new Anthropic();
471471 
472 const workspace = await client.beta.organization.workspaces.update("<workspace-id>", {
472 const workspace = await client.organization.workspaces.update("<workspace-id>", {
473473 external_key_id: "ekey_<id>"
474474 });
475475 
from line 480
480480 ```csharp C#
481481 AnthropicClient client = new();
482482 
483 var workspace = await client.Beta.Organization.Workspaces.Update("<workspace-id>", new()
483 var workspace = await client.Organization.Workspaces.Update("<workspace-id>", new()
484484 {
485485 ExternalKeyID = "ekey_<id>"
486486 });
from line 492
492492 ```go Go
493493 client := anthropic.NewClient()
494494 
495 workspace, err := client.Beta.Organization.Workspaces.Update(
495 workspace, err := client.Organization.Workspaces.Update(
496496 context.Background(),
497497 "<workspace-id>",
498 anthropic.BetaOrganizationWorkspaceUpdateParams{
498 anthropic.OrganizationWorkspaceUpdateParams{
499499 ExternalKeyID: anthropic.String("ekey_<id>"),
500500 },
501501 )
from line 508
508508 ```
509509 
510510 ```java Java
511 import com.anthropic.models.beta.organization.workspaces.WorkspaceUpdateParams;
511 import com.anthropic.models.organization.workspaces.WorkspaceUpdateParams;
512512 
513513 void main() {
514514 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
from line 516
516516 var params = WorkspaceUpdateParams.builder()
517517 .externalKeyId("ekey_<id>")
518518 .build();
519 var workspace = client.beta().organization().workspaces().update("<workspace-id>", params);
519 var workspace = client.organization().workspaces().update("<workspace-id>", params);
520520 
521521 IO.println("id: " + workspace.id());
522522 IO.println("external_key_id: " + workspace.externalKeyId().orElseThrow());
from line 526
526526 ```php PHP
527527 $client = new Client();
528528 
529 $workspace = $client->beta->organization->workspaces->update(
529 $workspace = $client->organization->workspaces->update(
530530 workspaceID: '<workspace-id>',
531531 externalKeyID: 'ekey_<id>',
532532 );
from line 539
539539 client = Anthropic::Client.new
540540 
541541 workspace_id = "<workspace-id>"
542 workspace = client.beta.organization.workspaces.update(
542 workspace = client.organization.workspaces.update(
543543 workspace_id,
544544 external_key_id: "ekey_<id>"
545545 )

manage-claude/inference-hooks-configuration Changed · +18 / -4 lines

from line 57
5757 | Result | What to check |
5858 | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
5959 | URL rejected | The URL failed a structural check. Use an `https://` URL on port 443. |
60 | Private or internal IP | The host resolves to a private or internal address. Use a publicly routable host. |
60 | Private or internal IP | The URL's host is a private or internal IP address, an IPv6 address, or `localhost`. Use a publicly routable host. |
6161 | Timeout | The AI security server did not return a verdict within the timeout. |
62 | Transport error | DNS resolution, the TLS handshake, or the connection failed. |
62 | Transport error | DNS resolution, the TLS handshake, or the connection failed, or the hostname resolves to a private address. |
6363 | Non-200 status | The AI security server responded with a status other than 200. Verdicts must come back as HTTP 200; redirects are not followed and count as failures. |
6464 | Unparseable response | The AI security server responded, but the body is not a valid verdict. |
6565 | Signing secret required | Your organization has no signing secret, so the test would be sent unsigned. Click **Generate secret** under **Request signing**, then test again. |
from line 117
117117* **Failures per minute:** webhook failures over the last two minutes, averaged.
118118* **Block rate:** denials as a share of your AI security server's verdicts, shown while the rollout percentage is below 100.
119119* **Circuit breaker tripped:** when the breaker last tripped, if it has.
120* **Recent errors:** each entry is reduced to a timestamp, an error type, and a one-line reason. Entries never include request content or your endpoint URL.
120* **Recent errors:** each entry shows when the failure happened, an error type, and a category. The category is `webhook_error` for a problem with your endpoint or the connection to it, or `relay_error` for a failure inside Anthropic's systems. Entries never include request content or your endpoint URL. The list keeps the 10 most recent failures and clears an hour after the last one.
121121 
122The error types in **Recent errors** mean:
123 
124| Error shown | What it means | Counts toward the circuit breaker |
125| ---------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- |
126| `DlpWebhookTimeoutError` · `webhook_error` | Your AI security server didn't return a verdict within the **Prompt verdict timeout (ms)** you set. | Yes |
127| `DlpWebhookStatusError` · `webhook_error` | Your AI security server answered with an HTTP status other than 200, such as a redirect. | Yes |
128| `DlpWebhookResponseError` · `webhook_error` | Your AI security server answered 200, but the body isn't a valid verdict or is larger than 64 KiB. | Yes |
129| `DlpWebhookTransportError` · `webhook_error` | The connection failed or dropped before a complete answer arrived: for example, the hostname didn't resolve or resolved to a private address, the connection was refused or reset, or the TLS handshake failed. A network problem on Anthropic's side can also show up this way. | No |
130| `DlpWebhookDisallowedAddressError` · `webhook_error` | The endpoint URL's host is a private or internal IP address, an IPv6 address, or `localhost`. A hostname that resolves to such an address shows as a transport error instead. | Yes |
131| `DlpWebhookBlockedError` · `webhook_error` | The endpoint URL isn't an `https://` URL on port 443, or can't be parsed, so no request was sent. | No |
132| `DlpWebhookRelayError` · `relay_error` | The failure was inside Anthropic's systems, and your AI security server usually wasn't contacted. | No |
133 
134In shadow mode, no error counts toward the circuit breaker.
135 
122136The panel is best-effort: if Anthropic cannot read the counters it shows zero failures and no errors rather than an error of its own, so a healthy-looking panel is not by itself proof that your AI security server is healthy. **Failures per minute** counts every failure, including the network and DNS errors that never trip the circuit breaker, so it can be high while **Circuit breaker tripped** stays empty.
123137 
124138## Circuit breaker
from line 155
141155 
142156## Audit trail
143157 
144Inference hooks activity is recorded in your organization's [Activity Feed](https://platform.claude.com/docs/en/manage-claude/compliance-activity-feed): configuration changes, denials, circuit breaker trips, and requests that proceeded without inspection under your failure handling setting. While the circuit breaker is tripped, no per-request Inference hooks activities are recorded; the trip activity is the feed's record of that window. Denial records carry identifiers that let you join each denial to the matching record in your own system.
158Inference hooks activity is recorded in your organization's [Activity Feed](https://platform.claude.com/docs/en/manage-claude/compliance-activity-feed): configuration changes, denials, circuit breaker trips, and requests that proceeded without inspection because no verdict could be obtained. That last kind is recorded only while **Enforce verdicts** is on and **Mode** is **Allow the request**. Its reason is `endpoint_timeout`, `endpoint_error` for any other problem calling your AI security server, or `internal_error` for a failure on Anthropic's side. Under **Block the request** or **Shadow mode**, failed requests aren't recorded individually, and the circuit breaker's automatic recovery isn't recorded. While the circuit breaker is tripped, no per-request Inference hooks activities are recorded; the trip activity is the feed's record of that window. Denial records carry identifiers that let you join each denial to the matching record in your own system.
145159 
146160## Turn Inference hooks off
147161 

manage-claude/inference-hooks-endpoint Changed · +11 / -6 lines

from line 283
283283 
284284A third-party tool is one on a server that Anthropic knows of, such as a claude.ai connector or an MCP server that the request names in `mcp_servers`. This doesn't mean Anthropic has vetted the server.
285285 
286| Field | Present | Description |
287| ----------------- | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
288| `type` | Always | `"third_party"` |
289| `toolset_name` | Optional | The name the request gives the server. |
290| `origin` | Optional | The scheme, host, and non-default port of the server's URL. An absent `origin` means unknown, not safe. |
291| `verified_origin` | Whenever `origin` is | `true` only when Anthropic's servers connect to the server themselves. Treat `false` as an origin that Anthropic hasn't confirmed. |
286| Field | Present | Description |
287| ----------------- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
288| `type` | Always | `"third_party"` |
289| `toolset_name` | Optional | The name the request gives the server. |
290| `origin` | Optional | The scheme, host, and non-default port of the server's URL. It can be a private or local address, `localhost` included. An absent `origin` means unknown, not safe. |
291| `verified_origin` | Whenever `origin` is | `true` only when Anthropic's servers connect to the server themselves. Treat `false` as an origin that Anthropic hasn't confirmed. |
292292 
293293A `tool_use` block for a tool on an MCP server that the request names `crm` in `mcp_servers`:
294294 
from line 313
313313 
314314A client tool is any other tool. The application that calls Claude declares it and receives its calls. A call to a tool the request doesn't declare is also `"client"`.
315315 
316A tool on an MCP server that Claude Code connects to directly from the user's computer, such as a local MCP server, is a client tool. Its `tool_info` is `{"type": "client"}`, and its `tool_name` is the name Claude Code gives it, in the form `mcp__<server>__<tool>`.
317 
318A deny stops the call before Claude Code runs it. The exchange between Claude Code and a local server doesn't pass through Anthropic, so your AI security server sees the tool's result only when Claude Code sends it back. Its text is then in a `tool_result` block in the next prompt frame.
319 
316320| Field | Present | Description |
317321| -------------- | -------- | --------------------------------- |
318322| `type` | Always | `"client"` |
from line 806
802806* New `source.application` values.
803807* New `actor.type` values. `actor` is a union discriminated on `type`, and `"user"` is the only kind sent today; a future kind guarantees only that `type` is present.
804808* Content blocks with an unrecognized `type`.
809* Messages with a `role` other than `user` or `assistant`, which a later revision may add.
805810 
806811Never reject a request because of an unrecognized block type or field; read the fields you know and skip the rest.
807812 

manage-claude/rate-limits-api Changed · +51 / -51 lines

from line 20
2020 **Admin API credentials required.** These endpoints are part of the Admin API. You can access them using an [Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys), an OAuth token with the `org:admin` scope, or a personal or service account key that isn't scoped to a workspace; workspace API keys don't work. See [Authentication](https://platform.claude.com/docs/en/manage-claude/admin-api#authentication) for details.
2121</Check>
2222 
23The SDK and CLI examples on this page construct the default client, which reads the Admin API key from the `ANTHROPIC_API_KEY` environment variable. The SDKs expose these endpoints as `client.beta.organization.rate_limits` and `client.beta.organization.workspaces.rate_limits`; the Python, TypeScript, C#, Go, and Java list methods return an iterator that follows `next_page` for you, while the PHP, Ruby, and curl examples read one page.
23The SDK and CLI examples on this page construct the default client, which reads the Admin API key from the `ANTHROPIC_API_KEY` environment variable. The SDKs expose these endpoints as `client.organization.rate_limits` (typescript: `client.organization.rateLimits`; csharp, go: `client.Organization.RateLimits`; java: `client.organization().rateLimits()`; php: `$client->organization->rateLimits`) and `client.organization.workspaces.rate_limits` (typescript: `client.organization.workspaces.rateLimits`; csharp, go: `client.Organization.Workspaces.RateLimits`; java: `client.organization().workspaces().rateLimits()`; php: `$client->organization->workspaces->rateLimits`); the Python, TypeScript, C#, Go, and Java list methods return an iterator that follows `next_page` for you, while the PHP, Ruby, and curl examples read one page.
2424 
2525## Quick start
2626 
from line 34
3434 ```
3535 
3636 ```bash CLI
37 ant beta:organization:rate-limits list
37 ant organization:rate-limits list
3838 ```
3939 
4040 ```python Python
4141 client = anthropic.Anthropic()
4242 
43 rate_limits = client.beta.organization.rate_limits.list()
43 rate_limits = client.organization.rate_limits.list()
4444 
4545 for entry in rate_limits:
4646 models = f" ({', '.join(entry.models)})" if entry.models else ""
from line 52
5252 ```typescript TypeScript
5353 const client = new Anthropic();
5454 
55 const rateLimits = await client.beta.organization.rateLimits.list();
55 const rateLimits = await client.organization.rateLimits.list();
5656 
5757 for await (const entry of rateLimits) {
5858 const models = entry.models ? ` (${entry.models.join(", ")})` : "";
from line 66
6666 ```csharp C#
6767 AnthropicClient client = new();
6868 
69 var rateLimits = await client.Beta.Organization.RateLimits.List();
69 var rateLimits = await client.Organization.RateLimits.List();
7070 
7171 await foreach (var entry in rateLimits.Paginate())
7272 {
from line 82
8282 ```go Go
8383 client := anthropic.NewClient()
8484 
85 rateLimits := client.Beta.Organization.RateLimits.ListAutoPaging(context.Background(), anthropic.BetaOrganizationRateLimitListParams{})
85 rateLimits := client.Organization.RateLimits.ListAutoPaging(context.Background(), anthropic.OrganizationRateLimitListParams{})
8686 
8787 for rateLimits.Next() {
8888 entry := rateLimits.Current()
from line 103
103103 ```java Java
104104 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
105105 
106 var rateLimits = client.beta().organization().rateLimits().list();
106 var rateLimits = client.organization().rateLimits().list();
107107 
108108 for (var entry : rateLimits.autoPager()) {
109109 var models = entry.models()
from line 119
119119 ```php PHP
120120 $client = new Client();
121121 
122 $rateLimits = $client->beta->organization->rateLimits->list();
122 $rateLimits = $client->organization->rateLimits->list();
123123 
124124 foreach ($rateLimits->data as $entry) {
125125 $models = $entry->models ? ' (' . implode(', ', $entry->models) . ')' : '';
from line 133
133133 ```ruby Ruby
134134 client = Anthropic::Client.new
135135 
136 rate_limits = client.beta.organization.rate_limits.list
136 rate_limits = client.organization.rate_limits.list
137137 
138138 rate_limits.data.each do |entry|
139139 models = entry.models ? " (#{entry.models.join(", ")})" : ""
from line 158
158158* **`models` list:** For `model_group` entries, the `models` field lists every model ID and alias that counts against that group's limits. Use this list to look up which group any model string falls under. For other group types, `models` is `null`.
159159* **`limits` list:** Each group carries a list of `{type, value}` pairs. The `type` field identifies the limiter (such as `requests_per_minute`, `input_tokens_per_minute`, or `output_tokens_per_minute`) and `value` is the configured limit. See [Rate limits](https://platform.claude.com/docs/en/api/rate-limits) for how each limiter is measured and enforced.
160160 
161For complete parameter details and response schemas, see the [Organization Rate Limits API reference](https://platform.claude.com/docs/en/api/beta/organization/rate_limits/list).
161For complete parameter details and response schemas, see the [Organization Rate Limits API reference](https://platform.claude.com/docs/en/api/organization/rate_limits/list).
162162 
163163### List all organization rate limits
164164 
from line 170
170170 ```
171171 
172172 ```bash CLI
173 ant beta:organization:rate-limits list
173 ant organization:rate-limits list
174174 ```
175175 
176176 ```python Python
177177 client = anthropic.Anthropic()
178178 
179 rate_limits = client.beta.organization.rate_limits.list()
179 rate_limits = client.organization.rate_limits.list()
180180 
181181 for entry in rate_limits:
182182 models = f" ({', '.join(entry.models)})" if entry.models else ""
from line 188
188188 ```typescript TypeScript
189189 const client = new Anthropic();
190190 
191 const rateLimits = await client.beta.organization.rateLimits.list();
191 const rateLimits = await client.organization.rateLimits.list();
192192 
193193 for await (const entry of rateLimits) {
194194 const models = entry.models ? ` (${entry.models.join(", ")})` : "";
from line 202
202202 ```csharp C#
203203 AnthropicClient client = new();
204204 
205 var rateLimits = await client.Beta.Organization.RateLimits.List();
205 var rateLimits = await client.Organization.RateLimits.List();
206206 
207207 await foreach (var entry in rateLimits.Paginate())
208208 {
from line 218
218218 ```go Go
219219 client := anthropic.NewClient()
220220 
221 rateLimits := client.Beta.Organization.RateLimits.ListAutoPaging(context.Background(), anthropic.BetaOrganizationRateLimitListParams{})
221 rateLimits := client.Organization.RateLimits.ListAutoPaging(context.Background(), anthropic.OrganizationRateLimitListParams{})
222222 
223223 for rateLimits.Next() {
224224 entry := rateLimits.Current()
from line 239
239239 ```java Java
240240 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
241241 
242 var rateLimits = client.beta().organization().rateLimits().list();
242 var rateLimits = client.organization().rateLimits().list();
243243 
244244 for (var entry : rateLimits.autoPager()) {
245245 var models = entry.models()
from line 255
255255 ```php PHP
256256 $client = new Client();
257257 
258 $rateLimits = $client->beta->organization->rateLimits->list();
258 $rateLimits = $client->organization->rateLimits->list();
259259 
260260 foreach ($rateLimits->data as $entry) {
261261 $models = $entry->models ? ' (' . implode(', ', $entry->models) . ')' : '';
from line 269
269269 ```ruby Ruby
270270 client = Anthropic::Client.new
271271 
272 rate_limits = client.beta.organization.rate_limits.list
272 rate_limits = client.organization.rate_limits.list
273273 
274274 rate_limits.data.each do |entry|
275275 models = entry.models ? " (#{entry.models.join(", ")})" : ""
from line 344
344344 ```
345345 
346346 ```bash CLI
347 ant beta:organization:rate-limits list --model claude-opus-5
347 ant organization:rate-limits list --model claude-opus-5
348348 ```
349349 
350350 ```python Python
351351 client = anthropic.Anthropic()
352352 
353 rate_limits = client.beta.organization.rate_limits.list(model="claude-opus-5")
353 rate_limits = client.organization.rate_limits.list(model="claude-opus-5")
354354 
355355 for entry in rate_limits:
356356 models = f" ({', '.join(entry.models)})" if entry.models else ""
from line 362
362362 ```typescript TypeScript
363363 const client = new Anthropic();
364364 
365 const rateLimits = await client.beta.organization.rateLimits.list({ model: "claude-opus-5" });
365 const rateLimits = await client.organization.rateLimits.list({ model: "claude-opus-5" });
366366 
367367 for await (const entry of rateLimits) {
368368 const models = entry.models ? ` (${entry.models.join(", ")})` : "";
from line 376
376376 ```csharp C#
377377 AnthropicClient client = new();
378378 
379 var rateLimits = await client.Beta.Organization.RateLimits.List(new()
379 var rateLimits = await client.Organization.RateLimits.List(new()
380380 {
381381 Model = "claude-opus-5"
382382 });
from line 395
395395 ```go Go
396396 client := anthropic.NewClient()
397397 
398 rateLimits := client.Beta.Organization.RateLimits.ListAutoPaging(context.Background(), anthropic.BetaOrganizationRateLimitListParams{
398 rateLimits := client.Organization.RateLimits.ListAutoPaging(context.Background(), anthropic.OrganizationRateLimitListParams{
399399 Model: anthropic.String(anthropic.ModelClaudeOpus5),
400400 })
401401 
from line 416
416416 ```
417417 
418418 ```java Java
419 import com.anthropic.models.beta.organization.ratelimits.RateLimitListParams;
419 import com.anthropic.models.organization.ratelimits.RateLimitListParams;
420420 import com.anthropic.models.messages.Model;
421421 
422422 void main() {
from line 425
425425 var params = RateLimitListParams.builder()
426426 .model(Model.CLAUDE_OPUS_5.asString())
427427 .build();
428 var rateLimits = client.beta().organization().rateLimits().list(params);
428 var rateLimits = client.organization().rateLimits().list(params);
429429 
430430 for (var entry : rateLimits.autoPager()) {
431431 var models = entry.models()
from line 444
444444 
445445 $client = new Client();
446446 
447 $rateLimits = $client->beta->organization->rateLimits->list(
447 $rateLimits = $client->organization->rateLimits->list(
448448 model: Model::CLAUDE_OPUS_5->value,
449449 );
450450 
from line 460
460460 ```ruby Ruby
461461 client = Anthropic::Client.new
462462 
463 rate_limits = client.beta.organization.rate_limits.list(model: Anthropic::Model::CLAUDE_OPUS_5)
463 rate_limits = client.organization.rate_limits.list(model: Anthropic::Model::CLAUDE_OPUS_5)
464464 
465465 rate_limits.data.each do |entry|
466466 models = entry.models ? " (#{entry.models.join(", ")})" : ""
from line 484
484484* Within a group that is present, a limiter type that is absent from `limits[]` has no workspace override for that limiter. The workspace inherits the organization value for it.
485485* For each limiter that is present, `org_limit` is the organization-level value for the same limiter, or `null` if the organization has no configured limit for that limiter type.
486486 
487For complete parameter details and response schemas, see the [Workspace Rate Limits API reference](https://platform.claude.com/docs/en/api/beta/organization/workspaces/rate_limits/list).
487For complete parameter details and response schemas, see the [Workspace Rate Limits API reference](https://platform.claude.com/docs/en/api/organization/workspaces/rate_limits/list).
488488 
489489<Tip>
490 To retrieve your organization's workspace IDs, use the [List Workspaces](https://platform.claude.com/docs/en/api/beta/organization/workspaces/list) endpoint, or find them in the [Claude Console](https://platform.claude.com/settings/workspaces). The default workspace cannot have rate limit overrides, so it has no entry on this endpoint; use the organization endpoint to read its limits.
490 To retrieve your organization's workspace IDs, use the [List Workspaces](https://platform.claude.com/docs/en/api/organization/workspaces/list) endpoint, or find them in the [Claude Console](https://platform.claude.com/settings/workspaces). The default workspace cannot have rate limit overrides, so it has no entry on this endpoint; use the organization endpoint to read its limits.
491491</Tip>
492492 
493493<CodeGroup>
from line 498
498498 ```
499499 
500500 ```bash CLI
501 ant beta:organization:workspaces:rate-limits list \
501 ant organization:workspaces:rate-limits list \
502502 --workspace-id wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ
503503 ```
504504 
from line 505
505505 ```python Python
506506 client = anthropic.Anthropic()
507507 
508 rate_limits = client.beta.organization.workspaces.rate_limits.list(
508 rate_limits = client.organization.workspaces.rate_limits.list(
509509 "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
510510 )
511511 
from line 519
519519 ```typescript TypeScript
520520 const client = new Anthropic();
521521 
522 const rateLimits = await client.beta.organization.workspaces.rateLimits.list(
522 const rateLimits = await client.organization.workspaces.rateLimits.list(
523523 "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
524524 );
525525 
from line 535
535535 ```csharp C#
536536 AnthropicClient client = new();
537537 
538 var rateLimits = await client.Beta.Organization.Workspaces.RateLimits.List(
538 var rateLimits = await client.Organization.Workspaces.RateLimits.List(
539539 "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
540540 );
541541 
from line 553
553553 ```go Go
554554 client := anthropic.NewClient()
555555 
556 rateLimits := client.Beta.Organization.Workspaces.RateLimits.ListAutoPaging(
556 rateLimits := client.Organization.Workspaces.RateLimits.ListAutoPaging(
557557 context.Background(),
558558 "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
559 anthropic.BetaOrganizationWorkspaceRateLimitListParams{},
559 anthropic.OrganizationWorkspaceRateLimitListParams{},
560560 )
561561 
562562 for rateLimits.Next() {
from line 578
578578 ```java Java
579579 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
580580 
581 var rateLimits = client.beta().organization().workspaces().rateLimits()
581 var rateLimits = client.organization().workspaces().rateLimits()
582582 .list("wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ");
583583 
584584 for (var entry : rateLimits.autoPager()) {
from line 595
595595 ```php PHP
596596 $client = new Client();
597597 
598 $rateLimits = $client->beta->organization->workspaces->rateLimits->list(
598 $rateLimits = $client->organization->workspaces->rateLimits->list(
599599 workspaceID: 'wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ',
600600 );
601601 
from line 612
612612 client = Anthropic::Client.new
613613 
614614 workspace_id = "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
615 rate_limits = client.beta.organization.workspaces.rate_limits.list(workspace_id)
615 rate_limits = client.organization.workspaces.rate_limits.list(workspace_id)
616616 
617617 rate_limits.data.each do |entry|
618618 models = entry.models ? " (#{entry.models.join(", ")})" : ""
from line 678
678678 ```
679679 
680680 ```bash CLI
681 ant beta:organization:rate-limits list --group-type batch
681 ant organization:rate-limits list --group-type batch
682682 ```
683683 
684684 ```python Python
685685 client = anthropic.Anthropic()
686686 
687 rate_limits = client.beta.organization.rate_limits.list(group_type="batch")
687 rate_limits = client.organization.rate_limits.list(group_type="batch")
688688 
689689 for entry in rate_limits:
690690 models = f" ({', '.join(entry.models)})" if entry.models else ""
from line 696
696696 ```typescript TypeScript
697697 const client = new Anthropic();
698698 
699 const rateLimits = await client.beta.organization.rateLimits.list({ group_type: "batch" });
699 const rateLimits = await client.organization.rateLimits.list({ group_type: "batch" });
700700 
701701 for await (const entry of rateLimits) {
702702 const models = entry.models ? ` (${entry.models.join(", ")})` : "";
from line 708
708708 ```
709709 
710710 ```csharp C#
711 using Anthropic.Models.Beta.Organization.RateLimits;
711 using Anthropic.Models.Organization.RateLimits;
712712 
713713 AnthropicClient client = new();
714714 
715 var rateLimits = await client.Beta.Organization.RateLimits.List(new()
715 var rateLimits = await client.Organization.RateLimits.List(new()
716716 {
717717 GroupType = GroupType.Batch
718718 });
from line 731
731731 ```go Go
732732 client := anthropic.NewClient()
733733 
734 rateLimits := client.Beta.Organization.RateLimits.ListAutoPaging(context.Background(), anthropic.BetaOrganizationRateLimitListParams{
735 GroupType: anthropic.BetaOrganizationRateLimitListParamsGroupTypeBatch,
734 rateLimits := client.Organization.RateLimits.ListAutoPaging(context.Background(), anthropic.OrganizationRateLimitListParams{
735 GroupType: anthropic.OrganizationRateLimitListParamsGroupTypeBatch,
736736 })
737737 
738738 for rateLimits.Next() {
from line 752
752752 ```
753753 
754754 ```java Java
755 import com.anthropic.models.beta.organization.ratelimits.RateLimitListParams;
755 import com.anthropic.models.organization.ratelimits.RateLimitListParams;
756756 
757757 void main() {
758758 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
from line 760
760760 var params = RateLimitListParams.builder()
761761 .groupType(RateLimitListParams.GroupType.BATCH)
762762 .build();
763 var rateLimits = client.beta().organization().rateLimits().list(params);
763 var rateLimits = client.organization().rateLimits().list(params);
764764 
765765 for (var entry : rateLimits.autoPager()) {
766766 var models = entry.models()
from line 775
775775 ```
776776 
777777 ```php PHP
778 use Anthropic\Beta\Organization\RateLimits\RateLimitListParams\GroupType;
778 use Anthropic\Organization\RateLimits\RateLimitListParams\GroupType;
779779 // ...
780780 
781781 $client = new Client();
782782 
783 $rateLimits = $client->beta->organization->rateLimits->list(
783 $rateLimits = $client->organization->rateLimits->list(
784784 groupType: GroupType::BATCH,
785785 );
786786 
from line 796
796796 ```ruby Ruby
797797 client = Anthropic::Client.new
798798 
799 rate_limits = client.beta.organization.rate_limits.list(group_type: :batch)
799 rate_limits = client.organization.rate_limits.list(group_type: :batch)
800800 
801801 rate_limits.data.each do |entry|
802802 models = entry.models ? " (#{entry.models.join(", ")})" : ""
from line 832
832832 
833833* [Rate limits](https://platform.claude.com/docs/en/api/rate-limits)
834834* [Admin API](https://platform.claude.com/docs/en/manage-claude/admin-api)
835* [Admin API reference](https://platform.claude.com/docs/en/api/beta/organization)
835* [Admin API reference](https://platform.claude.com/docs/en/api/organization)
836836* [Workspaces](https://platform.claude.com/docs/en/manage-claude/workspaces)
837837* [Usage and Cost API](https://platform.claude.com/docs/en/manage-claude/usage-cost-api)
838838 

manage-claude/wif-admin-api Changed · +107 / -112 lines

from line 69
6969 
7070All endpoints live under `https://api.anthropic.com/v1/organizations/`. Every request to the federation and service-account endpoints needs the API version header and the bearer token:
7171 
72In the SDKs these endpoints are `client.beta.organization.service_accounts`, `client.beta.organization.federation.issuers`, and `client.beta.organization.federation.rules` (`ant beta:organization:service-accounts`, `federation:issuers`, and `federation:rules` in the CLI). The SDK and CLI examples construct the default client, which sends the bearer token from `ANTHROPIC_AUTH_TOKEN`, or, in an automated workload, performs the federation exchange itself as described in [Bootstrap a workload to manage WIF](https://platform.claude.com/docs/en/manage-claude/wif-admin-api#bootstrap-a-workload-to-manage-wif). SDK list methods fetch further pages on demand, so `limit` sets the page size; the PHP and Ruby examples read one page.
72In the SDKs these endpoints are `client.organization.service_accounts` (typescript: `client.organization.serviceAccounts`; csharp, go: `client.Organization.ServiceAccounts`; java: `client.organization().serviceAccounts()`; php: `$client->organization->serviceAccounts`), `client.organization.federation.issuers` (csharp, go: `client.Organization.Federation.Issuers`; java: `client.organization().federation().issuers()`; php: `$client->organization->federation->issuers`), and `client.organization.federation.rules` (csharp, go: `client.Organization.Federation.Rules`; java: `client.organization().federation().rules()`; php: `$client->organization->federation->rules`) (`ant organization:service-accounts`, `federation:issuers`, and `federation:rules` in the CLI). The SDK and CLI examples construct the default client, which sends the bearer token from `ANTHROPIC_AUTH_TOKEN`, or, in an automated workload, performs the federation exchange itself as described in [Bootstrap a workload to manage WIF](https://platform.claude.com/docs/en/manage-claude/wif-admin-api#bootstrap-a-workload-to-manage-wif). SDK list methods fetch further pages on demand, so `limit` sets the page size; the PHP and Ruby examples read one page.
7373 
7474<CodeGroup>
7575 ```bash cURL
from line 79
7979 ```
8080 
8181 ```bash CLI
82 ant beta:organization:service-accounts list
82 ant organization:service-accounts list
8383 ```
8484 
8585 ```python Python
8686 client = anthropic.Anthropic()
8787 
88 service_accounts = client.beta.organization.service_accounts.list()
88 service_accounts = client.organization.service_accounts.list()
8989 
9090 for service_account in service_accounts:
9191 print(f"{service_account.id}: {service_account.name}")
from line 94
9494 ```typescript TypeScript
9595 const client = new Anthropic();
9696 
97 for await (const serviceAccount of client.beta.organization.serviceAccounts.list()) {
97 for await (const serviceAccount of client.organization.serviceAccounts.list()) {
9898 console.log(`${serviceAccount.id}: ${serviceAccount.name}`);
9999 }
100100 ```
from line 102
102102 ```csharp C#
103103 AnthropicClient client = new();
104104 
105 var page = await client.Beta.Organization.ServiceAccounts.List();
105 var page = await client.Organization.ServiceAccounts.List();
106106 
107107 await foreach (var serviceAccount in page.Paginate())
108108 {
from line 113
113113 ```go Go
114114 client := anthropic.NewClient()
115115 
116 serviceAccounts := client.Beta.Organization.ServiceAccounts.ListAutoPaging(context.Background(), anthropic.BetaOrganizationServiceAccountListParams{})
116 serviceAccounts := client.Organization.ServiceAccounts.ListAutoPaging(context.Background(), anthropic.OrganizationServiceAccountListParams{})
117117 
118118 for serviceAccounts.Next() {
119119 serviceAccount := serviceAccounts.Current()
from line 127
127127 ```java Java
128128 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
129129 
130 var serviceAccounts = client.beta().organization().serviceAccounts().list();
130 var serviceAccounts = client.organization().serviceAccounts().list();
131131 
132132 for (var serviceAccount : serviceAccounts.autoPager()) {
133133 IO.println(serviceAccount.id() + ": " + serviceAccount.name());
from line 137
137137 ```php PHP
138138 $client = new Client();
139139 
140 $serviceAccounts = $client->beta->organization->serviceAccounts->list();
140 $serviceAccounts = $client->organization->serviceAccounts->list();
141141 
142142 foreach ($serviceAccounts->getItems() as $serviceAccount) {
143143 echo "{$serviceAccount->id}: {$serviceAccount->name}\n";
from line 147
147147 ```ruby Ruby
148148 client = Anthropic::Client.new
149149 
150 service_accounts = client.beta.organization.service_accounts.list
150 service_accounts = client.organization.service_accounts.list
151151 
152152 service_accounts.data.each do |service_account|
153153 puts "#{service_account.id}: #{service_account.name}"
from line 176
176176 ```
177177 
178178 ```bash CLI
179 ant beta:organization:service-accounts create \
179 ant organization:service-accounts create \
180180 --name inference-worker \
181181 --organization-role developer
182182 ```
from line 184
184184 ```python Python
185185 client = anthropic.Anthropic()
186186 
187 service_account = client.beta.organization.service_accounts.create(
187 service_account = client.organization.service_accounts.create(
188188 name="inference-worker", organization_role="developer"
189189 )
190190 
from line 195
195195 ```typescript TypeScript
196196 const client = new Anthropic();
197197 
198 const serviceAccount = await client.beta.organization.serviceAccounts.create({
198 const serviceAccount = await client.organization.serviceAccounts.create({
199199 name: "inference-worker",
200200 organization_role: "developer"
201201 });
from line 205
205205 ```
206206 
207207 ```csharp C#
208 using Anthropic.Models.Beta.Organization.ServiceAccounts;
208 using Anthropic.Models.Organization.ServiceAccounts;
209209 
210210 AnthropicClient client = new();
211211 
212 var serviceAccount = await client.Beta.Organization.ServiceAccounts.Create(new()
212 var serviceAccount = await client.Organization.ServiceAccounts.Create(new()
213213 {
214214 Name = "inference-worker",
215215 OrganizationRole = OrganizationRole.Developer
from line 222
222222 ```go Go
223223 client := anthropic.NewClient()
224224 
225 serviceAccount, err := client.Beta.Organization.ServiceAccounts.New(context.Background(), anthropic.BetaOrganizationServiceAccountNewParams{
225 serviceAccount, err := client.Organization.ServiceAccounts.New(context.Background(), anthropic.OrganizationServiceAccountNewParams{
226226 Name: "inference-worker",
227 OrganizationRole: anthropic.BetaOrganizationServiceAccountNewParamsOrganizationRoleDeveloper,
227 OrganizationRole: anthropic.OrganizationServiceAccountNewParamsOrganizationRoleDeveloper,
228228 })
229229 if err != nil {
230230 log.Fatal(err)
from line 235
235235 ```
236236 
237237 ```java Java
238 import com.anthropic.models.beta.organization.serviceaccounts.ServiceAccountCreateParams;
238 import com.anthropic.models.organization.serviceaccounts.ServiceAccountCreateParams;
239239 
240240 void main() {
241241 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
from line 244
244244 .name("inference-worker")
245245 .organizationRole(ServiceAccountCreateParams.OrganizationRole.DEVELOPER)
246246 .build();
247 var serviceAccount = client.beta().organization().serviceAccounts().create(params);
247 var serviceAccount = client.organization().serviceAccounts().create(params);
248248 
249249 IO.println("id: " + serviceAccount.id());
250250 IO.println("name: " + serviceAccount.name());
from line 252
252252 ```
253253 
254254 ```php PHP
255 use Anthropic\Beta\Organization\ServiceAccounts\ServiceAccountCreateParams\OrganizationRole;
255 use Anthropic\Organization\ServiceAccounts\ServiceAccountCreateParams\OrganizationRole;
256256 // ...
257257 
258258 $client = new Client();
259259 
260 $serviceAccount = $client->beta->organization->serviceAccounts->create(
260 $serviceAccount = $client->organization->serviceAccounts->create(
261261 name: 'inference-worker',
262262 organizationRole: OrganizationRole::DEVELOPER,
263263 );
from line 269
269269 ```ruby Ruby
270270 client = Anthropic::Client.new
271271 
272 service_account = client.beta.organization.service_accounts.create(
272 service_account = client.organization.service_accounts.create(
273273 name: "inference-worker",
274274 organization_role: :developer
275275 )
from line 289
289289 ```
290290 
291291 ```bash CLI
292 ant beta:organization:service-accounts list --limit 20
292 ant organization:service-accounts list --limit 20
293293 ```
294294 
295295 ```python Python
296296 client = anthropic.Anthropic()
297297 
298 service_accounts = client.beta.organization.service_accounts.list(limit=20)
298 service_accounts = client.organization.service_accounts.list(limit=20)
299299 
300300 for service_account in service_accounts:
301301 print(f"{service_account.id}: {service_account.name}")
from line 304
304304 ```typescript TypeScript
305305 const client = new Anthropic();
306306 
307 for await (const serviceAccount of client.beta.organization.serviceAccounts.list({
307 for await (const serviceAccount of client.organization.serviceAccounts.list({
308308 limit: 20
309309 })) {
310310 console.log(`${serviceAccount.id}: ${serviceAccount.name}`);
from line 314
314314 ```csharp C#
315315 AnthropicClient client = new();
316316 
317 var page = await client.Beta.Organization.ServiceAccounts.List(new() { Limit = 20 });
317 var page = await client.Organization.ServiceAccounts.List(new() { Limit = 20 });
318318 
319319 await foreach (var serviceAccount in page.Paginate())
320320 {
from line 325
325325 ```go Go
326326 client := anthropic.NewClient()
327327 
328 serviceAccounts := client.Beta.Organization.ServiceAccounts.ListAutoPaging(context.Background(), anthropic.BetaOrganizationServiceAccountListParams{
328 serviceAccounts := client.Organization.ServiceAccounts.ListAutoPaging(context.Background(), anthropic.OrganizationServiceAccountListParams{
329329 Limit: anthropic.Int(20),
330330 })
331331 
from line 339
339339 ```
340340 
341341 ```java Java
342 import com.anthropic.models.beta.organization.serviceaccounts.ServiceAccountListParams;
342 import com.anthropic.models.organization.serviceaccounts.ServiceAccountListParams;
343343 
344344 void main() {
345345 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
from line 347
347347 var params = ServiceAccountListParams.builder()
348348 .limit(20)
349349 .build();
350 var serviceAccounts = client.beta().organization().serviceAccounts().list(params);
350 var serviceAccounts = client.organization().serviceAccounts().list(params);
351351 
352352 for (var serviceAccount : serviceAccounts.autoPager()) {
353353 IO.println(serviceAccount.id() + ": " + serviceAccount.name());
from line 358
358358 ```php PHP
359359 $client = new Client();
360360 
361 $serviceAccounts = $client->beta->organization->serviceAccounts->list(limit: 20);
361 $serviceAccounts = $client->organization->serviceAccounts->list(limit: 20);
362362 
363363 foreach ($serviceAccounts->getItems() as $serviceAccount) {
364364 echo "{$serviceAccount->id}: {$serviceAccount->name}\n";
from line 368
368368 ```ruby Ruby
369369 client = Anthropic::Client.new
370370 
371 service_accounts = client.beta.organization.service_accounts.list(limit: 20)
371 service_accounts = client.organization.service_accounts.list(limit: 20)
372372 
373373 service_accounts.data.each do |service_account|
374374 puts "#{service_account.id}: #{service_account.name}"
from line 386
386386 ```
387387 
388388 ```bash CLI
389 ant beta:organization:service-accounts archive svac_01ABCDEFabcdef0123456789XY
389 ant organization:service-accounts archive svac_01ABCDEFabcdef0123456789XY
390390 ```
391391 
392392 ```python Python
393393 client = anthropic.Anthropic()
394394 
395 service_account = client.beta.organization.service_accounts.archive(
395 service_account = client.organization.service_accounts.archive(
396396 "svac_01ABCDEFabcdef0123456789XY"
397397 )
398398 
from line 403
403403 ```typescript TypeScript
404404 const client = new Anthropic();
405405 
406 const serviceAccount = await client.beta.organization.serviceAccounts.archive(
406 const serviceAccount = await client.organization.serviceAccounts.archive(
407407 "svac_01ABCDEFabcdef0123456789XY"
408408 );
409409 
from line 414
414414 ```csharp C#
415415 AnthropicClient client = new();
416416 
417 var serviceAccount = await client.Beta.Organization.ServiceAccounts.Archive(
417 var serviceAccount = await client.Organization.ServiceAccounts.Archive(
418418 "svac_01ABCDEFabcdef0123456789XY"
419419 );
420420 
from line 425
425425 ```go Go
426426 client := anthropic.NewClient()
427427 
428 serviceAccount, err := client.Beta.Organization.ServiceAccounts.Archive(
428 serviceAccount, err := client.Organization.ServiceAccounts.Archive(
429429 context.Background(),
430430 "svac_01ABCDEFabcdef0123456789XY",
431 anthropic.BetaOrganizationServiceAccountArchiveParams{},
432431 )
433432 if err != nil {
434433 log.Fatal(err)
from line 440
441440 ```java Java
442441 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
443442 
444 var serviceAccount = client.beta().organization().serviceAccounts()
443 var serviceAccount = client.organization().serviceAccounts()
445444 .archive("svac_01ABCDEFabcdef0123456789XY");
446445 
447446 IO.println("id: " + serviceAccount.id());
from line 450
451450 ```php PHP
452451 $client = new Client();
453452 
454 $serviceAccount = $client->beta->organization->serviceAccounts->archive(
453 $serviceAccount = $client->organization->serviceAccounts->archive(
455454 serviceAccountID: 'svac_01ABCDEFabcdef0123456789XY',
456455 );
457456 
from line 462
463462 client = Anthropic::Client.new
464463 
465464 service_account_id = "svac_01ABCDEFabcdef0123456789XY"
466 service_account = client.beta.organization.service_accounts.archive(service_account_id)
465 service_account = client.organization.service_accounts.archive(service_account_id)
467466 
468467 puts "id: #{service_account.id}"
469468 puts "archived_at: #{service_account.archived_at}"
from line 484
485484 
486485To read or update a single service account, use `GET` and `POST` on `/v1/organizations/service_accounts/{service_account_id}`. A service account must be a member of a workspace before federated tokens can act in it. Every service account has an implicit membership in your organization's default workspace; add explicit memberships for other workspaces with `GET`, `POST`, and `DELETE` on `/v1/organizations/service_accounts/{service_account_id}/workspaces`, where `DELETE` targets `.../workspaces/{workspace_id}`.
487486 
488For complete parameter details and response schemas, see the [Service accounts API reference](https://platform.claude.com/docs/en/api/beta/organization/service_accounts).
487For complete parameter details and response schemas, see the [Service accounts API reference](https://platform.claude.com/docs/en/api/organization/service_accounts).
489488 
490489## Federation issuers
491490 
from line 512
513512 ```
514513 
515514 ```bash CLI
516 ant beta:organization:federation:issuers create \
515 ant organization:federation:issuers create \
517516 --name github-actions \
518517 --issuer-url https://token.actions.githubusercontent.com \
519518 --jwks '{type: discovery}'
from line 521
522521 ```python Python
523522 client = anthropic.Anthropic()
524523 
525 issuer = client.beta.organization.federation.issuers.create(
524 issuer = client.organization.federation.issuers.create(
526525 name="github-actions",
527526 issuer_url="https://token.actions.githubusercontent.com",
528527 jwks={"type": "discovery"},
from line 535
536535 ```typescript TypeScript
537536 const client = new Anthropic();
538537 
539 const issuer = await client.beta.organization.federation.issuers.create({
538 const issuer = await client.organization.federation.issuers.create({
540539 name: "github-actions",
541540 issuer_url: "https://token.actions.githubusercontent.com",
542541 jwks: { type: "discovery" }
from line 547
548547 ```
549548 
550549 ```csharp C#
551 using Anthropic.Models.Beta.Organization.Federation.Issuers;
550 using Anthropic.Models.Organization.Federation.Issuers;
552551 
553552 AnthropicClient client = new();
554553 
555 var issuer = await client.Beta.Organization.Federation.Issuers.Create(new()
554 var issuer = await client.Organization.Federation.Issuers.Create(new()
556555 {
557556 Name = "github-actions",
558557 IssuerUrl = "https://token.actions.githubusercontent.com",
559 Jwks = new BetaJwksDiscovery()
558 Jwks = new JwksDiscovery()
560559 });
561560 
562561 Console.WriteLine($"id: {issuer.ID}");
from line 566
567566 ```go Go
568567 client := anthropic.NewClient()
569568 
570 issuer, err := client.Beta.Organization.Federation.Issuers.New(context.Background(), anthropic.BetaOrganizationFederationIssuerNewParams{
569 issuer, err := client.Organization.Federation.Issuers.New(context.Background(), anthropic.OrganizationFederationIssuerNewParams{
571570 Name: "github-actions",
572571 IssuerURL: "https://token.actions.githubusercontent.com",
573 JWKS: anthropic.BetaOrganizationFederationIssuerNewParamsJWKSUnion{
574 OfDiscovery: &anthropic.BetaJWKSDiscoveryParam{},
572 JWKS: anthropic.OrganizationFederationIssuerNewParamsJWKSUnion{
573 OfDiscovery: &anthropic.JWKSDiscoveryParam{},
575574 },
576575 })
577576 if err != nil {
from line 583
584583 ```
585584 
586585 ```java Java
587 import com.anthropic.models.beta.organization.federation.issuers.BetaJwksDiscovery;
588 import com.anthropic.models.beta.organization.federation.issuers.IssuerCreateParams;
586 import com.anthropic.models.organization.federation.issuers.JwksDiscovery;
587 import com.anthropic.models.organization.federation.issuers.IssuerCreateParams;
589588 
590589 void main() {
591590 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
from line 592
593592 var params = IssuerCreateParams.builder()
594593 .name("github-actions")
595594 .issuerUrl("https://token.actions.githubusercontent.com")
596 .jwks(BetaJwksDiscovery.builder().build())
595 .jwks(JwksDiscovery.builder().build())
597596 .build();
598 var issuer = client.beta().organization().federation().issuers().create(params);
597 var issuer = client.organization().federation().issuers().create(params);
599598 
600599 IO.println("id: " + issuer.id());
601600 IO.println("name: " + issuer.name());
from line 605
606605 ```php PHP
607606 $client = new Client();
608607 
609 $issuer = $client->beta->organization->federation->issuers->create(
608 $issuer = $client->organization->federation->issuers->create(
610609 name: 'github-actions',
611610 issuerURL: 'https://token.actions.githubusercontent.com',
612611 jwks: ['type' => 'discovery'],
from line 619
620619 ```ruby Ruby
621620 client = Anthropic::Client.new
622621 
623 issuer = client.beta.organization.federation.issuers.create(
622 issuer = client.organization.federation.issuers.create(
624623 name: "github-actions",
625624 issuer_url: "https://token.actions.githubusercontent.com",
626625 jwks: {type: :discovery}
from line 641
642641 ```
643642 
644643 ```bash CLI
645 ant beta:organization:federation:issuers list --limit 20
644 ant organization:federation:issuers list --limit 20
646645 ```
647646 
648647 ```python Python
649648 client = anthropic.Anthropic()
650649 
651 issuers = client.beta.organization.federation.issuers.list(limit=20)
650 issuers = client.organization.federation.issuers.list(limit=20)
652651 
653652 for issuer in issuers:
654653 print(f"{issuer.id}: {issuer.name}")
from line 656
657656 ```typescript TypeScript
658657 const client = new Anthropic();
659658 
660 for await (const issuer of client.beta.organization.federation.issuers.list({ limit: 20 })) {
659 for await (const issuer of client.organization.federation.issuers.list({ limit: 20 })) {
661660 console.log(`${issuer.id}: ${issuer.name}`);
662661 }
663662 ```
from line 664
665664 ```csharp C#
666665 AnthropicClient client = new();
667666 
668 var page = await client.Beta.Organization.Federation.Issuers.List(new() { Limit = 20 });
667 var page = await client.Organization.Federation.Issuers.List(new() { Limit = 20 });
669668 
670669 await foreach (var issuer in page.Paginate())
671670 {
from line 675
676675 ```go Go
677676 client := anthropic.NewClient()
678677 
679 issuers := client.Beta.Organization.Federation.Issuers.ListAutoPaging(context.Background(), anthropic.BetaOrganizationFederationIssuerListParams{
678 issuers := client.Organization.Federation.Issuers.ListAutoPaging(context.Background(), anthropic.OrganizationFederationIssuerListParams{
680679 Limit: anthropic.Int(20),
681680 })
682681 
from line 689
690689 ```
691690 
692691 ```java Java
693 import com.anthropic.models.beta.organization.federation.issuers.IssuerListParams;
692 import com.anthropic.models.organization.federation.issuers.IssuerListParams;
694693 
695694 void main() {
696695 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
from line 697
698697 var params = IssuerListParams.builder()
699698 .limit(20)
700699 .build();
701 var issuers = client.beta().organization().federation().issuers().list(params);
700 var issuers = client.organization().federation().issuers().list(params);
702701 
703702 for (var issuer : issuers.autoPager()) {
704703 IO.println(issuer.id() + ": " + issuer.name());
from line 708
709708 ```php PHP
710709 $client = new Client();
711710 
712 $issuers = $client->beta->organization->federation->issuers->list(limit: 20);
711 $issuers = $client->organization->federation->issuers->list(limit: 20);
713712 
714713 foreach ($issuers->getItems() as $issuer) {
715714 echo "{$issuer->id}: {$issuer->name}\n";
from line 718
719718 ```ruby Ruby
720719 client = Anthropic::Client.new
721720 
722 issuers = client.beta.organization.federation.issuers.list(limit: 20)
721 issuers = client.organization.federation.issuers.list(limit: 20)
723722 
724723 issuers.data.each do |issuer|
725724 puts "#{issuer.id}: #{issuer.name}"
from line 736
737736 ```
738737 
739738 ```bash CLI
740 ant beta:organization:federation:issuers archive \
739 ant organization:federation:issuers archive \
741740 --federation-issuer-id fdis_01ABCDEFabcdef0123456789XY
742741 ```
743742 
from line 743
744743 ```python Python
745744 client = anthropic.Anthropic()
746745 
747 issuer = client.beta.organization.federation.issuers.archive(
746 issuer = client.organization.federation.issuers.archive(
748747 "fdis_01ABCDEFabcdef0123456789XY"
749748 )
750749 
from line 754
755754 ```typescript TypeScript
756755 const client = new Anthropic();
757756 
758 const issuer = await client.beta.organization.federation.issuers.archive(
757 const issuer = await client.organization.federation.issuers.archive(
759758 "fdis_01ABCDEFabcdef0123456789XY"
760759 );
761760 
from line 765
766765 ```csharp C#
767766 AnthropicClient client = new();
768767 
769 var issuer = await client.Beta.Organization.Federation.Issuers.Archive(
768 var issuer = await client.Organization.Federation.Issuers.Archive(
770769 "fdis_01ABCDEFabcdef0123456789XY"
771770 );
772771 
from line 776
777776 ```go Go
778777 client := anthropic.NewClient()
779778 
780 issuer, err := client.Beta.Organization.Federation.Issuers.Archive(
779 issuer, err := client.Organization.Federation.Issuers.Archive(
781780 context.Background(),
782781 "fdis_01ABCDEFabcdef0123456789XY",
783 anthropic.BetaOrganizationFederationIssuerArchiveParams{},
784782 )
785783 if err != nil {
786784 log.Fatal(err)
from line 791
793791 ```java Java
794792 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
795793 
796 var issuer = client.beta().organization().federation().issuers()
794 var issuer = client.organization().federation().issuers()
797795 .archive("fdis_01ABCDEFabcdef0123456789XY");
798796 
799797 IO.println("id: " + issuer.id());
from line 801
803801 ```php PHP
804802 $client = new Client();
805803 
806 $issuer = $client->beta->organization->federation->issuers->archive(
804 $issuer = $client->organization->federation->issuers->archive(
807805 federationIssuerID: 'fdis_01ABCDEFabcdef0123456789XY',
808806 );
809807 
from line 813
815813 client = Anthropic::Client.new
816814 
817815 issuer_id = "fdis_01ABCDEFabcdef0123456789XY"
818 issuer = client.beta.organization.federation.issuers.archive(issuer_id)
816 issuer = client.organization.federation.issuers.archive(issuer_id)
819817 
820818 puts "id: #{issuer.id}"
821819 puts "archived_at: #{issuer.archived_at}"
from line 822
824822 
825823To read or update a single issuer, use `GET` and `POST` on `/v1/organizations/federation_issuers/{issuer_id}`. An OAuth caller cannot update an issuer that backs a rule whose `oauth_scope` is anything other than `workspace:developer` or `workspace:inference`; see [Permissions and constraints](https://platform.claude.com/docs/en/manage-claude/wif-admin-api#permissions-and-constraints).
826824 
827For complete parameter details and response schemas, see the [Federation issuers API reference](https://platform.claude.com/docs/en/api/beta/organization/federation/issuers).
825For complete parameter details and response schemas, see the [Federation issuers API reference](https://platform.claude.com/docs/en/api/organization/federation/issuers).
828826 
829827## Federation rules
830828 
from line 854
856854 ```
857855 
858856 ```bash CLI
859 ant beta:organization:federation:rules create <<'YAML'
857 ant organization:federation:rules create <<'YAML'
860858 name: gha-deploy
861859 issuer_id: fdis_01ABCDEFabcdef0123456789XY
862860 match:
from line 873
875873 ```python Python
876874 client = anthropic.Anthropic()
877875 
878 rule = client.beta.organization.federation.rules.create(
876 rule = client.organization.federation.rules.create(
879877 name="gha-deploy",
880878 issuer_id="fdis_01ABCDEFabcdef0123456789XY",
881879 match={
from line 896
898896 ```typescript TypeScript
899897 const client = new Anthropic();
900898 
901 const rule = await client.beta.organization.federation.rules.create({
899 const rule = await client.organization.federation.rules.create({
902900 name: "gha-deploy",
903901 issuer_id: "fdis_01ABCDEFabcdef0123456789XY",
904902 match: {
from line 919
921919 ```csharp C#
922920 AnthropicClient client = new();
923921 
924 var rule = await client.Beta.Organization.Federation.Rules.Create(new()
922 var rule = await client.Organization.Federation.Rules.Create(new()
925923 {
926924 Name = "gha-deploy",
927925 IssuerID = "fdis_01ABCDEFabcdef0123456789XY",
from line 941
943941 ```go Go
944942 client := anthropic.NewClient()
945943 
946 rule, err := client.Beta.Organization.Federation.Rules.New(context.Background(), anthropic.BetaOrganizationFederationRuleNewParams{
944 rule, err := client.Organization.Federation.Rules.New(context.Background(), anthropic.OrganizationFederationRuleNewParams{
947945 Name: "gha-deploy",
948946 IssuerID: "fdis_01ABCDEFabcdef0123456789XY",
949 Match: anthropic.BetaFederationRuleMatchParam{
947 Match: anthropic.FederationRuleMatchParam{
950948 SubjectPrefix: anthropic.String("repo:my-org/my-repo:ref:refs/heads/main"),
951949 Claims: map[string]string{"repository_owner": "my-org"},
952950 },
953 Target: anthropic.BetaServiceAccountTargetParam{
951 Target: anthropic.ServiceAccountTargetParam{
954952 ServiceAccountID: "svac_01ABCDEFabcdef0123456789XY",
955953 },
956954 WorkspaceID: anthropic.String("wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"),
from line 965
967965 
968966 ```java Java
969967 import com.anthropic.core.JsonValue;
970 import com.anthropic.models.beta.organization.federation.rules.BetaFederationRuleMatch;
971 import com.anthropic.models.beta.organization.federation.rules.BetaServiceAccountTarget;
972 import com.anthropic.models.beta.organization.federation.rules.RuleCreateParams;
968 import com.anthropic.models.organization.federation.rules.FederationRuleMatch;
969 import com.anthropic.models.organization.federation.rules.ServiceAccountTarget;
970 import com.anthropic.models.organization.federation.rules.RuleCreateParams;
973971 
974972 void main() {
975973 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
976974 
977 var match = BetaFederationRuleMatch.builder()
975 var match = FederationRuleMatch.builder()
978976 .subjectPrefix("repo:my-org/my-repo:ref:refs/heads/main")
979 .claims(BetaFederationRuleMatch.Claims.builder()
977 .claims(FederationRuleMatch.Claims.builder()
980978 .putAdditionalProperty("repository_owner", JsonValue.from("my-org"))
981979 .build())
982980 .build();
from line 982
984982 .name("gha-deploy")
985983 .issuerId("fdis_01ABCDEFabcdef0123456789XY")
986984 .match(match)
987 .target(BetaServiceAccountTarget.of("svac_01ABCDEFabcdef0123456789XY"))
985 .target(ServiceAccountTarget.of("svac_01ABCDEFabcdef0123456789XY"))
988986 .workspaceId("wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ")
989987 .oauthScope("workspace:developer")
990988 .tokenLifetimeSeconds(600)
991989 .build();
992 var rule = client.beta().organization().federation().rules().create(params);
990 var rule = client.organization().federation().rules().create(params);
993991 
994992 IO.println("id: " + rule.id());
995993 IO.println("name: " + rule.name());
from line 997
999997 ```php PHP
1000998 $client = new Client();
1001999 
1002 $rule = $client->beta->organization->federation->rules->create(
1000 $rule = $client->organization->federation->rules->create(
10031001 name: 'gha-deploy',
10041002 issuerID: 'fdis_01ABCDEFabcdef0123456789XY',
10051003 match: [
from line 1020
10221020 ```ruby Ruby
10231021 client = Anthropic::Client.new
10241022 
1025 rule = client.beta.organization.federation.rules.create(
1023 rule = client.organization.federation.rules.create(
10261024 name: "gha-deploy",
10271025 issuer_id: "fdis_01ABCDEFabcdef0123456789XY",
10281026 match: {
from line 1051
10531051 ```
10541052 
10551053 ```bash CLI
1056 ant beta:organization:federation:rules list \
1054 ant organization:federation:rules list \
10571055 --issuer-id fdis_01ABCDEFabcdef0123456789XY
10581056 ```
10591057 
from line 1058
10601058 ```python Python
10611059 client = anthropic.Anthropic()
10621060 
1063 rules = client.beta.organization.federation.rules.list(
1061 rules = client.organization.federation.rules.list(
10641062 issuer_id="fdis_01ABCDEFabcdef0123456789XY"
10651063 )
10661064 
from line 1069
10711069 ```typescript TypeScript
10721070 const client = new Anthropic();
10731071 
1074 for await (const rule of client.beta.organization.federation.rules.list({
1072 for await (const rule of client.organization.federation.rules.list({
10751073 issuer_id: "fdis_01ABCDEFabcdef0123456789XY"
10761074 })) {
10771075 console.log(`${rule.id}: ${rule.name}`);
from line 1079
10811079 ```csharp C#
10821080 AnthropicClient client = new();
10831081 
1084 var page = await client.Beta.Organization.Federation.Rules.List(new()
1082 var page = await client.Organization.Federation.Rules.List(new()
10851083 {
10861084 IssuerID = "fdis_01ABCDEFabcdef0123456789XY"
10871085 });
from line 1093
10951093 ```go Go
10961094 client := anthropic.NewClient()
10971095 
1098 rules := client.Beta.Organization.Federation.Rules.ListAutoPaging(context.Background(), anthropic.BetaOrganizationFederationRuleListParams{
1096 rules := client.Organization.Federation.Rules.ListAutoPaging(context.Background(), anthropic.OrganizationFederationRuleListParams{
10991097 IssuerID: anthropic.String("fdis_01ABCDEFabcdef0123456789XY"),
11001098 })
11011099 
from line 1107
11091107 ```
11101108 
11111109 ```java Java
1112 import com.anthropic.models.beta.organization.federation.rules.RuleListParams;
1110 import com.anthropic.models.organization.federation.rules.RuleListParams;
11131111 
11141112 void main() {
11151113 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
from line 1115
11171115 var params = RuleListParams.builder()
11181116 .issuerId("fdis_01ABCDEFabcdef0123456789XY")
11191117 .build();
1120 var rules = client.beta().organization().federation().rules().list(params);
1118 var rules = client.organization().federation().rules().list(params);
11211119 
11221120 for (var rule : rules.autoPager()) {
11231121 IO.println(rule.id() + ": " + rule.name());
from line 1126
11281126 ```php PHP
11291127 $client = new Client();
11301128 
1131 $rules = $client->beta->organization->federation->rules->list(
1129 $rules = $client->organization->federation->rules->list(
11321130 issuerID: 'fdis_01ABCDEFabcdef0123456789XY',
11331131 );
11341132 
from line 1138
11401138 ```ruby Ruby
11411139 client = Anthropic::Client.new
11421140 
1143 rules = client.beta.organization.federation.rules.list(
1141 rules = client.organization.federation.rules.list(
11441142 issuer_id: "fdis_01ABCDEFabcdef0123456789XY"
11451143 )
11461144 
from line 1158
11601158 ```
11611159 
11621160 ```bash CLI
1163 ant beta:organization:federation:rules archive \
1161 ant organization:federation:rules archive \
11641162 --federation-rule-id fdrl_01ABCDEFabcdef0123456789XY
11651163 ```
11661164 
from line 1165
11671165 ```python Python
11681166 client = anthropic.Anthropic()
11691167 
1170 rule = client.beta.organization.federation.rules.archive(
1171 "fdrl_01ABCDEFabcdef0123456789XY"
1172 )
1168 rule = client.organization.federation.rules.archive("fdrl_01ABCDEFabcdef0123456789XY")
11731169 
11741170 print(f"id: {rule.id}")
11751171 print(f"archived_at: {rule.archived_at}")
from line 1174
11781174 ```typescript TypeScript
11791175 const client = new Anthropic();
11801176 
1181 const rule = await client.beta.organization.federation.rules.archive(
1177 const rule = await client.organization.federation.rules.archive(
11821178 "fdrl_01ABCDEFabcdef0123456789XY"
11831179 );
11841180 
from line 1185
11891185 ```csharp C#
11901186 AnthropicClient client = new();
11911187 
1192 var rule = await client.Beta.Organization.Federation.Rules.Archive(
1188 var rule = await client.Organization.Federation.Rules.Archive(
11931189 "fdrl_01ABCDEFabcdef0123456789XY"
11941190 );
11951191 
from line 1196
12001196 ```go Go
12011197 client := anthropic.NewClient()
12021198 
1203 rule, err := client.Beta.Organization.Federation.Rules.Archive(
1199 rule, err := client.Organization.Federation.Rules.Archive(
12041200 context.Background(),
12051201 "fdrl_01ABCDEFabcdef0123456789XY",
1206 anthropic.BetaOrganizationFederationRuleArchiveParams{},
12071202 )
12081203 if err != nil {
12091204 log.Fatal(err)
from line 1211
12161211 ```java Java
12171212 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
12181213 
1219 var rule = client.beta().organization().federation().rules()
1214 var rule = client.organization().federation().rules()
12201215 .archive("fdrl_01ABCDEFabcdef0123456789XY");
12211216 
12221217 IO.println("id: " + rule.id());
from line 1221
12261221 ```php PHP
12271222 $client = new Client();
12281223 
1229 $rule = $client->beta->organization->federation->rules->archive(
1224 $rule = $client->organization->federation->rules->archive(
12301225 federationRuleID: 'fdrl_01ABCDEFabcdef0123456789XY',
12311226 );
12321227 
from line 1233
12381233 client = Anthropic::Client.new
12391234 
12401235 rule_id = "fdrl_01ABCDEFabcdef0123456789XY"
1241 rule = client.beta.organization.federation.rules.archive(rule_id)
1236 rule = client.organization.federation.rules.archive(rule_id)
12421237 
12431238 puts "id: #{rule.id}"
12441239 puts "archived_at: #{rule.archived_at}"
from line 1251
12561251 
12571252To read or update a single rule, use `GET` and `POST` on `/v1/organizations/federation_rules/{rule_id}`. To manage the workspaces a rule can mint tokens in, use `GET` and `POST` on `/v1/organizations/federation_rules/{rule_id}/workspaces`, and `DELETE` on `/v1/organizations/federation_rules/{rule_id}/workspaces/{workspace_id}`.
12581253 
1259For complete parameter details and response schemas, see the [Federation rules API reference](https://platform.claude.com/docs/en/api/beta/organization/federation/rules).
1254For complete parameter details and response schemas, see the [Federation rules API reference](https://platform.claude.com/docs/en/api/organization/federation/rules).
12601255 
12611256## Permissions and constraints
12621257 
from line 1274
12791274* [Workload Identity Federation](https://platform.claude.com/docs/en/manage-claude/workload-identity-federation): concepts and the Console setup walkthrough
12801275* [WIF reference](https://platform.claude.com/docs/en/manage-claude/wif-reference): environment variables, validation rules, OAuth scopes, and error codes
12811276* [Admin API](https://platform.claude.com/docs/en/manage-claude/admin-api): the rest of the organization management surface
1282* [Admin API reference](https://platform.claude.com/docs/en/api/beta/organization): generated request and response schemas for every Admin API endpoint
1277* [Admin API reference](https://platform.claude.com/docs/en/api/organization): generated request and response schemas for the service account and federation endpoints
12831278 

manage-claude/workspaces Changed · +76 / -78 lines

from line 14
1414 
1515* **Workspace identifiers** use the `wrkspc_` prefix (for example, `wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ`)
1616* **Maximum 100 workspaces** per organization by default (archived workspaces don't count); contact your account team if you need more
17* **Default Workspace** has a `wrkspc_` ID like any other workspace (returned in the [`anthropic-workspace-id` response header](https://platform.claude.com/docs/en/manage-claude/workspaces#identify-the-workspace-behind-an-api-response) and accepted by [Get Workspace](https://platform.claude.com/docs/en/api/beta/organization/workspaces/retrieve)), but it appears in [List Workspaces](https://platform.claude.com/docs/en/api/beta/organization/workspaces/list) results only when you pass `include_default=true`, and API keys, usage reports, and cost reports show `null` for its `workspace_id`, as do all-workspaces API keys (an API key's `scope` field tells them apart; for a key bound to the Default Workspace it carries the real ID)
17* **Default Workspace** has a `wrkspc_` ID like any other workspace (returned in the [`anthropic-workspace-id` response header](https://platform.claude.com/docs/en/manage-claude/workspaces#identify-the-workspace-behind-an-api-response) and accepted by [Get Workspace](https://platform.claude.com/docs/en/api/organization/workspaces/retrieve)), but it appears in [List Workspaces](https://platform.claude.com/docs/en/api/organization/workspaces/list) results only when you pass `include_default=true`, and API keys, usage reports, and cost reports show `null` for its `workspace_id`, as do all-workspaces API keys (an API key's `scope` field tells them apart; for a key bound to the Default Workspace it carries the real ID)
1818* **API keys** can be scoped to a single workspace. In this case, they can only access resources within that workspace. Some API keys can be granted permissions across multiple workspaces, and provide a [workspace ID header](https://platform.claude.com/docs/en/manage-claude/authentication#select-a-workspace) to access resources within that workspace
1919 
2020### Claude Code workspace
from line 141
141141 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. Workspace keys don't work there. See [Authentication](https://platform.claude.com/docs/en/manage-claude/admin-api#authentication).
142142</Note>
143143 
144The following SDK and CLI examples construct the default client, which reads the Admin API key from the `ANTHROPIC_API_KEY` environment variable; the SDKs expose these endpoints under `client.beta.organization.workspaces`. SDK list methods fetch further pages on demand, so `limit` sets the page size; the PHP, Ruby, and curl examples return one page.
144The following SDK and CLI examples construct the default client, which reads the Admin API key from the `ANTHROPIC_API_KEY` environment variable; the SDKs expose these endpoints under `client.organization.workspaces` (csharp, go: `client.Organization.Workspaces`; java: `client.organization().workspaces()`; php: `$client->organization->workspaces`). SDK list methods fetch further pages on demand, so `limit` sets the page size; the PHP, Ruby, and curl examples return one page.
145145 
146146Create a workspace:
147147 
from line 155
155155 ```
156156 
157157 ```bash CLI
158 ant beta:organization:workspaces create --name Production
158 ant organization:workspaces create --name Production
159159 ```
160160 
161161 ```python Python
162162 client = anthropic.Anthropic()
163163 
164 workspace = client.beta.organization.workspaces.create(name="Production")
164 workspace = client.organization.workspaces.create(name="Production")
165165 
166166 print(f"id: {workspace.id}")
167167 print(f"name: {workspace.name}")
from line 170
170170 ```typescript TypeScript
171171 const client = new Anthropic();
172172 
173 const workspace = await client.beta.organization.workspaces.create({ name: "Production" });
173 const workspace = await client.organization.workspaces.create({ name: "Production" });
174174 
175175 console.log(`id: ${workspace.id}`);
176176 console.log(`name: ${workspace.name}`);
from line 179
179179 ```csharp C#
180180 AnthropicClient client = new();
181181 
182 var workspace = await client.Beta.Organization.Workspaces.Create(new()
182 var workspace = await client.Organization.Workspaces.Create(new()
183183 {
184184 Name = "Production"
185185 });
from line 191
191191 ```go Go
192192 client := anthropic.NewClient()
193193 
194 workspace, err := client.Beta.Organization.Workspaces.New(context.Background(), anthropic.BetaOrganizationWorkspaceNewParams{
194 workspace, err := client.Organization.Workspaces.New(context.Background(), anthropic.OrganizationWorkspaceNewParams{
195195 Name: "Production",
196196 })
197197 if err != nil {
from line 203
203203 ```
204204 
205205 ```java Java
206 import com.anthropic.models.beta.organization.workspaces.WorkspaceCreateParams;
206 import com.anthropic.models.organization.workspaces.WorkspaceCreateParams;
207207 
208208 void main() {
209209 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
from line 211
211211 var params = WorkspaceCreateParams.builder()
212212 .name("Production")
213213 .build();
214 var workspace = client.beta().organization().workspaces().create(params);
214 var workspace = client.organization().workspaces().create(params);
215215 
216216 IO.println("id: " + workspace.id());
217217 IO.println("name: " + workspace.name());
from line 221
221221 ```php PHP
222222 $client = new Client();
223223 
224 $workspace = $client->beta->organization->workspaces->create(
224 $workspace = $client->organization->workspaces->create(
225225 name: 'Production',
226226 );
227227 
from line 232
232232 ```ruby Ruby
233233 client = Anthropic::Client.new
234234 
235 workspace = client.beta.organization.workspaces.create(name: "Production")
235 workspace = client.organization.workspaces.create(name: "Production")
236236 
237237 puts "id: #{workspace.id}"
238238 puts "name: #{workspace.name}"
from line 249
249249 ```
250250 
251251 ```bash CLI
252 ant beta:organization:workspaces list --limit 10 --include-archived=false
252 ant organization:workspaces list --limit 10 --include-archived=false
253253 ```
254254 
255255 ```python Python
256256 client = anthropic.Anthropic()
257257 
258 workspaces = client.beta.organization.workspaces.list(limit=10, include_archived=False)
258 workspaces = client.organization.workspaces.list(limit=10, include_archived=False)
259259 
260260 for workspace in workspaces:
261261 print(f"{workspace.id}: {workspace.name}")
from line 264
264264 ```typescript TypeScript
265265 const client = new Anthropic();
266266 
267 const workspaces = await client.beta.organization.workspaces.list({
267 const workspaces = await client.organization.workspaces.list({
268268 limit: 10,
269269 include_archived: false
270270 });
from line 277
277277 ```csharp C#
278278 AnthropicClient client = new();
279279 
280 var workspaces = await client.Beta.Organization.Workspaces.List(new()
280 var workspaces = await client.Organization.Workspaces.List(new()
281281 {
282282 Limit = 10,
283283 IncludeArchived = false
from line 292
292292 ```go Go
293293 client := anthropic.NewClient()
294294 
295 workspaces := client.Beta.Organization.Workspaces.ListAutoPaging(context.Background(), anthropic.BetaOrganizationWorkspaceListParams{
295 workspaces := client.Organization.Workspaces.ListAutoPaging(context.Background(), anthropic.OrganizationWorkspaceListParams{
296296 Limit: anthropic.Int(10),
297297 IncludeArchived: anthropic.Bool(false),
298298 })
from line 307
307307 ```
308308 
309309 ```java Java
310 import com.anthropic.models.beta.organization.workspaces.WorkspaceListParams;
310 import com.anthropic.models.organization.workspaces.WorkspaceListParams;
311311 
312312 void main() {
313313 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
from line 316
316316 .limit(10)
317317 .includeArchived(false)
318318 .build();
319 var workspaces = client.beta().organization().workspaces().list(params);
319 var workspaces = client.organization().workspaces().list(params);
320320 
321321 for (var workspace : workspaces.autoPager()) {
322322 IO.println(workspace.id() + ": " + workspace.name());
from line 327
327327 ```php PHP
328328 $client = new Client();
329329 
330 $workspaces = $client->beta->organization->workspaces->list(
330 $workspaces = $client->organization->workspaces->list(
331331 limit: 10,
332332 includeArchived: false,
333333 );
from line 340
340340 ```ruby Ruby
341341 client = Anthropic::Client.new
342342 
343 workspaces = client.beta.organization.workspaces.list(limit: 10, include_archived: false)
343 workspaces = client.organization.workspaces.list(limit: 10, include_archived: false)
344344 
345345 workspaces.data.each do |workspace|
346346 puts "#{workspace.id}: #{workspace.name}"
from line 358
358358 ```
359359 
360360 ```bash CLI
361 ant beta:organization:workspaces archive --workspace-id wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ
361 ant organization:workspaces archive --workspace-id wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ
362362 ```
363363 
364364 ```python Python
365365 client = anthropic.Anthropic()
366366 
367 workspace = client.beta.organization.workspaces.archive(
368 "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
369 )
367 workspace = client.organization.workspaces.archive("wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ")
370368 
371369 print(f"id: {workspace.id}")
372370 print(f"archived_at: {workspace.archived_at}")
from line 373
375373 ```typescript TypeScript
376374 const client = new Anthropic();
377375 
378 const workspace = await client.beta.organization.workspaces.archive(
376 const workspace = await client.organization.workspaces.archive(
379377 "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
380378 );
381379 
from line 384
386384 ```csharp C#
387385 AnthropicClient client = new();
388386 
389 var workspace = await client.Beta.Organization.Workspaces.Archive(
387 var workspace = await client.Organization.Workspaces.Archive(
390388 "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
391389 );
392390 
from line 395
397395 ```go Go
398396 client := anthropic.NewClient()
399397 
400 workspace, err := client.Beta.Organization.Workspaces.Archive(context.Background(), "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ")
398 workspace, err := client.Organization.Workspaces.Archive(context.Background(), "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ")
401399 if err != nil {
402400 log.Fatal(err)
403401 }
from line 407
409407 ```java Java
410408 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
411409 
412 var workspace = client.beta().organization().workspaces()
410 var workspace = client.organization().workspaces()
413411 .archive("wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ");
414412 
415413 IO.println("id: " + workspace.id());
from line 417
419417 ```php PHP
420418 $client = new Client();
421419 
422 $workspace = $client->beta->organization->workspaces->archive(
420 $workspace = $client->organization->workspaces->archive(
423421 workspaceID: 'wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ',
424422 );
425423 
from line 429
431429 client = Anthropic::Client.new
432430 
433431 workspace_id = "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
434 workspace = client.beta.organization.workspaces.archive(workspace_id)
432 workspace = client.organization.workspaces.archive(workspace_id)
435433 
436434 puts "id: #{workspace.id}"
437435 puts "archived_at: #{workspace.archived_at}"
from line 436
438436 ```
439437</CodeGroup>
440438 
441For complete parameter details and response schemas, see the [Workspaces API reference](https://platform.claude.com/docs/en/api/beta/organization/workspaces/retrieve).
439For complete parameter details and response schemas, see the [Workspaces API reference](https://platform.claude.com/docs/en/api/organization/workspaces/retrieve).
442440 
443441### Managing workspace members
444442 
from line 455
457455 ```
458456 
459457 ```bash CLI
460 ant beta:organization:workspaces:members add \
458 ant organization:workspaces:members add \
461459 --workspace-id wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ \
462460 --user-id user_01XyDMpzjS89pFZXqSFUBDr6 \
463461 --workspace-role workspace_developer
from line 464
466464 ```python Python
467465 client = anthropic.Anthropic()
468466 
469 member = client.beta.organization.workspaces.members.add(
467 member = client.organization.workspaces.members.add(
470468 "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
471469 user_id="user_01XyDMpzjS89pFZXqSFUBDr6",
472470 workspace_role="workspace_developer",
from line 477
479477 ```typescript TypeScript
480478 const client = new Anthropic();
481479 
482 const member = await client.beta.organization.workspaces.members.add(
480 const member = await client.organization.workspaces.members.add(
483481 "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
484482 {
485483 user_id: "user_01XyDMpzjS89pFZXqSFUBDr6",
from line 490
492490 ```
493491 
494492 ```csharp C#
495 using Anthropic.Models.Beta.Organization.Workspaces;
493 using Anthropic.Models.Organization.Workspaces;
496494 
497495 AnthropicClient client = new();
498496 
499 var member = await client.Beta.Organization.Workspaces.Members.Add(
497 var member = await client.Organization.Workspaces.Members.Add(
500498 "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
501499 new()
502500 {
503501 UserID = "user_01XyDMpzjS89pFZXqSFUBDr6",
504 WorkspaceRole = BetaNoBillingWorkspaceRole.WorkspaceDeveloper
502 WorkspaceRole = NoBillingWorkspaceRole.WorkspaceDeveloper
505503 }
506504 );
507505 
from line 510
512510 ```go Go
513511 client := anthropic.NewClient()
514512 
515 member, err := client.Beta.Organization.Workspaces.Members.Add(
513 member, err := client.Organization.Workspaces.Members.Add(
516514 context.Background(),
517515 "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
518 anthropic.BetaOrganizationWorkspaceMemberAddParams{
516 anthropic.OrganizationWorkspaceMemberAddParams{
519517 UserID: "user_01XyDMpzjS89pFZXqSFUBDr6",
520 WorkspaceRole: anthropic.BetaNoBillingWorkspaceRoleWorkspaceDeveloper,
518 WorkspaceRole: anthropic.NoBillingWorkspaceRoleWorkspaceDeveloper,
521519 },
522520 )
523521 if err != nil {
from line 527
529527 ```
530528 
531529 ```java Java
532 import com.anthropic.models.beta.organization.workspaces.BetaNoBillingWorkspaceRole;
533 import com.anthropic.models.beta.organization.workspaces.members.MemberAddParams;
530 import com.anthropic.models.organization.workspaces.NoBillingWorkspaceRole;
531 import com.anthropic.models.organization.workspaces.members.MemberAddParams;
534532 
535533 void main() {
536534 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
from line 535
537535 
538536 var params = MemberAddParams.builder()
539537 .userId("user_01XyDMpzjS89pFZXqSFUBDr6")
540 .workspaceRole(BetaNoBillingWorkspaceRole.WORKSPACE_DEVELOPER)
538 .workspaceRole(NoBillingWorkspaceRole.WORKSPACE_DEVELOPER)
541539 .build();
542 var member = client.beta().organization().workspaces().members()
540 var member = client.organization().workspaces().members()
543541 .add("wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ", params);
544542 
545543 IO.println("user_id: " + member.userId());
from line 546
548546 ```
549547 
550548 ```php PHP
551 use Anthropic\Beta\Organization\Workspaces\NoBillingWorkspaceRole;
549 use Anthropic\Organization\Workspaces\NoBillingWorkspaceRole;
552550 // ...
553551 
554552 $client = new Client();
555553 
556 $member = $client->beta->organization->workspaces->members->add(
554 $member = $client->organization->workspaces->members->add(
557555 workspaceID: 'wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ',
558556 userID: 'user_01XyDMpzjS89pFZXqSFUBDr6',
559557 workspaceRole: NoBillingWorkspaceRole::WORKSPACE_DEVELOPER,
from line 565
567565 client = Anthropic::Client.new
568566 
569567 workspace_id = "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
570 member = client.beta.organization.workspaces.members.add(
568 member = client.organization.workspaces.members.add(
571569 workspace_id,
572570 user_id: "user_01XyDMpzjS89pFZXqSFUBDr6",
573571 workspace_role: :workspace_developer
from line 588
590588 ```
591589 
592590 ```bash CLI
593 ant beta:organization:workspaces:members update \
591 ant organization:workspaces:members update \
594592 --user-id user_01XyDMpzjS89pFZXqSFUBDr6 \
595593 --workspace-id wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ \
596594 --workspace-role workspace_admin
from line 597
599597 ```python Python
600598 client = anthropic.Anthropic()
601599 
602 member = client.beta.organization.workspaces.members.update(
600 member = client.organization.workspaces.members.update(
603601 "user_01XyDMpzjS89pFZXqSFUBDr6",
604602 workspace_id="wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
605603 workspace_role="workspace_admin",
from line 610
612610 ```typescript TypeScript
613611 const client = new Anthropic();
614612 
615 const member = await client.beta.organization.workspaces.members.update(
613 const member = await client.organization.workspaces.members.update(
616614 "user_01XyDMpzjS89pFZXqSFUBDr6",
617615 {
618616 workspace_id: "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
from line 623
625623 ```
626624 
627625 ```csharp C#
628 using Anthropic.Models.Beta.Organization.Workspaces;
626 using Anthropic.Models.Organization.Workspaces;
629627 
630628 AnthropicClient client = new();
631629 
632 var member = await client.Beta.Organization.Workspaces.Members.Update(
630 var member = await client.Organization.Workspaces.Members.Update(
633631 "user_01XyDMpzjS89pFZXqSFUBDr6",
634632 new()
635633 {
636634 WorkspaceID = "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
637 WorkspaceRole = BetaWorkspaceRole.WorkspaceAdmin
635 WorkspaceRole = WorkspaceRole.WorkspaceAdmin
638636 }
639637 );
640638 
from line 643
645643 ```go Go
646644 client := anthropic.NewClient()
647645 
648 member, err := client.Beta.Organization.Workspaces.Members.Update(
646 member, err := client.Organization.Workspaces.Members.Update(
649647 context.Background(),
650648 "user_01XyDMpzjS89pFZXqSFUBDr6",
651 anthropic.BetaOrganizationWorkspaceMemberUpdateParams{
649 anthropic.OrganizationWorkspaceMemberUpdateParams{
652650 WorkspaceID: "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
653 WorkspaceRole: anthropic.BetaWorkspaceRoleWorkspaceAdmin,
651 WorkspaceRole: anthropic.WorkspaceRoleWorkspaceAdmin,
654652 },
655653 )
656654 if err != nil {
from line 660
662660 ```
663661 
664662 ```java Java
665 import com.anthropic.models.beta.organization.workspaces.BetaWorkspaceRole;
666 import com.anthropic.models.beta.organization.workspaces.members.MemberUpdateParams;
663 import com.anthropic.models.organization.workspaces.WorkspaceRole;
664 import com.anthropic.models.organization.workspaces.members.MemberUpdateParams;
667665 
668666 void main() {
669667 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
from line 668
670668 
671669 var params = MemberUpdateParams.builder()
672670 .workspaceId("wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ")
673 .workspaceRole(BetaWorkspaceRole.WORKSPACE_ADMIN)
671 .workspaceRole(WorkspaceRole.WORKSPACE_ADMIN)
674672 .build();
675 var member = client.beta().organization().workspaces().members()
673 var member = client.organization().workspaces().members()
676674 .update("user_01XyDMpzjS89pFZXqSFUBDr6", params);
677675 
678676 IO.println("user_id: " + member.userId());
from line 679
681679 ```
682680 
683681 ```php PHP
684 use Anthropic\Beta\Organization\Workspaces\WorkspaceRole;
682 use Anthropic\Organization\Workspaces\WorkspaceRole;
685683 // ...
686684 
687685 $client = new Client();
688686 
689 $member = $client->beta->organization->workspaces->members->update(
687 $member = $client->organization->workspaces->members->update(
690688 userID: 'user_01XyDMpzjS89pFZXqSFUBDr6',
691689 workspaceID: 'wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ',
692690 workspaceRole: WorkspaceRole::WORKSPACE_ADMIN,
from line 698
700698 client = Anthropic::Client.new
701699 
702700 user_id = "user_01XyDMpzjS89pFZXqSFUBDr6"
703 member = client.beta.organization.workspaces.members.update(
701 member = client.organization.workspaces.members.update(
704702 user_id,
705703 workspace_id: "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
706704 workspace_role: :workspace_admin
from line 719
721719 ```
722720 
723721 ```bash CLI
724 ant beta:organization:workspaces:members remove \
722 ant organization:workspaces:members remove \
725723 --user-id user_01XyDMpzjS89pFZXqSFUBDr6 \
726724 --workspace-id wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ
727725 ```
from line 727
729727 ```python Python
730728 client = anthropic.Anthropic()
731729 
732 removed_member = client.beta.organization.workspaces.members.remove(
730 removed_member = client.organization.workspaces.members.remove(
733731 "user_01XyDMpzjS89pFZXqSFUBDr6",
734732 workspace_id="wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
735733 )
from line 738
740738 ```typescript TypeScript
741739 const client = new Anthropic();
742740 
743 const removedMember = await client.beta.organization.workspaces.members.remove(
741 const removedMember = await client.organization.workspaces.members.remove(
744742 "user_01XyDMpzjS89pFZXqSFUBDr6",
745743 { workspace_id: "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ" }
746744 );
from line 749
751749 ```csharp C#
752750 AnthropicClient client = new();
753751 
754 var removedMember = await client.Beta.Organization.Workspaces.Members.Remove(
752 var removedMember = await client.Organization.Workspaces.Members.Remove(
755753 "user_01XyDMpzjS89pFZXqSFUBDr6",
756754 new() { WorkspaceID = "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ" }
757755 );
from line 760
762760 ```go Go
763761 client := anthropic.NewClient()
764762 
765 removedMember, err := client.Beta.Organization.Workspaces.Members.Remove(
763 removedMember, err := client.Organization.Workspaces.Members.Remove(
766764 context.Background(),
767765 "user_01XyDMpzjS89pFZXqSFUBDr6",
768 anthropic.BetaOrganizationWorkspaceMemberRemoveParams{
766 anthropic.OrganizationWorkspaceMemberRemoveParams{
769767 WorkspaceID: "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
770768 },
771769 )
from line 775
777775 ```
778776 
779777 ```java Java
780 import com.anthropic.models.beta.organization.workspaces.members.MemberRemoveParams;
778 import com.anthropic.models.organization.workspaces.members.MemberRemoveParams;
781779 
782780 void main() {
783781 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
from line 783
785783 var params = MemberRemoveParams.builder()
786784 .workspaceId("wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ")
787785 .build();
788 var removedMember = client.beta().organization().workspaces().members()
786 var removedMember = client.organization().workspaces().members()
789787 .remove("user_01XyDMpzjS89pFZXqSFUBDr6", params);
790788 
791789 IO.println("user_id: " + removedMember.userId());
from line 793
795793 ```php PHP
796794 $client = new Client();
797795 
798 $removedMember = $client->beta->organization->workspaces->members->remove(
796 $removedMember = $client->organization->workspaces->members->remove(
799797 userID: 'user_01XyDMpzjS89pFZXqSFUBDr6',
800798 workspaceID: 'wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ',
801799 );
from line 805
807805 client = Anthropic::Client.new
808806 
809807 user_id = "user_01XyDMpzjS89pFZXqSFUBDr6"
810 removed_member = client.beta.organization.workspaces.members.remove(
808 removed_member = client.organization.workspaces.members.remove(
811809 user_id,
812810 workspace_id: "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
813811 )
from line 814
816814 ```
817815</CodeGroup>
818816 
819For complete parameter details, see the [Workspace Members API reference](https://platform.claude.com/docs/en/api/beta/organization/workspaces/members/retrieve).
817For complete parameter details, see the [Workspace Members API reference](https://platform.claude.com/docs/en/api/organization/workspaces/members/retrieve).
820818 
821819## API keys and resource scoping
822820 
from line 834
836834* **[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. Tunnels are created in a workspace, and the Console **MCP tunnels** list and the Managed Agent server picker show tunnels in the current workspace only; the cap of 10 active tunnels applies organization-wide. Tunnel management requires a role with tunnel management permissions; organization developers can view but not change them.
837835* **Workspaces** themselves and **organization members** are managed at the organization level through the [Admin API](https://platform.claude.com/docs/en/manage-claude/admin-api), using an Admin API key, an `org:admin` OAuth token, or a personal or service account key that isn't scoped to a specific workspace.
838836 
839To look up your organization's workspace IDs, call the [List Workspaces](https://platform.claude.com/docs/en/api/beta/organization/workspaces/list) endpoint (pass `include_default=true` to include the Default Workspace) or find them in the [Claude Console](https://platform.claude.com/settings/workspaces).
837To 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 in the [Claude Console](https://platform.claude.com/settings/workspaces).
840838 
841839<Note>
842840 [Prompt caches](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) are also isolated per 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 Amazon Bedrock and Google Cloud, prompt caches are isolated per organization.
from line 1006
10081006 
10091007* Confirm which workspace's usage, cost, and [rate limits](https://platform.claude.com/docs/en/api/rate-limits) the request counted toward
10101008* Match it against the `workspace_id` field in [Usage and Cost API](https://platform.claude.com/docs/en/manage-claude/usage-cost-api) reports and on [Admin API](https://platform.claude.com/docs/en/manage-claude/admin-api) objects such as API keys (both report `null` for the Default Workspace, as API keys also do for all-workspaces keys; an API key's `scope` field tells the two apart and, for a key bound to one workspace, carries that workspace's real ID)
1011* Check whether it's your Default Workspace's ID by passing it to [Get Workspace](https://platform.claude.com/docs/en/api/beta/organization/workspaces/retrieve) with an [Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys): the Default Workspace comes back with `"name": "Default"`, even though [List Workspaces](https://platform.claude.com/docs/en/api/beta/organization/workspaces/list) omits it unless you pass `include_default=true`
1009* Check whether it's your Default Workspace's ID by passing it to [Get Workspace](https://platform.claude.com/docs/en/api/organization/workspaces/retrieve) with an [Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys): the Default Workspace comes back with `"name": "Default"`, even though [List Workspaces](https://platform.claude.com/docs/en/api/organization/workspaces/list) omits it unless you pass `include_default=true`
10121010* Open that workspace in the [Console](https://platform.claude.com/settings/workspaces) to find the request's resources, such as sessions, files, message batches, and skills
10131011 
10141012## Workspace limits
from line 1097
10991097 
11001098<AccordionGroup>
11011099 <Accordion title="What's the Default Workspace?">
1102 Every organization has a "Default Workspace" that cannot be renamed, archived, or deleted. Like every workspace, it has a `wrkspc_` ID: the API returns it in the [`anthropic-workspace-id` response header](https://platform.claude.com/docs/en/manage-claude/workspaces#identify-the-workspace-behind-an-api-response), and you can pass it to [Get Workspace](https://platform.claude.com/docs/en/api/beta/organization/workspaces/retrieve) and [Update Workspace](https://platform.claude.com/docs/en/api/beta/organization/workspaces/update). It has no member list of its own, because access to it follows each member's organization role. It appears in [List Workspaces](https://platform.claude.com/docs/en/api/beta/organization/workspaces/list) results only when you pass `include_default=true`, and API keys, usage reports, and cost reports that belong to it show `null` for `workspace_id`, as do all-workspaces API keys; an API key's `scope` field tells the two apart and, for a key that belongs to the Default Workspace, carries its real ID.
1100 Every organization has a "Default Workspace" that cannot be renamed, archived, or deleted. Like every workspace, it has a `wrkspc_` ID: the API returns it in the [`anthropic-workspace-id` response header](https://platform.claude.com/docs/en/manage-claude/workspaces#identify-the-workspace-behind-an-api-response), and you can pass it to [Get Workspace](https://platform.claude.com/docs/en/api/organization/workspaces/retrieve) and [Update Workspace](https://platform.claude.com/docs/en/api/organization/workspaces/update). It has no member list of its own, because access to it follows each member's organization role. It appears in [List Workspaces](https://platform.claude.com/docs/en/api/organization/workspaces/list) results only when you pass `include_default=true`, and API keys, usage reports, and cost reports that belong to it show `null` for `workspace_id`, as do all-workspaces API keys; an API key's `scope` field tells the two apart and, for a key that belongs to the Default Workspace, carries its real ID.
11031101 </Accordion>
11041102 
11051103 <Accordion title="What's the Claude Code workspace?">
from line 1136
11381136## See also
11391137 
11401138* [Admin API](https://platform.claude.com/docs/en/manage-claude/admin-api)
1141* [Admin API reference](https://platform.claude.com/docs/en/api/beta/organization)
1139* [Admin API reference](https://platform.claude.com/docs/en/api/organization)
11421140* [Rate limits](https://platform.claude.com/docs/en/api/rate-limits)
11431141* [Usage and Cost API](https://platform.claude.com/docs/en/manage-claude/usage-cost-api)
11441142 

models/fable-5-1/migration-guide Changed · +6 / -6 lines

from line 18
1818 The skill applies the model ID swap and, as needed, breaking parameter changes, prefill replacement, and effort calibration for your target model across your code base, then produces a checklist of items to verify manually. It asks you to confirm the migration scope (entire working directory, a subdirectory, or a specific file list) before editing any files. The skill also detects Amazon Bedrock and Claude Platform on AWS clients and adjusts model ID formats and feature changes for those platforms.
1919</Tip>
2020 
21[Claude Fable 5.1](https://platform.claude.com/docs/en/models/fable-5-1/whats-new-fable-5-1) succeeds Claude Fable 5 at the same input and output prices, with cache reads at a quarter of the cost. It's available on the Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), and [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry). [Claude Mythos 5.1](https://anthropic.com/glasswing) shares the same capabilities and is offered only to approved customers in Project Glasswing. For behavioral differences and prompting patterns, see [Prompting Claude Fable 5.1](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-fable-5-1).
21[Claude Fable 5.1](https://platform.claude.com/docs/en/models/fable-5-1/whats-new-fable-5-1) succeeds Claude Fable 5 at the same input and output prices, with cache reads at a quarter of the cost. It's available on the Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), and [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry). [Claude Mythos 5.1](https://platform.claude.com/docs/en/models/mythos-5-1/overview) shares the same capabilities and is available only to organizations verified through Anthropic's verification programs, such as the [Cyber Verification Program](https://support.claude.com/en/articles/14604842). For behavioral differences and prompting patterns, see [Prompting Claude Fable 5.1](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-fable-5-1).
2222 
2323The baseline settings shared by `claude-fable-5-1` and `claude-mythos-5-1`:
2424 
from line 32
3232 
3333Where the two models diverge:
3434 
35* **Availability:** Claude Fable 5.1 doesn't require access approval. Claude Mythos 5.1 is available only to approved customers in [Project Glasswing](https://anthropic.com/glasswing). Contact your Anthropic account team for access.
35* **Availability:** Claude Fable 5.1 doesn't require access approval. Claude Mythos 5.1 is available only to organizations verified through Anthropic's verification programs, such as the [Cyber Verification Program](https://support.claude.com/en/articles/14604842). To request access, apply to the program that covers your use case, or contact your Anthropic account team.
3636* **Priority Tier:** Neither model is supported on [Priority Tier](https://platform.claude.com/docs/en/api/service-tiers#supported-models). Claude Fable 5 is.
3737 
3838## Migrating to Claude Fable 5.1 from Claude Fable 5
from line 45
4545model = "claude-fable-5" # Before
4646model = "claude-fable-5-1" # After
4747 
48# Or, for the Project Glasswing model with the same capabilities:
48# Or, for Claude Mythos 5.1, which offers the same capabilities to verified organizations:
4949model = "claude-mythos-5-1" # After
5050```
5151 
from line 1542
15421542model = "claude-opus-5" # Before
15431543model = "claude-fable-5-1" # After
15441544 
1545# Or, for the Project Glasswing model with the same capabilities:
1545# Or, for Claude Mythos 5.1, which offers the same capabilities to verified organizations:
15461546model = "claude-mythos-5-1" # After
15471547```
15481548 
from line 1582
15821582model = "claude-opus-4-8" # Before
15831583model = "claude-fable-5-1" # After
15841584 
1585# Or, for the Project Glasswing model with the same capabilities:
1585# Or, for Claude Mythos 5.1, which offers the same capabilities to verified organizations:
15861586model = "claude-mythos-5-1" # After
15871587```
15881588 
from line 1600
16001600 
16011601## Migrating to Claude Mythos 5.1 from Claude Mythos 5
16021602 
1603[Claude Mythos 5.1](https://anthropic.com/glasswing) is the access-gated counterpart to Claude Fable 5.1. Confirm your organization's access with your Anthropic account team before switching model IDs.
1603[Claude Mythos 5.1](https://platform.claude.com/docs/en/models/mythos-5-1/overview) is the counterpart to Claude Fable 5.1 for organizations verified through Anthropic's verification programs, such as the [Cyber Verification Program](https://support.claude.com/en/articles/14604842). Confirm that your organization has access to Claude Mythos 5.1 before you switch model IDs.
16041604 
16051605The API-level delta matches [Migrating to Claude Fable 5.1 from Claude Fable 5](https://platform.claude.com/docs/en/models/fable-5-1/migration-guide#migrating-from-claude-fable-5-to-claude-fable-5-1): forced tool choice returns a 400 error, and thinking blocks are preserved only for the model that produced them or a newer one (Claude Mythos 5.1 reads Claude Mythos 5's blocks, not the reverse). Unlike Claude Fable 5.1, Claude Mythos 5.1 doesn't run the conversation check, so editing earlier turns doesn't [invalidate thinking blocks](https://platform.claude.com/docs/en/models/fable-5-1/migration-guide#fable-5-1-preserved-thinking), though it still restarts the prompt cache.
16061606 

models/fable-5-1/whats-new-fable-5-1 Changed · +6 / -6 lines

from line 4
44description: Overview of new features, breaking changes, and capability improvements in Claude Fable 5.1 and Claude Mythos 5.1.
55---
66 
7Claude Fable 5.1 extends Claude Fable 5 at the same input and output prices, with cache reads at a quarter of the cost, and brings stronger long-running agentic coding, multistep research, and document, spreadsheet, and slide work. For most workloads, start with Claude Opus 5.5 (see [Choosing a model](https://platform.claude.com/docs/en/about-claude/models/choosing-a-model)). Use Claude Fable 5.1 for demanding reasoning and long-horizon agentic work, or when your evals on Claude Opus 5.5 at higher effort still fall short. Claude Mythos 5.1 offers the same capabilities to [Project Glasswing](https://anthropic.com/glasswing) participants only.
7Claude Fable 5.1 extends Claude Fable 5 at the same input and output prices, with cache reads at a quarter of the cost, and brings stronger long-running agentic coding, multistep research, and document, spreadsheet, and slide work. For most workloads, start with Claude Opus 5.5 (see [Choosing a model](https://platform.claude.com/docs/en/about-claude/models/choosing-a-model)). Use Claude Fable 5.1 for demanding reasoning and long-horizon agentic work, or when your evals on Claude Opus 5.5 at higher effort still fall short. Claude Mythos 5.1 offers the same capabilities only to organizations verified through Anthropic's verification programs, such as the [Cyber Verification Program](https://support.claude.com/en/articles/14604842).
88 
99If you already call Claude Fable 5, three changes are breaking: [forced tool use returns an error](https://platform.claude.com/docs/en/models/fable-5-1/whats-new-fable-5-1#forced-tool-use-is-not-supported), [earlier models can't read its thinking blocks](https://platform.claude.com/docs/en/models/fable-5-1/whats-new-fable-5-1#thinking-blocks-are-tied-to-the-model-that-produced-them), and [editing earlier turns invalidates thinking blocks](https://platform.claude.com/docs/en/models/fable-5-1/whats-new-fable-5-1#editing-earlier-turns-invalidates-thinking-blocks). Five are additive: [per-message effort](https://platform.claude.com/docs/en/models/fable-5-1/whats-new-fable-5-1#change-effort-mid-conversation-beta) (beta), [turn-scoped system messages](https://platform.claude.com/docs/en/models/fable-5-1/whats-new-fable-5-1#turn-scoped-system-messages-beta) (beta), [readable progress updates between tool calls](https://platform.claude.com/docs/en/models/fable-5-1/whats-new-fable-5-1#progress-updates-between-tool-calls-beta) (`display: "updates"`, beta), a [lower cache read price](https://platform.claude.com/docs/en/models/fable-5-1/whats-new-fable-5-1#pricing), and [content provenance](https://platform.claude.com/docs/en/models/fable-5-1/whats-new-fable-5-1#content-provenance).
1010 
1111## Models
1212 
13| Model | Claude API ID | Description | Availability |
14| ----------------- | ----------------- | ------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------- |
15| Claude Fable 5.1 | claude-fable-5-1 | Successor to Claude Fable 5, for long-running agentic coding, knowledge work, and research | All customers, on the Claude API and partner platforms |
16| Claude Mythos 5.1 | claude-mythos-5-1 | Same capabilities as Claude Fable 5.1. Successor to Claude Mythos 5. | [Project Glasswing](https://anthropic.com/glasswing) participants only |
13| Model | Claude API ID | Description | Availability |
14| ----------------- | ----------------- | ------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
15| Claude Fable 5.1 | claude-fable-5-1 | Successor to Claude Fable 5, for long-running agentic coding, knowledge work, and research | All customers, on the Claude API and partner platforms |
16| Claude Mythos 5.1 | claude-mythos-5-1 | Same capabilities as Claude Fable 5.1. Successor to Claude Mythos 5. | Organizations verified through Anthropic's verification programs, such as the [Cyber Verification Program](https://support.claude.com/en/articles/14604842) |
1717 
1818Claude Fable 5.1 and Claude Mythos 5.1 share specs and pricing:
1919 
from line 426
426426* **Google Cloud:** [Claude on Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), as `claude-fable-5-1`.
427427* **Microsoft Foundry:** [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), on Anthropic infrastructure.
428428 
429Claude Mythos 5.1 is offered only to approved customers in [Project Glasswing](https://anthropic.com/glasswing). For access, contact your Anthropic, AWS, or Google Cloud account team.
429Claude Mythos 5.1 is available only to organizations verified through Anthropic's verification programs, such as the [Cyber Verification Program](https://support.claude.com/en/articles/14604842). To request access, apply to the program that covers your use case, or contact your Anthropic, AWS, or Google Cloud account team.
430430 
431431Claude Fable 5.1 and Claude Mythos 5.1 carry 30-day data retention and aren't available under zero data retention unless expressly authorized by Anthropic. Both are [Covered Models](https://support.claude.com/en/articles/15425695), like Claude Fable 5 and Claude Mythos 5. See [Model-specific data retention requirements](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#model-specific-data-retention-requirements).
432432 

models/fable-5/introducing-claude-fable-5-and-claude-mythos-5 Changed · +6 / -6 lines

from line 12
1212 Access to Claude Fable 5 and Claude Mythos 5 has been restored. See [our statement](https://www.anthropic.com/news/redeploying-fable-5) for more information.
1313</Tip>
1414 
15Claude Fable 5 is built for demanding reasoning and long-horizon agentic work. Claude Mythos 5 shares the same capabilities and is available only in limited release through [Project Glasswing](https://anthropic.com/glasswing).
15Claude Fable 5 is built for demanding reasoning and long-horizon agentic work. Claude Mythos 5 shares the same capabilities and is available only to organizations verified through Anthropic's verification programs, such as the [Cyber Verification Program](https://support.claude.com/en/articles/14604842).
1616 
1717The headline change for integrations: Claude Fable 5 includes safety classifiers that can decline requests. If your integration calls Claude Fable 5, plan for three changes: new response handling for refusals, fallback options for retrying on another Claude model, and new billing rules. [Refusals, fallback, and billing on Claude Fable 5](https://platform.claude.com/docs/en/models/fable-5/introducing-claude-fable-5-and-claude-mythos-5#refusals-fallback-and-billing-on-claude-fable-5) summarizes all three.
1818 
1919## Models
2020 
21| Model | API model ID | Description |
22| --------------- | ----------------- | -------------------------------------------------------------------------------------------------------------- |
23| Claude Fable 5 | `claude-fable-5` | Built for demanding reasoning and long-horizon agentic work |
24| Claude Mythos 5 | `claude-mythos-5` | Shares Claude Fable 5's capabilities. Available through Project Glasswing. Successor to Claude Mythos Preview. |
21| Model | API model ID | Description |
22| --------------- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
23| Claude Fable 5 | `claude-fable-5` | Built for demanding reasoning and long-horizon agentic work |
24| Claude Mythos 5 | `claude-mythos-5` | Shares Claude Fable 5's capabilities. Available only to organizations verified through Anthropic's verification programs, such as the [Cyber Verification Program](https://support.claude.com/en/articles/14604842). Successor to Claude Mythos Preview. |
2525 
2626Claude Fable 5 and Claude Mythos 5 share the same specs and pricing:
2727 
from line 53
5353## Availability
5454 
5555* **Claude Fable 5** is available on the Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), and [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry).
56* **Claude Mythos 5** is offered only to approved customers in [Project Glasswing](https://anthropic.com/glasswing). For access, contact your Anthropic, AWS, or Google Cloud account team. Customers without access to Claude Mythos 5 can use Claude Fable 5, which does not require access approval and offers the same capabilities.
56* **Claude Mythos 5** is available only to organizations verified through Anthropic's verification programs, such as the [Cyber Verification Program](https://support.claude.com/en/articles/14604842). Customers without access to Claude Mythos 5 can use Claude Fable 5, which does not require access approval and offers the same capabilities.
5757 
5858Claude Fable 5 and Claude Mythos 5 carry 30-day data retention and are not available under zero data retention unless expressly authorized by Anthropic. Both are designated [Covered Models](https://support.claude.com/en/articles/15425695). See [Model-specific data retention requirements](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#model-specific-data-retention-requirements).
5959 

models/fable-5/migration-guide Changed · +5 / -5 lines

from line 18
1818 The skill applies the model ID swap and, as needed, breaking parameter changes, prefill replacement, and effort calibration for your target model across your code base, then produces a checklist of items to verify manually. It asks you to confirm the migration scope (entire working directory, a subdirectory, or a specific file list) before editing any files. The skill also detects Amazon Bedrock and Claude Platform on AWS clients and adjusts model ID formats and feature changes for those platforms.
1919</Tip>
2020 
21[Claude Fable 5](https://platform.claude.com/docs/en/models/fable-5/introducing-claude-fable-5-and-claude-mythos-5) is built for demanding reasoning and long-horizon agentic work. [Claude Fable 5.1](https://platform.claude.com/docs/en/models/fable-5-1/migration-guide) builds on it. Claude Fable 5 is available on the Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), and [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry). [Claude Mythos 5](https://anthropic.com/glasswing) shares the same capabilities and is offered only to approved customers in Project Glasswing.
21[Claude Fable 5](https://platform.claude.com/docs/en/models/fable-5/introducing-claude-fable-5-and-claude-mythos-5) is built for demanding reasoning and long-horizon agentic work. [Claude Fable 5.1](https://platform.claude.com/docs/en/models/fable-5-1/migration-guide) builds on it. Claude Fable 5 is available on the Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), and [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry). [Claude Mythos 5](https://platform.claude.com/docs/en/models/mythos-5/overview) shares the same capabilities and is available only to organizations verified through Anthropic's verification programs, such as the [Cyber Verification Program](https://support.claude.com/en/articles/14604842).
2222 
2323The baseline settings shared by `claude-fable-5` and `claude-mythos-5`:
2424 
from line 30
3030 
3131Where the two models diverge:
3232 
33* **Availability:** Claude Fable 5 does not require access approval. Claude Mythos 5 is available only to approved customers in [Project Glasswing](https://anthropic.com/glasswing).
33* **Availability:** Claude Fable 5 does not require access approval. Claude Mythos 5 is available only to organizations verified through Anthropic's verification programs, such as the [Cyber Verification Program](https://support.claude.com/en/articles/14604842).
3434* **Priority Tier:** [Priority Tier](https://platform.claude.com/docs/en/api/service-tiers#supported-models) is supported on Claude Fable 5 but not on Claude Mythos 5.
3535 
3636## Migrating to Claude Mythos 5 and Claude Fable 5 from Claude Mythos Preview
3737 
38[Claude Mythos 5](https://anthropic.com/glasswing) is the access-gated successor to [Claude Mythos Preview](https://anthropic.com/glasswing), the invitation-only research preview. [Claude Fable 5](https://platform.claude.com/docs/en/models/fable-5/introducing-claude-fable-5-and-claude-mythos-5) offers the same capabilities and does not require access approval. The changes in this section apply equally to both targets.
38[Claude Mythos 5](https://platform.claude.com/docs/en/models/mythos-5/overview) is the access-gated successor to [Claude Mythos Preview](https://anthropic.com/glasswing), the invitation-only research preview. [Claude Fable 5](https://platform.claude.com/docs/en/models/fable-5/introducing-claude-fable-5-and-claude-mythos-5) offers the same capabilities and does not require access approval. The changes in this section apply equally to both targets.
3939 
4040Migration is mostly drop-in. Claude Mythos 5 and Claude Fable 5 use the same [Messages API](https://platform.claude.com/docs/en/build-with-claude/working-with-messages) and the same [tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) patterns as Claude Mythos Preview, and token counts are roughly unchanged because all three models use the same tokenizer. The key changes to check are the features that are no longer available (listed in the next section) and thinking output. If you migrate to Claude Fable 5, also plan for safety classifier refusals; see [Refusals and fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback).
4141 
from line 335
335335model = "claude-opus-5" # Before
336336model = "claude-fable-5" # After
337337 
338# Or, for the Project Glasswing model with the same capabilities:
338# Or, for Claude Mythos 5, which offers the same capabilities to verified organizations:
339339model = "claude-mythos-5" # After
340340```
341341 
from line 373
373373model = "claude-opus-4-8" # Before
374374model = "claude-fable-5" # After
375375 
376# Or, for the Project Glasswing model with the same capabilities:
376# Or, for Claude Mythos 5, which offers the same capabilities to verified organizations:
377377model = "claude-mythos-5" # After
378378```
379379 

models/mythos-5-1/overview Changed · +5 / -5 lines

from line 1
11---
22title: Claude Mythos 5.1
33url: https://platform.claude.com/docs/en/models/mythos-5-1/overview
4description: "Claude Mythos 5.1 at a glance: the same model as Claude Fable 5.1, offered by invitation only through Project Glasswing. Model IDs, specifications, pricing, and how to request access."
4description: "Claude Mythos 5.1 at a glance: the same model as Claude Fable 5.1, available only to organizations verified through Anthropic's verification programs. Model IDs, specifications, pricing, and how to request access."
55---
66 
7**Invite only.** Released September 1, 2026.
7**Verification required.** Released September 1, 2026.
88 
9Claude Fable 5.1 for Project Glasswing participants
9Claude Fable 5.1 for verified organizations
1010 
1111Model ID: `claude-mythos-5-1`
1212 
from line 14
1414 
1515[Announcement](https://www.anthropic.com/claude-fable-and-mythos-5-1) · [What’s new](https://platform.claude.com/docs/en/models/fable-5-1/whats-new-fable-5-1) · [Migration guide](https://platform.claude.com/docs/en/models/fable-5-1/migration-guide#migrating-from-claude-mythos-5-to-claude-mythos-5-1)
1616 
17Claude Mythos 5.1 is offered separately, by invitation only, as part of Project Glasswing. It shares Claude Fable 5.1’s specifications and pricing. For access, contact your Anthropic, AWS, or Google Cloud account team. [See Claude Fable 5.1](https://platform.claude.com/docs/en/models/fable-5-1/overview) · [Project Glasswing](https://anthropic.com/glasswing)
17Claude Mythos 5.1 is available only to organizations verified through Anthropic’s verification programs, such as the [Cyber Verification Program](https://support.claude.com/en/articles/14604842). It has the same specifications and pricing as Claude Fable 5.1. To request access, apply to the program that covers your use case. [See Claude Fable 5.1](https://platform.claude.com/docs/en/models/fable-5-1/overview) · [How refusals and fallback work](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback)
1818 
1919## How it compares
2020 
from line 75
7575 
7676| Feature | Value |
7777| :---------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
78| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Active (invite only) |
78| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Active (verification required) |
7979| Released | September 1, 2026 |
8080| Retirement | Not sooner than September 1, 2027 |
8181| Platforms | Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) |

models/mythos-5/overview Changed · +4 / -4 lines

from line 1
11---
22title: Claude Mythos 5
33url: https://platform.claude.com/docs/en/models/mythos-5/overview
4description: "Claude Mythos 5 reference: the same model as Claude Fable 5, offered by invitation only through Project Glasswing for defensive cybersecurity work. Model IDs, specifications, pricing, and migration resources. Claude Mythos 5.1 is the current Mythos model."
4description: "Claude Mythos 5 reference: the same model as Claude Fable 5, offered for defensive cybersecurity work to organizations verified through Anthropic's verification programs. Model IDs, specifications, pricing, and migration resources. Claude Mythos 5.1 is the current Mythos model."
55---
66 
7**Invite only.** Released June 9, 2026.
7**Verification required.** Released June 9, 2026.
88 
99Most capable model for cybersecurity and biology research
1010 
from line 14
1414 
1515[Announcement](https://www.anthropic.com/news/claude-fable-5-mythos-5) · [What’s new](https://platform.claude.com/docs/en/models/fable-5/introducing-claude-fable-5-and-claude-mythos-5) · [Migration guide](https://platform.claude.com/docs/en/models/fable-5-1/migration-guide#migrating-from-claude-mythos-5-to-claude-mythos-5-1)
1616 
17Claude Mythos 5 is offered separately, by invitation only, as part of Project Glasswing. It shares Claude Fable 5’s specifications and pricing. For access, contact your Anthropic, AWS, or Google Cloud account team. [See Claude Fable 5](https://platform.claude.com/docs/en/models/fable-5/overview) · [Project Glasswing](https://anthropic.com/glasswing)
17Claude Mythos 5 is available only to organizations verified through Anthropic’s verification programs, such as the [Cyber Verification Program](https://support.claude.com/en/articles/14604842). It has the same specifications and pricing as Claude Fable 5. To request access, apply to the program that covers your use case. [See Claude Fable 5](https://platform.claude.com/docs/en/models/fable-5/overview) · [How refusals and fallback work](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback)
1818 
1919## How it compares
2020 
from line 73
7373 
7474| Feature | Value |
7575| :---------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
76| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Active (invite only) |
76| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Active (verification required) |
7777| Released | June 9, 2026 |
7878| Retirement | Not sooner than June 9, 2027 |
7979| Platforms | Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) |

about-claude/models/choosing-a-model Changed · +1 / -1 lines

from line 55
5555 
5656**Claude Opus 5.5** (`claude-opus-5-5`) is built for long-running agentic coding and knowledge work, with [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) always on. If your integration forces tool use (`tool_choice` of type `any` or `tool`), turns thinking off, or uses the `computer_20251124` computer use tool, see [Breaking changes](https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5#breaking-changes) before switching.
5757 
58**Claude Fable 5.1** (`claude-fable-5-1`) is Anthropic's most capable model open to all customers. It extends Claude Fable 5 with stronger long-running agentic coding, knowledge work, and research at the same input and output prices, with cache reads at a quarter of the cost. **Claude Mythos 5.1** (`claude-mythos-5-1`) offers the same capabilities to [Project Glasswing](https://anthropic.com/glasswing) participants only. Both models use always-on [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking). See [What's new in Claude Fable 5.1](https://platform.claude.com/docs/en/models/fable-5-1/whats-new-fable-5-1) for details.
58**Claude Fable 5.1** (`claude-fable-5-1`) is Anthropic's most capable model open to all customers. It extends Claude Fable 5 with stronger long-running agentic coding, knowledge work, and research at the same input and output prices, with cache reads at a quarter of the cost. **Claude Mythos 5.1** (`claude-mythos-5-1`) offers the same capabilities only to organizations verified through Anthropic's verification programs, such as the [Cyber Verification Program](https://support.claude.com/en/articles/14604842). Both models use always-on [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking). See [What's new in Claude Fable 5.1](https://platform.claude.com/docs/en/models/fable-5-1/whats-new-fable-5-1) for details.
5959 
6060For context windows, output limits, and prices, see the [model comparison table](https://platform.claude.com/docs/en/models/overview#latest-models-comparison).
6161 

api/errors Changed · +2 / -2 lines

from line 475
475475 
476476### Thinking cannot be disabled
477477 
478On Claude Fable 5.1, [Claude Mythos 5.1](https://anthropic.com/glasswing), Claude Fable 5, [Claude Mythos 5](https://anthropic.com/glasswing), Claude Opus 5.5, and [Claude Mythos Preview](https://anthropic.com/glasswing), thinking is always on. Sending `thinking: {"type": "disabled"}` to any of these models returns a 400 `invalid_request_error`. On all of these models except Claude Mythos Preview, the message reads:
478On Claude Fable 5.1, [Claude Mythos 5.1](https://platform.claude.com/docs/en/models/mythos-5-1/overview), Claude Fable 5, [Claude Mythos 5](https://platform.claude.com/docs/en/models/mythos-5/overview), Claude Opus 5.5, and [Claude Mythos Preview](https://anthropic.com/glasswing), thinking is always on. Sending `thinking: {"type": "disabled"}` to any of these models returns a 400 `invalid_request_error`. On all of these models except Claude Mythos Preview, the message reads:
479479 
480480```text wrap
481481"thinking.type.disabled" is not supported for this model. Use "thinking.type.adaptive" and "output_config.effort" to control thinking behavior.
from line 519
519519 
520520### Forced tool use not supported
521521 
522Claude Opus 5.5, Claude Sonnet 5.5, Claude Fable 5.1, and [Claude Mythos 5.1](https://anthropic.com/glasswing) don't support forced tool use. Sending `tool_choice: {"type": "any"}` or `tool_choice: {"type": "tool", "name": "..."}` to any of these models, including on the [token counting endpoint](https://platform.claude.com/docs/en/build-with-claude/token-counting), returns a 400 `invalid_request_error`:
522Claude Opus 5.5, Claude Sonnet 5.5, Claude Fable 5.1, and [Claude Mythos 5.1](https://platform.claude.com/docs/en/models/mythos-5-1/overview) don't support forced tool use. Sending `tool_choice: {"type": "any"}` or `tool_choice: {"type": "tool", "name": "..."}` to any of these models, including on the [token counting endpoint](https://platform.claude.com/docs/en/build-with-claude/token-counting), returns a 400 `invalid_request_error`:
523523 
524524```text wrap
525525tool_choice: type "tool" and "any" are not supported for this model.

build-with-claude/claude-in-microsoft-foundry Changed · +2 / -2 lines

from line 682
682682| Model | Default deployment name | Hosted on Azure | Hosted on Anthropic |
683683| :---------------------------------------------------------------------------------------------------- | :---------------------- | :-------------: | :-----------------: |
684684| Claude Fable 5.1 | `claude-fable-5-1` | | ✓ |
685| Claude Mythos 5.1 ([limited availability](https://anthropic.com/glasswing)) | `claude-mythos-5-1` | | ✓ |
685| Claude Mythos 5.1 ([limited availability](https://support.claude.com/en/articles/14604842)) | `claude-mythos-5-1` | | ✓ |
686686| Claude Fable 5 | `claude-fable-5` | | ✓ |
687| Claude Mythos 5 ([limited availability](https://anthropic.com/glasswing)) | `claude-mythos-5` | | ✓ |
687| Claude Mythos 5 ([limited availability](https://support.claude.com/en/articles/14604842)) | `claude-mythos-5` | | ✓ |
688688| Claude Opus 5.5 | `claude-opus-5-5` | ✓ | ✓ |
689689| Claude Opus 5 | `claude-opus-5` | ✓ | ✓ |
690690| Claude Opus 4.8 | `claude-opus-4-8` | ✓ | ✓ |

build-with-claude/claude-on-vertex-ai Changed · +2 / -2 lines

from line 118
118118| Model | Agent Platform API model ID |
119119| :---------------------------------------------------------------------------------------------------- | :--------------------------- |
120120| Claude Fable 5.1 | `claude-fable-5-1` |
121| Claude Mythos 5.1 ([limited availability](https://anthropic.com/glasswing)) | `claude-mythos-5-1` |
121| Claude Mythos 5.1 ([limited availability](https://support.claude.com/en/articles/14604842)) | `claude-mythos-5-1` |
122122| Claude Fable 5 | `claude-fable-5` |
123| Claude Mythos 5 ([limited availability](https://anthropic.com/glasswing)) | `claude-mythos-5` |
123| Claude Mythos 5 ([limited availability](https://support.claude.com/en/articles/14604842)) | `claude-mythos-5` |
124124| Claude Opus 5.5 | `claude-opus-5-5` |
125125| Claude Opus 5 | `claude-opus-5` |
126126| Claude Opus 4.8 | `claude-opus-4-8` |

build-with-claude/mid-conversation-system-messages Changed · +1 / -1 lines

from line 15
1515<Note>
1616 Mid-conversation system messages are available on the Claude API, [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), and [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai).
1717 
18 This feature is available on Claude Fable 5.1, [Claude Mythos 5.1](https://anthropic.com/glasswing), Claude Fable 5, [Claude Mythos 5](https://anthropic.com/glasswing), Claude Opus 5.5, Claude Opus 4.8, Claude Opus 5, and Claude Sonnet 5.5. No beta header is required for mid-conversation system messages. This feature is not available on Claude Sonnet 5. Use the top-level `system` field there instead.
18 This feature is available on Claude Fable 5.1, [Claude Mythos 5.1](https://platform.claude.com/docs/en/models/mythos-5-1/overview), Claude Fable 5, [Claude Mythos 5](https://platform.claude.com/docs/en/models/mythos-5/overview), Claude Opus 5.5, Claude Opus 4.8, Claude Opus 5, and Claude Sonnet 5.5. No beta header is required for mid-conversation system messages. This feature is not available on Claude Sonnet 5. Use the top-level `system` field there instead.
1919 
2020 [Mid-conversation tool changes](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages#mid-conversation-tool-changes) are in beta on the same models. On the Claude API, send the `inline-tools-2026-09-15` beta header, which also covers [defining a tool inside a `tool_addition` block](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages#define-tools-in-a-message-beta). [Adding an MCP server that way](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages#add-an-mcp-server-mid-conversation-beta) needs a second beta header, `mcp-client-2026-09-15`, which is available on the Claude API. The `mid-conversation-tool-changes-2026-07-01` header works for changes that name a tool by reference, on the Claude API, Amazon Bedrock, and Google Cloud.
2121 
Feedback