Follow Discord
Sweep 22 Oct 2026 · 21:04Z Build v2.1.309 528 read Stable v2.1.308 Latest v2.1.309 Next v2.1.309 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

authentication changedmanage-claude/authentication

Nearest release: v2.1.309, published 3 hours before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Recorded here
Lines+28added
Lines−28removed
From line 80 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits13to this page, all time

The whole hunk

from line 80, old and new numbered
/
lines
from line 80
8080 // const client = new Anthropic();
8181 ```
8282 
83 ```csharp C#
84 using Anthropic;
85 
86 AnthropicClient client = new() { ApiKey = "my-anthropic-api-key" };
87 // Or, with ANTHROPIC_API_KEY set in the environment:
88 // AnthropicClient client = new();
89 ```
90 
8391 ```go Go
8492 client := anthropic.NewClient(
8593 option.WithAPIKey("sk-ant-api03-..."), // defaults to os.LookupEnv("ANTHROPIC_API_KEY")
from line 100
92100 
93101 // Explicit
94102 AnthropicClient client = AnthropicOkHttpClient.builder()
95 .apiKey("my-anthropic-api-key")
96 .build();
103 .apiKey("my-anthropic-api-key")
104 .build();
97105 
98106 // From ANTHROPIC_API_KEY (or anthropic.apiKey system property)
99107 AnthropicClient clientFromEnv = AnthropicOkHttpClient.fromEnv();
100108 ```
101109 
102 ```csharp C#
103 using Anthropic;
104 
105 AnthropicClient client = new() { ApiKey = "my-anthropic-api-key" };
106 // Or, with ANTHROPIC_API_KEY set in the environment:
107 // AnthropicClient client = new();
108 ```
109 
110110 ```php PHP
111111 // Reads ANTHROPIC_API_KEY from the environment
112112 $client = new Client();
from line 133
133133 
134134<CodeGroup>
135135 ```bash cURL
136 # Required on every request for a multi-workspace key.
137 # Omit the anthropic-workspace-id header for a single-workspace key.
136 # Required on every request for a key that isn't scoped to a workspace.
137 # Omit the anthropic-workspace-id header for a key scoped to one workspace.
138138 curl https://api.anthropic.com/v1/messages \
139139 -H "x-api-key: $ANTHROPIC_API_KEY" \
140140 -H "anthropic-version: 2023-06-01" \
from line 148
148148 ```
149149 
150150 ```bash CLI
151 # Required on every command for a multi-workspace key.
152 # Omit --workspace-id for a single-workspace key.
151 # Required on every command for a key that isn't scoped to a workspace.
152 # Omit --workspace-id for a key scoped to one workspace.
153153 ant messages create \
154154 --workspace-id wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ \
155155 --model claude-opus-5-5 \
from line 160
160160 ```python Python
161161 client = Anthropic() # reads ANTHROPIC_API_KEY
162162 
163 # Required on every request for a multi-workspace key.
164 # Omit extra_headers for a single-workspace key.
163 # Required on every request for a key that isn't scoped to a workspace.
164 # Omit extra_headers for a key scoped to one workspace.
165165 message = client.messages.create(
166166 model="claude-opus-5-5",
167167 max_tokens=1024,
from line 179
179179 ```typescript TypeScript
180180 const client = new Anthropic(); // reads ANTHROPIC_API_KEY
181181 
182 // Required on every request for a multi-workspace key.
183 // Omit the second argument for a single-workspace key.
182 // Required on every request for a key that isn't scoped to a workspace.
183 // Omit the second argument for a key scoped to one workspace.
184184 const message = await client.messages.create(
185185 {
186186 model: "claude-opus-5-5",
from line 207
207207 Messages = [new UserMessageParam { Content = "Hello, Claude" }],
208208 };
209209 
210 // Required on every request for a multi-workspace key.
211 // Call client.Messages.Create(parameters) directly for a single-workspace key.
210 // Required on every request for a key that isn't scoped to a workspace.
211 // Call client.Messages.Create(parameters) directly for a key scoped to one workspace.
212212 var message = await client
213213 .WithOptions(options =>
214214 options with
from line 235
235235 ```go Go
236236 client := anthropic.NewClient() // reads ANTHROPIC_API_KEY
237237 
238 // Required on every request for a multi-workspace key.
239 // Omit the option for a single-workspace key.
238 // Required on every request for a key that isn't scoped to a workspace.
239 // Omit the option for a key scoped to one workspace.
240240 message, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
241241 Model: anthropic.ModelClaudeOpus5_5,
242242 MaxTokens: 1024,
from line 258
258258 ```java Java
259259 AnthropicClient client = AnthropicOkHttpClient.fromEnv(); // reads ANTHROPIC_API_KEY
260260 
261 // Required on every request for a multi-workspace key.
262 // Omit putAdditionalHeader for a single-workspace key.
261 // Required on every request for a key that isn't scoped to a workspace.
262 // Omit putAdditionalHeader for a key scoped to one workspace.
263263 Message message = client.messages().create(MessageCreateParams.builder()
264264 .model(Model.CLAUDE_OPUS_5_5)
265265 .maxTokens(1024)
from line 279
279279 ```php PHP
280280 $client = new Client(); // reads ANTHROPIC_API_KEY
281281 
282 // Required on every request for a multi-workspace key.
283 // Omit requestOptions for a single-workspace key.
282 // Required on every request for a key that isn't scoped to a workspace.
283 // Omit requestOptions for a key scoped to one workspace.
284284 $message = $client->messages->create(
285285 model: Model::CLAUDE_OPUS_5_5,
286286 maxTokens: 1024,
from line 296
296296 ```ruby Ruby
297297 client = Anthropic::Client.new # reads ANTHROPIC_API_KEY
298298 
299 # Required on every request for a multi-workspace key.
300 # Omit request_options for a single-workspace key.
299 # Required on every request for a key that isn't scoped to a workspace.
300 # Omit request_options for a key scoped to one workspace.
301301 message = client.messages.create(
302302 model: Anthropic::Model::CLAUDE_OPUS_5_5,
303303 max_tokens: 1024,
Feedback