The whole hunk
from line 44, old and new numbered
/
lines
from line 44
4444
4545| Header | Value | Required |
4646| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
47| `x-api-key` | Your API key from Console | One of `x-api-key` or `Authorization` |
48| `Authorization` | `Bearer <token>`, where `<token>` is a short-lived access token obtained from `POST /v1/oauth/token` through [Workload Identity Federation](https://platform.claude.com/docs/en/manage-claude/workload-identity-federation) | One of `x-api-key` or `Authorization` |
47| `Authorization` | `Bearer <token>`, where `<token>` is your API key or a short-lived access token obtained from `POST /v1/oauth/token` through [Workload Identity Federation](https://platform.claude.com/docs/en/manage-claude/workload-identity-federation) | Yes, unless `x-api-key` is set |
48| `x-api-key` | Your API key from Console. Legacy fallback for `Authorization`, still supported | No |
4949| `anthropic-workspace-id` | ID of the [workspace](https://platform.claude.com/docs/en/manage-claude/workspaces) the request runs in (for example, `wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ`). See [Select a workspace](https://platform.claude.com/docs/en/manage-claude/authentication#select-a-workspace). | Required with a multi-workspace API key. Optional for other API keys. Not used with Workload Identity Federation tokens, which select a workspace at token exchange. |
5050| `anthropic-version` | API version (for example, `2023-06-01`) | Yes |
5151| `content-type` | `application/json` | Yes |
from line 64
6464
6565**Benefits:**
6666
67* Automatic header management (`x-api-key`, `anthropic-version`, `content-type`)
67* Automatic header management (authentication, `anthropic-version`, `content-type`)
6868* Type-safe request and response handling
6969* Built-in retry logic and error handling
7070* Streaming support