---
title: Compliance
url: https://platform.claude.com/docs/en/api/go/beta/compliance
---

# Compliance

## Compliance › Review › Cases

### List Review Cases

`client.Beta.Compliance.Review.Cases.List(ctx, params) (*PageCursor[BetaComplianceReviewCase], error)`

**GET** `/v1/compliance/review/cases`

List the review cases of every organization that the API key can reach, newest first by default. Both open and closed cases are returned unless `status` is set.

To sync, store the largest `updated_at` you have read, and send it as the at-or-after filter on `updated_at`, sorted by `updated_at` ascending. That finds new cases, newly closed cases, and cases with a new notice. Read every page, match results by `id`, and store the new largest value after the last page.

A request with the `anthropic-user-profile-id` header and no `user_profile_id` parameter returns a 400 error.

An Admin API key with the `read:compliance_review_cases` scope can call this endpoint.

#### Parameters

- `params BetaComplianceReviewCaseListParams`

  - `CreatedAtGt param.Opt[Time] Optional` (query parameter)

    Return only cases whose `created_at` is after this time.

    format: date-time

  - `CreatedAtGte param.Opt[Time] Optional` (query parameter)

    Return only cases whose `created_at` is at or after this time.

    format: date-time

  - `CreatedAtLt param.Opt[Time] Optional` (query parameter)

    Return only cases whose `created_at` is before this time.

    format: date-time

  - `CreatedAtLte param.Opt[Time] Optional` (query parameter)

    Return only cases whose `created_at` is at or before this time.

    format: date-time

  - `Limit param.Opt[int64] Optional` (query parameter)

    Number of cases to return per page, between 1 and 100. Defaults to 20.

    format: int32

  - `Order BetaComplianceReviewOrder Optional` (query parameter)

    Sort direction, by `order_by` and then by `id`. Defaults to `desc`.

  - `OrderBy BetaComplianceReviewCaseOrderBy Optional` (query parameter)

    The field to sort by. Defaults to `created_at`.

  - `Page param.Opt[string] Optional` (query parameter)

    Opaque cursor from a previous response's `next_page`. Leave it out to get the first page. A cursor works only with the filters and sort order of the request that returned it.

  - `Status BetaComplianceReviewCaseStatusFilter Optional` (query parameter)

    Return only cases with this status. Leave it out to get both open and closed cases.

  - `UpdatedAtGt param.Opt[Time] Optional` (query parameter)

    Return only cases whose `updated_at` is after this time.

    format: date-time

  - `UpdatedAtGte param.Opt[Time] Optional` (query parameter)

    Return cases whose `updated_at` is at or after this time. Cases slightly older than this time are also returned, so that a sync misses no change.

    format: date-time

  - `UpdatedAtLt param.Opt[Time] Optional` (query parameter)

    Return only cases whose `updated_at` is before this time.

    format: date-time

  - `UpdatedAtLte param.Opt[Time] Optional` (query parameter)

    Return only cases whose `updated_at` is at or before this time.

    format: date-time

  - `UserProfileID param.Opt[string] Optional` (query parameter)

    Return only cases where a message's `user_profile_id` is this ID, including cases that also have messages of other user profiles. A case stops matching once its messages' `user_profile_id` is null. An ID that matches no reachable case returns no cases. A request that sends the `anthropic-user-profile-id` header without this parameter returns a 400 error.

  - `Betas []AnthropicBeta Optional` (header parameter)

    Optional header to specify the beta version(s) you want to use.

    - `const AnthropicBetaComputerUse2024_10_22 AnthropicBeta = "computer-use-2024-10-22"`

    - `const AnthropicBetaComputerUse2025_01_24 AnthropicBeta = "computer-use-2025-01-24"`

    - `const AnthropicBetaOutput128k2025_02_19 AnthropicBeta = "output-128k-2025-02-19"`

    - `const AnthropicBetaMCPClient2025_04_04 AnthropicBeta = "mcp-client-2025-04-04"`

    - `const AnthropicBetaMCPClient2025_11_20 AnthropicBeta = "mcp-client-2025-11-20"`

    - `const AnthropicBetaDevFullThinking2025_05_14 AnthropicBeta = "dev-full-thinking-2025-05-14"`

    - `const AnthropicBetaInterleavedThinking2025_05_14 AnthropicBeta = "interleaved-thinking-2025-05-14"`

    - `const AnthropicBetaCodeExecution2025_05_22 AnthropicBeta = "code-execution-2025-05-22"`

    - `const AnthropicBetaContext1m2025_08_07 AnthropicBeta = "context-1m-2025-08-07"`

    - `const AnthropicBetaContextManagement2025_06_27 AnthropicBeta = "context-management-2025-06-27"`

    - `const AnthropicBetaModelContextWindowExceeded2025_08_26 AnthropicBeta = "model-context-window-exceeded-2025-08-26"`

    - `const AnthropicBetaFastMode2026_02_01 AnthropicBeta = "fast-mode-2026-02-01"`

    - `const AnthropicBetaOutput300k2026_03_24 AnthropicBeta = "output-300k-2026-03-24"`

    - `const AnthropicBetaUserProfiles2026_03_24 AnthropicBeta = "user-profiles-2026-03-24"`

    - `const AnthropicBetaUserProfiles2026_08_18 AnthropicBeta = "user-profiles-2026-08-18"`

    - `const AnthropicBetaUserProfiles2026_09_04 AnthropicBeta = "user-profiles-2026-09-04"`

    - `const AnthropicBetaAdvisorTool2026_03_01 AnthropicBeta = "advisor-tool-2026-03-01"`

    - `const AnthropicBetaManagedAgents2026_04_01 AnthropicBeta = "managed-agents-2026-04-01"`

    - `const AnthropicBetaDreaming2026_04_21 AnthropicBeta = "dreaming-2026-04-21"`

    - `const AnthropicBetaThinkingTokenCount2026_05_13 AnthropicBeta = "thinking-token-count-2026-05-13"`

    - `const AnthropicBetaServerSideFallback2026_06_01 AnthropicBeta = "server-side-fallback-2026-06-01"`

    - `const AnthropicBetaServerSideFallback2026_07_01 AnthropicBeta = "server-side-fallback-2026-07-01"`

    - `const AnthropicBetaFallbackCredit2026_06_01 AnthropicBeta = "fallback-credit-2026-06-01"`

    - `const AnthropicBetaFallbackCredit2026_07_01 AnthropicBeta = "fallback-credit-2026-07-01"`

    - `const AnthropicBetaAgentMemory2026_07_22 AnthropicBeta = "agent-memory-2026-07-22"`

    - `const AnthropicBetaMidConversationToolChanges2026_07_01 AnthropicBeta = "mid-conversation-tool-changes-2026-07-01"`

    - `const AnthropicBetaCompact2026_01_12 AnthropicBeta = "compact-2026-01-12"`

    - `const AnthropicBetaComputerUse2025_11_24 AnthropicBeta = "computer-use-2025-11-24"`

    - `const AnthropicBetaMCPTunnels2026_06_22 AnthropicBeta = "mcp-tunnels-2026-06-22"`

    - `const AnthropicBetaStructuredOutputs2025_11_13 AnthropicBeta = "structured-outputs-2025-11-13"`

    - `const AnthropicBetaTaskBudgets2026_03_13 AnthropicBeta = "task-budgets-2026-03-13"`

    - `const AnthropicBetaThinkingDisplayUpdates2026_08_18 AnthropicBeta = "thinking-display-updates-2026-08-18"`

    - `const AnthropicBetaMidConversationOutputConfig2026_07_01 AnthropicBeta = "mid-conversation-output-config-2026-07-01"`

    - `const AnthropicBetaThinkingBindingControls2026_08_01 AnthropicBeta = "thinking-binding-controls-2026-08-01"`

    - `const AnthropicBetaMidConversationSystemClearAt2026_08_21 AnthropicBeta = "mid-conversation-system-clear-at-2026-08-21"`

    - `const AnthropicBetaCompact2026_09_04 AnthropicBeta = "compact-2026-09-04"`

    - `const AnthropicBetaInlineTools2026_09_15 AnthropicBeta = "inline-tools-2026-09-15"`

    - `const AnthropicBetaMCPClient2026_09_15 AnthropicBeta = "mcp-client-2026-09-15"`

    - `const AnthropicBetaCEPlugins2026_09_01 AnthropicBeta = "ce-plugins-2026-09-01"`

    - `const AnthropicBetaSpendLimitReads2026_09_26 AnthropicBeta = "spend-limit-reads-2026-09-26"`

    - `const AnthropicBetaTelemetryDestinations2026_08_11 AnthropicBeta = "telemetry-destinations-2026-08-11"`

    - `const AnthropicBetaWebhooks2026_10_07 AnthropicBeta = "webhooks-2026-10-07"`

    - `const AnthropicBetaAdminUserSignOut2026_10_08 AnthropicBeta = "admin-user-sign-out-2026-10-08"`

    - `const AnthropicBetaMessageThreads2026_08_12 AnthropicBeta = "message-threads-2026-08-12"`

    - `const AnthropicBetaAnalyticsUsageCost2026_08_24 AnthropicBeta = "analytics-usage-cost-2026-08-24"`

    - `const AnthropicBetaExperimentalClaudeTag2026_10_21 AnthropicBeta = "experimental-claude-tag-2026-10-21"`

    - `const AnthropicBetaCEClaudeCodeManagedSettings2026_10_06 AnthropicBeta = "ce-claude-code-managed-settings-2026-10-06"`

    - `const AnthropicBetaEfs2026_10_01 AnthropicBeta = "efs-2026-10-01"`

    - `const AnthropicBetaGoogleManagedDataControls2026_09_01 AnthropicBeta = "google-managed-data-controls-2026-09-01"`

    - `const AnthropicBetaUserProfilesBilling2026_10_01 AnthropicBeta = "user-profiles-billing-2026-10-01"`

    - `const AnthropicBetaMessageBatches2024_09_24 AnthropicBeta = "message-batches-2024-09-24"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaPromptCaching2024_07_31 AnthropicBeta = "prompt-caching-2024-07-31"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaPDFs2024_09_25 AnthropicBeta = "pdfs-2024-09-25"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaTokenCounting2024_11_01 AnthropicBeta = "token-counting-2024-11-01"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaTokenEfficientTools2025_02_19 AnthropicBeta = "token-efficient-tools-2025-02-19"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaFilesAPI2025_04_14 AnthropicBeta = "files-api-2025-04-14"`

      **Deprecated**: Sending this value selects the beta response shapes. Removing it moves you to the current shapes, so follow the migration steps: https://platform.claude.com/docs/en/build-with-claude/files#migrate-from-files-api-2025-04-14

    - `const AnthropicBetaExtendedCacheTTL2025_04_11 AnthropicBeta = "extended-cache-ttl-2025-04-11"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaSkills2025_10_02 AnthropicBeta = "skills-2025-10-02"`

      **Deprecated**: Sending this value selects the beta response shapes. Removing it moves you to the current shapes, so follow the migration steps: https://platform.claude.com/docs/en/build-with-claude/skills-guide#migrate-from-skills-2025-10-02

    - `const AnthropicBetaCacheDiagnosis2026_04_07 AnthropicBeta = "cache-diagnosis-2026-04-07"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaCEUserManagement2026_07_13 AnthropicBeta = "ce-user-management-2026-07-13"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

#### Returns

- `type BetaComplianceReviewCase`

  A record of an organization's messages that Anthropic flagged and sent to the organization to review. It lists the messages by ID and doesn't include their content.

  - `Type ComplianceReviewCase`

    The object type, always `compliance_review_case`.

  - `ID string`

    The unique ID of the case (`rvc_...`).

  - `CreatedAt Time`

    When Anthropic sent the case. The time you have to respond starts here.

    format: date-time

  - `EnforcementAction BetaComplianceReviewEnforcementAction`

    The action that Anthropic took before it sent the case. Null when it took none.

    - `Type string`

      The kind of action. New values can appear, so accept a value that you don't know.

  - `OrganizationID string`

    The UUID of the organization that sent the flagged messages, which the case belongs to.

  - `PolicyCategories []BetaComplianceReviewPolicyCategory`

    Anthropic's labels for why the messages were flagged, such as `cyber` or `fraud`. There is at least one. New values can appear, so accept a value that you don't know.

    - `const BetaComplianceReviewPolicyCategoryCyber BetaComplianceReviewPolicyCategory = "cyber"`

    - `const BetaComplianceReviewPolicyCategoryBio BetaComplianceReviewPolicyCategory = "bio"`

    - `const BetaComplianceReviewPolicyCategoryChem BetaComplianceReviewPolicyCategory = "chem"`

    - `const BetaComplianceReviewPolicyCategoryRadnuc BetaComplianceReviewPolicyCategory = "radnuc"`

    - `const BetaComplianceReviewPolicyCategoryCgw BetaComplianceReviewPolicyCategory = "cgw"`

    - `const BetaComplianceReviewPolicyCategoryMgw BetaComplianceReviewPolicyCategory = "mgw"`

    - `const BetaComplianceReviewPolicyCategoryIo BetaComplianceReviewPolicyCategory = "io"`

    - `const BetaComplianceReviewPolicyCategoryFraud BetaComplianceReviewPolicyCategory = "fraud"`

    - `const BetaComplianceReviewPolicyCategoryViolentExtremism BetaComplianceReviewPolicyCategory = "violent_extremism"`

    - `const BetaComplianceReviewPolicyCategorySurveillance BetaComplianceReviewPolicyCategory = "surveillance"`

    - `const BetaComplianceReviewPolicyCategoryHumanExploitation BetaComplianceReviewPolicyCategory = "human_exploitation"`

    - `const BetaComplianceReviewPolicyCategorySelfHarm BetaComplianceReviewPolicyCategory = "self_harm"`

    - `const BetaComplianceReviewPolicyCategoryAdultContent BetaComplianceReviewPolicyCategory = "adult_content"`

    - `const BetaComplianceReviewPolicyCategoryReasoningExtraction BetaComplianceReviewPolicyCategory = "reasoning_extraction"`

    - `const BetaComplianceReviewPolicyCategoryFrontierLLM BetaComplianceReviewPolicyCategory = "frontier_llm"`

    - `const BetaComplianceReviewPolicyCategoryCompromisedKey BetaComplianceReviewPolicyCategory = "compromised_key"`

    - `const BetaComplianceReviewPolicyCategoryBenign BetaComplianceReviewPolicyCategory = "benign"`

    - `const BetaComplianceReviewPolicyCategoryOther BetaComplianceReviewPolicyCategory = "other"`

    - `const BetaComplianceReviewPolicyCategoryUndetermined BetaComplianceReviewPolicyCategory = "undetermined"`

  - `Status BetaComplianceReviewCaseStatusUnion`

    Whether Anthropic is still waiting for a response.

    - `type BetaComplianceReviewCaseOpen`

      Anthropic is waiting for a response to the case.

      - `Type Open`

    - `type BetaComplianceReviewCaseClosed`

      Anthropic has stopped waiting for a response. A closed case stays closed.

      - `Type Closed`

      - `Reason BetaComplianceReviewCaseCloseReason`

        Why the case closed. It doesn't change afterwards.

        - `Type BetaComplianceReviewCaseCloseReasonType`

          `responded` means that Anthropic recorded a response. `window_ended` means that the time to respond ended with no response. `ended_by_anthropic` means that Anthropic ended the case before that time was over. New values can appear, so accept a value that you don't know.

          - `const BetaComplianceReviewCaseCloseReasonTypeResponded BetaComplianceReviewCaseCloseReasonType = "responded"`

          - `const BetaComplianceReviewCaseCloseReasonTypeWindowEnded BetaComplianceReviewCaseCloseReasonType = "window_ended"`

          - `const BetaComplianceReviewCaseCloseReasonTypeEndedByAnthropic BetaComplianceReviewCaseCloseReasonType = "ended_by_anthropic"`

  - `Transcripts []BetaComplianceReviewTranscript`

    The flagged messages. There is at least one, and the list isn't paginated.

    - `ItemID string`

      The ID of the flagged message.

    - `UserProfileID string`

      The ID of the user profile that the message belongs to. Null when the message belongs to none, or when the profile can no longer be looked up.

  - `UpdatedAt Time`

    When the case last changed. It changes when Anthropic sends the case, when the case closes, and when Anthropic sends a notice about the case.

    format: date-time

  - `WorkspaceID string`

    The ID of the workspace that sent the flagged messages (`wrkspc_...`). Null when the messages have no workspace, and it can be null for the default workspace.

#### Example

```go
package main

import (
	"context"
	"fmt"

	"github.com/anthropics/anthropic-sdk-go/v2"
	"github.com/anthropics/anthropic-sdk-go/v2/option"
)

func main() {
	client := anthropic.NewClient(
		option.WithAPIKey("my-anthropic-api-key"),
	)
	page, err := client.Beta.Compliance.Review.Cases.List(context.TODO(), anthropic.BetaComplianceReviewCaseListParams{})
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", page)
}
```

##### Response (200)

```json
{
  "data": [
    {
      "id": "id",
      "created_at": "2019-12-27T18:11:19.117Z",
      "enforcement_action": {
        "type": "type"
      },
      "organization_id": "organization_id",
      "policy_categories": [
        "cyber"
      ],
      "status": {
        "type": "open"
      },
      "transcripts": [
        {
          "item_id": "item_id",
          "user_profile_id": "user_profile_id"
        }
      ],
      "type": "compliance_review_case",
      "updated_at": "2019-12-27T18:11:19.117Z",
      "workspace_id": "workspace_id"
    }
  ],
  "next_page": "next_page"
}
```

### Get Review Case

`client.Beta.Compliance.Review.Cases.Get(ctx, caseID, query) (*BetaComplianceReviewCase, error)`

**GET** `/v1/compliance/review/cases/{case_id}`

Read one review case.

A case that the API key can't reach, or that Anthropic hasn't sent, returns the same 404 as a case that doesn't exist.

An Admin API key with the `read:compliance_review_cases` scope can call this endpoint.

#### Parameters

- `caseID string` (path parameter)

  The ID of the case (`rvc_...`).

- `query BetaComplianceReviewCaseGetParams`

  - `Betas []AnthropicBeta Optional` (header parameter)

    Optional header to specify the beta version(s) you want to use.

    - `const AnthropicBetaComputerUse2024_10_22 AnthropicBeta = "computer-use-2024-10-22"`

    - `const AnthropicBetaComputerUse2025_01_24 AnthropicBeta = "computer-use-2025-01-24"`

    - `const AnthropicBetaOutput128k2025_02_19 AnthropicBeta = "output-128k-2025-02-19"`

    - `const AnthropicBetaMCPClient2025_04_04 AnthropicBeta = "mcp-client-2025-04-04"`

    - `const AnthropicBetaMCPClient2025_11_20 AnthropicBeta = "mcp-client-2025-11-20"`

    - `const AnthropicBetaDevFullThinking2025_05_14 AnthropicBeta = "dev-full-thinking-2025-05-14"`

    - `const AnthropicBetaInterleavedThinking2025_05_14 AnthropicBeta = "interleaved-thinking-2025-05-14"`

    - `const AnthropicBetaCodeExecution2025_05_22 AnthropicBeta = "code-execution-2025-05-22"`

    - `const AnthropicBetaContext1m2025_08_07 AnthropicBeta = "context-1m-2025-08-07"`

    - `const AnthropicBetaContextManagement2025_06_27 AnthropicBeta = "context-management-2025-06-27"`

    - `const AnthropicBetaModelContextWindowExceeded2025_08_26 AnthropicBeta = "model-context-window-exceeded-2025-08-26"`

    - `const AnthropicBetaFastMode2026_02_01 AnthropicBeta = "fast-mode-2026-02-01"`

    - `const AnthropicBetaOutput300k2026_03_24 AnthropicBeta = "output-300k-2026-03-24"`

    - `const AnthropicBetaUserProfiles2026_03_24 AnthropicBeta = "user-profiles-2026-03-24"`

    - `const AnthropicBetaUserProfiles2026_08_18 AnthropicBeta = "user-profiles-2026-08-18"`

    - `const AnthropicBetaUserProfiles2026_09_04 AnthropicBeta = "user-profiles-2026-09-04"`

    - `const AnthropicBetaAdvisorTool2026_03_01 AnthropicBeta = "advisor-tool-2026-03-01"`

    - `const AnthropicBetaManagedAgents2026_04_01 AnthropicBeta = "managed-agents-2026-04-01"`

    - `const AnthropicBetaDreaming2026_04_21 AnthropicBeta = "dreaming-2026-04-21"`

    - `const AnthropicBetaThinkingTokenCount2026_05_13 AnthropicBeta = "thinking-token-count-2026-05-13"`

    - `const AnthropicBetaServerSideFallback2026_06_01 AnthropicBeta = "server-side-fallback-2026-06-01"`

    - `const AnthropicBetaServerSideFallback2026_07_01 AnthropicBeta = "server-side-fallback-2026-07-01"`

    - `const AnthropicBetaFallbackCredit2026_06_01 AnthropicBeta = "fallback-credit-2026-06-01"`

    - `const AnthropicBetaFallbackCredit2026_07_01 AnthropicBeta = "fallback-credit-2026-07-01"`

    - `const AnthropicBetaAgentMemory2026_07_22 AnthropicBeta = "agent-memory-2026-07-22"`

    - `const AnthropicBetaMidConversationToolChanges2026_07_01 AnthropicBeta = "mid-conversation-tool-changes-2026-07-01"`

    - `const AnthropicBetaCompact2026_01_12 AnthropicBeta = "compact-2026-01-12"`

    - `const AnthropicBetaComputerUse2025_11_24 AnthropicBeta = "computer-use-2025-11-24"`

    - `const AnthropicBetaMCPTunnels2026_06_22 AnthropicBeta = "mcp-tunnels-2026-06-22"`

    - `const AnthropicBetaStructuredOutputs2025_11_13 AnthropicBeta = "structured-outputs-2025-11-13"`

    - `const AnthropicBetaTaskBudgets2026_03_13 AnthropicBeta = "task-budgets-2026-03-13"`

    - `const AnthropicBetaThinkingDisplayUpdates2026_08_18 AnthropicBeta = "thinking-display-updates-2026-08-18"`

    - `const AnthropicBetaMidConversationOutputConfig2026_07_01 AnthropicBeta = "mid-conversation-output-config-2026-07-01"`

    - `const AnthropicBetaThinkingBindingControls2026_08_01 AnthropicBeta = "thinking-binding-controls-2026-08-01"`

    - `const AnthropicBetaMidConversationSystemClearAt2026_08_21 AnthropicBeta = "mid-conversation-system-clear-at-2026-08-21"`

    - `const AnthropicBetaCompact2026_09_04 AnthropicBeta = "compact-2026-09-04"`

    - `const AnthropicBetaInlineTools2026_09_15 AnthropicBeta = "inline-tools-2026-09-15"`

    - `const AnthropicBetaMCPClient2026_09_15 AnthropicBeta = "mcp-client-2026-09-15"`

    - `const AnthropicBetaCEPlugins2026_09_01 AnthropicBeta = "ce-plugins-2026-09-01"`

    - `const AnthropicBetaSpendLimitReads2026_09_26 AnthropicBeta = "spend-limit-reads-2026-09-26"`

    - `const AnthropicBetaTelemetryDestinations2026_08_11 AnthropicBeta = "telemetry-destinations-2026-08-11"`

    - `const AnthropicBetaWebhooks2026_10_07 AnthropicBeta = "webhooks-2026-10-07"`

    - `const AnthropicBetaAdminUserSignOut2026_10_08 AnthropicBeta = "admin-user-sign-out-2026-10-08"`

    - `const AnthropicBetaMessageThreads2026_08_12 AnthropicBeta = "message-threads-2026-08-12"`

    - `const AnthropicBetaAnalyticsUsageCost2026_08_24 AnthropicBeta = "analytics-usage-cost-2026-08-24"`

    - `const AnthropicBetaExperimentalClaudeTag2026_10_21 AnthropicBeta = "experimental-claude-tag-2026-10-21"`

    - `const AnthropicBetaCEClaudeCodeManagedSettings2026_10_06 AnthropicBeta = "ce-claude-code-managed-settings-2026-10-06"`

    - `const AnthropicBetaEfs2026_10_01 AnthropicBeta = "efs-2026-10-01"`

    - `const AnthropicBetaGoogleManagedDataControls2026_09_01 AnthropicBeta = "google-managed-data-controls-2026-09-01"`

    - `const AnthropicBetaUserProfilesBilling2026_10_01 AnthropicBeta = "user-profiles-billing-2026-10-01"`

    - `const AnthropicBetaMessageBatches2024_09_24 AnthropicBeta = "message-batches-2024-09-24"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaPromptCaching2024_07_31 AnthropicBeta = "prompt-caching-2024-07-31"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaPDFs2024_09_25 AnthropicBeta = "pdfs-2024-09-25"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaTokenCounting2024_11_01 AnthropicBeta = "token-counting-2024-11-01"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaTokenEfficientTools2025_02_19 AnthropicBeta = "token-efficient-tools-2025-02-19"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaFilesAPI2025_04_14 AnthropicBeta = "files-api-2025-04-14"`

      **Deprecated**: Sending this value selects the beta response shapes. Removing it moves you to the current shapes, so follow the migration steps: https://platform.claude.com/docs/en/build-with-claude/files#migrate-from-files-api-2025-04-14

    - `const AnthropicBetaExtendedCacheTTL2025_04_11 AnthropicBeta = "extended-cache-ttl-2025-04-11"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaSkills2025_10_02 AnthropicBeta = "skills-2025-10-02"`

      **Deprecated**: Sending this value selects the beta response shapes. Removing it moves you to the current shapes, so follow the migration steps: https://platform.claude.com/docs/en/build-with-claude/skills-guide#migrate-from-skills-2025-10-02

    - `const AnthropicBetaCacheDiagnosis2026_04_07 AnthropicBeta = "cache-diagnosis-2026-04-07"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaCEUserManagement2026_07_13 AnthropicBeta = "ce-user-management-2026-07-13"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

#### Returns

- `type BetaComplianceReviewCase`

  A record of an organization's messages that Anthropic flagged and sent to the organization to review. It lists the messages by ID and doesn't include their content.

  - `Type ComplianceReviewCase`

    The object type, always `compliance_review_case`.

  - `ID string`

    The unique ID of the case (`rvc_...`).

  - `CreatedAt Time`

    When Anthropic sent the case. The time you have to respond starts here.

    format: date-time

  - `EnforcementAction BetaComplianceReviewEnforcementAction`

    The action that Anthropic took before it sent the case. Null when it took none.

    - `Type string`

      The kind of action. New values can appear, so accept a value that you don't know.

  - `OrganizationID string`

    The UUID of the organization that sent the flagged messages, which the case belongs to.

  - `PolicyCategories []BetaComplianceReviewPolicyCategory`

    Anthropic's labels for why the messages were flagged, such as `cyber` or `fraud`. There is at least one. New values can appear, so accept a value that you don't know.

    - `const BetaComplianceReviewPolicyCategoryCyber BetaComplianceReviewPolicyCategory = "cyber"`

    - `const BetaComplianceReviewPolicyCategoryBio BetaComplianceReviewPolicyCategory = "bio"`

    - `const BetaComplianceReviewPolicyCategoryChem BetaComplianceReviewPolicyCategory = "chem"`

    - `const BetaComplianceReviewPolicyCategoryRadnuc BetaComplianceReviewPolicyCategory = "radnuc"`

    - `const BetaComplianceReviewPolicyCategoryCgw BetaComplianceReviewPolicyCategory = "cgw"`

    - `const BetaComplianceReviewPolicyCategoryMgw BetaComplianceReviewPolicyCategory = "mgw"`

    - `const BetaComplianceReviewPolicyCategoryIo BetaComplianceReviewPolicyCategory = "io"`

    - `const BetaComplianceReviewPolicyCategoryFraud BetaComplianceReviewPolicyCategory = "fraud"`

    - `const BetaComplianceReviewPolicyCategoryViolentExtremism BetaComplianceReviewPolicyCategory = "violent_extremism"`

    - `const BetaComplianceReviewPolicyCategorySurveillance BetaComplianceReviewPolicyCategory = "surveillance"`

    - `const BetaComplianceReviewPolicyCategoryHumanExploitation BetaComplianceReviewPolicyCategory = "human_exploitation"`

    - `const BetaComplianceReviewPolicyCategorySelfHarm BetaComplianceReviewPolicyCategory = "self_harm"`

    - `const BetaComplianceReviewPolicyCategoryAdultContent BetaComplianceReviewPolicyCategory = "adult_content"`

    - `const BetaComplianceReviewPolicyCategoryReasoningExtraction BetaComplianceReviewPolicyCategory = "reasoning_extraction"`

    - `const BetaComplianceReviewPolicyCategoryFrontierLLM BetaComplianceReviewPolicyCategory = "frontier_llm"`

    - `const BetaComplianceReviewPolicyCategoryCompromisedKey BetaComplianceReviewPolicyCategory = "compromised_key"`

    - `const BetaComplianceReviewPolicyCategoryBenign BetaComplianceReviewPolicyCategory = "benign"`

    - `const BetaComplianceReviewPolicyCategoryOther BetaComplianceReviewPolicyCategory = "other"`

    - `const BetaComplianceReviewPolicyCategoryUndetermined BetaComplianceReviewPolicyCategory = "undetermined"`

  - `Status BetaComplianceReviewCaseStatusUnion`

    Whether Anthropic is still waiting for a response.

    - `type BetaComplianceReviewCaseOpen`

      Anthropic is waiting for a response to the case.

      - `Type Open`

    - `type BetaComplianceReviewCaseClosed`

      Anthropic has stopped waiting for a response. A closed case stays closed.

      - `Type Closed`

      - `Reason BetaComplianceReviewCaseCloseReason`

        Why the case closed. It doesn't change afterwards.

        - `Type BetaComplianceReviewCaseCloseReasonType`

          `responded` means that Anthropic recorded a response. `window_ended` means that the time to respond ended with no response. `ended_by_anthropic` means that Anthropic ended the case before that time was over. New values can appear, so accept a value that you don't know.

          - `const BetaComplianceReviewCaseCloseReasonTypeResponded BetaComplianceReviewCaseCloseReasonType = "responded"`

          - `const BetaComplianceReviewCaseCloseReasonTypeWindowEnded BetaComplianceReviewCaseCloseReasonType = "window_ended"`

          - `const BetaComplianceReviewCaseCloseReasonTypeEndedByAnthropic BetaComplianceReviewCaseCloseReasonType = "ended_by_anthropic"`

  - `Transcripts []BetaComplianceReviewTranscript`

    The flagged messages. There is at least one, and the list isn't paginated.

    - `ItemID string`

      The ID of the flagged message.

    - `UserProfileID string`

      The ID of the user profile that the message belongs to. Null when the message belongs to none, or when the profile can no longer be looked up.

  - `UpdatedAt Time`

    When the case last changed. It changes when Anthropic sends the case, when the case closes, and when Anthropic sends a notice about the case.

    format: date-time

  - `WorkspaceID string`

    The ID of the workspace that sent the flagged messages (`wrkspc_...`). Null when the messages have no workspace, and it can be null for the default workspace.

#### Example

```go
package main

import (
	"context"
	"fmt"

	"github.com/anthropics/anthropic-sdk-go/v2"
	"github.com/anthropics/anthropic-sdk-go/v2/option"
)

func main() {
	client := anthropic.NewClient(
		option.WithAPIKey("my-anthropic-api-key"),
	)
	betaComplianceReviewCase, err := client.Beta.Compliance.Review.Cases.Get(
		context.TODO(),
		"case_id",
		anthropic.BetaComplianceReviewCaseGetParams{},
	)
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", betaComplianceReviewCase.ID)
}
```

##### Response (200)

```json
{
  "id": "id",
  "created_at": "2019-12-27T18:11:19.117Z",
  "enforcement_action": {
    "type": "type"
  },
  "organization_id": "organization_id",
  "policy_categories": [
    "cyber"
  ],
  "status": {
    "type": "open"
  },
  "transcripts": [
    {
      "item_id": "item_id",
      "user_profile_id": "user_profile_id"
    }
  ],
  "type": "compliance_review_case",
  "updated_at": "2019-12-27T18:11:19.117Z",
  "workspace_id": "workspace_id"
}
```

### Respond to Review Case

`client.Beta.Compliance.Review.Cases.Respond(ctx, caseID, params) (*BetaComplianceReviewCase, error)`

**POST** `/v1/compliance/review/cases/{case_id}/respond`

Send your conclusion on a review case. A response closes the case, and a closed case can't be reopened.

Only the first response counts. A request is safe to send again: if the closed case has a response with the same field values, in any list order, the API returns 200 and changes nothing. If the closed case has a different response, or none, the API returns a 400 with `case_closed` in `error.details.error_code`.

If your end customer reviews this case instead of you, the API returns a 403 with `case_reviewed_by_end_customer` in `error.details.error_code`.

An Admin API key with the `write:compliance_review_cases` scope can call this endpoint.

#### Parameters

- `caseID string` (path parameter)

  The ID of the case (`rvc_...`).

- `params BetaComplianceReviewCaseRespondParams`

  - `Determination BetaComplianceReviewDetermination`

    Your conclusion on the case as a whole. Anthropic doesn't check it against `verdicts`.

  - `PolicyCategories []BetaComplianceReviewViolatedPolicyCategory Optional`

    The policy categories that you found were violated. Send one to four with `violation`, and none with `no_violation`. They need not match the case's own. Each value is one of `cyber`, `bio`, `chem`, `radnuc` (radiological or nuclear weapons), `cgw` (conventional weapons), `mgw` (military-grade weapons systems), `io` (influence operations), `fraud`, `violent_extremism`, `surveillance`, `human_exploitation`, `self_harm`, `adult_content`, `reasoning_extraction`, `frontier_llm` (use of the model to accelerate frontier AI research and development in restricted ways), `compromised_key` or `other`, and can appear once.

    - `const BetaComplianceReviewViolatedPolicyCategoryCyber BetaComplianceReviewViolatedPolicyCategory = "cyber"`

    - `const BetaComplianceReviewViolatedPolicyCategoryBio BetaComplianceReviewViolatedPolicyCategory = "bio"`

    - `const BetaComplianceReviewViolatedPolicyCategoryChem BetaComplianceReviewViolatedPolicyCategory = "chem"`

    - `const BetaComplianceReviewViolatedPolicyCategoryRadnuc BetaComplianceReviewViolatedPolicyCategory = "radnuc"`

    - `const BetaComplianceReviewViolatedPolicyCategoryCgw BetaComplianceReviewViolatedPolicyCategory = "cgw"`

    - `const BetaComplianceReviewViolatedPolicyCategoryMgw BetaComplianceReviewViolatedPolicyCategory = "mgw"`

    - `const BetaComplianceReviewViolatedPolicyCategoryIo BetaComplianceReviewViolatedPolicyCategory = "io"`

    - `const BetaComplianceReviewViolatedPolicyCategoryFraud BetaComplianceReviewViolatedPolicyCategory = "fraud"`

    - `const BetaComplianceReviewViolatedPolicyCategoryViolentExtremism BetaComplianceReviewViolatedPolicyCategory = "violent_extremism"`

    - `const BetaComplianceReviewViolatedPolicyCategorySurveillance BetaComplianceReviewViolatedPolicyCategory = "surveillance"`

    - `const BetaComplianceReviewViolatedPolicyCategoryHumanExploitation BetaComplianceReviewViolatedPolicyCategory = "human_exploitation"`

    - `const BetaComplianceReviewViolatedPolicyCategorySelfHarm BetaComplianceReviewViolatedPolicyCategory = "self_harm"`

    - `const BetaComplianceReviewViolatedPolicyCategoryAdultContent BetaComplianceReviewViolatedPolicyCategory = "adult_content"`

    - `const BetaComplianceReviewViolatedPolicyCategoryReasoningExtraction BetaComplianceReviewViolatedPolicyCategory = "reasoning_extraction"`

    - `const BetaComplianceReviewViolatedPolicyCategoryFrontierLLM BetaComplianceReviewViolatedPolicyCategory = "frontier_llm"`

    - `const BetaComplianceReviewViolatedPolicyCategoryCompromisedKey BetaComplianceReviewViolatedPolicyCategory = "compromised_key"`

    - `const BetaComplianceReviewViolatedPolicyCategoryOther BetaComplianceReviewViolatedPolicyCategory = "other"`

  - `Verdicts []BetaComplianceReviewVerdictParam Optional`

    Your conclusions on individual messages of the case. They need not cover every message, and each `item_id` can appear once.

    - `Determination BetaComplianceReviewDetermination`

      Your conclusion on this message.

      - `const BetaComplianceReviewDeterminationViolation BetaComplianceReviewDetermination = "violation"`

        The messages violated a policy.

      - `const BetaComplianceReviewDeterminationNoViolation BetaComplianceReviewDetermination = "no_violation"`

        The messages violated no policy.

    - `ItemID string`

      The `item_id` of one of the case's `transcripts`.

    - `PolicyCategory BetaComplianceReviewViolatedPolicyCategory Optional`

      The policy category that this message violated, from the values that the request's `policy_categories` accepts. Optional with `violation`. Leave it out with `no_violation`.

      - `const BetaComplianceReviewViolatedPolicyCategoryCyber BetaComplianceReviewViolatedPolicyCategory = "cyber"`

      - `const BetaComplianceReviewViolatedPolicyCategoryBio BetaComplianceReviewViolatedPolicyCategory = "bio"`

      - `const BetaComplianceReviewViolatedPolicyCategoryChem BetaComplianceReviewViolatedPolicyCategory = "chem"`

      - `const BetaComplianceReviewViolatedPolicyCategoryRadnuc BetaComplianceReviewViolatedPolicyCategory = "radnuc"`

      - `const BetaComplianceReviewViolatedPolicyCategoryCgw BetaComplianceReviewViolatedPolicyCategory = "cgw"`

      - `const BetaComplianceReviewViolatedPolicyCategoryMgw BetaComplianceReviewViolatedPolicyCategory = "mgw"`

      - `const BetaComplianceReviewViolatedPolicyCategoryIo BetaComplianceReviewViolatedPolicyCategory = "io"`

      - `const BetaComplianceReviewViolatedPolicyCategoryFraud BetaComplianceReviewViolatedPolicyCategory = "fraud"`

      - `const BetaComplianceReviewViolatedPolicyCategoryViolentExtremism BetaComplianceReviewViolatedPolicyCategory = "violent_extremism"`

      - `const BetaComplianceReviewViolatedPolicyCategorySurveillance BetaComplianceReviewViolatedPolicyCategory = "surveillance"`

      - `const BetaComplianceReviewViolatedPolicyCategoryHumanExploitation BetaComplianceReviewViolatedPolicyCategory = "human_exploitation"`

      - `const BetaComplianceReviewViolatedPolicyCategorySelfHarm BetaComplianceReviewViolatedPolicyCategory = "self_harm"`

      - `const BetaComplianceReviewViolatedPolicyCategoryAdultContent BetaComplianceReviewViolatedPolicyCategory = "adult_content"`

      - `const BetaComplianceReviewViolatedPolicyCategoryReasoningExtraction BetaComplianceReviewViolatedPolicyCategory = "reasoning_extraction"`

      - `const BetaComplianceReviewViolatedPolicyCategoryFrontierLLM BetaComplianceReviewViolatedPolicyCategory = "frontier_llm"`

      - `const BetaComplianceReviewViolatedPolicyCategoryCompromisedKey BetaComplianceReviewViolatedPolicyCategory = "compromised_key"`

      - `const BetaComplianceReviewViolatedPolicyCategoryOther BetaComplianceReviewViolatedPolicyCategory = "other"`

  - `Betas []AnthropicBeta Optional` (header parameter)

    Optional header to specify the beta version(s) you want to use.

    - `const AnthropicBetaComputerUse2024_10_22 AnthropicBeta = "computer-use-2024-10-22"`

    - `const AnthropicBetaComputerUse2025_01_24 AnthropicBeta = "computer-use-2025-01-24"`

    - `const AnthropicBetaOutput128k2025_02_19 AnthropicBeta = "output-128k-2025-02-19"`

    - `const AnthropicBetaMCPClient2025_04_04 AnthropicBeta = "mcp-client-2025-04-04"`

    - `const AnthropicBetaMCPClient2025_11_20 AnthropicBeta = "mcp-client-2025-11-20"`

    - `const AnthropicBetaDevFullThinking2025_05_14 AnthropicBeta = "dev-full-thinking-2025-05-14"`

    - `const AnthropicBetaInterleavedThinking2025_05_14 AnthropicBeta = "interleaved-thinking-2025-05-14"`

    - `const AnthropicBetaCodeExecution2025_05_22 AnthropicBeta = "code-execution-2025-05-22"`

    - `const AnthropicBetaContext1m2025_08_07 AnthropicBeta = "context-1m-2025-08-07"`

    - `const AnthropicBetaContextManagement2025_06_27 AnthropicBeta = "context-management-2025-06-27"`

    - `const AnthropicBetaModelContextWindowExceeded2025_08_26 AnthropicBeta = "model-context-window-exceeded-2025-08-26"`

    - `const AnthropicBetaFastMode2026_02_01 AnthropicBeta = "fast-mode-2026-02-01"`

    - `const AnthropicBetaOutput300k2026_03_24 AnthropicBeta = "output-300k-2026-03-24"`

    - `const AnthropicBetaUserProfiles2026_03_24 AnthropicBeta = "user-profiles-2026-03-24"`

    - `const AnthropicBetaUserProfiles2026_08_18 AnthropicBeta = "user-profiles-2026-08-18"`

    - `const AnthropicBetaUserProfiles2026_09_04 AnthropicBeta = "user-profiles-2026-09-04"`

    - `const AnthropicBetaAdvisorTool2026_03_01 AnthropicBeta = "advisor-tool-2026-03-01"`

    - `const AnthropicBetaManagedAgents2026_04_01 AnthropicBeta = "managed-agents-2026-04-01"`

    - `const AnthropicBetaDreaming2026_04_21 AnthropicBeta = "dreaming-2026-04-21"`

    - `const AnthropicBetaThinkingTokenCount2026_05_13 AnthropicBeta = "thinking-token-count-2026-05-13"`

    - `const AnthropicBetaServerSideFallback2026_06_01 AnthropicBeta = "server-side-fallback-2026-06-01"`

    - `const AnthropicBetaServerSideFallback2026_07_01 AnthropicBeta = "server-side-fallback-2026-07-01"`

    - `const AnthropicBetaFallbackCredit2026_06_01 AnthropicBeta = "fallback-credit-2026-06-01"`

    - `const AnthropicBetaFallbackCredit2026_07_01 AnthropicBeta = "fallback-credit-2026-07-01"`

    - `const AnthropicBetaAgentMemory2026_07_22 AnthropicBeta = "agent-memory-2026-07-22"`

    - `const AnthropicBetaMidConversationToolChanges2026_07_01 AnthropicBeta = "mid-conversation-tool-changes-2026-07-01"`

    - `const AnthropicBetaCompact2026_01_12 AnthropicBeta = "compact-2026-01-12"`

    - `const AnthropicBetaComputerUse2025_11_24 AnthropicBeta = "computer-use-2025-11-24"`

    - `const AnthropicBetaMCPTunnels2026_06_22 AnthropicBeta = "mcp-tunnels-2026-06-22"`

    - `const AnthropicBetaStructuredOutputs2025_11_13 AnthropicBeta = "structured-outputs-2025-11-13"`

    - `const AnthropicBetaTaskBudgets2026_03_13 AnthropicBeta = "task-budgets-2026-03-13"`

    - `const AnthropicBetaThinkingDisplayUpdates2026_08_18 AnthropicBeta = "thinking-display-updates-2026-08-18"`

    - `const AnthropicBetaMidConversationOutputConfig2026_07_01 AnthropicBeta = "mid-conversation-output-config-2026-07-01"`

    - `const AnthropicBetaThinkingBindingControls2026_08_01 AnthropicBeta = "thinking-binding-controls-2026-08-01"`

    - `const AnthropicBetaMidConversationSystemClearAt2026_08_21 AnthropicBeta = "mid-conversation-system-clear-at-2026-08-21"`

    - `const AnthropicBetaCompact2026_09_04 AnthropicBeta = "compact-2026-09-04"`

    - `const AnthropicBetaInlineTools2026_09_15 AnthropicBeta = "inline-tools-2026-09-15"`

    - `const AnthropicBetaMCPClient2026_09_15 AnthropicBeta = "mcp-client-2026-09-15"`

    - `const AnthropicBetaCEPlugins2026_09_01 AnthropicBeta = "ce-plugins-2026-09-01"`

    - `const AnthropicBetaSpendLimitReads2026_09_26 AnthropicBeta = "spend-limit-reads-2026-09-26"`

    - `const AnthropicBetaTelemetryDestinations2026_08_11 AnthropicBeta = "telemetry-destinations-2026-08-11"`

    - `const AnthropicBetaWebhooks2026_10_07 AnthropicBeta = "webhooks-2026-10-07"`

    - `const AnthropicBetaAdminUserSignOut2026_10_08 AnthropicBeta = "admin-user-sign-out-2026-10-08"`

    - `const AnthropicBetaMessageThreads2026_08_12 AnthropicBeta = "message-threads-2026-08-12"`

    - `const AnthropicBetaAnalyticsUsageCost2026_08_24 AnthropicBeta = "analytics-usage-cost-2026-08-24"`

    - `const AnthropicBetaExperimentalClaudeTag2026_10_21 AnthropicBeta = "experimental-claude-tag-2026-10-21"`

    - `const AnthropicBetaCEClaudeCodeManagedSettings2026_10_06 AnthropicBeta = "ce-claude-code-managed-settings-2026-10-06"`

    - `const AnthropicBetaEfs2026_10_01 AnthropicBeta = "efs-2026-10-01"`

    - `const AnthropicBetaGoogleManagedDataControls2026_09_01 AnthropicBeta = "google-managed-data-controls-2026-09-01"`

    - `const AnthropicBetaUserProfilesBilling2026_10_01 AnthropicBeta = "user-profiles-billing-2026-10-01"`

    - `const AnthropicBetaMessageBatches2024_09_24 AnthropicBeta = "message-batches-2024-09-24"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaPromptCaching2024_07_31 AnthropicBeta = "prompt-caching-2024-07-31"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaPDFs2024_09_25 AnthropicBeta = "pdfs-2024-09-25"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaTokenCounting2024_11_01 AnthropicBeta = "token-counting-2024-11-01"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaTokenEfficientTools2025_02_19 AnthropicBeta = "token-efficient-tools-2025-02-19"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaFilesAPI2025_04_14 AnthropicBeta = "files-api-2025-04-14"`

      **Deprecated**: Sending this value selects the beta response shapes. Removing it moves you to the current shapes, so follow the migration steps: https://platform.claude.com/docs/en/build-with-claude/files#migrate-from-files-api-2025-04-14

    - `const AnthropicBetaExtendedCacheTTL2025_04_11 AnthropicBeta = "extended-cache-ttl-2025-04-11"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaSkills2025_10_02 AnthropicBeta = "skills-2025-10-02"`

      **Deprecated**: Sending this value selects the beta response shapes. Removing it moves you to the current shapes, so follow the migration steps: https://platform.claude.com/docs/en/build-with-claude/skills-guide#migrate-from-skills-2025-10-02

    - `const AnthropicBetaCacheDiagnosis2026_04_07 AnthropicBeta = "cache-diagnosis-2026-04-07"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaCEUserManagement2026_07_13 AnthropicBeta = "ce-user-management-2026-07-13"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

#### Returns

- `type BetaComplianceReviewCase`

  A record of an organization's messages that Anthropic flagged and sent to the organization to review. It lists the messages by ID and doesn't include their content.

  - `Type ComplianceReviewCase`

    The object type, always `compliance_review_case`.

  - `ID string`

    The unique ID of the case (`rvc_...`).

  - `CreatedAt Time`

    When Anthropic sent the case. The time you have to respond starts here.

    format: date-time

  - `EnforcementAction BetaComplianceReviewEnforcementAction`

    The action that Anthropic took before it sent the case. Null when it took none.

    - `Type string`

      The kind of action. New values can appear, so accept a value that you don't know.

  - `OrganizationID string`

    The UUID of the organization that sent the flagged messages, which the case belongs to.

  - `PolicyCategories []BetaComplianceReviewPolicyCategory`

    Anthropic's labels for why the messages were flagged, such as `cyber` or `fraud`. There is at least one. New values can appear, so accept a value that you don't know.

    - `const BetaComplianceReviewPolicyCategoryCyber BetaComplianceReviewPolicyCategory = "cyber"`

    - `const BetaComplianceReviewPolicyCategoryBio BetaComplianceReviewPolicyCategory = "bio"`

    - `const BetaComplianceReviewPolicyCategoryChem BetaComplianceReviewPolicyCategory = "chem"`

    - `const BetaComplianceReviewPolicyCategoryRadnuc BetaComplianceReviewPolicyCategory = "radnuc"`

    - `const BetaComplianceReviewPolicyCategoryCgw BetaComplianceReviewPolicyCategory = "cgw"`

    - `const BetaComplianceReviewPolicyCategoryMgw BetaComplianceReviewPolicyCategory = "mgw"`

    - `const BetaComplianceReviewPolicyCategoryIo BetaComplianceReviewPolicyCategory = "io"`

    - `const BetaComplianceReviewPolicyCategoryFraud BetaComplianceReviewPolicyCategory = "fraud"`

    - `const BetaComplianceReviewPolicyCategoryViolentExtremism BetaComplianceReviewPolicyCategory = "violent_extremism"`

    - `const BetaComplianceReviewPolicyCategorySurveillance BetaComplianceReviewPolicyCategory = "surveillance"`

    - `const BetaComplianceReviewPolicyCategoryHumanExploitation BetaComplianceReviewPolicyCategory = "human_exploitation"`

    - `const BetaComplianceReviewPolicyCategorySelfHarm BetaComplianceReviewPolicyCategory = "self_harm"`

    - `const BetaComplianceReviewPolicyCategoryAdultContent BetaComplianceReviewPolicyCategory = "adult_content"`

    - `const BetaComplianceReviewPolicyCategoryReasoningExtraction BetaComplianceReviewPolicyCategory = "reasoning_extraction"`

    - `const BetaComplianceReviewPolicyCategoryFrontierLLM BetaComplianceReviewPolicyCategory = "frontier_llm"`

    - `const BetaComplianceReviewPolicyCategoryCompromisedKey BetaComplianceReviewPolicyCategory = "compromised_key"`

    - `const BetaComplianceReviewPolicyCategoryBenign BetaComplianceReviewPolicyCategory = "benign"`

    - `const BetaComplianceReviewPolicyCategoryOther BetaComplianceReviewPolicyCategory = "other"`

    - `const BetaComplianceReviewPolicyCategoryUndetermined BetaComplianceReviewPolicyCategory = "undetermined"`

  - `Status BetaComplianceReviewCaseStatusUnion`

    Whether Anthropic is still waiting for a response.

    - `type BetaComplianceReviewCaseOpen`

      Anthropic is waiting for a response to the case.

      - `Type Open`

    - `type BetaComplianceReviewCaseClosed`

      Anthropic has stopped waiting for a response. A closed case stays closed.

      - `Type Closed`

      - `Reason BetaComplianceReviewCaseCloseReason`

        Why the case closed. It doesn't change afterwards.

        - `Type BetaComplianceReviewCaseCloseReasonType`

          `responded` means that Anthropic recorded a response. `window_ended` means that the time to respond ended with no response. `ended_by_anthropic` means that Anthropic ended the case before that time was over. New values can appear, so accept a value that you don't know.

          - `const BetaComplianceReviewCaseCloseReasonTypeResponded BetaComplianceReviewCaseCloseReasonType = "responded"`

          - `const BetaComplianceReviewCaseCloseReasonTypeWindowEnded BetaComplianceReviewCaseCloseReasonType = "window_ended"`

          - `const BetaComplianceReviewCaseCloseReasonTypeEndedByAnthropic BetaComplianceReviewCaseCloseReasonType = "ended_by_anthropic"`

  - `Transcripts []BetaComplianceReviewTranscript`

    The flagged messages. There is at least one, and the list isn't paginated.

    - `ItemID string`

      The ID of the flagged message.

    - `UserProfileID string`

      The ID of the user profile that the message belongs to. Null when the message belongs to none, or when the profile can no longer be looked up.

  - `UpdatedAt Time`

    When the case last changed. It changes when Anthropic sends the case, when the case closes, and when Anthropic sends a notice about the case.

    format: date-time

  - `WorkspaceID string`

    The ID of the workspace that sent the flagged messages (`wrkspc_...`). Null when the messages have no workspace, and it can be null for the default workspace.

#### Example

```go
package main

import (
	"context"
	"fmt"

	"github.com/anthropics/anthropic-sdk-go/v2"
	"github.com/anthropics/anthropic-sdk-go/v2/option"
)

func main() {
	client := anthropic.NewClient(
		option.WithAPIKey("my-anthropic-api-key"),
	)
	betaComplianceReviewCase, err := client.Beta.Compliance.Review.Cases.Respond(
		context.TODO(),
		"case_id",
		anthropic.BetaComplianceReviewCaseRespondParams{
			Determination: anthropic.BetaComplianceReviewDeterminationNoViolation,
		},
	)
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", betaComplianceReviewCase.ID)
}
```

##### Response (200)

```json
{
  "id": "id",
  "created_at": "2019-12-27T18:11:19.117Z",
  "enforcement_action": {
    "type": "type"
  },
  "organization_id": "organization_id",
  "policy_categories": [
    "cyber"
  ],
  "status": {
    "type": "open"
  },
  "transcripts": [
    {
      "item_id": "item_id",
      "user_profile_id": "user_profile_id"
    }
  ],
  "type": "compliance_review_case",
  "updated_at": "2019-12-27T18:11:19.117Z",
  "workspace_id": "workspace_id"
}
```

## Compliance › Review › Notices

### List Review Notices

`client.Beta.Compliance.Review.Notices.List(ctx, params) (*PageCursor[BetaComplianceReviewNotice], error)`

**GET** `/v1/compliance/review/notices`

List Anthropic's notices to the organizations that the API key can reach, newest first by default. A notice is returned only if the API key can read every case in its `case_ids`.

To poll, store the largest `created_at` you have read, and send it as the at-or-after filter on `created_at`. Read every page, match results by `id`, and store the new largest value after the last page.

An Admin API key with the `read:compliance_review_cases` scope can call this endpoint.

#### Parameters

- `params BetaComplianceReviewNoticeListParams`

  - `CaseID param.Opt[string] Optional` (query parameter)

    Return only notices whose `case_ids` include this case (`rvc_...`). A case that the API key can't read returns an empty list.

  - `CreatedAtGt param.Opt[Time] Optional` (query parameter)

    Return only notices whose `created_at` is after this time.

    format: date-time

  - `CreatedAtGte param.Opt[Time] Optional` (query parameter)

    Return notices whose `created_at` is at or after this time. Notices slightly older than this time are also returned, so that a poll misses no notice.

    format: date-time

  - `CreatedAtLt param.Opt[Time] Optional` (query parameter)

    Return only notices whose `created_at` is before this time.

    format: date-time

  - `CreatedAtLte param.Opt[Time] Optional` (query parameter)

    Return only notices whose `created_at` is at or before this time.

    format: date-time

  - `Limit param.Opt[int64] Optional` (query parameter)

    Number of notices to return per page, between 1 and 100. Defaults to 20.

    format: int32

  - `Order BetaComplianceReviewOrder Optional` (query parameter)

    Sort direction, by `created_at` and then by `id`. Defaults to `desc`.

  - `Page param.Opt[string] Optional` (query parameter)

    Opaque cursor from a previous response's `next_page`. Leave it out to get the first page. A cursor works only with the filters and sort order of the request that returned it.

  - `Betas []AnthropicBeta Optional` (header parameter)

    Optional header to specify the beta version(s) you want to use.

    - `const AnthropicBetaComputerUse2024_10_22 AnthropicBeta = "computer-use-2024-10-22"`

    - `const AnthropicBetaComputerUse2025_01_24 AnthropicBeta = "computer-use-2025-01-24"`

    - `const AnthropicBetaOutput128k2025_02_19 AnthropicBeta = "output-128k-2025-02-19"`

    - `const AnthropicBetaMCPClient2025_04_04 AnthropicBeta = "mcp-client-2025-04-04"`

    - `const AnthropicBetaMCPClient2025_11_20 AnthropicBeta = "mcp-client-2025-11-20"`

    - `const AnthropicBetaDevFullThinking2025_05_14 AnthropicBeta = "dev-full-thinking-2025-05-14"`

    - `const AnthropicBetaInterleavedThinking2025_05_14 AnthropicBeta = "interleaved-thinking-2025-05-14"`

    - `const AnthropicBetaCodeExecution2025_05_22 AnthropicBeta = "code-execution-2025-05-22"`

    - `const AnthropicBetaContext1m2025_08_07 AnthropicBeta = "context-1m-2025-08-07"`

    - `const AnthropicBetaContextManagement2025_06_27 AnthropicBeta = "context-management-2025-06-27"`

    - `const AnthropicBetaModelContextWindowExceeded2025_08_26 AnthropicBeta = "model-context-window-exceeded-2025-08-26"`

    - `const AnthropicBetaFastMode2026_02_01 AnthropicBeta = "fast-mode-2026-02-01"`

    - `const AnthropicBetaOutput300k2026_03_24 AnthropicBeta = "output-300k-2026-03-24"`

    - `const AnthropicBetaUserProfiles2026_03_24 AnthropicBeta = "user-profiles-2026-03-24"`

    - `const AnthropicBetaUserProfiles2026_08_18 AnthropicBeta = "user-profiles-2026-08-18"`

    - `const AnthropicBetaUserProfiles2026_09_04 AnthropicBeta = "user-profiles-2026-09-04"`

    - `const AnthropicBetaAdvisorTool2026_03_01 AnthropicBeta = "advisor-tool-2026-03-01"`

    - `const AnthropicBetaManagedAgents2026_04_01 AnthropicBeta = "managed-agents-2026-04-01"`

    - `const AnthropicBetaDreaming2026_04_21 AnthropicBeta = "dreaming-2026-04-21"`

    - `const AnthropicBetaThinkingTokenCount2026_05_13 AnthropicBeta = "thinking-token-count-2026-05-13"`

    - `const AnthropicBetaServerSideFallback2026_06_01 AnthropicBeta = "server-side-fallback-2026-06-01"`

    - `const AnthropicBetaServerSideFallback2026_07_01 AnthropicBeta = "server-side-fallback-2026-07-01"`

    - `const AnthropicBetaFallbackCredit2026_06_01 AnthropicBeta = "fallback-credit-2026-06-01"`

    - `const AnthropicBetaFallbackCredit2026_07_01 AnthropicBeta = "fallback-credit-2026-07-01"`

    - `const AnthropicBetaAgentMemory2026_07_22 AnthropicBeta = "agent-memory-2026-07-22"`

    - `const AnthropicBetaMidConversationToolChanges2026_07_01 AnthropicBeta = "mid-conversation-tool-changes-2026-07-01"`

    - `const AnthropicBetaCompact2026_01_12 AnthropicBeta = "compact-2026-01-12"`

    - `const AnthropicBetaComputerUse2025_11_24 AnthropicBeta = "computer-use-2025-11-24"`

    - `const AnthropicBetaMCPTunnels2026_06_22 AnthropicBeta = "mcp-tunnels-2026-06-22"`

    - `const AnthropicBetaStructuredOutputs2025_11_13 AnthropicBeta = "structured-outputs-2025-11-13"`

    - `const AnthropicBetaTaskBudgets2026_03_13 AnthropicBeta = "task-budgets-2026-03-13"`

    - `const AnthropicBetaThinkingDisplayUpdates2026_08_18 AnthropicBeta = "thinking-display-updates-2026-08-18"`

    - `const AnthropicBetaMidConversationOutputConfig2026_07_01 AnthropicBeta = "mid-conversation-output-config-2026-07-01"`

    - `const AnthropicBetaThinkingBindingControls2026_08_01 AnthropicBeta = "thinking-binding-controls-2026-08-01"`

    - `const AnthropicBetaMidConversationSystemClearAt2026_08_21 AnthropicBeta = "mid-conversation-system-clear-at-2026-08-21"`

    - `const AnthropicBetaCompact2026_09_04 AnthropicBeta = "compact-2026-09-04"`

    - `const AnthropicBetaInlineTools2026_09_15 AnthropicBeta = "inline-tools-2026-09-15"`

    - `const AnthropicBetaMCPClient2026_09_15 AnthropicBeta = "mcp-client-2026-09-15"`

    - `const AnthropicBetaCEPlugins2026_09_01 AnthropicBeta = "ce-plugins-2026-09-01"`

    - `const AnthropicBetaSpendLimitReads2026_09_26 AnthropicBeta = "spend-limit-reads-2026-09-26"`

    - `const AnthropicBetaTelemetryDestinations2026_08_11 AnthropicBeta = "telemetry-destinations-2026-08-11"`

    - `const AnthropicBetaWebhooks2026_10_07 AnthropicBeta = "webhooks-2026-10-07"`

    - `const AnthropicBetaAdminUserSignOut2026_10_08 AnthropicBeta = "admin-user-sign-out-2026-10-08"`

    - `const AnthropicBetaMessageThreads2026_08_12 AnthropicBeta = "message-threads-2026-08-12"`

    - `const AnthropicBetaAnalyticsUsageCost2026_08_24 AnthropicBeta = "analytics-usage-cost-2026-08-24"`

    - `const AnthropicBetaExperimentalClaudeTag2026_10_21 AnthropicBeta = "experimental-claude-tag-2026-10-21"`

    - `const AnthropicBetaCEClaudeCodeManagedSettings2026_10_06 AnthropicBeta = "ce-claude-code-managed-settings-2026-10-06"`

    - `const AnthropicBetaEfs2026_10_01 AnthropicBeta = "efs-2026-10-01"`

    - `const AnthropicBetaGoogleManagedDataControls2026_09_01 AnthropicBeta = "google-managed-data-controls-2026-09-01"`

    - `const AnthropicBetaUserProfilesBilling2026_10_01 AnthropicBeta = "user-profiles-billing-2026-10-01"`

    - `const AnthropicBetaMessageBatches2024_09_24 AnthropicBeta = "message-batches-2024-09-24"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaPromptCaching2024_07_31 AnthropicBeta = "prompt-caching-2024-07-31"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaPDFs2024_09_25 AnthropicBeta = "pdfs-2024-09-25"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaTokenCounting2024_11_01 AnthropicBeta = "token-counting-2024-11-01"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaTokenEfficientTools2025_02_19 AnthropicBeta = "token-efficient-tools-2025-02-19"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaFilesAPI2025_04_14 AnthropicBeta = "files-api-2025-04-14"`

      **Deprecated**: Sending this value selects the beta response shapes. Removing it moves you to the current shapes, so follow the migration steps: https://platform.claude.com/docs/en/build-with-claude/files#migrate-from-files-api-2025-04-14

    - `const AnthropicBetaExtendedCacheTTL2025_04_11 AnthropicBeta = "extended-cache-ttl-2025-04-11"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaSkills2025_10_02 AnthropicBeta = "skills-2025-10-02"`

      **Deprecated**: Sending this value selects the beta response shapes. Removing it moves you to the current shapes, so follow the migration steps: https://platform.claude.com/docs/en/build-with-claude/skills-guide#migrate-from-skills-2025-10-02

    - `const AnthropicBetaCacheDiagnosis2026_04_07 AnthropicBeta = "cache-diagnosis-2026-04-07"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaCEUserManagement2026_07_13 AnthropicBeta = "ce-user-management-2026-07-13"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

#### Returns

- `type BetaComplianceReviewNotice`

  A message from Anthropic to an organization about its review cases or about the organization as a whole, such as a request to respond by a date, a warning, or a question. A notice doesn't change after Anthropic sends it.

  - `Type ComplianceReviewNotice`

    The object type, always `compliance_review_notice`.

  - `ID string`

    The unique ID of the notice (`rvn_...`).

  - `CaseIDs []string`

    The IDs of the cases that the notice is about (`rvc_...`). Empty when the notice is about the whole organization.

  - `CreatedAt Time`

    When Anthropic sent the notice.

    format: date-time

  - `Kind BetaComplianceReviewNoticeKind`

    What kind of notice this is.

    - `Type BetaComplianceReviewNoticeKindType`

      `response_requested` asks you to respond to the cases in `case_ids`. For `warning` and `question`, `message` explains how to answer if an answer is needed. New values can appear, so accept a value that you don't know.

      - `const BetaComplianceReviewNoticeKindTypeResponseRequested BetaComplianceReviewNoticeKindType = "response_requested"`

      - `const BetaComplianceReviewNoticeKindTypeWarning BetaComplianceReviewNoticeKindType = "warning"`

      - `const BetaComplianceReviewNoticeKindTypeQuestion BetaComplianceReviewNoticeKindType = "question"`

  - `Message string`

    The text of the notice.

  - `OrganizationID string`

    The UUID of the organization that the notice is for.

  - `RespondBy Time`

    The time by which Anthropic asks for an answer. Null when there is no deadline. Missing it changes nothing on a case, and the time to respond to a case can end before it.

    format: date-time

#### Example

```go
package main

import (
	"context"
	"fmt"

	"github.com/anthropics/anthropic-sdk-go/v2"
	"github.com/anthropics/anthropic-sdk-go/v2/option"
)

func main() {
	client := anthropic.NewClient(
		option.WithAPIKey("my-anthropic-api-key"),
	)
	page, err := client.Beta.Compliance.Review.Notices.List(context.TODO(), anthropic.BetaComplianceReviewNoticeListParams{})
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", page)
}
```

##### Response (200)

```json
{
  "data": [
    {
      "id": "id",
      "case_ids": [
        "string"
      ],
      "created_at": "2019-12-27T18:11:19.117Z",
      "kind": {
        "type": "response_requested"
      },
      "message": "message",
      "organization_id": "organization_id",
      "respond_by": "2019-12-27T18:11:19.117Z",
      "type": "compliance_review_notice"
    }
  ],
  "next_page": "next_page"
}
```

## Compliance › Review › Items

### Get Review Item

`client.Beta.Compliance.Review.Items.Get(ctx, itemID, query) (*BetaComplianceReviewItem, error)`

**GET** `/v1/compliance/review/items/{item_id}`

Read one message that Anthropic flagged for your organization to review, with its request and response.

A message that the API key can't read, or that isn't flagged, returns the same 404 as one that doesn't exist. For a message recorded with a user profile, send that profile's ID in the `anthropic-user-profile-id` header. A flagged message can also return 404 if it belongs to another organization than the key's own, or to your end customer's user profile or Workspace.

If your encryption key or storage bucket refuses the read, the API returns a 400 with `cmek_key_disabled`, `storage_bucket_unreadable` or `customer_storage_refusal_unattributed` in `error.details.error_code`.

The API key must have the `read:compliance_review_items`, `read:compliance_user_data` or `read:org_audit` scope. A key of an organization with no parent organization must have `read:compliance_review_items`.

#### Parameters

- `itemID string` (path parameter)

  The ID of the item. For a message, its ID as the client received it or as a review case lists it, such as `msg_...`.

- `query BetaComplianceReviewItemGetParams`

  - `Betas []AnthropicBeta Optional` (header parameter)

    Optional header to specify the beta version(s) you want to use.

    - `const AnthropicBetaComputerUse2024_10_22 AnthropicBeta = "computer-use-2024-10-22"`

    - `const AnthropicBetaComputerUse2025_01_24 AnthropicBeta = "computer-use-2025-01-24"`

    - `const AnthropicBetaOutput128k2025_02_19 AnthropicBeta = "output-128k-2025-02-19"`

    - `const AnthropicBetaMCPClient2025_04_04 AnthropicBeta = "mcp-client-2025-04-04"`

    - `const AnthropicBetaMCPClient2025_11_20 AnthropicBeta = "mcp-client-2025-11-20"`

    - `const AnthropicBetaDevFullThinking2025_05_14 AnthropicBeta = "dev-full-thinking-2025-05-14"`

    - `const AnthropicBetaInterleavedThinking2025_05_14 AnthropicBeta = "interleaved-thinking-2025-05-14"`

    - `const AnthropicBetaCodeExecution2025_05_22 AnthropicBeta = "code-execution-2025-05-22"`

    - `const AnthropicBetaContext1m2025_08_07 AnthropicBeta = "context-1m-2025-08-07"`

    - `const AnthropicBetaContextManagement2025_06_27 AnthropicBeta = "context-management-2025-06-27"`

    - `const AnthropicBetaModelContextWindowExceeded2025_08_26 AnthropicBeta = "model-context-window-exceeded-2025-08-26"`

    - `const AnthropicBetaFastMode2026_02_01 AnthropicBeta = "fast-mode-2026-02-01"`

    - `const AnthropicBetaOutput300k2026_03_24 AnthropicBeta = "output-300k-2026-03-24"`

    - `const AnthropicBetaUserProfiles2026_03_24 AnthropicBeta = "user-profiles-2026-03-24"`

    - `const AnthropicBetaUserProfiles2026_08_18 AnthropicBeta = "user-profiles-2026-08-18"`

    - `const AnthropicBetaUserProfiles2026_09_04 AnthropicBeta = "user-profiles-2026-09-04"`

    - `const AnthropicBetaAdvisorTool2026_03_01 AnthropicBeta = "advisor-tool-2026-03-01"`

    - `const AnthropicBetaManagedAgents2026_04_01 AnthropicBeta = "managed-agents-2026-04-01"`

    - `const AnthropicBetaDreaming2026_04_21 AnthropicBeta = "dreaming-2026-04-21"`

    - `const AnthropicBetaThinkingTokenCount2026_05_13 AnthropicBeta = "thinking-token-count-2026-05-13"`

    - `const AnthropicBetaServerSideFallback2026_06_01 AnthropicBeta = "server-side-fallback-2026-06-01"`

    - `const AnthropicBetaServerSideFallback2026_07_01 AnthropicBeta = "server-side-fallback-2026-07-01"`

    - `const AnthropicBetaFallbackCredit2026_06_01 AnthropicBeta = "fallback-credit-2026-06-01"`

    - `const AnthropicBetaFallbackCredit2026_07_01 AnthropicBeta = "fallback-credit-2026-07-01"`

    - `const AnthropicBetaAgentMemory2026_07_22 AnthropicBeta = "agent-memory-2026-07-22"`

    - `const AnthropicBetaMidConversationToolChanges2026_07_01 AnthropicBeta = "mid-conversation-tool-changes-2026-07-01"`

    - `const AnthropicBetaCompact2026_01_12 AnthropicBeta = "compact-2026-01-12"`

    - `const AnthropicBetaComputerUse2025_11_24 AnthropicBeta = "computer-use-2025-11-24"`

    - `const AnthropicBetaMCPTunnels2026_06_22 AnthropicBeta = "mcp-tunnels-2026-06-22"`

    - `const AnthropicBetaStructuredOutputs2025_11_13 AnthropicBeta = "structured-outputs-2025-11-13"`

    - `const AnthropicBetaTaskBudgets2026_03_13 AnthropicBeta = "task-budgets-2026-03-13"`

    - `const AnthropicBetaThinkingDisplayUpdates2026_08_18 AnthropicBeta = "thinking-display-updates-2026-08-18"`

    - `const AnthropicBetaMidConversationOutputConfig2026_07_01 AnthropicBeta = "mid-conversation-output-config-2026-07-01"`

    - `const AnthropicBetaThinkingBindingControls2026_08_01 AnthropicBeta = "thinking-binding-controls-2026-08-01"`

    - `const AnthropicBetaMidConversationSystemClearAt2026_08_21 AnthropicBeta = "mid-conversation-system-clear-at-2026-08-21"`

    - `const AnthropicBetaCompact2026_09_04 AnthropicBeta = "compact-2026-09-04"`

    - `const AnthropicBetaInlineTools2026_09_15 AnthropicBeta = "inline-tools-2026-09-15"`

    - `const AnthropicBetaMCPClient2026_09_15 AnthropicBeta = "mcp-client-2026-09-15"`

    - `const AnthropicBetaCEPlugins2026_09_01 AnthropicBeta = "ce-plugins-2026-09-01"`

    - `const AnthropicBetaSpendLimitReads2026_09_26 AnthropicBeta = "spend-limit-reads-2026-09-26"`

    - `const AnthropicBetaTelemetryDestinations2026_08_11 AnthropicBeta = "telemetry-destinations-2026-08-11"`

    - `const AnthropicBetaWebhooks2026_10_07 AnthropicBeta = "webhooks-2026-10-07"`

    - `const AnthropicBetaAdminUserSignOut2026_10_08 AnthropicBeta = "admin-user-sign-out-2026-10-08"`

    - `const AnthropicBetaMessageThreads2026_08_12 AnthropicBeta = "message-threads-2026-08-12"`

    - `const AnthropicBetaAnalyticsUsageCost2026_08_24 AnthropicBeta = "analytics-usage-cost-2026-08-24"`

    - `const AnthropicBetaExperimentalClaudeTag2026_10_21 AnthropicBeta = "experimental-claude-tag-2026-10-21"`

    - `const AnthropicBetaCEClaudeCodeManagedSettings2026_10_06 AnthropicBeta = "ce-claude-code-managed-settings-2026-10-06"`

    - `const AnthropicBetaEfs2026_10_01 AnthropicBeta = "efs-2026-10-01"`

    - `const AnthropicBetaGoogleManagedDataControls2026_09_01 AnthropicBeta = "google-managed-data-controls-2026-09-01"`

    - `const AnthropicBetaUserProfilesBilling2026_10_01 AnthropicBeta = "user-profiles-billing-2026-10-01"`

    - `const AnthropicBetaMessageBatches2024_09_24 AnthropicBeta = "message-batches-2024-09-24"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaPromptCaching2024_07_31 AnthropicBeta = "prompt-caching-2024-07-31"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaPDFs2024_09_25 AnthropicBeta = "pdfs-2024-09-25"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaTokenCounting2024_11_01 AnthropicBeta = "token-counting-2024-11-01"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaTokenEfficientTools2025_02_19 AnthropicBeta = "token-efficient-tools-2025-02-19"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaFilesAPI2025_04_14 AnthropicBeta = "files-api-2025-04-14"`

      **Deprecated**: Sending this value selects the beta response shapes. Removing it moves you to the current shapes, so follow the migration steps: https://platform.claude.com/docs/en/build-with-claude/files#migrate-from-files-api-2025-04-14

    - `const AnthropicBetaExtendedCacheTTL2025_04_11 AnthropicBeta = "extended-cache-ttl-2025-04-11"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaSkills2025_10_02 AnthropicBeta = "skills-2025-10-02"`

      **Deprecated**: Sending this value selects the beta response shapes. Removing it moves you to the current shapes, so follow the migration steps: https://platform.claude.com/docs/en/build-with-claude/skills-guide#migrate-from-skills-2025-10-02

    - `const AnthropicBetaCacheDiagnosis2026_04_07 AnthropicBeta = "cache-diagnosis-2026-04-07"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaCEUserManagement2026_07_13 AnthropicBeta = "ce-user-management-2026-07-13"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

  - `UserProfileID param.Opt[string] Optional` (header parameter)

    The ID of the user profile that the message was recorded with (`uprof_...`). Send it for a message recorded with a user profile, and leave it out for a message recorded with none.

#### Returns

- `type BetaComplianceReviewItem`

  One stored item that the organization it belongs to can read for review.

  - `Type ComplianceReviewItem`

    The object type, always `compliance_review_item`.

  - `ID string`

    The ID of the item. For a message, its own ID, such as `msg_...`.

  - `Actor BetaComplianceReviewActorUnion`

    For a message, who sent it. Null when no sender was recorded. New types can appear, so accept a type that you don't know.

    - `type BetaComplianceReviewUserActor`

      A signed-in user.

      - `Type UserActor`

      - `EmailAddress string`

        The user's email address. Set only for a current member of an organization that the API key can read.

      - `UserID string`

        The ID of the user (`user_...`).

    - `type BetaComplianceReviewAPIActor`

      An API key.

      - `Type APIActor`

      - `APIKeyID string`

        The ID of the API key (`apikey_...`).

    - `type BetaComplianceReviewServiceAccountActor`

      A service account.

      - `Type ServiceAccountActor`

      - `ServiceAccountID string`

        The ID of the service account (`svac_...`).

  - `ContentExpiresAt Time`

    Read the item, and save any copy you need, by this time. The item can stop being readable sooner.

    format: date-time

  - `CreatedAt Time`

    For a message, when Anthropic received the call.

    format: date-time

  - `Details BetaComplianceReviewItemDetailsUnion`

    What is particular to this kind of item. New types can appear, so accept a type that you don't know.

    - `type BetaComplianceReviewMessageDetails`

      A message sent to Claude.

      - `Type Message`

      - `Content BetaComplianceReviewMessageContentUnion`

        The stored request and response. Null when `content_unavailable_reason` is set. New types can appear, so accept a type that you don't know.

        - `type BetaComplianceReviewCreateMessageContent`

          A request to create a message, and its response.

          - `Type CreateMessage`

          - `Request map[string]any`

            The `POST /v1/messages` request body, without thinking blocks or unpublished fields. For a user's message from an Anthropic app, such as Claude Code, `system` is a placeholder.

          - `Response BetaMessage`

            The model's `Message`, without thinking blocks or unpublished fields. Null when no response was stored, for example because the client disconnected.

            - `Type Message`

              Object type.

              For Messages, this is always `"message"`.

              default: message

            - `ID string`

              Unique object identifier.

              The format and length of IDs may change over time.

            - `Container BetaContainer`

              Information about the container used in this request.

              This will be non-null if a container tool (e.g. code execution) was used.

              - `ID string`

                Identifier for the container used in this request

              - `ExpiresAt Time`

                The time at which the container will expire.

                format: date-time

              - `Skills []BetaContainerSkill`

                Skills loaded in the container

                - `Type BetaContainerSkillType`

                  Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)

                  - `const BetaContainerSkillTypeAnthropic BetaContainerSkillType = "anthropic"`

                  - `const BetaContainerSkillTypeCustom BetaContainerSkillType = "custom"`

                - `SkillID string`

                  Skill ID

                  minLength: 1, maxLength: 64

                - `Version string`

                  The resolved version: a skill version ID for custom skills.

                  minLength: 1, maxLength: 64

            - `Content []BetaContentBlockUnion`

              Content generated by the model.

              This is an array of content blocks, each of which has a `type` that determines its shape.

              Example:

              ```json
              [{"type": "text", "text": "Hi, I'm Claude."}]
              ```

              If the request input `messages` ended with an `assistant` turn, then the response `content` will continue directly from that last turn. You can use this to constrain the model's output.

              For example, if the input `messages` were:

              ```json
              [
                {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"},
                {"role": "assistant", "content": "The best answer is ("}
              ]
              ```

              Then the response `content` might be:

              ```json
              [{"type": "text", "text": "B)"}]
              ```

              - `type BetaTextBlock`

                - `Type Text`

                  default: text

                - `Citations []BetaTextCitationUnion`

                  Citations supporting the text block.

                  The type of citation returned will depend on the type of document being cited. Citing a PDF results in `page_location`, plain text results in `char_location`, and content document results in `content_block_location`.

                  - `type BetaCitationCharLocation`

                    - `Type CharLocation`

                      default: char_location

                    - `CitedText string`

                    - `DocumentIndex int64`

                      minimum: 0

                    - `DocumentTitle string`

                    - `EndCharIndex int64`

                    - `FileID string`

                    - `StartCharIndex int64`

                      minimum: 0

                  - `type BetaCitationPageLocation`

                    - `Type PageLocation`

                      default: page_location

                    - `CitedText string`

                    - `DocumentIndex int64`

                      minimum: 0

                    - `DocumentTitle string`

                    - `EndPageNumber int64`

                    - `FileID string`

                    - `StartPageNumber int64`

                      minimum: 1

                  - `type BetaCitationContentBlockLocation`

                    - `Type ContentBlockLocation`

                      default: content_block_location

                    - `CitedText string`

                      The full text of the cited block range, concatenated.

                      Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

                    - `DocumentIndex int64`

                      minimum: 0

                    - `DocumentTitle string`

                    - `EndBlockIndex int64`

                      Exclusive 0-based end index of the cited block range in the source's `content` array.

                      Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

                    - `FileID string`

                    - `StartBlockIndex int64`

                      0-based index of the first cited block in the source's `content` array.

                      minimum: 0

                  - `type BetaCitationsWebSearchResultLocation`

                    - `Type WebSearchResultLocation`

                      default: web_search_result_location

                    - `CitedText string`

                    - `EncryptedIndex string`

                    - `Title string`

                      maxLength: 512

                    - `URL string`

                  - `type BetaCitationSearchResultLocation`

                    - `Type SearchResultLocation`

                      default: search_result_location

                    - `CitedText string`

                      The full text of the cited block range, concatenated.

                      Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

                    - `EndBlockIndex int64`

                      Exclusive 0-based end index of the cited block range in the source's `content` array.

                      Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

                    - `SearchResultIndex int64`

                      0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.

                      Counted separately from `document_index`; server-side web search results are not included in this count.

                      minimum: 0

                    - `Source string`

                    - `StartBlockIndex int64`

                      0-based index of the first cited block in the source's `content` array.

                      minimum: 0

                    - `Title string`

                - `Text string`

              - `type BetaThinkingBlock`

                - `Type Thinking`

                  default: thinking

                - `Signature string`

                  A value used to verify that this thinking block was generated by Claude when it is passed back to the API.

                  This is an opaque field and should not be interpreted or parsed. When passing thinking blocks back to the API (required when using tools with extended thinking), pass them back exactly as received, with this field intact.

                  See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=go) for details.

                - `Thinking string`

                  The text of Claude's thinking process for this block.

              - `type BetaRedactedThinkingBlock`

                - `Type RedactedThinking`

                  default: redacted_thinking

                - `Data string`

                  The contents of this redacted thinking block, returned when portions of the model's thinking were safety-redacted. This field is opaque and encrypted, with no readable content.

                  Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation.

                  See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=go#redacted-thinking-blocks) for details.

              - `type BetaToolUseBlock`

                - `Type ToolUse`

                  default: tool_use

                - `ID string`

                  pattern: ^[a-zA-Z0-9_-]+$

                - `Input map[string]any`

                - `Name string`

                  minLength: 1

                - `Caller BetaToolUseBlockCallerUnion Optional`

                  - `type BetaDirectCaller`

                    Tool invocation directly from the model.

                    - `Type Direct`

                  - `type BetaServerToolCaller`

                    Tool invocation generated by a server-side tool.

                    - `Type CodeExecution20250825`

                    - `ToolID string`

                      pattern: ^srvtoolu_[a-zA-Z0-9_]+$

                  - `type BetaServerToolCaller20260120`

                    - `Type CodeExecution20260120`

                    - `ToolID string`

                      pattern: ^srvtoolu_[a-zA-Z0-9_]+$

                - `ToolsetName string Optional`

                  For a toolset member tool_use, the toolset family.

                  minLength: 1, maxLength: 64, pattern: ^[a-zA-Z0-9_-]+$

              - `type BetaServerToolUseBlock`

                - `Type ServerToolUse`

                  default: server_tool_use

                - `ID string`

                  pattern: ^srvtoolu_[a-zA-Z0-9_]+$

                - `Input map[string]any`

                - `Name BetaServerToolUseBlockName`

                  - `const BetaServerToolUseBlockNameAdvisor BetaServerToolUseBlockName = "advisor"`

                  - `const BetaServerToolUseBlockNameWebSearch BetaServerToolUseBlockName = "web_search"`

                  - `const BetaServerToolUseBlockNameWebFetch BetaServerToolUseBlockName = "web_fetch"`

                  - `const BetaServerToolUseBlockNameCodeExecution BetaServerToolUseBlockName = "code_execution"`

                  - `const BetaServerToolUseBlockNameBashCodeExecution BetaServerToolUseBlockName = "bash_code_execution"`

                  - `const BetaServerToolUseBlockNameTextEditorCodeExecution BetaServerToolUseBlockName = "text_editor_code_execution"`

                  - `const BetaServerToolUseBlockNameToolSearchToolRegex BetaServerToolUseBlockName = "tool_search_tool_regex"`

                  - `const BetaServerToolUseBlockNameToolSearchToolBm25 BetaServerToolUseBlockName = "tool_search_tool_bm25"`

                - `Caller BetaServerToolUseBlockCallerUnion Optional`

                  - `type BetaDirectCaller`

                    Tool invocation directly from the model.

                  - `type BetaServerToolCaller`

                    Tool invocation generated by a server-side tool.

                  - `type BetaServerToolCaller20260120`

              - `type BetaWebSearchToolResultBlock`

                - `Type WebSearchToolResult`

                  default: web_search_tool_result

                - `Content BetaWebSearchToolResultBlockContentUnion`

                  - `type BetaWebSearchToolResultErrorObject`

                    - `Type WebSearchToolResultError`

                      default: web_search_tool_result_error

                    - `ErrorCode BetaWebSearchToolResultErrorCode`

                      - `const BetaWebSearchToolResultErrorCodeInvalidToolInput BetaWebSearchToolResultErrorCode = "invalid_tool_input"`

                      - `const BetaWebSearchToolResultErrorCodeUnavailable BetaWebSearchToolResultErrorCode = "unavailable"`

                      - `const BetaWebSearchToolResultErrorCodeMaxUsesExceeded BetaWebSearchToolResultErrorCode = "max_uses_exceeded"`

                      - `const BetaWebSearchToolResultErrorCodeTooManyRequests BetaWebSearchToolResultErrorCode = "too_many_requests"`

                      - `const BetaWebSearchToolResultErrorCodeQueryTooLong BetaWebSearchToolResultErrorCode = "query_too_long"`

                      - `const BetaWebSearchToolResultErrorCodeRequestTooLarge BetaWebSearchToolResultErrorCode = "request_too_large"`

                  - `[]BetaWebSearchResultBlock`

                    - `Type WebSearchResult`

                      default: web_search_result

                    - `EncryptedContent string`

                    - `PageAge string`

                    - `Title string`

                    - `URL string`

                - `ToolUseID string`

                  pattern: ^srvtoolu_[a-zA-Z0-9_]+$

                - `Caller BetaWebSearchToolResultBlockCallerUnion Optional`

                  - `type BetaDirectCaller`

                    Tool invocation directly from the model.

                  - `type BetaServerToolCaller`

                    Tool invocation generated by a server-side tool.

                  - `type BetaServerToolCaller20260120`

              - `type BetaWebFetchToolResultBlock`

                - `Type WebFetchToolResult`

                  default: web_fetch_tool_result

                - `Content BetaWebFetchToolResultBlockContentUnion`

                  - `type BetaWebFetchToolResultErrorBlock`

                    - `Type WebFetchToolResultError`

                      default: web_fetch_tool_result_error

                    - `ErrorCode BetaWebFetchToolResultErrorCode`

                      - `const BetaWebFetchToolResultErrorCodeInvalidToolInput BetaWebFetchToolResultErrorCode = "invalid_tool_input"`

                      - `const BetaWebFetchToolResultErrorCodeURLTooLong BetaWebFetchToolResultErrorCode = "url_too_long"`

                      - `const BetaWebFetchToolResultErrorCodeURLNotAllowed BetaWebFetchToolResultErrorCode = "url_not_allowed"`

                      - `const BetaWebFetchToolResultErrorCodeURLNotInPriorContext BetaWebFetchToolResultErrorCode = "url_not_in_prior_context"`

                      - `const BetaWebFetchToolResultErrorCodeURLNotAccessible BetaWebFetchToolResultErrorCode = "url_not_accessible"`

                      - `const BetaWebFetchToolResultErrorCodeUnsupportedContentType BetaWebFetchToolResultErrorCode = "unsupported_content_type"`

                      - `const BetaWebFetchToolResultErrorCodeTooManyRequests BetaWebFetchToolResultErrorCode = "too_many_requests"`

                      - `const BetaWebFetchToolResultErrorCodeMaxUsesExceeded BetaWebFetchToolResultErrorCode = "max_uses_exceeded"`

                      - `const BetaWebFetchToolResultErrorCodeUnavailable BetaWebFetchToolResultErrorCode = "unavailable"`

                      - `const BetaWebFetchToolResultErrorCodeContentTooLarge BetaWebFetchToolResultErrorCode = "content_too_large"`

                  - `type BetaWebFetchBlock`

                    - `Type WebFetchResult`

                      default: web_fetch_result

                    - `Content BetaDocumentBlock`

                      - `Type Document`

                        default: document

                      - `Citations BetaCitationConfig`

                        Citation configuration for the document

                        - `Enabled bool`

                          default: false

                      - `Source BetaDocumentBlockSourceUnion`

                        - `type BetaBase64PDFSource`

                          - `Type Base64`

                          - `Data string`

                            format: byte

                          - `MediaType ApplicationPDF`

                        - `type BetaPlainTextSource`

                          - `Type Text`

                          - `Data string`

                          - `MediaType TextPlain`

                      - `Title string`

                        The title of the document

                    - `RetrievedAt string`

                      ISO 8601 timestamp when the content was retrieved

                    - `URL string`

                      Fetched content URL

                - `ToolUseID string`

                  pattern: ^srvtoolu_[a-zA-Z0-9_]+$

                - `Caller BetaWebFetchToolResultBlockCallerUnion Optional`

                  - `type BetaDirectCaller`

                    Tool invocation directly from the model.

                  - `type BetaServerToolCaller`

                    Tool invocation generated by a server-side tool.

                  - `type BetaServerToolCaller20260120`

              - `type BetaAdvisorToolResultBlock`

                - `Type AdvisorToolResult`

                  default: advisor_tool_result

                - `Content BetaAdvisorToolResultBlockContentUnion`

                  - `type BetaAdvisorToolResultErrorObject`

                    - `Type AdvisorToolResultError`

                      default: advisor_tool_result_error

                    - `ErrorCode BetaAdvisorToolResultErrorObjectErrorCode`

                      - `const BetaAdvisorToolResultErrorObjectErrorCodeMaxUsesExceeded BetaAdvisorToolResultErrorObjectErrorCode = "max_uses_exceeded"`

                      - `const BetaAdvisorToolResultErrorObjectErrorCodePromptTooLong BetaAdvisorToolResultErrorObjectErrorCode = "prompt_too_long"`

                      - `const BetaAdvisorToolResultErrorObjectErrorCodeTooManyRequests BetaAdvisorToolResultErrorObjectErrorCode = "too_many_requests"`

                      - `const BetaAdvisorToolResultErrorObjectErrorCodeOverloaded BetaAdvisorToolResultErrorObjectErrorCode = "overloaded"`

                      - `const BetaAdvisorToolResultErrorObjectErrorCodeUnavailable BetaAdvisorToolResultErrorObjectErrorCode = "unavailable"`

                      - `const BetaAdvisorToolResultErrorObjectErrorCodeExecutionTimeExceeded BetaAdvisorToolResultErrorObjectErrorCode = "execution_time_exceeded"`

                      - `const BetaAdvisorToolResultErrorObjectErrorCodeModelNotFound BetaAdvisorToolResultErrorObjectErrorCode = "model_not_found"`

                  - `type BetaAdvisorResultBlock`

                    - `Type AdvisorResult`

                      default: advisor_result

                    - `StopReason string`

                      The advisor sub-inference's stop reason (same values as the top-level message `stop_reason`). `max_tokens` indicates the advisor's output was truncated at the tool's `max_tokens` value or the advisor model's policy cap.

                    - `Text string`

                  - `type BetaAdvisorRedactedResultBlock`

                    - `Type AdvisorRedactedResult`

                      default: advisor_redacted_result

                    - `EncryptedContent string`

                      Opaque blob containing the advisor's output. Round-trip verbatim; do not inspect or modify.

                    - `StopReason string`

                      The advisor sub-inference's stop reason (same values as the top-level message `stop_reason`).

                - `ToolUseID string`

                  pattern: ^srvtoolu_[a-zA-Z0-9_]+$

              - `type BetaCodeExecutionToolResultBlock`

                - `Type CodeExecutionToolResult`

                  default: code_execution_tool_result

                - `Content BetaCodeExecutionToolResultBlockContentUnion`

                  - `type BetaCodeExecutionToolResultErrorObject`

                    - `Type CodeExecutionToolResultError`

                      default: code_execution_tool_result_error

                    - `ErrorCode BetaCodeExecutionToolResultErrorCode`

                      - `const BetaCodeExecutionToolResultErrorCodeInvalidToolInput BetaCodeExecutionToolResultErrorCode = "invalid_tool_input"`

                      - `const BetaCodeExecutionToolResultErrorCodeUnavailable BetaCodeExecutionToolResultErrorCode = "unavailable"`

                      - `const BetaCodeExecutionToolResultErrorCodeTooManyRequests BetaCodeExecutionToolResultErrorCode = "too_many_requests"`

                      - `const BetaCodeExecutionToolResultErrorCodeExecutionTimeExceeded BetaCodeExecutionToolResultErrorCode = "execution_time_exceeded"`

                  - `type BetaCodeExecutionResultBlock`

                    - `Type CodeExecutionResult`

                      default: code_execution_result

                    - `Content []BetaCodeExecutionOutputBlock`

                      - `Type CodeExecutionOutput`

                        default: code_execution_output

                      - `FileID string`

                    - `ReturnCode int64`

                    - `Stderr string`

                    - `Stdout string`

                  - `type BetaEncryptedCodeExecutionResultBlock`

                    The output and exit code of Python code that Claude ran with the code execution tool, with standard output in encrypted form.

                    The API returns this block in place of `code_execution_result` when the code called the web search tool.

                    See the [programmatic tool calling guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling?sdk_languages=go) to learn more about programmatic tool calling.

                    - `Type EncryptedCodeExecutionResult`

                      default: encrypted_code_execution_result

                    - `Content []BetaCodeExecutionOutputBlock`

                      - `Type CodeExecutionOutput`

                        default: code_execution_output

                      - `FileID string`

                    - `EncryptedStdout string`

                    - `ReturnCode int64`

                    - `Stderr string`

                - `ToolUseID string`

                  pattern: ^srvtoolu_[a-zA-Z0-9_]+$

              - `type BetaBashCodeExecutionToolResultBlock`

                - `Type BashCodeExecutionToolResult`

                  default: bash_code_execution_tool_result

                - `Content BetaBashCodeExecutionToolResultBlockContentUnion`

                  - `type BetaBashCodeExecutionToolResultErrorObject`

                    - `Type BashCodeExecutionToolResultError`

                      default: bash_code_execution_tool_result_error

                    - `ErrorCode BetaBashCodeExecutionToolResultErrorObjectErrorCode`

                      - `const BetaBashCodeExecutionToolResultErrorObjectErrorCodeInvalidToolInput BetaBashCodeExecutionToolResultErrorObjectErrorCode = "invalid_tool_input"`

                      - `const BetaBashCodeExecutionToolResultErrorObjectErrorCodeUnavailable BetaBashCodeExecutionToolResultErrorObjectErrorCode = "unavailable"`

                      - `const BetaBashCodeExecutionToolResultErrorObjectErrorCodeTooManyRequests BetaBashCodeExecutionToolResultErrorObjectErrorCode = "too_many_requests"`

                      - `const BetaBashCodeExecutionToolResultErrorObjectErrorCodeExecutionTimeExceeded BetaBashCodeExecutionToolResultErrorObjectErrorCode = "execution_time_exceeded"`

                      - `const BetaBashCodeExecutionToolResultErrorObjectErrorCodeOutputFileTooLarge BetaBashCodeExecutionToolResultErrorObjectErrorCode = "output_file_too_large"`

                  - `type BetaBashCodeExecutionResultBlock`

                    - `Type BashCodeExecutionResult`

                      default: bash_code_execution_result

                    - `Content []BetaBashCodeExecutionOutputBlock`

                      - `Type BashCodeExecutionOutput`

                        default: bash_code_execution_output

                      - `FileID string`

                    - `ReturnCode int64`

                    - `Stderr string`

                    - `Stdout string`

                - `ToolUseID string`

                  pattern: ^srvtoolu_[a-zA-Z0-9_]+$

              - `type BetaTextEditorCodeExecutionToolResultBlock`

                - `Type TextEditorCodeExecutionToolResult`

                  default: text_editor_code_execution_tool_result

                - `Content BetaTextEditorCodeExecutionToolResultBlockContentUnion`

                  - `type BetaTextEditorCodeExecutionToolResultErrorObject`

                    - `Type TextEditorCodeExecutionToolResultError`

                      default: text_editor_code_execution_tool_result_error

                    - `ErrorCode BetaTextEditorCodeExecutionToolResultErrorObjectErrorCode`

                      - `const BetaTextEditorCodeExecutionToolResultErrorObjectErrorCodeInvalidToolInput BetaTextEditorCodeExecutionToolResultErrorObjectErrorCode = "invalid_tool_input"`

                      - `const BetaTextEditorCodeExecutionToolResultErrorObjectErrorCodeUnavailable BetaTextEditorCodeExecutionToolResultErrorObjectErrorCode = "unavailable"`

                      - `const BetaTextEditorCodeExecutionToolResultErrorObjectErrorCodeTooManyRequests BetaTextEditorCodeExecutionToolResultErrorObjectErrorCode = "too_many_requests"`

                      - `const BetaTextEditorCodeExecutionToolResultErrorObjectErrorCodeExecutionTimeExceeded BetaTextEditorCodeExecutionToolResultErrorObjectErrorCode = "execution_time_exceeded"`

                      - `const BetaTextEditorCodeExecutionToolResultErrorObjectErrorCodeFileNotFound BetaTextEditorCodeExecutionToolResultErrorObjectErrorCode = "file_not_found"`

                    - `ErrorMessage string`

                  - `type BetaTextEditorCodeExecutionViewResultBlock`

                    - `Type TextEditorCodeExecutionViewResult`

                      default: text_editor_code_execution_view_result

                    - `Content string`

                    - `FileType BetaTextEditorCodeExecutionViewResultBlockFileType`

                      - `const BetaTextEditorCodeExecutionViewResultBlockFileTypeText BetaTextEditorCodeExecutionViewResultBlockFileType = "text"`

                      - `const BetaTextEditorCodeExecutionViewResultBlockFileTypeImage BetaTextEditorCodeExecutionViewResultBlockFileType = "image"`

                      - `const BetaTextEditorCodeExecutionViewResultBlockFileTypePDF BetaTextEditorCodeExecutionViewResultBlockFileType = "pdf"`

                    - `NumLines int64`

                    - `StartLine int64`

                    - `TotalLines int64`

                  - `type BetaTextEditorCodeExecutionCreateResultBlock`

                    - `Type TextEditorCodeExecutionCreateResult`

                      default: text_editor_code_execution_create_result

                    - `IsFileUpdate bool`

                  - `type BetaTextEditorCodeExecutionStrReplaceResultBlock`

                    - `Type TextEditorCodeExecutionStrReplaceResult`

                      default: text_editor_code_execution_str_replace_result

                    - `Lines []string`

                    - `NewLines int64`

                    - `NewStart int64`

                    - `OldLines int64`

                    - `OldStart int64`

                - `ToolUseID string`

                  pattern: ^srvtoolu_[a-zA-Z0-9_]+$

              - `type BetaToolSearchToolResultBlock`

                - `Type ToolSearchToolResult`

                  default: tool_search_tool_result

                - `Content BetaToolSearchToolResultBlockContentUnion`

                  - `type BetaToolSearchToolResultErrorObject`

                    - `Type ToolSearchToolResultError`

                      default: tool_search_tool_result_error

                    - `ErrorCode BetaToolSearchToolResultErrorObjectErrorCode`

                      - `const BetaToolSearchToolResultErrorObjectErrorCodeInvalidToolInput BetaToolSearchToolResultErrorObjectErrorCode = "invalid_tool_input"`

                      - `const BetaToolSearchToolResultErrorObjectErrorCodeUnavailable BetaToolSearchToolResultErrorObjectErrorCode = "unavailable"`

                      - `const BetaToolSearchToolResultErrorObjectErrorCodeTooManyRequests BetaToolSearchToolResultErrorObjectErrorCode = "too_many_requests"`

                      - `const BetaToolSearchToolResultErrorObjectErrorCodeExecutionTimeExceeded BetaToolSearchToolResultErrorObjectErrorCode = "execution_time_exceeded"`

                    - `ErrorMessage string`

                  - `type BetaToolSearchToolSearchResultBlock`

                    - `Type ToolSearchToolSearchResult`

                      default: tool_search_tool_search_result

                    - `ToolReferences []BetaToolReferenceBlock`

                      - `Type ToolReference`

                        default: tool_reference

                      - `ToolName string`

                        minLength: 1, maxLength: 256, pattern: ^[a-zA-Z0-9_-]{1,256}$

                - `ToolUseID string`

                  pattern: ^srvtoolu_[a-zA-Z0-9_]+$

              - `type BetaMCPToolUseBlock`

                - `Type MCPToolUse`

                  default: mcp_tool_use

                - `ID string`

                  pattern: ^[a-zA-Z0-9_-]+$

                - `Input map[string]any`

                - `Name string`

                  The name of the MCP tool

                - `ServerName string`

                  The name of the MCP server

              - `type BetaMCPToolResultBlock`

                - `Type MCPToolResult`

                  default: mcp_tool_result

                - `Content BetaMCPToolResultBlockContentUnion`

                  - `string`

                  - `[]BetaTextBlock`

                    - `Type Text`

                      default: text

                    - `Citations []BetaTextCitationUnion`

                      Citations supporting the text block.

                      The type of citation returned will depend on the type of document being cited. Citing a PDF results in `page_location`, plain text results in `char_location`, and content document results in `content_block_location`.

                    - `Text string`

                - `IsError bool`

                  default: false

                - `ToolUseID string`

                  pattern: ^[a-zA-Z0-9_-]+$

              - `type BetaContainerUploadBlock`

                Response model for a file uploaded to the container.

                - `Type ContainerUpload`

                  default: container_upload

                - `FileID string`

              - `type BetaCompactionBlock`

                A compaction block returned when autocompact is triggered.

                When content is None, it indicates the compaction failed to produce a valid
                summary (e.g., malformed output from the model). Clients may round-trip
                compaction blocks with null content; the server treats them as no-ops.

                - `Type Compaction`

                  default: compaction

                - `Content string`

                  Summary of compacted content, or null if compaction failed

                - `EncryptedContent string`

                  Opaque metadata from prior compaction, to be round-tripped verbatim

                - `Signature string Optional`

                  Signature over the summary, to be sent back with the block verbatim

                - `ToolChanges []BetaCompactionBlockToolChangeUnion Optional`

                  The tool changes of the compacted range: the `tool_addition` and `tool_removal` blocks that take the request's `tools` to the tool set in effect at the end of the range, or `[]` when the range changed no tool. Absent when the server did not compute them. Send the block back unchanged.

                  - `type BetaResponseToolAdditionBlock`

                    An entry of a `compaction` block's `tool_changes`: a tool the
                    compacted range made available, as a reference to a `tools` entry or
                    MCP toolset, or as the tool definition in effect at the end of the
                    range, by value. Send it back unchanged.

                    - `Type ToolAddition`

                      default: tool_addition

                    - `Tool BetaResponseToolAdditionBlockToolUnion`

                      The tool made available: a reference to a `tools` entry or MCP toolset, or a `tool_definition` carrying the definition by value.

                      - `type BetaResponseToolChangeToolReference`

                        Reference to a single tool, by the name the model uses to call it, as
                        a `compaction` block's `tool_changes` entry reports it: a tool
                        declared in `tools` or defined by an earlier `tool_addition` block.
                        Send it back unchanged with the block.

                        - `Type ToolReference`

                          default: tool_reference

                        - `Name string`

                      - `type BetaResponseToolChangeMCPToolReference`

                        Reference to a single MCP tool, by its server and its name on that
                        server, as a `compaction` block's `tool_changes` entry reports it.
                        Send it back unchanged with the block.

                        - `Type MCPToolReference`

                          default: mcp_tool_reference

                        - `Name string`

                        - `ServerName string`

                      - `type BetaResponseToolChangeMCPToolsetReference`

                        Reference to every tool in the named MCP server's toolset, as a
                        `compaction` block's `tool_changes` entry reports it. Send it back
                        unchanged with the block.

                        - `Type MCPToolsetReference`

                          default: mcp_toolset_reference

                        - `ServerName string`

                      - `type BetaToolChangeToolDefinition`

                        A tool defined by value, as a `compaction` block's `tool_changes` entry
                        reports it: `definition` is the tool's definition as it was sent, in the
                        form of a `tools` entry, without `cache_control`. Send it back unchanged
                        with the block.

                        - `Type ToolDefinition`

                          default: tool_definition

                        - `Definition BetaResponseToolUnion`

                          - `type BetaResponseTool`

                            A custom tool definition, as sent.

                            - `Type BetaResponseToolType Optional`

                            - `InputSchema BetaResponseToolInputSchema`

                              [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input.

                              This defines the shape of the `input` that your tool accepts and that the model will produce.

                              - `Type Object`

                              - `Properties map[string]any Optional`

                              - `Required []string Optional`

                            - `Name string`

                              Name of the tool.

                              This is how the tool will be called by the model and in `tool_use` blocks.

                              minLength: 1, maxLength: 128, pattern: ^[a-zA-Z0-9_-]{1,128}$

                            - `AllowedCallers []string Optional`

                              - `"direct"`

                              - `"code_execution_20250825"`

                              - `"code_execution_20260120"`

                              - `"code_execution_20260521"`

                            - `DeferLoading bool Optional`

                              If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.

                            - `Description string Optional`

                              Description of what this tool does.

                              Tool descriptions should be as detailed as possible. The more information that the model has about what the tool is and how to use it, the better it will perform. You can use natural language descriptions to reinforce important aspects of the tool input JSON schema.

                            - `EagerInputStreaming bool Optional`

                              Enable eager input streaming for this tool. When true, tool input parameters will be streamed incrementally as they are generated, and types will be inferred on-the-fly rather than buffering the full JSON output. When false, streaming is disabled for this tool even if the fine-grained-tool-streaming beta is active. When null (default), uses the default behavior based on beta headers.

                            - `InputExamples []map[string]any Optional`

                            - `Strict bool Optional`

                              When true, guarantees schema validation on tool names and inputs

                          - `type BetaToolBash20241022`

                            - `Type Bash20241022`

                            - `Name Bash`

                              Name of the tool.

                              This is how the tool will be called by the model and in `tool_use` blocks.

                            - `AllowedCallers []string Optional`

                              - `"direct"`

                              - `"code_execution_20250825"`

                              - `"code_execution_20260120"`

                              - `"code_execution_20260521"`

                            - `CacheControl BetaCacheControlEphemeral Optional`

                              Create a cache control breakpoint at this content block.

                              - `Type Ephemeral`

                              - `TTL BetaCacheControlEphemeralTTL Optional`

                                The time-to-live for the cache control breakpoint.

                                This may be one the following values:

                                - `5m`: 5 minutes
                                - `1h`: 1 hour

                                Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=go) for details.

                                - `const BetaCacheControlEphemeralTTLTTL5m BetaCacheControlEphemeralTTL = "5m"`

                                - `const BetaCacheControlEphemeralTTLTTL1h BetaCacheControlEphemeralTTL = "1h"`

                            - `DeferLoading bool Optional`

                              If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.

                            - `InputExamples []map[string]any Optional`

                            - `Strict bool Optional`

                              When true, guarantees schema validation on tool names and inputs

                          - `type BetaToolBash20250124`

                            - `Type Bash20250124`

                            - `Name Bash`

                              Name of the tool.

                              This is how the tool will be called by the model and in `tool_use` blocks.

                            - `AllowedCallers []string Optional`

                              - `"direct"`

                              - `"code_execution_20250825"`

                              - `"code_execution_20260120"`

                              - `"code_execution_20260521"`

                            - `CacheControl BetaCacheControlEphemeral Optional`

                              Create a cache control breakpoint at this content block.

                            - `DeferLoading bool Optional`

                              If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.

                            - `InputExamples []map[string]any Optional`

                            - `Strict bool Optional`

                              When true, guarantees schema validation on tool names and inputs

                          - `type BetaCodeExecutionTool20250522`

                            - `Type CodeExecution20250522`

                            - `Name CodeExecution`

                              Name of the tool.

                              This is how the tool will be called by the model and in `tool_use` blocks.

                            - `AllowedCallers []string Optional`

                              - `"direct"`

                              - `"code_execution_20250825"`

                              - `"code_execution_20260120"`

                              - `"code_execution_20260521"`

                            - `CacheControl BetaCacheControlEphemeral Optional`

                              Create a cache control breakpoint at this content block.

                            - `DeferLoading bool Optional`

                              If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.

                            - `Strict bool Optional`

                              When true, guarantees schema validation on tool names and inputs

                          - `type BetaCodeExecutionTool20250825`

                            - `Type CodeExecution20250825`

                            - `Name CodeExecution`

                              Name of the tool.

                              This is how the tool will be called by the model and in `tool_use` blocks.

                            - `AllowedCallers []string Optional`

                              - `"direct"`

                              - `"code_execution_20250825"`

                              - `"code_execution_20260120"`

                              - `"code_execution_20260521"`

                            - `CacheControl BetaCacheControlEphemeral Optional`

                              Create a cache control breakpoint at this content block.

                            - `DeferLoading bool Optional`

                              If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.

                            - `Strict bool Optional`

                              When true, guarantees schema validation on tool names and inputs

                          - `type BetaCodeExecutionTool20260120`

                            A `tools` entry for the code execution tool, version `code_execution_20260120`. It adds REPL state persistence to version `code_execution_20250825`.

                            REPL state persistence applies with programmatic tool calling. With it, the Python interpreter state, such as variable bindings, persists across requests that reuse the container.

                            See the [code execution tool guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool?sdk_languages=go#tool-versions) to learn what each tool version adds.

                            - `Type CodeExecution20260120`

                            - `Name CodeExecution`

                              Name of the tool.

                              This is how the tool will be called by the model and in `tool_use` blocks.

                            - `AllowedCallers []string Optional`

                              - `"direct"`

                              - `"code_execution_20250825"`

                              - `"code_execution_20260120"`

                              - `"code_execution_20260521"`

                            - `CacheControl BetaCacheControlEphemeral Optional`

                              Create a cache control breakpoint at this content block.

                            - `DeferLoading bool Optional`

                              If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.

                            - `Strict bool Optional`

                              When true, guarantees schema validation on tool names and inputs

                          - `type BetaCodeExecutionTool20260521`

                            Code execution tool with REPL state persistence.

                            - `Type CodeExecution20260521`

                            - `Name CodeExecution`

                              Name of the tool.

                              This is how the tool will be called by the model and in `tool_use` blocks.

                            - `AllowedCallers []string Optional`

                              - `"direct"`

                              - `"code_execution_20250825"`

                              - `"code_execution_20260120"`

                              - `"code_execution_20260521"`

                            - `CacheControl BetaCacheControlEphemeral Optional`

                              Create a cache control breakpoint at this content block.

                            - `DeferLoading bool Optional`

                              If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.

                            - `Strict bool Optional`

                              When true, guarantees schema validation on tool names and inputs

                          - `type BetaBrowserToolset20260801`

                            The browser toolset: a single `tools[]` entry (carrying no
                            `name`) that declares the browser tool family. The model is served
                            the family's tool with any members disabled via `configs` removed
                            from its schema.

                            - `Type BrowserToolset20260801`

                            - `CacheControl BetaCacheControlEphemeral Optional`

                              Create a cache control breakpoint at this content block.

                            - `Configs BetaBrowserToolsetConfigs Optional`

                              Sparse per-member overrides, keyed by member name. Absent, null, and {} are equivalent; a member's defaults apply wherever its key is absent.

                              - `Type BetaBrowserTypeConfig Optional`

                                `type`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `CloseTab BetaBrowserCloseTabConfig Optional`

                                `close_tab`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `DoubleClick BetaBrowserDoubleClickConfig Optional`

                                `double_click`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `FileUpload BetaBrowserFileUploadConfig Optional`

                                `file_upload`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `Find BetaBrowserFindConfig Optional`

                                `find`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `FormInput BetaBrowserFormInputConfig Optional`

                                `form_input`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `GetPageText BetaBrowserGetPageTextConfig Optional`

                                `get_page_text`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `HoldKey BetaBrowserHoldKeyConfig Optional`

                                `hold_key`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `Hover BetaBrowserHoverConfig Optional`

                                `hover`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `JavascriptExec BetaBrowserJavascriptExecConfig Optional`

                                `javascript_exec`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `Key BetaBrowserKeyConfig Optional`

                                `key`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `LeftClick BetaBrowserLeftClickConfig Optional`

                                `left_click`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `LeftClickDrag BetaBrowserLeftClickDragConfig Optional`

                                `left_click_drag`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `LeftMouseDown BetaBrowserLeftMouseDownConfig Optional`

                                `left_mouse_down`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `LeftMouseUp BetaBrowserLeftMouseUpConfig Optional`

                                `left_mouse_up`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `ListTabs BetaBrowserListTabsConfig Optional`

                                `list_tabs`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `MiddleClick BetaBrowserMiddleClickConfig Optional`

                                `middle_click`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `MouseMove BetaBrowserMouseMoveConfig Optional`

                                `mouse_move`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `Navigate BetaBrowserNavigateConfig Optional`

                                `navigate`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `NewTab BetaBrowserNewTabConfig Optional`

                                `new_tab`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `ReadConsole BetaBrowserReadConsoleConfig Optional`

                                `read_console`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `ReadNetwork BetaBrowserReadNetworkConfig Optional`

                                `read_network`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `ReadPage BetaBrowserReadPageConfig Optional`

                                `read_page`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `RightClick BetaBrowserRightClickConfig Optional`

                                `right_click`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `Screenshot BetaBrowserScreenshotConfig Optional`

                                `screenshot`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `Scroll BetaBrowserScrollConfig Optional`

                                `scroll`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `ScrollTo BetaBrowserScrollToConfig Optional`

                                `scroll_to`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `SwitchTab BetaBrowserSwitchTabConfig Optional`

                                `switch_tab`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `TripleClick BetaBrowserTripleClickConfig Optional`

                                `triple_click`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `Wait BetaBrowserWaitConfig Optional`

                                `wait`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `Zoom BetaBrowserZoomConfig Optional`

                                `zoom`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                          - `type BetaToolComputerUse20241022`

                            - `Type Computer20241022`

                            - `DisplayHeightPx int64`

                              The height of the display in pixels.

                              minimum: 1

                            - `DisplayWidthPx int64`

                              The width of the display in pixels.

                              minimum: 1

                            - `Name Computer`

                              Name of the tool.

                              This is how the tool will be called by the model and in `tool_use` blocks.

                            - `AllowedCallers []string Optional`

                              - `"direct"`

                              - `"code_execution_20250825"`

                              - `"code_execution_20260120"`

                              - `"code_execution_20260521"`

                            - `CacheControl BetaCacheControlEphemeral Optional`

                              Create a cache control breakpoint at this content block.

                            - `DeferLoading bool Optional`

                              If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.

                            - `DisplayNumber int64 Optional`

                              The X11 display number (e.g. 0, 1) for the display.

                              minimum: 0

                            - `InputExamples []map[string]any Optional`

                            - `Strict bool Optional`

                              When true, guarantees schema validation on tool names and inputs

                          - `type BetaMemoryTool20250818`

                            - `Type Memory20250818`

                            - `Name Memory`

                              Name of the tool.

                              This is how the tool will be called by the model and in `tool_use` blocks.

                            - `AllowedCallers []string Optional`

                              - `"direct"`

                              - `"code_execution_20250825"`

                              - `"code_execution_20260120"`

                              - `"code_execution_20260521"`

                            - `CacheControl BetaCacheControlEphemeral Optional`

                              Create a cache control breakpoint at this content block.

                            - `DeferLoading bool Optional`

                              If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.

                            - `InputExamples []map[string]any Optional`

                            - `Strict bool Optional`

                              When true, guarantees schema validation on tool names and inputs

                          - `type BetaToolComputerUse20250124`

                            - `Type Computer20250124`

                            - `DisplayHeightPx int64`

                              The height of the display in pixels.

                              minimum: 1

                            - `DisplayWidthPx int64`

                              The width of the display in pixels.

                              minimum: 1

                            - `Name Computer`

                              Name of the tool.

                              This is how the tool will be called by the model and in `tool_use` blocks.

                            - `AllowedCallers []string Optional`

                              - `"direct"`

                              - `"code_execution_20250825"`

                              - `"code_execution_20260120"`

                              - `"code_execution_20260521"`

                            - `CacheControl BetaCacheControlEphemeral Optional`

                              Create a cache control breakpoint at this content block.

                            - `DeferLoading bool Optional`

                              If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.

                            - `DisplayNumber int64 Optional`

                              The X11 display number (e.g. 0, 1) for the display.

                              minimum: 0

                            - `InputExamples []map[string]any Optional`

                            - `Strict bool Optional`

                              When true, guarantees schema validation on tool names and inputs

                          - `type BetaToolTextEditor20241022`

                            - `Type TextEditor20241022`

                            - `Name StrReplaceEditor`

                              Name of the tool.

                              This is how the tool will be called by the model and in `tool_use` blocks.

                            - `AllowedCallers []string Optional`

                              - `"direct"`

                              - `"code_execution_20250825"`

                              - `"code_execution_20260120"`

                              - `"code_execution_20260521"`

                            - `CacheControl BetaCacheControlEphemeral Optional`

                              Create a cache control breakpoint at this content block.

                            - `DeferLoading bool Optional`

                              If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.

                            - `InputExamples []map[string]any Optional`

                            - `Strict bool Optional`

                              When true, guarantees schema validation on tool names and inputs

                          - `type BetaToolComputerUse20251124`

                            - `Type Computer20251124`

                            - `DisplayHeightPx int64`

                              The height of the display in pixels.

                              minimum: 1

                            - `DisplayWidthPx int64`

                              The width of the display in pixels.

                              minimum: 1

                            - `Name Computer`

                              Name of the tool.

                              This is how the tool will be called by the model and in `tool_use` blocks.

                            - `AllowedCallers []string Optional`

                              - `"direct"`

                              - `"code_execution_20250825"`

                              - `"code_execution_20260120"`

                              - `"code_execution_20260521"`

                            - `CacheControl BetaCacheControlEphemeral Optional`

                              Create a cache control breakpoint at this content block.

                            - `DeferLoading bool Optional`

                              If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.

                            - `DisplayNumber int64 Optional`

                              The X11 display number (e.g. 0, 1) for the display.

                              minimum: 0

                            - `EnableZoom bool Optional`

                              Whether to enable an action to take a zoomed-in screenshot of the screen.

                            - `InputExamples []map[string]any Optional`

                            - `Strict bool Optional`

                              When true, guarantees schema validation on tool names and inputs

                          - `type BetaComputerToolset20260801`

                            The computer toolset: a single `tools[]` entry (carrying no
                            `name`) that declares the computer tool family. The model is
                            served the family's tool with any members disabled via `configs`
                            removed from its schema. Every member is enabled by default, zoom
                            included. The single-tool options `display_number` and
                            `enable_zoom` are not fields of a toolset entry — it carries only
                            `type`, `configs`, and `cache_control`; zoom is controlled
                            via `configs.zoom.enabled`.

                            - `Type ComputerToolset20260801`

                            - `CacheControl BetaCacheControlEphemeral Optional`

                              Create a cache control breakpoint at this content block.

                            - `Configs BetaComputerToolsetConfigs Optional`

                              Sparse per-member overrides, keyed by member name. Absent, null, and {} are equivalent; a member's defaults apply wherever its key is absent.

                              - `Type BetaComputerTypeConfig Optional`

                                `type`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `CursorPosition BetaComputerCursorPositionConfig Optional`

                                `cursor_position`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `DoubleClick BetaComputerDoubleClickConfig Optional`

                                `double_click`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `HoldKey BetaComputerHoldKeyConfig Optional`

                                `hold_key`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `Key BetaComputerKeyConfig Optional`

                                `key`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `LeftClick BetaComputerLeftClickConfig Optional`

                                `left_click`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `LeftClickDrag BetaComputerLeftClickDragConfig Optional`

                                `left_click_drag`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `LeftMouseDown BetaComputerLeftMouseDownConfig Optional`

                                `left_mouse_down`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `LeftMouseUp BetaComputerLeftMouseUpConfig Optional`

                                `left_mouse_up`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `MiddleClick BetaComputerMiddleClickConfig Optional`

                                `middle_click`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `MouseMove BetaComputerMouseMoveConfig Optional`

                                `mouse_move`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `RightClick BetaComputerRightClickConfig Optional`

                                `right_click`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `Screenshot BetaComputerScreenshotConfig Optional`

                                `screenshot`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `Scroll BetaComputerScrollConfig Optional`

                                `scroll`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `TripleClick BetaComputerTripleClickConfig Optional`

                                `triple_click`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `Wait BetaComputerWaitConfig Optional`

                                `wait`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                              - `Zoom BetaComputerZoomConfig Optional`

                                `zoom`'s config overrides.

                                - `DeferLoading bool Optional`

                                  Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.

                                - `Enabled bool Optional`

                                  Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.

                          - `type BetaToolTextEditor20250124`

                            - `Type TextEditor20250124`

                            - `Name StrReplaceEditor`

                              Name of the tool.

                              This is how the tool will be called by the model and in `tool_use` blocks.

                            - `AllowedCallers []string Optional`

                              - `"direct"`

                              - `"code_execution_20250825"`

                              - `"code_execution_20260120"`

                              - `"code_execution_20260521"`

                            - `CacheControl BetaCacheControlEphemeral Optional`

                              Create a cache control breakpoint at this content block.

                            - `DeferLoading bool Optional`

                              If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.

                            - `InputExamples []map[string]any Optional`

                            - `Strict bool Optional`

                              When true, guarantees schema validation on tool names and inputs

                          - `type BetaToolTextEditor20250429`

                            - `Type TextEditor20250429`

                            - `Name StrReplaceBasedEditTool`

                              Name of the tool.

                              This is how the tool will be called by the model and in `tool_use` blocks.

                            - `AllowedCallers []string Optional`

                              - `"direct"`

                              - `"code_execution_20250825"`

                              - `"code_execution_20260120"`

                              - `"code_execution_20260521"`

                            - `CacheControl BetaCacheControlEphemeral Optional`

                              Create a cache control breakpoint at this content block.

                            - `DeferLoading bool Optional`

                              If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.

                            - `InputExamples []map[string]any Optional`

                            - `Strict bool Optional`

                              When true, guarantees schema validation on tool names and inputs

                          - `type BetaToolTextEditor20250728`

                            - `Type TextEditor20250728`

                            - `Name StrReplaceBasedEditTool`

                              Name of the tool.

                              This is how the tool will be called by the model and in `tool_use` blocks.

                            - `AllowedCallers []string Optional`

                              - `"direct"`

                              - `"code_execution_20250825"`

                              - `"code_execution_20260120"`

                              - `"code_execution_20260521"`

                            - `CacheControl BetaCacheControlEphemeral Optional`

                              Create a cache control breakpoint at this content block.

                            - `DeferLoading bool Optional`

                              If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.

                            - `InputExamples []map[string]any Optional`

                            - `MaxCharacters int64 Optional`

                              Maximum number of characters to display when viewing a file. If not specified, defaults to displaying the full file.

                              minimum: 1

                            - `Strict bool Optional`

                              When true, guarantees schema validation on tool names and inputs

                          - `type BetaWebSearchTool20250305`

                            - `Type WebSearch20250305`

                            - `Name WebSearch`

                              Name of the tool.

                              This is how the tool will be called by the model and in `tool_use` blocks.

                            - `AllowedCallers []string Optional`

                              - `"direct"`

                              - `"code_execution_20250825"`

                              - `"code_execution_20260120"`

                              - `"code_execution_20260521"`

                            - `AllowedDomains []string Optional`

                              If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.

                            - `BlockedDomains []string Optional`

                              If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.

                            - `CacheControl BetaCacheControlEphemeral Optional`

                              Create a cache control breakpoint at this content block.

                            - `DeferLoading bool Optional`

                              If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.

                            - `MaxUses int64 Optional`

                              Maximum number of times the tool can be used in the API request.

                              minimum: 1

                            - `Strict bool Optional`

                              When true, guarantees schema validation on tool names and inputs

                            - `UserLocation BetaUserLocation Optional`

                              Parameters for the user's location. Used to provide more relevant search results.

                              - `Type Approximate`

                              - `City string Optional`

                                The city of the user.

                                minLength: 1, maxLength: 255

                              - `Country string Optional`

                                The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user.

                                minLength: 2, maxLength: 2

                              - `Region string Optional`

                                The region of the user.

                                minLength: 1, maxLength: 255

                              - `Timezone string Optional`

                                The [IANA timezone](https://nodatime.org/TimeZones) of the user.

                                minLength: 1, maxLength: 255

                          - `type BetaWebFetchTool20250910`

                            - `Type WebFetch20250910`

                            - `Name WebFetch`

                              Name of the tool.

                              This is how the tool will be called by the model and in `tool_use` blocks.

                            - `AllowedCallers []string Optional`

                              - `"direct"`

                              - `"code_execution_20250825"`

                              - `"code_execution_20260120"`

                              - `"code_execution_20260521"`

                            - `AllowedDomains []string Optional`

                              List of domains to allow fetching from

                            - `BlockedDomains []string Optional`

                              List of domains to block fetching from

                            - `CacheControl BetaCacheControlEphemeral Optional`

                              Create a cache control breakpoint at this content block.

                            - `Citations BetaCitationsConfigParamResp Optional`

                              Citations configuration for fetched documents. Citations are disabled by default.

                              - `Enabled bool Optional`

                            - `DeferLoading bool Optional`

                              If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.

                            - `MaxContentTokens int64 Optional`

                              Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.

                              minimum: 1

                            - `MaxUses int64 Optional`

                              Maximum number of times the tool can be used in the API request.

                              minimum: 1

                            - `Strict bool Optional`

                              When true, guarantees schema validation on tool names and inputs

                            - `URLSources BetaWebFetchURLSources Optional`

                              Which sources contribute to the set of URLs the tool may fetch. Omitted means every source.

                              - `ClientToolResults BetaWebFetchURLSourcesClientToolResultsUnion Optional`

                                Which client tools' results contribute fetchable URLs: "all", "none", or an only or except list of client tool names from tools[].

                                - `type BetaWebFetchURLSourceAll`

                                  The `url_sources` variant under which a source contributes in
                                  full: every result of the tool filter's source, or all user input.

                                  - `Type All`

                                - `type BetaWebFetchURLSourceNone`

                                  The `url_sources` variant under which a source contributes nothing:
                                  no result of the tool filter's source, or no user input.

                                  - `Type None`

                                - `type BetaWebFetchURLSourceOnly`

                                  The tool filter variant under which only the named tools' results
                                  contribute.

                                  - `Type Only`

                                  - `Tools []BetaWebFetchURLSourceToolReference`

                                    - `Type ToolReference`

                                    - `Name string`

                                - `type BetaWebFetchURLSourceExcept`

                                  The tool filter variant under which every result but the named
                                  tools' contributes.

                                  - `Type Except`

                                  - `Tools []BetaWebFetchURLSourceToolReference`

                                    - `Type ToolReference`

                                    - `Name string`

                              - `ServerToolResults BetaWebFetchURLSourcesServerToolResultsUnion Optional`

                                Which server tools' results contribute fetchable URLs: "all", "none", or an only or except list of server tool names from tools[]; only web_search and web_fetch results ever contribute.

                                - `type BetaWebFetchURLSourceAll`

                                  The `url_sources` variant under which a source contributes in
                                  full: every result of the tool filter's source, or all user input.

                                - `type BetaWebFetchURLSourceNone`

                                  The `url_sources` variant under which a source contributes nothing:
                                  no result of the tool filter's source, or no user input.

                                - `type BetaWebFetchURLSourceOnly`

                                  The tool filter variant under which only the named tools' results
                                  contribute.

                                - `type BetaWebFetchURLSourceExcept`

                                  The tool filter variant under which every result but the named
                                  tools' contributes.

                              - `UserInput BetaWebFetchURLSourcesUserInputUnion Optional`

                                Whether URLs in user messages are fetchable: "all" or "none".

                                - `type BetaWebFetchURLSourceAll`

                                  The `url_sources` variant under which a source contributes in
                                  full: every result of the tool filter's source, or all user input.

                                - `type BetaWebFetchURLSourceNone`

                                  The `url_sources` variant under which a source contributes nothing:
                                  no result of the tool filter's source, or no user input.

                          - `type BetaWebSearchTool20260209`

                            - `Type WebSearch20260209`

                            - `Name WebSearch`

                              Name of the tool.

                              This is how the tool will be called by the model and in `tool_use` blocks.

                            - `AllowedCallers []string Optional`

                              - `"direct"`

                              - `"code_execution_20250825"`

                              - `"code_execution_20260120"`

                              - `"code_execution_20260521"`

                            - `AllowedDomains []string Optional`

                              If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.

                            - `BlockedDomains []string Optional`

                              If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.

                            - `CacheControl BetaCacheControlEphemeral Optional`

                              Create a cache control breakpoint at this content block.

                            - `DeferLoading bool Optional`

                              If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.

                            - `MaxUses int64 Optional`

                              Maximum number of times the tool can be used in the API request.

                              minimum: 1

                            - `Strict bool Optional`

                              When true, guarantees schema validation on tool names and inputs

                            - `UserLocation BetaUserLocation Optional`

                              Parameters for the user's location. Used to provide more relevant search results.

                          - `type BetaWebFetchTool20260209`

                            - `Type WebFetch20260209`

                            - `Name WebFetch`

                              Name of the tool.

                              This is how the tool will be called by the model and in `tool_use` blocks.

                            - `AllowedCallers []string Optional`

                              - `"direct"`

                              - `"code_execution_20250825"`

                              - `"code_execution_20260120"`

                              - `"code_execution_20260521"`

                            - `AllowedDomains []string Optional`

                              List of domains to allow fetching from

                            - `BlockedDomains []string Optional`

                              List of domains to block fetching from

                            - `CacheControl BetaCacheControlEphemeral Optional`

                              Create a cache control breakpoint at this content block.

                            - `Citations BetaCitationsConfigParamResp Optional`

                              Citations configuration for fetched documents. Citations are disabled by default.

                            - `DeferLoading bool Optional`

                              If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.

                            - `MaxContentTokens int64 Optional`

                              Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.

                              minimum: 1

                            - `MaxUses int64 Optional`

                              Maximum number of times the tool can be used in the API request.

                              minimum: 1

                            - `Strict bool Optional`

                              When true, guarantees schema validation on tool names and inputs

                            - `URLSources BetaWebFetchURLSources Optional`

                              Which sources contribute to the set of URLs the tool may fetch. Omitted means every source.

                          - `type BetaWebFetchTool20260309`

                            Web fetch tool with use_cache parameter for bypassing cached content.

                            - `Type WebFetch20260309`

                            - `Name WebFetch`

                              Name of the tool.

                              This is how the tool will be called by the model and in `tool_use` blocks.

                            - `AllowedCallers []string Optional`

                              - `"direct"`

                              - `"code_execution_20250825"`

                              - `"code_execution_20260120"`

                              - `"code_execution_20260521"`

                            - `AllowedDomains []string Optional`

                              List of domains to allow fetching from

                            - `BlockedDomains []string Optional`

                              List of domains to block fetching from

                            - `CacheControl BetaCacheControlEphemeral Optional`

                              Create a cache control breakpoint at this content block.

                            - `Citations BetaCitationsConfigParamResp Optional`

                              Citations configuration for fetched documents. Citations are disabled by default.

                            - `DeferLoading bool Optional`

                              If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.

                            - `MaxContentTokens int64 Optional`

                              Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.

                              minimum: 1

                            - `MaxUses int64 Optional`

                              Maximum number of times the tool can be used in the API request.

                              minimum: 1

                            - `Strict bool Optional`

                              When true, guarantees schema validation on tool names and inputs

                            - `URLSources BetaWebFetchURLSources Optional`

                              Which sources contribute to the set of URLs the tool may fetch. Omitted means every source.

                            - `UseCache bool Optional`

                              Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources.

                          - `type BetaWebSearchTool20260318`

                            - `Type WebSearch20260318`

                            - `Name WebSearch`

                              Name of the tool.

                              This is how the tool will be called by the model and in `tool_use` blocks.

                            - `AllowedCallers []string Optional`

                              - `"direct"`

                              - `"code_execution_20250825"`

                              - `"code_execution_20260120"`

                              - `"code_execution_20260521"`

                            - `AllowedDomains []string Optional`

                              If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.

                            - `BlockedDomains []string Optional`

                              If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.

                            - `CacheControl BetaCacheControlEphemeral Optional`

                              Create a cache control breakpoint at this content block.

                            - `DeferLoading bool Optional`

                              If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.

                            - `MaxUses int64 Optional`

                              Maximum number of times the tool can be used in the API request.

                              minimum: 1

                            - `ResponseInclusion BetaWebSearchTool20260318ResponseInclusion Optional`

                              How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn.

                              - `const BetaWebSearchTool20260318ResponseInclusionFull BetaWebSearchTool20260318ResponseInclusion = "full"`

                              - `const BetaWebSearchTool20260318ResponseInclusionExcluded BetaWebSearchTool20260318ResponseInclusion = "excluded"`

                            - `Strict bool Optional`

                              When true, guarantees schema validation on tool names and inputs

                            - `UserLocation BetaUserLocation Optional`

                              Parameters for the user's location. Used to provide more relevant search results.

                          - `type BetaWebFetchTool20260318`

                            - `Type WebFetch20260318`

                            - `Name WebFetch`

                              Name of the tool.

                              This is how the tool will be called by the model and in `tool_use` blocks.

                            - `AllowedCallers []string Optional`

                              - `"direct"`

                              - `"code_execution_20250825"`

                              - `"code_execution_20260120"`

                              - `"code_execution_20260521"`

                            - `AllowedDomains []string Optional`

                              List of domains to allow fetching from

                            - `BlockedDomains []string Optional`

                              List of domains to block fetching from

                            - `CacheControl BetaCacheControlEphemeral Optional`

                              Create a cache control breakpoint at this content block.

                            - `Citations BetaCitationsConfigParamResp Optional`

                              Citations configuration for fetched documents. Citations are disabled by default.

                            - `DeferLoading bool Optional`

                              If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.

                            - `MaxContentTokens int64 Optional`

                              Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.

                              minimum: 1

                            - `MaxUses int64 Optional`

                              Maximum number of times the tool can be used in the API request.

                              minimum: 1

                            - `ResponseInclusion BetaWebFetchTool20260318ResponseInclusion Optional`

                              How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn.

                              - `const BetaWebFetchTool20260318ResponseInclusionFull BetaWebFetchTool20260318ResponseInclusion = "full"`

                              - `const BetaWebFetchTool20260318ResponseInclusionExcluded BetaWebFetchTool20260318ResponseInclusion = "excluded"`

                            - `Strict bool Optional`

                              When true, guarantees schema validation on tool names and inputs

                            - `URLSources BetaWebFetchURLSources Optional`

                              Which sources contribute to the set of URLs the tool may fetch. Omitted means every source.

                            - `UseCache bool Optional`

                              Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources.

                          - `type BetaAdvisorTool20260301`

                            - `Type Advisor20260301`

                            - `Model Model`

                              The model that will complete your prompt.

                              See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.

                              - `const ModelClaudeFable5_2 Model = "claude-fable-5-2"`

                                Built for the most ambitious work in coding, enterprise workflows, and the sciences

                              - `const ModelClaudeMythos5_2 Model = "claude-mythos-5-2"`

                                Built for the most demanding cybersecurity and life sciences research, available through verification programs

                              - `const ModelClaudeHaiku5_5 Model = "claude-haiku-5-5"`

                                Fastest model for high-volume, real-time tasks

                              - `const ModelClaudeSonnet5_5 Model = "claude-sonnet-5-5"`

                                Efficient model for coding and agents

                              - `const ModelClaudeFable5_1 Model = "claude-fable-5-1"`

                                Frontier intelligence for ambitious tasks across coding, scientific discovery, and enterprise workflows

                              - `const ModelClaudeOpus5_5 Model = "claude-opus-5-5"`

                                Powerful intelligence for coding, knowledge work, and long-running agents

                              - `const ModelClaudeMythos5_1 Model = "claude-mythos-5-1"`

                                Our most capable model for cybersecurity and biology research, available through trusted access programs

                              - `const ModelClaudeSonnet5 Model = "claude-sonnet-5"`

                                Efficient model for coding and agents

                              - `const ModelClaudeFable5 Model = "claude-fable-5"`

                                Next generation of intelligence for the hardest knowledge work and coding problems

                              - `const ModelClaudeMythos5 Model = "claude-mythos-5"`

                                Most capable model for cybersecurity and biology research

                              - `const ModelClaudeOpus5 Model = "claude-opus-5"`

                                Powerful intelligence for long-running agents and coding

                              - `const ModelClaudeOpus4_8 Model = "claude-opus-4-8"`

                                Powerful intelligence for long-running agents and coding

                              - `const ModelClaudeOpus4_7 Model = "claude-opus-4-7"`

                                Powerful intelligence for long-running agents and coding

                              - `const ModelClaudeOpus4_6 Model = "claude-opus-4-6"`

                                Powerful intelligence for long-running agents and coding

                              - `const ModelClaudeSonnet4_6 Model = "claude-sonnet-4-6"`

                                Best combination of speed and intelligence

                              - `const ModelClaudeHaiku4_5 Model = "claude-haiku-4-5"`

                              - `const ModelClaudeHaiku4_5_20251001 Model = "claude-haiku-4-5-20251001"`

                              - `const ModelClaudeMythosPreview Model = "claude-mythos-preview"`

                                **Deprecated**: Will reach end-of-life on June 30, 2026. Please migrate to claude-mythos-5. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.

                                New class of intelligence, strongest in coding and cybersecurity

                              - `const ModelClaudeOpus4_5 Model = "claude-opus-4-5"`

                                **Deprecated**: Will reach end-of-life on January 22, 2027. Please migrate to claude-opus-5-5. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.

                                Powerful intelligence for long-running agents and coding

                              - `const ModelClaudeOpus4_5_20251101 Model = "claude-opus-4-5-20251101"`

                                **Deprecated**: Will reach end-of-life on January 22, 2027. Please migrate to claude-opus-5-5. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.

                                Powerful intelligence for long-running agents and coding

                            - `Name Advisor`

                              Name of the tool.

                              This is how the tool will be called by the model and in `tool_use` blocks.

                            - `AllowedCallers []string Optional`

                              - `"direct"`

                              - `"code_execution_20250825"`

                              - `"code_execution_20260120"`

                              - `"code_execution_20260521"`

                            - `CacheControl BetaCacheControlEphemeral Optional`

                              Create a cache control breakpoint at this content block.

                            - `Caching BetaCacheControlEphemeral Optional`

                              Caching for the advisor's own prompt. When set, each advisor call writes a cache entry at the given TTL so subsequent calls in the same conversation read the stable prefix. When omitted, the advisor prompt is not cached.

                            - `DeferLoading bool Optional`

                              If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.

                            - `MaxTokens int64 Optional`

                              Bounds the advisor's total output (thinking + text) per call. When the advisor hits this cap, the returned advisor_result or advisor_redacted_result block carries stop_reason='max_tokens', and a truncation note is appended to the advice text the worker model sees (inside the encrypted blob in redacted mode). When set, the API also passes the advisor its remaining-token budget, so the advisor shapes its output toward the cap. When omitted, the advisor model's default output cap applies and the API doesn't pass a budget.

                              minimum: 1024

                            - `MaxUses int64 Optional`

                              Maximum number of times the tool can be used in the API request.

                              minimum: 1

                            - `Strict bool Optional`

                              When true, guarantees schema validation on tool names and inputs

                          - `type BetaToolSearchToolBm25_20251119`

                            - `Type BetaToolSearchToolBm25_20251119Type`

                              - `const BetaToolSearchToolBm25_20251119TypeToolSearchToolBm25_20251119 BetaToolSearchToolBm25_20251119Type = "tool_search_tool_bm25_20251119"`

                              - `const BetaToolSearchToolBm25_20251119TypeToolSearchToolBm25 BetaToolSearchToolBm25_20251119Type = "tool_search_tool_bm25"`

                            - `Name ToolSearchToolBm25`

                              Name of the tool.

                              This is how the tool will be called by the model and in `tool_use` blocks.

                            - `AllowedCallers []string Optional`

                              - `"direct"`

                              - `"code_execution_20250825"`

                              - `"code_execution_20260120"`

                              - `"code_execution_20260521"`

                            - `CacheControl BetaCacheControlEphemeral Optional`

                              Create a cache control breakpoint at this content block.

                            - `DeferLoading bool Optional`

                              If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.

                            - `Strict bool Optional`

                              When true, guarantees schema validation on tool names and inputs

                          - `type BetaToolSearchToolRegex20251119`

                            - `Type BetaToolSearchToolRegex20251119Type`

                              - `const BetaToolSearchToolRegex20251119TypeToolSearchToolRegex20251119 BetaToolSearchToolRegex20251119Type = "tool_search_tool_regex_20251119"`

                              - `const BetaToolSearchToolRegex20251119TypeToolSearchToolRegex BetaToolSearchToolRegex20251119Type = "tool_search_tool_regex"`

                            - `Name ToolSearchToolRegex`

                              Name of the tool.

                              This is how the tool will be called by the model and in `tool_use` blocks.

                            - `AllowedCallers []string Optional`

                              - `"direct"`

                              - `"code_execution_20250825"`

                              - `"code_execution_20260120"`

                              - `"code_execution_20260521"`

                            - `CacheControl BetaCacheControlEphemeral Optional`

                              Create a cache control breakpoint at this content block.

                            - `DeferLoading bool Optional`

                              If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.

                            - `Strict bool Optional`

                              When true, guarantees schema validation on tool names and inputs

                          - `type BetaMCPToolset`

                            Configuration for a group of tools from an MCP server.

                            Allows configuring enabled status and defer_loading for all tools
                            from an MCP server, with optional per-tool overrides.

                            - `Type MCPToolset`

                            - `MCPServerName string`

                              Name of the MCP server to configure tools for

                              minLength: 1, maxLength: 255

                            - `CacheControl BetaCacheControlEphemeral Optional`

                              Create a cache control breakpoint at this content block.

                            - `Configs map[string]BetaMCPToolConfig Optional`

                              Configuration overrides for specific tools, keyed by tool name

                              - `DeferLoading bool Optional`

                              - `Enabled bool Optional`

                            - `DefaultConfig BetaMCPToolDefaultConfig Optional`

                              Default configuration applied to all tools from this server

                              - `DeferLoading bool Optional`

                              - `Enabled bool Optional`

                            - `Tools []BetaMCPToolParamResp Optional`

                              The server's tool listing, pinned: when present, the server is not asked for its tools before sampling and exactly these entries, with `default_config` and `configs` applied, are the toolset's tools. Copy it from the `mcp_tool_listing` block of an earlier response.

                              - `InputSchema map[string]any`

                                The tool's input schema as the MCP server lists it, verbatim.

                              - `Name string`

                                The tool's name as the MCP server lists it (not prefixed with the server name).

                                minLength: 1

                              - `Description string Optional`

                                The tool's description as the MCP server lists it.

                  - `type BetaResponseToolRemovalBlock`

                    An entry of a `compaction` block's `tool_changes`: a tool of the
                    request's `tools` (or an MCP tool or toolset) that the compacted range
                    withdrew. Send it back unchanged.

                    - `Type ToolRemoval`

                      default: tool_removal

                    - `Tool BetaResponseToolRemovalBlockToolUnion`

                      A reference to the withdrawn `tools` entry, MCP tool or MCP toolset.

                      - `type BetaResponseToolChangeToolReference`

                        Reference to a single tool, by the name the model uses to call it, as
                        a `compaction` block's `tool_changes` entry reports it: a tool
                        declared in `tools` or defined by an earlier `tool_addition` block.
                        Send it back unchanged with the block.

                      - `type BetaResponseToolChangeMCPToolReference`

                        Reference to a single MCP tool, by its server and its name on that
                        server, as a `compaction` block's `tool_changes` entry reports it.
                        Send it back unchanged with the block.

                      - `type BetaResponseToolChangeMCPToolsetReference`

                        Reference to every tool in the named MCP server's toolset, as a
                        `compaction` block's `tool_changes` entry reports it. Send it back
                        unchanged with the block.

              - `type BetaFallbackBlock`

                Marks the point in `content` where one model's output gives way to the next.

                One block appears per hop where a preceding model actually ran this turn and
                declined. A turn where no preceding model ran and declined has no such
                boundary and carries no block — the signal for whether a fallback model
                served the response is the presence of a `fallback_message` entry in
                `usage.iterations`, not this block.

                The block is treated like a server-tool content block for streaming: it
                arrives via the standard `content_block_start` / `content_block_stop`
                pair and carries no deltas.

                - `Type Fallback`

                  default: fallback

                - `From BetaFallbackInfo`

                  The model whose output ends at this point — the model that declined at this hop. When the declining hop is the requested model, its `model` echoes the top-level `model` string the caller sent (alias or canonical); when the declining hop is a fallback model, its `model` is that model's canonical id.

                  - `Model Model`

                    The model that will complete your prompt.

                    See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.

                - `To BetaFallbackInfo`

                  The fallback model producing the content that follows this block. Its `model` is always the canonical id.

                - `Trigger BetaFallbackRefusalTrigger`

                  What caused the `from` model to hand over at this hop.

                  - `Type Refusal`

                    default: refusal

                  - `Category BetaFallbackRefusalTriggerCategory`

                    The policy category that triggered the `from` model's refusal at this hop. `null` when the refusal doesn't map to a named category. Same vocabulary as `stop_details.category`.

                    - `const BetaFallbackRefusalTriggerCategoryCyber BetaFallbackRefusalTriggerCategory = "cyber"`

                      The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category.

                    - `const BetaFallbackRefusalTriggerCategoryBio BetaFallbackRefusalTriggerCategory = "bio"`

                      The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category.

                    - `const BetaFallbackRefusalTriggerCategoryFrontierLLM BetaFallbackRefusalTriggerCategory = "frontier_llm"`

                      The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category.

                    - `const BetaFallbackRefusalTriggerCategoryReasoningExtraction BetaFallbackRefusalTriggerCategory = "reasoning_extraction"`

                      The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking?sdk_languages=go).

                    - `const BetaFallbackRefusalTriggerCategoryGeneralHarms BetaFallbackRefusalTriggerCategory = "general_harms"`

                      The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category.

              - `type BetaMCPToolListingBlock`

                The tool listing the server fetched from an MCP server while producing
                this response. Send the assistant message back unchanged, this block
                included, so later requests use this listing instead of asking the MCP
                server again.

                - `Type MCPToolListing`

                  default: mcp_tool_listing

                - `MCPServerName string`

                - `Tools []BetaMCPTool`

                  - `InputSchema map[string]any`

                  - `Name string`

                  - `Description string Optional`

            - `ContextManagement BetaContextManagementResponse`

              Context management response.

              Information about context management strategies applied during the request.

              - `AppliedEdits []BetaContextManagementResponseAppliedEditUnion`

                List of context management edits that were applied.

                - `type BetaClearToolUses20250919EditResponse`

                  - `Type ClearToolUses20250919`

                    The type of context management edit applied.

                    default: clear_tool_uses_20250919

                  - `ClearedInputTokens int64`

                    Number of input tokens cleared by this edit.

                    minimum: 0

                  - `ClearedToolUses int64`

                    Number of tool uses that were cleared.

                    minimum: 0

                - `type BetaClearThinking20251015EditResponse`

                  - `Type ClearThinking20251015`

                    The type of context management edit applied.

                    default: clear_thinking_20251015

                  - `ClearedInputTokens int64`

                    Number of input tokens cleared by this edit.

                    minimum: 0

                  - `ClearedThinkingTurns int64`

                    Number of thinking turns that were cleared.

                    minimum: 0

            - `Diagnostics BetaDiagnostics`

              Request-level diagnostics. `null` when the request did not supply `diagnostics`, or when it did and no prompt-cache divergence was detected.

              - `CacheMissReason BetaCacheMissReasonUnion`

                Explains why the prompt cache could not fully reuse the prefix from the request identified by `diagnostics.previous_message_id`. `null` means diagnosis is still pending — the response was serialized before the background comparison completed.

                - `type BetaCacheMissModelChanged`

                  A `cache_miss_reason` for a request whose `model` or `speed` differs from the previous request's.

                  See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=go#cache-miss-reason-types) to learn what to change for each reason.

                  - `Type ModelChanged`

                    default: model_changed

                  - `CacheMissedInputTokens int64`

                    Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

                - `type BetaCacheMissSystemChanged`

                  A `cache_miss_reason` for a request whose `system` differs from the previous request's.

                  See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=go#cache-miss-reason-types) to learn what to change for each reason.

                  - `Type SystemChanged`

                    default: system_changed

                  - `CacheMissedInputTokens int64`

                    Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

                - `type BetaCacheMissToolsChanged`

                  A `cache_miss_reason` for a request whose `tools` differ from the previous request's, for example because tools were added, removed, or reordered.

                  See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=go#cache-miss-reason-types) to learn what to change for each reason.

                  - `Type ToolsChanged`

                    default: tools_changed

                  - `CacheMissedInputTokens int64`

                    Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

                - `type BetaCacheMissMessagesChanged`

                  A `cache_miss_reason` for a request whose `messages` differ from the previous request's in an earlier entry, instead of only having entries appended. The `model`, `system`, and `tools` match.

                  See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=go#cache-miss-reason-types) to learn what to change for each reason.

                  - `Type MessagesChanged`

                    default: messages_changed

                  - `CacheMissedInputTokens int64`

                    Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

                - `type BetaCacheMissPreviousMessageNotFound`

                  A `cache_miss_reason` for when the API doesn't have a stored record of the request that `diagnostics.previous_message_id` references.

                  This doesn't mean that this request changed.

                  See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=go#cache-miss-reason-types) to learn what to change for each reason.

                  - `Type PreviousMessageNotFound`

                    default: previous_message_not_found

                - `type BetaCacheMissUnavailable`

                  A `cache_miss_reason` for when the API can't give a diagnosis. The request itself was processed normally.

                  This includes a request whose `model`, `system`, and `tools` match the previous request's but whose other prompt-affecting parameters, such as `thinking` or `tool_choice`, differ.

                  See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics?sdk_languages=go#cache-miss-reason-types) to learn what to change for each reason.

                  - `Type Unavailable`

                    default: unavailable

            - `Model Model`

              The model that will complete your prompt.

              See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.

            - `Role Assistant`

              Conversational role of the generated message.

              This will always be `"assistant"`.

              default: assistant

            - `StopDetails BetaRefusalStopDetails`

              Structured information about why model output stopped.

              This is `null` when the `stop_reason` has no additional detail to report.

              - `Type Refusal`

                default: refusal

              - `Category BetaRefusalStopDetailsCategory`

                The policy category that triggered the refusal.

                `null` when the refusal doesn't map to a named category.

                - `const BetaRefusalStopDetailsCategoryCyber BetaRefusalStopDetailsCategory = "cyber"`

                  The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category.

                - `const BetaRefusalStopDetailsCategoryBio BetaRefusalStopDetailsCategory = "bio"`

                  The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category.

                - `const BetaRefusalStopDetailsCategoryFrontierLLM BetaRefusalStopDetailsCategory = "frontier_llm"`

                  The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category.

                - `const BetaRefusalStopDetailsCategoryReasoningExtraction BetaRefusalStopDetailsCategory = "reasoning_extraction"`

                  The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking?sdk_languages=go).

                - `const BetaRefusalStopDetailsCategoryGeneralHarms BetaRefusalStopDetailsCategory = "general_harms"`

                  The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category.

              - `Explanation string`

                Human-readable explanation of the refusal.

                This text is not guaranteed to be stable. `null` when no explanation is available for the category.

              - `FallbackCreditToken string`

                Opaque code that refunds the cache-miss cost when retrying this refused
                request on the fallback model. Pass it as `fallback_credit_token` on the
                retry request. Expires 5 minutes after the refusal.

                The retry is sent either with the same request body (`system`, `messages`,
                `tools`, and other render-shaping fields), or with the same body plus one
                appended `assistant` message whose content is the partial text (with any
                trailing whitespace stripped from the final text block) and paired
                server-tool blocks from this refusal — which also authorizes that
                appended turn as an assistant-prefill continuation on models that otherwise
                disallow prefill. A token minted mid-server-tool-loop whose partial content
                was continuable may only be redeemed the second way — if a same-body retry
                is rejected with a 400 saying the token must be redeemed by continuing the
                partial response, retry the second way instead. Either way: same workspace,
                same platform; a mismatch is a 400. Resending a token for an already-warm
                prefix is permitted but yields no additional credit.

                `null` when the refused model isn't eligible for a fallback credit.

              - `FallbackHasPrefillClaim bool`

                Whether the accompanying `fallback_credit_token` may be redeemed with the
                appended-assistant retry form. Only set when `fallback_credit_token` is
                present.

                `true`: retry by resending the same request body plus one appended
                `assistant` message whose content is this response's `content` with any
                trailing whitespace stripped from the final text block and unpaired
                `tool_use` blocks omitted (the same appended-turn shape described on
                `fallback_credit_token`), with the token attached. `false`: retry by
                resending the original request body unchanged, with the token attached —
                the appended-assistant form is not available for this refusal (no
                continuable partial content, or the request uses `output_format` or a
                `tool_choice` that forces tool use). One exception: when the request used
                `output_format` or a forced `tool_choice` and the refusal arrived after
                server tools (including MCP connector tools) had already executed, the
                token may not be redeemable by either retry form; if the exact-body retry
                is then rejected with a 400 saying the token must be redeemed by
                continuing the partial response, discard the token and retry without it.

                Advisory: if an appended-assistant retry is rejected with a 400 despite
                `true`, fall back to resending the original request body with the token.

              - `RecommendedModel string`

                The server's suggested retry target for this refusal. Populated when a fallback attempt could not be made (the fallback model's rate limit was exhausted, or it was overloaded); names the fallback model the caller can retry directly. Null otherwise.

            - `StopReason BetaStopReason`

              The reason that we stopped.

              This may be one the following values:

              * `"end_turn"`: the model reached a natural stopping point
              * `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum
              * `"stop_sequence"`: one of your provided custom `stop_sequences` was generated
              * `"tool_use"`: the model invoked one or more tools
              * `"pause_turn"`: we paused a long-running turn. You may provide the response back as-is in a subsequent request to let the model continue.
              * `"refusal"`: when streaming classifiers intervene to handle potential policy violations
              * `"model_context_window_exceeded"`: we exceeded the model's context window

              In non-streaming mode this value is always non-null. In streaming mode, it is null in the `message_start` event and non-null otherwise.

              - `const BetaStopReasonEndTurn BetaStopReason = "end_turn"`

              - `const BetaStopReasonMaxTokens BetaStopReason = "max_tokens"`

              - `const BetaStopReasonStopSequence BetaStopReason = "stop_sequence"`

              - `const BetaStopReasonToolUse BetaStopReason = "tool_use"`

              - `const BetaStopReasonPauseTurn BetaStopReason = "pause_turn"`

              - `const BetaStopReasonCompaction BetaStopReason = "compaction"`

              - `const BetaStopReasonRefusal BetaStopReason = "refusal"`

              - `const BetaStopReasonModelContextWindowExceeded BetaStopReason = "model_context_window_exceeded"`

            - `StopSequence string`

              Which custom stop sequence was generated, if any.

              This value will be a non-null string if one of your custom stop sequences was generated.

            - `Usage BetaUsage`

              Billing and rate-limit usage.

              Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems.

              Under the hood, the API transforms requests into a format suitable for the model. The model's output then goes through a parsing stage before becoming an API response. As a result, the token counts in `usage` will not match one-to-one with the exact visible content of an API request or response.

              For example, `output_tokens` will be non-zero, even for an empty string response from Claude.

              Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`.

              - `CacheCreation BetaCacheCreation`

                Breakdown of cached tokens by TTL

                - `Ephemeral1hInputTokens int64`

                  The number of input tokens used to create the 1 hour cache entry.

                  default: 0, minimum: 0

                - `Ephemeral5mInputTokens int64`

                  The number of input tokens used to create the 5 minute cache entry.

                  default: 0, minimum: 0

              - `CacheCreationInputTokens int64`

                The number of input tokens used to create the cache entry.

                minimum: 0

              - `CacheReadInputTokens int64`

                The number of input tokens read from the cache.

                minimum: 0

              - `FallbackCredit BetaFallbackCreditUsage`

                Outcome of the `fallback_credit_token` presented on this request.

                Present on every response to a non-batch request that carried a
                `fallback_credit_token`, in either redemption mode; absent otherwise (batch
                items accept and ignore the token and carry no outcome object).

                - `Status BetaFallbackCreditUsageStatusUnion`

                  Whether the fallback-credit reprice was applied to this response's billing.

                  A union discriminated on `type`. `redeemed`: the retry is billed as if
                  the conversation had been on the retry model all along — including when the
                  resulting shift is zero because there was nothing to move. `not_applied`:
                  no reprice was applied; the arm's `reason` says why.

                  - `type BetaFallbackCreditRedeemed`

                    The reprice was applied: the retry is billed as if the conversation
                    had been on the retry model all along.

                    - `Type Redeemed`

                      default: redeemed

                  - `type BetaFallbackCreditNotApplied`

                    No reprice was applied; `reason` says why.

                    - `Type NotApplied`

                      default: not_applied

                    - `Reason BetaFallbackCreditNotAppliedReason`

                      Why the reprice was not applied.

                      A closed enum; additions to the redemption-check vocabulary arrive as
                      deliberate schema updates.

                      - `const BetaFallbackCreditNotAppliedReasonBodyMismatch BetaFallbackCreditNotAppliedReason = "body_mismatch"`

                      - `const BetaFallbackCreditNotAppliedReasonContinuationExcluded BetaFallbackCreditNotAppliedReason = "continuation_excluded"`

                      - `const BetaFallbackCreditNotAppliedReasonContinuationOnly BetaFallbackCreditNotAppliedReason = "continuation_only"`

                      - `const BetaFallbackCreditNotAppliedReasonExpired BetaFallbackCreditNotAppliedReason = "expired"`

                      - `const BetaFallbackCreditNotAppliedReasonInvalidTargetModel BetaFallbackCreditNotAppliedReason = "invalid_target_model"`

                      - `const BetaFallbackCreditNotAppliedReasonNotEnabled BetaFallbackCreditNotAppliedReason = "not_enabled"`

                      - `const BetaFallbackCreditNotAppliedReasonRepriceUnavailable BetaFallbackCreditNotAppliedReason = "reprice_unavailable"`

                      - `const BetaFallbackCreditNotAppliedReasonTemporarilyUnavailable BetaFallbackCreditNotAppliedReason = "temporarily_unavailable"`

                      - `const BetaFallbackCreditNotAppliedReasonVariantFieldsPresent BetaFallbackCreditNotAppliedReason = "variant_fields_present"`

                      - `const BetaFallbackCreditNotAppliedReasonWrongOrganization BetaFallbackCreditNotAppliedReason = "wrong_organization"`

                      - `const BetaFallbackCreditNotAppliedReasonWrongPlatform BetaFallbackCreditNotAppliedReason = "wrong_platform"`

                      - `const BetaFallbackCreditNotAppliedReasonWrongWorkspace BetaFallbackCreditNotAppliedReason = "wrong_workspace"`

                    - `RemoveToRedeem []string Optional`

                      Request fields to remove before retrying, so the retry can redeem this
                      token.

                      Present exactly when `reason` is `variant_fields_present` — never null,
                      never an empty array; absent otherwise. Fields are named only from your own request, and only after
                      the sealed variant hash matched. A served best-effort retry has already
                      been billed at normal price; nothing redeems retroactively, but a corrected
                      re-send inside the token's five-minute window can still redeem.

              - `InferenceGeo string`

                The geographic region where inference was performed for this request.

              - `InputTokens int64`

                The number of input tokens which were used.

                minimum: 0

              - `Iterations BetaIterationsUsage`

                Per-iteration token usage breakdown.

                Each entry represents one sampling iteration, with its own input/output token counts and cache statistics, discriminated by `type`. For `message` entries (model sampling iterations, such as the turns of a server-side tool use loop), this allows you to:

                - Calculate the context window size from the last `message` entry
                - Understand token accumulation across server-side tool use loops

                A `compaction` entry reports the token usage of the compaction operation itself — the server-side request that summarizes the context being closed — NOT the size of the context that was compacted away, and its token counts can be much smaller than that closed context (for example, a compaction that closes a ~200k-token context can report only a few thousand tokens). Do not derive the context window size from a `compaction` entry, even when it is the last entry. A `compaction` entry's tokens are not included in the top-level `usage` fields. When an input-token trigger is in effect (the default — 150,000 tokens unless configured otherwise), each `compaction` entry closes a context that had reached at least that threshold, though the context can exceed it by the final iteration's output and tool results.

                - `type BetaMessageIterationUsage`

                  Token usage for a sampling iteration.

                  - `Type Message`

                    Usage for a sampling iteration

                    default: message

                  - `CacheCreation BetaCacheCreation`

                    Breakdown of cached tokens by TTL

                  - `CacheCreationInputTokens int64`

                    The number of input tokens used to create the cache entry.

                    default: 0, minimum: 0

                  - `CacheReadInputTokens int64`

                    The number of input tokens read from the cache.

                    default: 0, minimum: 0

                  - `InputTokens int64`

                    The number of input tokens which were used.

                    minimum: 0

                  - `Model Model`

                    The model that will complete your prompt.

                    See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.

                  - `OutputTokens int64`

                    The number of output tokens which were used.

                    minimum: 0

                - `type BetaCompactionIterationUsage`

                  Token usage for a compaction iteration.

                  - `Type Compaction`

                    Usage for a compaction iteration

                    default: compaction

                  - `CacheCreation BetaCacheCreation`

                    Breakdown of cached tokens by TTL

                  - `CacheCreationInputTokens int64`

                    The number of input tokens used to create the cache entry.

                    default: 0, minimum: 0

                  - `CacheReadInputTokens int64`

                    The number of input tokens read from the cache.

                    default: 0, minimum: 0

                  - `InputTokens int64`

                    The number of input tokens which were used.

                    minimum: 0

                  - `OutputTokens int64`

                    The number of output tokens which were used.

                    minimum: 0

                - `type BetaAdvisorMessageIterationUsage`

                  Token usage for an advisor sub-inference iteration.

                  - `Type AdvisorMessage`

                    Usage for an advisor sub-inference iteration

                    default: advisor_message

                  - `CacheCreation BetaCacheCreation`

                    Breakdown of cached tokens by TTL

                  - `CacheCreationInputTokens int64`

                    The number of input tokens used to create the cache entry.

                    default: 0, minimum: 0

                  - `CacheReadInputTokens int64`

                    The number of input tokens read from the cache.

                    default: 0, minimum: 0

                  - `InputTokens int64`

                    The number of input tokens which were used.

                    minimum: 0

                  - `Model Model`

                    The model that will complete your prompt.

                    See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.

                  - `OutputTokens int64`

                    The number of output tokens which were used.

                    minimum: 0

                - `type BetaFallbackMessageIterationUsage`

                  Token usage for the fallback-model attempt of a server-side fallback request.

                  The terminal entry of a fallback-served turn: when a fallback hop's
                  output is the returned message, the entry for the iteration that
                  completed it carries this type in place of `message`. A declined hop
                  and the serving hop's earlier tool-loop iterations produce `message`
                  entries. Whether a fallback model served the response is signalled by
                  the presence of this entry in `usage.iterations`.

                  - `Type FallbackMessage`

                    Usage for the fallback-model attempt that served the response

                    default: fallback_message

                  - `CacheCreation BetaCacheCreation`

                    Breakdown of cached tokens by TTL

                  - `CacheCreationInputTokens int64`

                    The number of input tokens used to create the cache entry.

                    default: 0, minimum: 0

                  - `CacheReadInputTokens int64`

                    The number of input tokens read from the cache.

                    default: 0, minimum: 0

                  - `InputTokens int64`

                    The number of input tokens which were used.

                    minimum: 0

                  - `Model Model`

                    The model that will complete your prompt.

                    See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.

                  - `OutputTokens int64`

                    The number of output tokens which were used.

                    minimum: 0

              - `OutputTokens int64`

                The number of output tokens which were used.

                minimum: 0

              - `OutputTokensDetails BetaOutputTokensDetails`

                Breakdown of output tokens by category.

                `output_tokens` remains the inclusive, authoritative total used for billing.
                This object provides a read-only decomposition for observability — for example,
                how many of the billed output tokens were spent on internal reasoning that may
                have been summarized before being returned to you.

                - `ThinkingTokens int64`

                  Number of output tokens the model generated as internal reasoning, including
                  the thinking-block delimiter tokens.

                  Reflects the raw reasoning the model produced, not the (possibly shorter)
                  summarized thinking text returned in the response body. It may differ from the model's exact
                  generation count by a small number of tokens. Always ≤ `output_tokens`;
                  `output_tokens - thinking_tokens` approximates the non-reasoning output.

                  default: 0, minimum: 0

              - `ServerToolUse BetaServerToolUsage`

                The number of server tool requests.

                - `WebFetchRequests int64`

                  The number of web fetch tool requests.

                  default: 0, minimum: 0

                - `WebSearchRequests int64`

                  The number of web search tool requests.

                  default: 0, minimum: 0

              - `ServiceTier BetaUsageServiceTier`

                If the request used the priority, standard, or batch tier.

                - `const BetaUsageServiceTierStandard BetaUsageServiceTier = "standard"`

                - `const BetaUsageServiceTierPriority BetaUsageServiceTier = "priority"`

                - `const BetaUsageServiceTierBatch BetaUsageServiceTier = "batch"`

              - `Speed BetaUsageSpeed`

                The inference speed mode used for this request.

                - `const BetaUsageSpeedStandard BetaUsageSpeed = "standard"`

                - `const BetaUsageSpeedFast BetaUsageSpeed = "fast"`

            - `InputTransformations []BetaInputTransformationUnion Optional`

              Changes the API made to the request's input before showing it to the model,
              and blocks that failed a binding check but were left unchanged: one entry per
              block, in request order. Two entry types today. `thinking_dropped` — a
              `thinking`, `redacted_thinking` or `connector_text` block from the request's
              `messages` that was removed from the prompt instead of being shown to the
              model because it failed a binding check. `thinking_mismatch_allowed` — a
              `thinking` or `redacted_thinking` block that failed the conversation check
              (the conversation before it differs from the one it was created in, or it
              carries no record of one on a model that requires it) and was shown to the
              model all the same, because that check is not enforced for this request.
              More entry types may be added over time; ignore types you do not recognize.

              Requires `anthropic-beta: thinking-binding-controls-2026-08-01`. Present on
              every such response from a model that supports extended thinking, as `[]`
              when there is no entry to report; without the beta, blocks are removed or
              left in place all the same but nothing is reported. Removed blocks contribute
              nothing to `usage.input_tokens`; blocks left in place count as sent. When
              streaming, the array is final in `message_start`; the final `message_delta`
              event carries it only when a server-side model fallback happened mid-stream,
              in which case it holds the serving model's entries and replaces the one in
              `message_start`.

              - `type BetaThinkingDroppedInputTransformation`

                - `Type ThinkingDropped`

                  Always `thinking_dropped` for this entry type.

                  default: thinking_dropped

                - `Path string`

                  Where the removed block was in your request, as `messages.{i}.content.{j}`:
                  `i` indexes the `messages` array you sent and `j` that message's `content`
                  array — the same form error messages use.

                - `Reason BetaThinkingDroppedInputTransformationReason`

                  Which binding check removed the block: `model_binding_mismatch` — it was
                  created by a model whose reasoning the requested model may not read;
                  `prefix_binding_mismatch` — the conversation before it differs from the
                  conversation it was created in (the rest of that turn's consecutive thinking
                  blocks are removed with it, each with this reason);
                  `organization_binding_mismatch` — it was created under a different
                  organization (an Anthropic organization, AWS account or Google Cloud project)
                  and this organization is not one of its additional organizations;
                  `end_user_binding_mismatch` — it was created for a different end user, or
                  was removed by the consumer-organization binding. A block that would fail
                  several checks reports one reason, in this order of precedence:
                  `organization_binding_mismatch`, `end_user_binding_mismatch`,
                  `model_binding_mismatch`, `prefix_binding_mismatch`.

                  - `const BetaThinkingDroppedInputTransformationReasonModelBindingMismatch BetaThinkingDroppedInputTransformationReason = "model_binding_mismatch"`

                  - `const BetaThinkingDroppedInputTransformationReasonPrefixBindingMismatch BetaThinkingDroppedInputTransformationReason = "prefix_binding_mismatch"`

                  - `const BetaThinkingDroppedInputTransformationReasonOrganizationBindingMismatch BetaThinkingDroppedInputTransformationReason = "organization_binding_mismatch"`

                  - `const BetaThinkingDroppedInputTransformationReasonEndUserBindingMismatch BetaThinkingDroppedInputTransformationReason = "end_user_binding_mismatch"`

              - `type BetaThinkingMismatchAllowedInputTransformation`

                - `Type ThinkingMismatchAllowed`

                  Always `thinking_mismatch_allowed` for this entry type.

                  default: thinking_mismatch_allowed

                - `Path string`

                  Where the block is in your request, as `messages.{i}.content.{j}`:
                  `i` indexes the `messages` array you sent and `j` that message's `content`
                  array — the same form error messages use.

                - `Reason BetaThinkingMismatchAllowedInputTransformationReason`

                  Which binding check the block failed; the block was shown to the model all
                  the same. Always `prefix_binding_mismatch` today — the conversation before
                  the block differs from the conversation it was created in, or the block
                  carries no record of one on a model that requires it. Were the check
                  enforced for this request, the block would have been removed or the request
                  rejected (`thinking.block_binding.prefix_mismatch_behavior`). A removal also
                  takes the rest of that turn's consecutive thinking blocks, whereas here each
                  block is checked on its own, so `thinking_mismatch_allowed` entries are a
                  lower bound on what enforcement would remove.

                  - `const BetaThinkingMismatchAllowedInputTransformationReasonModelBindingMismatch BetaThinkingMismatchAllowedInputTransformationReason = "model_binding_mismatch"`

                  - `const BetaThinkingMismatchAllowedInputTransformationReasonPrefixBindingMismatch BetaThinkingMismatchAllowedInputTransformationReason = "prefix_binding_mismatch"`

                  - `const BetaThinkingMismatchAllowedInputTransformationReasonOrganizationBindingMismatch BetaThinkingMismatchAllowedInputTransformationReason = "organization_binding_mismatch"`

                  - `const BetaThinkingMismatchAllowedInputTransformationReasonEndUserBindingMismatch BetaThinkingMismatchAllowedInputTransformationReason = "end_user_binding_mismatch"`

      - `ContentUnavailableReason BetaComplianceReviewContentUnavailableReasonUnion`

        Why `content` is null. Null when `content` is set. New types can appear, so accept a type that you don't know.

        - `type BetaComplianceReviewContentNotCaptured`

          No copy of the message was stored.

          - `Type NotCaptured`

        - `type BetaComplianceReviewStoredCopyUnavailable`

          A copy of the message was stored and can't be returned.

          - `Type StoredCopyUnavailable`

      - `Model string`

        The model that the call named. Null when none was recorded.

  - `OrganizationID string`

    The UUID of the organization that the item belongs to. For a message, the organization that sent it.

  - `ReadReason BetaComplianceReviewReadReasonUnion`

    Why the item is readable. New types can appear, so accept a type that you don't know.

    - `type BetaComplianceReviewSafeguardsReason`

      Anthropic flagged the item for your organization to review.

      - `Type SafeguardsReview`

  - `UserProfileID string`

    The ID of the user profile that the item was attributed to (`uprof_...`). Null when none was recorded.

  - `WorkspaceID string`

    The ID of the workspace (`wrkspc_...`). Null when the item isn't attributed to a workspace.

#### Example

```go
package main

import (
	"context"
	"fmt"

	"github.com/anthropics/anthropic-sdk-go/v2"
	"github.com/anthropics/anthropic-sdk-go/v2/option"
)

func main() {
	client := anthropic.NewClient(
		option.WithAPIKey("my-anthropic-api-key"),
	)
	betaComplianceReviewItem, err := client.Beta.Compliance.Review.Items.Get(
		context.TODO(),
		"item_id",
		anthropic.BetaComplianceReviewItemGetParams{},
	)
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", betaComplianceReviewItem.ID)
}
```

##### Response (200)

```json
{
  "id": "id",
  "actor": {
    "email_address": "email_address",
    "type": "user_actor",
    "user_id": "user_id"
  },
  "content_expires_at": "2019-12-27T18:11:19.117Z",
  "created_at": "2019-12-27T18:11:19.117Z",
  "details": {
    "content": {
      "request": {
        "foo": "bar"
      },
      "response": {
        "id": "msg_013Zva2CMHLNnXjNJJKqJ2EF",
        "container": {
          "id": "container_011CpZohnwH4vuy7gazohgSP",
          "expires_at": "2019-12-27T18:11:19.117Z",
          "skills": [
            {
              "skill_id": "pdf",
              "type": "anthropic",
              "version": "latest"
            }
          ]
        },
        "content": [
          {
            "citations": null,
            "text": "Hi! My name is Claude.",
            "type": "text"
          }
        ],
        "context_management": {
          "applied_edits": [
            {
              "cleared_input_tokens": 0,
              "cleared_tool_uses": 0,
              "type": "clear_tool_uses_20250919"
            }
          ]
        },
        "diagnostics": null,
        "model": "claude-opus-5-5",
        "role": "assistant",
        "stop_details": null,
        "stop_reason": "end_turn",
        "stop_sequence": null,
        "type": "message",
        "usage": {
          "cache_creation": {
            "ephemeral_1h_input_tokens": 0,
            "ephemeral_5m_input_tokens": 0
          },
          "cache_creation_input_tokens": 2051,
          "cache_read_input_tokens": 2051,
          "fallback_credit": {
            "status": {
              "type": "redeemed"
            }
          },
          "inference_geo": "global",
          "input_tokens": 2095,
          "iterations": [
            {
              "cache_creation": {
                "ephemeral_1h_input_tokens": 0,
                "ephemeral_5m_input_tokens": 0
              },
              "cache_creation_input_tokens": 0,
              "cache_read_input_tokens": 0,
              "input_tokens": 0,
              "model": "claude-fable-5-2",
              "output_tokens": 0,
              "type": "message"
            }
          ],
          "output_tokens": 503,
          "output_tokens_details": {
            "thinking_tokens": 0
          },
          "server_tool_use": {
            "web_fetch_requests": 2,
            "web_search_requests": 0
          },
          "service_tier": "standard",
          "speed": "standard"
        },
        "input_transformations": [
          {
            "path": "path",
            "reason": "model_binding_mismatch",
            "type": "thinking_dropped"
          }
        ]
      },
      "type": "create_message"
    },
    "content_unavailable_reason": {
      "type": "not_captured"
    },
    "model": "model",
    "type": "message"
  },
  "organization_id": "organization_id",
  "read_reason": {
    "type": "safeguards_review"
  },
  "type": "compliance_review_item",
  "user_profile_id": "user_profile_id",
  "workspace_id": "workspace_id"
}
```
