One change
beta-headers
api/beta-headers
Nearest release: v2.1.238, published under an hour after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
api/beta-headers Changed · +10 / -10 lines
from line 24
Each feature's documentation states the exact beta name to send. The [API overview](https://platform.claude.com/docs/en/api/overview) lists the APIs currently in beta. -The following examples show the same request with cURL, the `ant` CLI, and the SDKs. The SDKs take beta names in the `betas` parameter and send the `anthropic-beta` header for you: +The following examples show the same request with cURL, the `ant` CLI, and the SDKs, using the [context editing](https://platform.claude.com/docs/en/build-with-claude/context-editing) beta as the example. The SDKs take beta names in the `betas` parameter and send the `anthropic-beta` header for you: <CodeGroup> ```bash cURL
from line 31
curl https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" \ + -H "anthropic-beta: context-management-2025-06-27" \ -H "content-type: application/json" \ -d '{ "model": "claude-opus-5",
from line 44
```bash CLI ant beta:messages create \ - --beta files-api-2025-04-14 \ + --beta context-management-2025-06-27 \ --model claude-opus-5 \ --max-tokens 1024 \ --message '{role: user, content: "Hello, Claude"}'
from line 57
model="claude-opus-5", max_tokens=1024, messages=[{"role": "user", "content": "Hello, Claude"}], - betas=["files-api-2025-04-14"], + betas=["context-management-2025-06-27"], ) print(response.content)
from line 70
model: "claude-opus-5", max_tokens: 1024, messages: [{ role: "user", content: "Hello, Claude" }], - betas: ["files-api-2025-04-14"] + betas: ["context-management-2025-06-27"] }); console.log(msg.content);
from line 85
Model = "claude-opus-5", MaxTokens = 1024, Messages = [new() { Role = Role.User, Content = "Hello, Claude" }], - Betas = ["files-api-2025-04-14"], + Betas = ["context-management-2025-06-27"], } );
from line 101
Messages: []anthropic.BetaMessageParam{ anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Hello, Claude")), }, - Betas: []anthropic.AnthropicBeta{anthropic.AnthropicBetaFilesAPI2025_04_14}, + Betas: []anthropic.AnthropicBeta{anthropic.AnthropicBetaContextManagement2025_06_27}, }) if err != nil { panic(err)
from line 117
.model(Model.CLAUDE_OPUS_5) .maxTokens(1024) .addUserMessage("Hello, Claude") - .addBeta(AnthropicBeta.FILES_API_2025_04_14) + .addBeta(AnthropicBeta.CONTEXT_MANAGEMENT_2025_06_27) .build(); BetaMessage message = client.beta().messages().create(params);
from line 131
maxTokens: 1024, messages: [['role' => 'user', 'content' => 'Hello, Claude']], model: 'claude-opus-5', - betas: ['files-api-2025-04-14'], + betas: ['context-management-2025-06-27'], ); echo $message;
from line 144
model: "claude-opus-5", max_tokens: 1024, messages: [{role: "user", content: "Hello, Claude"}], - betas: ["files-api-2025-04-14"] + betas: ["context-management-2025-06-27"] ) puts(message.content)