Showing preview only (1,952K chars total). Download the full file or copy to clipboard to get everything.
Repository: anthropics/anthropic-sdk-go
Branch: main
Commit: 017d9ffaa3f1
Files: 164
Total size: 1.8 MB
Directory structure:
gitextract_ngkaakcw/
├── .devcontainer/
│ └── devcontainer.json
├── .github/
│ ├── CODEOWNERS
│ └── workflows/
│ ├── ci.yml
│ ├── claude.yml
│ ├── create-releases.yml
│ └── detect-breaking-changes.yml
├── .gitignore
├── .release-please-manifest.json
├── .stats.yml
├── Brewfile
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── SECURITY.md
├── aliases.go
├── api.md
├── bedrock/
│ ├── bedrock.go
│ └── bedrock_test.go
├── beta.go
├── betafile.go
├── betafile_test.go
├── betamessage.go
├── betamessage_test.go
├── betamessagebatch.go
├── betamessagebatch_test.go
├── betamessageutil.go
├── betamodel.go
├── betamodel_test.go
├── betaskill.go
├── betaskill_test.go
├── betaskillversion.go
├── betaskillversion_test.go
├── betatoolrunner.go
├── client.go
├── client_test.go
├── completion.go
├── completion_test.go
├── examples/
│ ├── .keep
│ ├── bedrock/
│ │ └── main.go
│ ├── bedrock-bearer-token/
│ │ └── main.go
│ ├── bedrock-streaming/
│ │ └── main.go
│ ├── file-upload/
│ │ ├── file.txt
│ │ └── main.go
│ ├── go.mod
│ ├── go.sum
│ ├── message/
│ │ └── main.go
│ ├── message-mcp-streaming/
│ │ └── main.go
│ ├── message-streaming/
│ │ └── main.go
│ ├── multimodal/
│ │ └── main.go
│ ├── structured-outputs/
│ │ └── main.go
│ ├── tool-runner/
│ │ └── main.go
│ ├── tool-runner-streaming/
│ │ └── main.go
│ ├── tools/
│ │ └── main.go
│ ├── tools-streaming/
│ │ └── main.go
│ ├── tools-streaming-jsonschema/
│ │ └── main.go
│ ├── vertex/
│ │ └── main.go
│ └── vertex-streaming/
│ └── main.go
├── field.go
├── go.mod
├── go.sum
├── internal/
│ ├── apierror/
│ │ └── apierror.go
│ ├── apiform/
│ │ ├── encoder.go
│ │ ├── form.go
│ │ ├── form_test.go
│ │ ├── richparam.go
│ │ └── tag.go
│ ├── apijson/
│ │ ├── decodeparam_test.go
│ │ ├── decoder.go
│ │ ├── decoderesp_test.go
│ │ ├── encoder.go
│ │ ├── enum.go
│ │ ├── enum_test.go
│ │ ├── field.go
│ │ ├── json_test.go
│ │ ├── port.go
│ │ ├── port_test.go
│ │ ├── registry.go
│ │ ├── subfield.go
│ │ ├── tag.go
│ │ └── union.go
│ ├── apiquery/
│ │ ├── encoder.go
│ │ ├── query.go
│ │ ├── query_test.go
│ │ ├── richparam.go
│ │ └── tag.go
│ ├── encoding/
│ │ └── json/
│ │ ├── decode.go
│ │ ├── encode.go
│ │ ├── fold.go
│ │ ├── indent.go
│ │ ├── scanner.go
│ │ ├── sentinel/
│ │ │ ├── null.go
│ │ │ └── sentinel_test.go
│ │ ├── shims/
│ │ │ └── shims.go
│ │ ├── stream.go
│ │ ├── tables.go
│ │ ├── tags.go
│ │ └── time.go
│ ├── paramutil/
│ │ ├── field.go
│ │ └── union.go
│ ├── requestconfig/
│ │ ├── requestconfig.go
│ │ └── requestconfig_test.go
│ ├── testutil/
│ │ ├── golden.go
│ │ ├── testutil.go
│ │ └── vcr.go
│ └── version.go
├── lib/
│ └── .keep
├── message.go
├── message_test.go
├── messagebatch.go
├── messagebatch_test.go
├── messageutil.go
├── messageutil_test.go
├── model.go
├── model_test.go
├── option/
│ ├── middleware.go
│ └── requestoption.go
├── packages/
│ ├── jsonl/
│ │ └── jsonl.go
│ ├── pagination/
│ │ └── pagination.go
│ ├── param/
│ │ ├── encoder.go
│ │ ├── encoder_test.go
│ │ ├── null.go
│ │ ├── null_test.go
│ │ ├── option.go
│ │ └── param.go
│ ├── respjson/
│ │ ├── decoder_test.go
│ │ └── respjson.go
│ └── ssestream/
│ └── ssestream.go
├── paginationauto_test.go
├── paginationmanual_test.go
├── release-please-config.json
├── schemautil.go
├── schemautil_test.go
├── scripts/
│ ├── bootstrap
│ ├── detect-breaking-changes
│ ├── format
│ ├── lint
│ ├── mock
│ ├── test
│ └── utils/
│ └── upload-artifact.sh
├── shared/
│ ├── constant/
│ │ └── constants.go
│ └── shared.go
├── toolrunner/
│ ├── runner_test.go
│ ├── testdata/
│ │ ├── cassettes/
│ │ │ ├── tool_runner_basic.yaml
│ │ │ ├── tool_runner_concurrent.yaml
│ │ │ ├── tool_runner_context_cancel.yaml
│ │ │ ├── tool_runner_custom_handling.yaml
│ │ │ ├── tool_runner_max_iterations.yaml
│ │ │ ├── tool_runner_next_message.yaml
│ │ │ ├── tool_runner_next_streaming.yaml
│ │ │ ├── tool_runner_run_to_completion.yaml
│ │ │ ├── tool_runner_streaming_all.yaml
│ │ │ └── tool_runner_tool_call_error.yaml
│ │ └── snapshots/
│ │ ├── tool_runner_basic.golden
│ │ ├── tool_runner_next_message_step_1.golden
│ │ ├── tool_runner_next_message_step_2.golden
│ │ ├── tool_runner_next_streaming_types.golden
│ │ ├── tool_runner_run_to_completion.golden
│ │ ├── tool_runner_streaming_all.golden
│ │ └── tool_runner_tool_call_error_assistant.golden
│ └── tool.go
├── tools.md
├── usage_test.go
└── vertex/
└── vertex.go
================================================
FILE CONTENTS
================================================
================================================
FILE: .devcontainer/devcontainer.json
================================================
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/debian
{
"name": "Development",
"image": "mcr.microsoft.com/devcontainers/go:1.23-bookworm",
"postCreateCommand": "go mod tidy"
}
================================================
FILE: .github/CODEOWNERS
================================================
# This file is used to automatically assign reviewers to PRs
# For more information see: https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners
* @anthropics/sdk
================================================
FILE: .github/workflows/ci.yml
================================================
name: CI
on:
push:
branches:
- '**'
- '!integrated/**'
- '!stl-preview-head/**'
- '!stl-preview-base/**'
- '!generated'
- '!codegen/**'
- 'codegen/stl/**'
pull_request:
branches-ignore:
- 'stl-preview-head/**'
- 'stl-preview-base/**'
jobs:
build:
timeout-minutes: 10
name: build
permissions:
contents: read
id-token: write
runs-on: ${{ github.repository == 'stainless-sdks/anthropic-go' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: |-
github.repository == 'stainless-sdks/anthropic-go' &&
(github.event_name == 'push' || github.event.pull_request.head.repo.fork)
steps:
- uses: actions/checkout@v6
- name: Get GitHub OIDC Token
if: |-
github.repository == 'stainless-sdks/anthropic-go' &&
!startsWith(github.ref, 'refs/heads/stl/')
id: github-oidc
uses: actions/github-script@v8
with:
script: core.setOutput('github_token', await core.getIDToken());
- name: Upload tarball
if: |-
github.repository == 'stainless-sdks/anthropic-go' &&
!startsWith(github.ref, 'refs/heads/stl/')
env:
URL: https://pkg.stainless.com/s
AUTH: ${{ steps.github-oidc.outputs.github_token }}
SHA: ${{ github.sha }}
run: ./scripts/utils/upload-artifact.sh
lint:
timeout-minutes: 10
name: lint
runs-on: ${{ github.repository == 'stainless-sdks/anthropic-go' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v6
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Run lints
run: ./scripts/lint
test:
timeout-minutes: 10
name: test
runs-on: ${{ github.repository == 'stainless-sdks/anthropic-go' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v6
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run tests
run: ./scripts/test
================================================
FILE: .github/workflows/claude.yml
================================================
name: Claude Code
on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
issues:
types: [opened, assigned]
pull_request_review:
types: [submitted]
jobs:
claude:
if: |
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
issues: read
id-token: write
actions: read # Required for Claude to read CI results on PRs
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Run Claude Code
id: claude
uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
# This is an optional setting that allows Claude to read CI results on PRs
additional_permissions: |
actions: read
# Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
# prompt: 'Update the pull request description to include a summary of changes.'
# Optional: Add claude_args to customize behavior and configuration
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://code.claude.com/docs/en/cli-reference for available options
# claude_args: '--allowed-tools Bash(gh pr:*)'
================================================
FILE: .github/workflows/create-releases.yml
================================================
name: Create releases
on:
schedule:
- cron: '0 5 * * *' # every day at 5am UTC
push:
branches:
- main
jobs:
release:
name: release
if: github.ref == 'refs/heads/main' && github.repository == 'anthropics/anthropic-sdk-go'
runs-on: ubuntu-latest
environment: production-release
steps:
- uses: actions/checkout@v6
- uses: stainless-api/trigger-release-please@v1
id: release
with:
repo: ${{ github.event.repository.full_name }}
stainless-api-key: ${{ secrets.STAINLESS_API_KEY }}
- name: Generate godocs
if: ${{ steps.release.outputs.releases_created }}
run: |
# x-release-please-start-version
version=$(jq -r '. | to_entries[0] | .value' .release-please-manifest.json)
curl -X POST https://pkg.go.dev/fetch/github.com/anthropics/anthropic-sdk-go@v${version}
# x-release-please-end
================================================
FILE: .github/workflows/detect-breaking-changes.yml
================================================
name: CI
on:
pull_request:
branches:
- main
- next
jobs:
detect_breaking_changes:
runs-on: 'ubuntu-latest'
name: detect-breaking-changes
if: github.repository == 'anthropics/anthropic-sdk-go'
steps:
- name: Calculate fetch-depth
run: |
echo "FETCH_DEPTH=$(expr ${{ github.event.pull_request.commits }} + 1)" >> $GITHUB_ENV
- uses: actions/checkout@v6
with:
# Ensure we can check out the pull request base in the script below.
fetch-depth: ${{ env.FETCH_DEPTH }}
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Detect breaking changes
run: |
# Try to check out previous versions of the breaking change detection script. This ensures that
# we still detect breaking changes when entire files and their tests are removed.
git checkout "${{ github.event.pull_request.base.sha }}" -- ./scripts/detect-breaking-changes 2>/dev/null || true
./scripts/detect-breaking-changes ${{ github.event.pull_request.base.sha }}
================================================
FILE: .gitignore
================================================
.prism.log
codegen.log
Brewfile.lock.json
.idea/
================================================
FILE: .release-please-manifest.json
================================================
{
".": "1.27.1"
}
================================================
FILE: .stats.yml
================================================
configured_endpoints: 34
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/anthropic%2Fanthropic-dd2dcd00a757075370a7e4a7f469a1e2d067c2118684c3b70d7906a8f5cf518b.yml
openapi_spec_hash: ebeeaa9a9bf7603f0bbcce30389e27ca
config_hash: f292746941a1c02183ee7646c37753af
================================================
FILE: Brewfile
================================================
brew "go"
================================================
FILE: CHANGELOG.md
================================================
# Changelog
## 1.27.1 (2026-03-18)
Full Changelog: [v1.27.0...v1.27.1](https://github.com/anthropics/anthropic-sdk-go/compare/v1.27.0...v1.27.1)
### Chores
* **internal:** regenerate SDK with no functional changes ([c963fd0](https://github.com/anthropics/anthropic-sdk-go/commit/c963fd0fd1e591bfd572f100a3a444ba40fe4ad4))
* **internal:** tweak CI branches ([95e3410](https://github.com/anthropics/anthropic-sdk-go/commit/95e3410a6892afae8b1b4631d05b5bfd4bf12eb2))
## 1.27.0 (2026-03-16)
Full Changelog: [v1.26.0...v1.27.0](https://github.com/anthropics/anthropic-sdk-go/compare/v1.26.0...v1.27.0)
### Features
* **api:** change array_format to brackets ([ca5ae6e](https://github.com/anthropics/anthropic-sdk-go/commit/ca5ae6eaf8243aece877d33eb88653db2e439a36))
* **api:** chore(config): clean up model enum list ([#31](https://github.com/anthropics/anthropic-sdk-go/issues/31)) ([1db4ea7](https://github.com/anthropics/anthropic-sdk-go/commit/1db4ea7956259bb217bc2523a5244b6029c4bd15))
* **api:** GA thinking-display-setting ([1924af2](https://github.com/anthropics/anthropic-sdk-go/commit/1924af22e00fad68ccf31a3809c8cab8d442c048))
* **api:** remove publishing section from cli target ([514282e](https://github.com/anthropics/anthropic-sdk-go/commit/514282e1728881f7ef4c6782f3000ca0ec632d53))
* **tests:** update mock server ([cf24ced](https://github.com/anthropics/anthropic-sdk-go/commit/cf24ced2844da5d0f645e7a2afbabb936c891892))
### Bug Fixes
* allow canceling a request while it is waiting to retry ([32ee053](https://github.com/anthropics/anthropic-sdk-go/commit/32ee05317970d99df3147c65c2055efabe354472))
* **client:** update model reference from claude-3-7-sonnet-latest to claude-sonnet-4-5 ([2f42e73](https://github.com/anthropics/anthropic-sdk-go/commit/2f42e7336295d898d18c66ddd6f9f70bab108cc6))
### Chores
* **client:** reorganize code in Messages files to lead to less conflicts ([c677bb5](https://github.com/anthropics/anthropic-sdk-go/commit/c677bb58a3da8f17f0dbc630b5b28faed995aa6b))
* **internal:** codegen related update ([c978aac](https://github.com/anthropics/anthropic-sdk-go/commit/c978aacf53bbcf6555ba97bdc6bdfc9be9d8f98d))
* **internal:** codegen related update ([4ac31a2](https://github.com/anthropics/anthropic-sdk-go/commit/4ac31a2fb9dc45a41bcbaa25dfbf8848119768ec))
* **internal:** codegen related update ([5b2b2fa](https://github.com/anthropics/anthropic-sdk-go/commit/5b2b2fa276ad9365ddcb53270f307db05e5b6363))
* **internal:** codegen related update ([9678c6c](https://github.com/anthropics/anthropic-sdk-go/commit/9678c6c5d375f66cb569a537a0766a5ed4d8f7f0))
* **internal:** codegen related update ([f6035d2](https://github.com/anthropics/anthropic-sdk-go/commit/f6035d2bb0c50cf97cea78fb3fe854289b11a34c))
* **internal:** codegen related update ([9246bbb](https://github.com/anthropics/anthropic-sdk-go/commit/9246bbb15553cee531b5caef2c7876e84a8fe8f2))
* **internal:** move custom custom `json` tags to `api` ([4392627](https://github.com/anthropics/anthropic-sdk-go/commit/4392627107c43726c242923c16b0f5ac2b432082))
* **tests:** unskip tests that are now supported in steady ([b0ca374](https://github.com/anthropics/anthropic-sdk-go/commit/b0ca37403486c65ae171d2b330ff82c938fe9b58))
### Documentation
* streamline README, centralize documentation at docs.anthropic.com ([33f6943](https://github.com/anthropics/anthropic-sdk-go/commit/33f69431abd96025134d8967c20a1f313af3382d)), closes [#587](https://github.com/anthropics/anthropic-sdk-go/issues/587)
## 1.26.0 (2026-02-19)
Full Changelog: [v1.25.1...v1.26.0](https://github.com/anthropics/anthropic-sdk-go/compare/v1.25.1...v1.26.0)
### Features
* **api:** Add top-level cache control (automatic caching) ([75f9f70](https://github.com/anthropics/anthropic-sdk-go/commit/75f9f70045587c458ec2e3491b4eb88bc3329e9e))
* **client:** add BetaToolRunner for automatic tool use loops ([#603](https://github.com/anthropics/anthropic-sdk-go/issues/603)) ([e44128a](https://github.com/anthropics/anthropic-sdk-go/commit/e44128a1a3c1d9b4710b4a024ace8121258b32b6))
### Chores
* **internal:** codegen related update ([6247d2f](https://github.com/anthropics/anthropic-sdk-go/commit/6247d2febe87242ee9d3ba49875ff62a5be9a626))
## 1.25.1 (2026-02-19)
Full Changelog: [v1.25.0...v1.25.1](https://github.com/anthropics/anthropic-sdk-go/compare/v1.25.0...v1.25.1)
### Bug Fixes
* **client:** use correct format specifier for header serialization ([9115a61](https://github.com/anthropics/anthropic-sdk-go/commit/9115a6154d0b1ba94370911822986b2ef8584e9a))
## 1.25.0 (2026-02-18)
Full Changelog: [v1.24.0...v1.25.0](https://github.com/anthropics/anthropic-sdk-go/compare/v1.24.0...v1.25.0)
### Features
* **api:** fix shared UserLocation and error code types ([cb98cd0](https://github.com/anthropics/anthropic-sdk-go/commit/cb98cd00c359c0181d7b39bdb057e7b06015aa33))
## 1.24.0 (2026-02-18)
Full Changelog: [v1.23.0...v1.24.0](https://github.com/anthropics/anthropic-sdk-go/compare/v1.23.0...v1.24.0)
### Features
* **api:** manual updates ([54d01f5](https://github.com/anthropics/anthropic-sdk-go/commit/54d01f5187ef9ec49f803edfe643bf1bf1e91072))
## 1.23.0 (2026-02-17)
Full Changelog: [v1.22.1...v1.23.0](https://github.com/anthropics/anthropic-sdk-go/compare/v1.22.1...v1.23.0)
### Features
* **api:** Releasing claude-sonnet-4-6 ([782d5a5](https://github.com/anthropics/anthropic-sdk-go/commit/782d5a5dc4c1f63cfef3afc5d257b08f8cf3fadc))
### Bug Fixes
* **api:** fix spec errors ([15e6a5a](https://github.com/anthropics/anthropic-sdk-go/commit/15e6a5a0b4fb426f126f7b26b087709ea7ba00ac))
* remove duplicate ServerToolUseBlock struct declaration ([#595](https://github.com/anthropics/anthropic-sdk-go/issues/595)) ([d4ece8a](https://github.com/anthropics/anthropic-sdk-go/commit/d4ece8ae310dd0369a5ea05671295ae2c23a53d9))
## 1.22.1 (2026-02-10)
Full Changelog: [v1.22.0...v1.22.1](https://github.com/anthropics/anthropic-sdk-go/compare/v1.22.0...v1.22.1)
### Bug Fixes
* **encoder:** correctly serialize NullStruct ([1435f8a](https://github.com/anthropics/anthropic-sdk-go/commit/1435f8ac4d272561c7e689cc6bb4e3794414ba57))
## 1.22.0 (2026-02-07)
Full Changelog: [v1.21.0...v1.22.0](https://github.com/anthropics/anthropic-sdk-go/compare/v1.21.0...v1.22.0)
### Features
* **api:** enabling fast-mode in claude-opus-4-6 ([ebe6433](https://github.com/anthropics/anthropic-sdk-go/commit/ebe6433768cab86dcc02b71159aaa347a8d473ec))
## 1.21.0 (2026-02-05)
Full Changelog: [v1.20.0...v1.21.0](https://github.com/anthropics/anthropic-sdk-go/compare/v1.20.0...v1.21.0)
### Features
* **api:** Release Claude Opus 4.6, adaptive thinking, and other features ([e899e64](https://github.com/anthropics/anthropic-sdk-go/commit/e899e64cd402eb004909d632e68acc4b0587f53c))
### Chores
* **ci:** remove claude-code-review workflow ([31db702](https://github.com/anthropics/anthropic-sdk-go/commit/31db70249f691b161f326f550dc26cdcce54dd30))
## 1.20.0 (2026-01-29)
Full Changelog: [v1.19.0...v1.20.0](https://github.com/anthropics/anthropic-sdk-go/compare/v1.19.0...v1.20.0)
### Features
* **api:** add support for Structured Outputs in the Messages API ([10c3821](https://github.com/anthropics/anthropic-sdk-go/commit/10c382188df98d7b045aec525bdc47f3df25d576))
* **api:** migrate sending message format in output_config rather than output_format ([f996db4](https://github.com/anthropics/anthropic-sdk-go/commit/f996db402bc1f868b11d877014a6c51d977c557f))
* **client:** add a convenient param.SetJSON helper ([427514e](https://github.com/anthropics/anthropic-sdk-go/commit/427514ea6dde81f4eb374967577b5a4cf380f627))
* **encoder:** support bracket encoding form-data object members ([eaaeadf](https://github.com/anthropics/anthropic-sdk-go/commit/eaaeadf6dd67119ca4406f0fb0337c16d9011b8f))
### Bug Fixes
* **accumulator:** revert to marshal accumulator on stop events ([#563](https://github.com/anthropics/anthropic-sdk-go/issues/563)) ([096a8a8](https://github.com/anthropics/anthropic-sdk-go/commit/096a8a8b20b530359c214e06272938bcf8a98c59))
* **client:** retain streaming when user sets request body ([6d073fe](https://github.com/anthropics/anthropic-sdk-go/commit/6d073fe49f351c26c7f3fa8337e661c6a3600c68))
* **docs:** add missing pointer prefix to api.md return types ([23aaf6d](https://github.com/anthropics/anthropic-sdk-go/commit/23aaf6de59f0c13c79dbe4fc1d764b47cfd83834))
* **mcp:** correct code tool API endpoint ([6c8a083](https://github.com/anthropics/anthropic-sdk-go/commit/6c8a0831e6f084d316179a9288c4fa1c5420ea59))
* rename param to avoid collision ([6d1cf75](https://github.com/anthropics/anthropic-sdk-go/commit/6d1cf75d5a407d5eb19c70e3778ab82bca74d0d5))
* streaming endpoints should pass through errors correctly ([e584c87](https://github.com/anthropics/anthropic-sdk-go/commit/e584c87ec001ee8991ca17b8236a6ef3deb78ea7))
* **to-param:** remove panics and add cases ([#524](https://github.com/anthropics/anthropic-sdk-go/issues/524)) ([f689816](https://github.com/anthropics/anthropic-sdk-go/commit/f6898163047854d39cec7c08ec5ab993bab463fc))
### Chores
* add float64 to valid types for RegisterFieldValidator ([b6bec73](https://github.com/anthropics/anthropic-sdk-go/commit/b6bec73c5ed18698884b990fc3dc6398a3784177))
* **ci:** Add Claude Code GitHub Workflow ([a151836](https://github.com/anthropics/anthropic-sdk-go/commit/a151836056343974d15eda64180fc776ba0f169d))
* **client:** improve example values ([8af69b8](https://github.com/anthropics/anthropic-sdk-go/commit/8af69b851f4a60334ed75542c2eacbe69c01893c))
* **client:** mark claude-3-5-haiku as deprecated ([dcac65c](https://github.com/anthropics/anthropic-sdk-go/commit/dcac65c8dd82f232c2997456319c16357874f37b))
* elide duplicate aliases ([c8e2ee1](https://github.com/anthropics/anthropic-sdk-go/commit/c8e2ee14de53b5636eadccb2a890e4464e30b8d4))
* **internal:** codegen related update ([931c976](https://github.com/anthropics/anthropic-sdk-go/commit/931c9769f1ff0557a8eff333463e1847b15f7953))
* **internal:** update `actions/checkout` version ([3bd83ec](https://github.com/anthropics/anthropic-sdk-go/commit/3bd83eca53f1ec0b759c2568601286405821dcbc))
* **internal:** use different example values for some enums ([f2d46b8](https://github.com/anthropics/anthropic-sdk-go/commit/f2d46b87de1a57ed1790cad3134b5e340f22fd73))
## 1.19.0 (2025-11-24)
Full Changelog: [v1.18.1...v1.19.0](https://github.com/anthropics/anthropic-sdk-go/compare/v1.18.1...v1.19.0)
### Features
* **api:** adds support for Claude Opus 4.5, Effort, Advance Tool Use Features, Autocompaction, and Computer Use v5 ([a03391c](https://github.com/anthropics/anthropic-sdk-go/commit/a03391cb00b8c78c79fd8bfe447f00d78f37db25))
## 1.18.1 (2025-11-19)
Full Changelog: [v1.18.0...v1.18.1](https://github.com/anthropics/anthropic-sdk-go/compare/v1.18.0...v1.18.1)
### Bug Fixes
* **structured outputs:** use correct beta header ([09ec0a6](https://github.com/anthropics/anthropic-sdk-go/commit/09ec0a647b1a108bb7c74e4c7b1016502ca781bb))
## 1.18.0 (2025-11-14)
Full Changelog: [v1.17.0...v1.18.0](https://github.com/anthropics/anthropic-sdk-go/compare/v1.17.0...v1.18.0)
### Features
* **api:** add support for structured outputs beta ([fb9cfb4](https://github.com/anthropics/anthropic-sdk-go/commit/fb9cfb4e4b571d5fec7da9874610aa8820aee80c))
### Chores
* bump gjson version ([69b5e0e](https://github.com/anthropics/anthropic-sdk-go/commit/69b5e0e40757884bece66397fb6ca769f4e00118))
## 1.17.0 (2025-11-05)
Full Changelog: [v1.16.0...v1.17.0](https://github.com/anthropics/anthropic-sdk-go/compare/v1.16.0...v1.17.0)
### Features
* **bedrock:** re-route beta headers through request body ([00a2bf3](https://github.com/anthropics/anthropic-sdk-go/commit/00a2bf35b34aa49f1514493cf0638b467c4f4eec))
### Chores
* **internal:** grammar fix (it's -> its) ([687bc29](https://github.com/anthropics/anthropic-sdk-go/commit/687bc299cacb84349eb2684df46994c06f9ba962))
## 1.16.0 (2025-10-29)
Full Changelog: [v1.15.0...v1.16.0](https://github.com/anthropics/anthropic-sdk-go/compare/v1.15.0...v1.16.0)
### Features
* **api:** add ability to clear thinking in context management ([6082754](https://github.com/anthropics/anthropic-sdk-go/commit/6082754e9b6a04570a93efdb5339853c71f1fe94))
## 1.15.0 (2025-10-28)
Full Changelog: [v1.14.0...v1.15.0](https://github.com/anthropics/anthropic-sdk-go/compare/v1.14.0...v1.15.0)
### Features
* **api:** adding support for agent skills ([5660b52](https://github.com/anthropics/anthropic-sdk-go/commit/5660b5252a4de07f3343c9089b148b16cda794d4))
### Chores
* **api:** mark older sonnet models as deprecated ([f13c5bd](https://github.com/anthropics/anthropic-sdk-go/commit/f13c5bd18ebb169c59913985537ca025634ef7eb))
## 1.14.0 (2025-10-15)
Full Changelog: [v1.13.0...v1.14.0](https://github.com/anthropics/anthropic-sdk-go/compare/v1.13.0...v1.14.0)
### Features
* **api:** manual updates ([3eac8aa](https://github.com/anthropics/anthropic-sdk-go/commit/3eac8aaee0dbb3f4a5e30b039d60503614365a82))
### Chores
* **client:** add context-management-2025-06-27 beta header ([eeba6fa](https://github.com/anthropics/anthropic-sdk-go/commit/eeba6fa95ca9eedf16897b413950fc5f80d0d8cb))
* **client:** add model-context-window-exceeded-2025-08-26 beta header ([7d5a37d](https://github.com/anthropics/anthropic-sdk-go/commit/7d5a37d895b769739d23b6e91f6c0a806cade710))
## 1.13.0 (2025-09-29)
Full Changelog: [v1.12.0...v1.13.0](https://github.com/anthropics/anthropic-sdk-go/compare/v1.12.0...v1.13.0)
### Features
* **api:** adds support for Claude Sonnet 4.5 and context management features ([3d5d51a](https://github.com/anthropics/anthropic-sdk-go/commit/3d5d51ad6ee64b34c7cc361a9dfd6f45966987dd))
### Bug Fixes
* bugfix for setting JSON keys with special characters ([c868b92](https://github.com/anthropics/anthropic-sdk-go/commit/c868b921190f8d371cc93d12e019daf5a7463306))
* **internal:** unmarshal correctly when there are multiple discriminators ([ecc3ce3](https://github.com/anthropics/anthropic-sdk-go/commit/ecc3ce31a9ed98b8f2b66b5e1489fce510528f77))
* use slices.Concat instead of sometimes modifying r.Options ([88e7186](https://github.com/anthropics/anthropic-sdk-go/commit/88e7186cad944290498a3381c829df36d26a1cce))
### Chores
* bump minimum go version to 1.22 ([87af8f3](https://github.com/anthropics/anthropic-sdk-go/commit/87af8f397ae68ce72a76a07a735d21495aad8799))
* do not install brew dependencies in ./scripts/bootstrap by default ([c689348](https://github.com/anthropics/anthropic-sdk-go/commit/c689348cc4b5ec7ab3512261e4e3cc50d208a02c))
* **internal:** fix tests ([bfc6eaf](https://github.com/anthropics/anthropic-sdk-go/commit/bfc6eafeff58664f0d6f155f96286f3993e60f89))
* update more docs for 1.22 ([d67c50d](https://github.com/anthropics/anthropic-sdk-go/commit/d67c50d49082b4b28bdabc44943853431cd5205c))
## 1.12.0 (2025-09-10)
Full Changelog: [v1.11.0...v1.12.0](https://github.com/anthropics/anthropic-sdk-go/compare/v1.11.0...v1.12.0)
### Features
* **api:** adds support for web_fetch_20250910 tool ([6d5e237](https://github.com/anthropics/anthropic-sdk-go/commit/6d5e2370e14e1d125ebebcf741b721e88dc0e810))
### Chores
* tmp ([07b65e9](https://github.com/anthropics/anthropic-sdk-go/commit/07b65e9b178a1c280fc96e3f2a7bf30bd9932329))
## 1.11.0 (2025-09-05)
Full Changelog: [v1.10.0...v1.11.0](https://github.com/anthropics/anthropic-sdk-go/compare/v1.10.0...v1.11.0)
### Features
* **api:** adds support for Documents in tool results ([7161c2c](https://github.com/anthropics/anthropic-sdk-go/commit/7161c2ce9843b80374186dc83fd84a8dfebda45f))
### Bug Fixes
* **client:** fix issue in Go with nested document content params ([b442cc3](https://github.com/anthropics/anthropic-sdk-go/commit/b442cc3fd41ee53a18f8ccec868ae1057dae53a8))
* use release please annotations on more places ([31a09b0](https://github.com/anthropics/anthropic-sdk-go/commit/31a09b07991cc92d38517c80320d154246779a76))
## 1.10.0 (2025-09-02)
Full Changelog: [v1.9.1...v1.10.0](https://github.com/anthropics/anthropic-sdk-go/compare/v1.9.1...v1.10.0)
### Features
* **api:** makes 1 hour TTL Cache Control generally available ([c28a9a3](https://github.com/anthropics/anthropic-sdk-go/commit/c28a9a3272acb1973f2a2fb768157ab27a8f440d))
* **client:** adds support for code-execution-2025-08-26 tool ([066a126](https://github.com/anthropics/anthropic-sdk-go/commit/066a126a92a8e09f10742f13e0db36724a96c788))
* use custom decoder for []ContentBlockParamUnion ([#464](https://github.com/anthropics/anthropic-sdk-go/issues/464)) ([4731597](https://github.com/anthropics/anthropic-sdk-go/commit/473159792468018c709da311d7ac27139cf851e6))
### Bug Fixes
* close body before retrying ([c970e10](https://github.com/anthropics/anthropic-sdk-go/commit/c970e10ff45c04c38a5a2c87fe85a8c191e06f80))
### Chores
* deprecate older claude-3-5 sonnet models ([#453](https://github.com/anthropics/anthropic-sdk-go/issues/453)) ([e49d59b](https://github.com/anthropics/anthropic-sdk-go/commit/e49d59b14be89dcfb858b565e5183ecf9c1e246b))
## 1.9.1 (2025-08-12)
Full Changelog: [v1.9.0...v1.9.1](https://github.com/anthropics/anthropic-sdk-go/compare/v1.9.0...v1.9.1)
## 1.9.0 (2025-08-12)
Full Changelog: [v1.8.0...v1.9.0](https://github.com/anthropics/anthropic-sdk-go/compare/v1.8.0...v1.9.0)
### Features
* **betas:** add context-1m-2025-08-07 ([c086118](https://github.com/anthropics/anthropic-sdk-go/commit/c086118c9acd55ec711b29a08f165b358e56332b))
### Chores
* **internal:** detect breaking changes when removing endpoints ([91ea519](https://github.com/anthropics/anthropic-sdk-go/commit/91ea5197646ffd3d807610f11bab8726092e7a4b))
* **internal:** update comment in script ([de412b0](https://github.com/anthropics/anthropic-sdk-go/commit/de412b007a097ce7d3231e0ccdf7d57572f78199))
* update @stainless-api/prism-cli to v5.15.0 ([555556f](https://github.com/anthropics/anthropic-sdk-go/commit/555556f4ce77d406e904733b30c782039dacb837))
## 1.8.0 (2025-08-08)
Full Changelog: [v1.7.0...v1.8.0](https://github.com/anthropics/anthropic-sdk-go/compare/v1.7.0...v1.8.0)
### Features
* **api:** search result content blocks ([0907804](https://github.com/anthropics/anthropic-sdk-go/commit/0907804ae58405abc4f4c0acb76464da3abdd00b))
* **client:** support optional json html escaping ([8da877c](https://github.com/anthropics/anthropic-sdk-go/commit/8da877cb04c62d081d36a1f8cb5eea7922a396ce))
## 1.7.0 (2025-08-05)
Full Changelog: [v1.6.2...v1.7.0](https://github.com/anthropics/anthropic-sdk-go/compare/v1.6.2...v1.7.0)
### Features
* **api:** add claude-opus-4-1-20250805 ([72c9d29](https://github.com/anthropics/anthropic-sdk-go/commit/72c9d29255cb59d11b132062df00889a63dd609e))
* **api:** adds support for text_editor_20250728 tool ([be56278](https://github.com/anthropics/anthropic-sdk-go/commit/be56278e456ff5eb034852e17a4642be612e30a2))
* **api:** removed older deprecated models ([88a397a](https://github.com/anthropics/anthropic-sdk-go/commit/88a397acb01a7557fbd6852f85ece295a7c2a2b7))
* **docs:** add File Upload example ([bade71b](https://github.com/anthropics/anthropic-sdk-go/commit/bade71b64850e8fa4410c404f263d4252cdbb82d))
* update streaming error message to say 'required' not 'recommended' ([0fb3d30](https://github.com/anthropics/anthropic-sdk-go/commit/0fb3d30814f8aead1237283a994f405c1103aff2))
* update streaming error message to say 'required' not 'recommended' ([b23f6df](https://github.com/anthropics/anthropic-sdk-go/commit/b23f6df73098c6fe3aa599beb73973b699c4b2a4))
### Bug Fixes
* **client:** process custom base url ahead of time ([2165b1a](https://github.com/anthropics/anthropic-sdk-go/commit/2165b1ac1c78491be85fdc6b49c63ab027caeed6))
### Chores
* **client:** add TextEditor_20250429 tool ([20424fc](https://github.com/anthropics/anthropic-sdk-go/commit/20424fc340b4f10b208f5ba8ee2d2b4a6f9e546d))
* **internal:** version bump ([e03b3bd](https://github.com/anthropics/anthropic-sdk-go/commit/e03b3bdd13e207925a9da2b12b830ce9bb6ed88b))
## 1.6.2 (2025-07-18)
Full Changelog: [v1.6.1...v1.6.2](https://github.com/anthropics/anthropic-sdk-go/compare/v1.6.1...v1.6.2)
### Chores
* **internal:** version bump ([defc645](https://github.com/anthropics/anthropic-sdk-go/commit/defc6458496679762e07ce8dc9838335e4bd8268))
## 1.6.1 (2025-07-18)
Full Changelog: [v1.6.0...v1.6.1](https://github.com/anthropics/anthropic-sdk-go/compare/v1.6.0...v1.6.1)
### Chores
* **internal:** version bump ([459dd39](https://github.com/anthropics/anthropic-sdk-go/commit/459dd391b281273af9027a23e39b78c422dace0b))
## 1.6.0 (2025-07-18)
Full Changelog: [v1.5.0...v1.6.0](https://github.com/anthropics/anthropic-sdk-go/compare/v1.5.0...v1.6.0)
### Features
* **client:** expand max streaming buffer size ([8b206e2](https://github.com/anthropics/anthropic-sdk-go/commit/8b206e2267b83af7e9f7f56f029497bd403608fe))
### Bug Fixes
* **api:** revert change to NewToolResultBlock ([b4167e7](https://github.com/anthropics/anthropic-sdk-go/commit/b4167e7b3bb80927b3f397c0b6fb00f7340272a0))
* **client:** fix default timeout logic to match other languages ([47e47f5](https://github.com/anthropics/anthropic-sdk-go/commit/47e47f54f8bd1a58413c82137713bedf88e2d4d2))
* **tests:** make sure to build examples in scripts/lint ([69bcb13](https://github.com/anthropics/anthropic-sdk-go/commit/69bcb139fcf661bff527d345e9876c26c784befc))
### Chores
* **api:** update BetaCitationSearchResultLocation ([5d040a7](https://github.com/anthropics/anthropic-sdk-go/commit/5d040a7698b11ee059c175ce4a806509a9ae8e5b))
* **internal:** fix lint script for tests ([f54301d](https://github.com/anthropics/anthropic-sdk-go/commit/f54301d9f251fa6e409852605f2d301c50d3466d))
* **internal:** restructure things to avoid conflicts ([5f1bead](https://github.com/anthropics/anthropic-sdk-go/commit/5f1bead6fd696504d63ebbbf21c1a55c707a3df7))
* lint tests ([4a64d14](https://github.com/anthropics/anthropic-sdk-go/commit/4a64d14e7988ba0c2343d7abc65f15da41bafb24))
* lint tests in subpackages ([4ae61a6](https://github.com/anthropics/anthropic-sdk-go/commit/4ae61a601cf94e459bc431e07c9b7e25557af493))
### Documentation
* model in examples ([da9d5af](https://github.com/anthropics/anthropic-sdk-go/commit/da9d5af61544a6f25d9284ee6eee25f5d1364e8a))
* model in examples ([fe2da16](https://github.com/anthropics/anthropic-sdk-go/commit/fe2da16e4bf05ee7029b1be33059bf3a4e76c300))
## 1.5.0 (2025-07-03)
Full Changelog: [v1.4.0...v1.5.0](https://github.com/anthropics/anthropic-sdk-go/compare/v1.4.0...v1.5.0)
### Features
* add RequestID to API errors ([884f13b](https://github.com/anthropics/anthropic-sdk-go/commit/884f13b87969c94bd3ed1343c17c84e69b676de8))
* **api:** add support for Search Result Content Blocks ([1f6ab8a](https://github.com/anthropics/anthropic-sdk-go/commit/1f6ab8aa2f3a29ca92920545933fc028b4701d20))
* **api:** api update ([27a18f2](https://github.com/anthropics/anthropic-sdk-go/commit/27a18f25697da82de75d5800a9077353bb5319a6))
* **api:** manual updates ([926b094](https://github.com/anthropics/anthropic-sdk-go/commit/926b094724c0443e8c2d19fc2c885d296254c01a))
* **client:** add debug log helper ([e427bb3](https://github.com/anthropics/anthropic-sdk-go/commit/e427bb35859880729e16cca16499accc3bb19a1b))
* **client:** add escape hatch for null slice & maps ([9e3ded0](https://github.com/anthropics/anthropic-sdk-go/commit/9e3ded03652bfd8fc5e63095f0849995907537fb))
* **vertex:** support global region endpoint ([3c0b86d](https://github.com/anthropics/anthropic-sdk-go/commit/3c0b86dc60bd05d12e854b8ec0fac79418532c78))
### Bug Fixes
* **client:** deprecate BetaBase64PDFBlock in favor of BetaRequestDocumentBlock ([5d8fd96](https://github.com/anthropics/anthropic-sdk-go/commit/5d8fd9661585c1894aeb4e80670d577ab1cc3582))
* don't try to deserialize as json when ResponseBodyInto is []byte ([0e7ce7b](https://github.com/anthropics/anthropic-sdk-go/commit/0e7ce7b16f5af7afc94333cdef6958a08875a71d))
* **pagination:** check if page data is empty in GetNextPage ([d64dc0a](https://github.com/anthropics/anthropic-sdk-go/commit/d64dc0a334da95f82a665f9cef9f6a2f58f39878))
### Chores
* **api:** mark claude-3-opus-20240229 as deprecated ([1472af8](https://github.com/anthropics/anthropic-sdk-go/commit/1472af8504ae2f48b562e4122e641b9207240d30))
* **ci:** enable for pull requests ([cdb1340](https://github.com/anthropics/anthropic-sdk-go/commit/cdb134079026cfa467d5f0299ee5e551fb50628a))
* **ci:** only run for pushes and fork pull requests ([d7d44ff](https://github.com/anthropics/anthropic-sdk-go/commit/d7d44ffb621e183f611fabe3ac6f0df06d99d459))
* fix documentation of null map ([c79ab28](https://github.com/anthropics/anthropic-sdk-go/commit/c79ab28a977f1bbda336bfffdd9fdc7ee6adccaf))
* **internal:** add breaking change detection ([49a1855](https://github.com/anthropics/anthropic-sdk-go/commit/49a1855d3d3f107ea69dc6c4e28a82dd36a9e2af))
### Documentation
* simplify message creation syntax in README example ([#203](https://github.com/anthropics/anthropic-sdk-go/issues/203)) ([c4aef2e](https://github.com/anthropics/anthropic-sdk-go/commit/c4aef2e9c75a6cdfdfd8928bbc164b384051fc53))
* update models and non-beta ([a7bc60e](https://github.com/anthropics/anthropic-sdk-go/commit/a7bc60e1beb087c6cc0843e99d3d3e4b51b1859d))
### Refactors
* improve Error() method to avoid code duplication ([43651c2](https://github.com/anthropics/anthropic-sdk-go/commit/43651c2804801454d24674baf62e05fc9e27e366))
## 1.4.0 (2025-06-04)
Full Changelog: [v1.3.0...v1.4.0](https://github.com/anthropics/anthropic-sdk-go/compare/v1.3.0...v1.4.0)
### Features
* **client:** allow overriding unions ([079149c](https://github.com/anthropics/anthropic-sdk-go/commit/079149c673981891ecd35906cd610f8d4a4b69a9))
### Chores
* **internal:** codegen related update ([853ba1f](https://github.com/anthropics/anthropic-sdk-go/commit/853ba1f46d2b6c476ee04d9c061368e708cc9e18))
## 1.3.0 (2025-06-03)
Full Changelog: [v1.2.2...v1.3.0](https://github.com/anthropics/anthropic-sdk-go/compare/v1.2.2...v1.3.0)
### Features
* **client:** add support for new text_editor_20250429 tool ([b33c543](https://github.com/anthropics/anthropic-sdk-go/commit/b33c543f7dc3b74c3322b6f84c189b81f67b6154))
## 1.2.2 (2025-06-02)
Full Changelog: [v1.2.1...v1.2.2](https://github.com/anthropics/anthropic-sdk-go/compare/v1.2.1...v1.2.2)
### Bug Fixes
* **client:** access subunions properly ([f29c162](https://github.com/anthropics/anthropic-sdk-go/commit/f29c1627fe94c6371937659d02f1af7b55583d60))
* fix error ([bbc002c](https://github.com/anthropics/anthropic-sdk-go/commit/bbc002ccbbf9df681201d9b8ba806c37338c0fd3))
### Chores
* make go mod tidy continue on error ([ac184b4](https://github.com/anthropics/anthropic-sdk-go/commit/ac184b4f7afee4015d133a05ce819a8dac35be52))
## 1.2.1 (2025-05-23)
Full Changelog: [v1.2.0...v1.2.1](https://github.com/anthropics/anthropic-sdk-go/compare/v1.2.0...v1.2.1)
### Chores
* **examples:** clean up MCP example ([66f406a](https://github.com/anthropics/anthropic-sdk-go/commit/66f406a04b9756281e7716e9b635c3e3f29397fb))
* **internal:** fix release workflows ([6a0ff4c](https://github.com/anthropics/anthropic-sdk-go/commit/6a0ff4cad1c1b4ab6435df80fccd945d6ce07be7))
## 1.2.0 (2025-05-22)
Full Changelog: [v1.1.0...v1.2.0](https://github.com/anthropics/anthropic-sdk-go/compare/v1.1.0...v1.2.0)
### Features
* **api:** add claude 4 models, files API, code execution tool, MCP connector and more ([b2e5cbf](https://github.com/anthropics/anthropic-sdk-go/commit/b2e5cbffd9d05228c2c2569974a6fa260c3f46be))
### Bug Fixes
* **tests:** fix model testing for anthropic.CalculateNonStreamingTimeout ([9956842](https://github.com/anthropics/anthropic-sdk-go/commit/995684240b77284a4590b1b9ae34a85e525d1e52))
## 1.1.0 (2025-05-22)
Full Changelog: [v1.0.0...v1.1.0](https://github.com/anthropics/anthropic-sdk-go/compare/v1.0.0...v1.1.0)
### Features
* **api:** add claude 4 models, files API, code execution tool, MCP connector and more ([2740935](https://github.com/anthropics/anthropic-sdk-go/commit/2740935f444de2d46103a7c777ea75e7e214872e))
### Bug Fixes
* **tests:** fix model testing for anthropic.CalculateNonStreamingTimeout ([f1aa0a1](https://github.com/anthropics/anthropic-sdk-go/commit/f1aa0a1a32d1ca87b87a7d688daab31f2a36071c))
## 1.0.0 (2025-05-21)
Full Changelog: [v0.2.0-beta.4...v1.0.0](https://github.com/anthropics/anthropic-sdk-go/compare/v0.2.0-beta.4...v1.0.0)
### ⚠ BREAKING CHANGES
* **client:** rename variant constructors
* **client:** remove is present
### Features
* **client:** improve variant constructor names ([227c96b](https://github.com/anthropics/anthropic-sdk-go/commit/227c96bf50e14827e112c31ad0f512354477a409))
* **client:** rename variant constructors ([078fad6](https://github.com/anthropics/anthropic-sdk-go/commit/078fad6558642a20b5fb3e82186b03c2efc0ab47))
### Bug Fixes
* **client:** correctly set stream key for multipart ([f17bfe0](https://github.com/anthropics/anthropic-sdk-go/commit/f17bfe0aac0fb8228d9cad87ccca0deb7449a824))
* **client:** don't panic on marshal with extra null field ([d67a151](https://github.com/anthropics/anthropic-sdk-go/commit/d67a151a6ef0870918c5eaf84ce996cb5b1860b7))
* **client:** elide nil citations array ([09cadec](https://github.com/anthropics/anthropic-sdk-go/commit/09cadec3c076d74bda74e67c345a1aee1fdb7ce4))
* **client:** fix bug with empty tool inputs and citation deltas in Accumulate ([f4ac348](https://github.com/anthropics/anthropic-sdk-go/commit/f4ac348658fb83485d6555c63f90920599c98d99))
* **client:** increase max stream buffer size ([18a6ccf](https://github.com/anthropics/anthropic-sdk-go/commit/18a6ccf1961922a342467800c737fa000bdd254e))
* **client:** remove is present ([385d99f](https://github.com/anthropics/anthropic-sdk-go/commit/385d99fa225c755d9af737425ad2ef4d66ad5ba9))
* **client:** resolve naming collisions in union variants ([2cb6904](https://github.com/anthropics/anthropic-sdk-go/commit/2cb69048a6b583954934bc2926186564b5c74bf6))
* **client:** use scanner for streaming ([82a2840](https://github.com/anthropics/anthropic-sdk-go/commit/82a2840ce0f8aa8bd63f7697c566f437c06bb132))
### Chores
* **examples:** remove fmt ([872e055](https://github.com/anthropics/anthropic-sdk-go/commit/872e0550171942c405786c7eedb23b8270f6e8de))
* formatting ([1ce0ee8](https://github.com/anthropics/anthropic-sdk-go/commit/1ce0ee863c5df658909d81b138dc1ebedb78844a))
* improve devcontainer setup ([9021490](https://github.com/anthropics/anthropic-sdk-go/commit/90214901d77ba57901e77d6ea31aafb06c120f2c))
### Documentation
* upgrade security note to warning ([#346](https://github.com/anthropics/anthropic-sdk-go/issues/346)) ([83e70de](https://github.com/anthropics/anthropic-sdk-go/commit/83e70decfb5da14a1ecf78402302f7f0600515ea))
## 0.2.0-beta.4 (2025-05-18)
Full Changelog: [v0.2.0-beta.3...v0.2.0-beta.4](https://github.com/anthropics/anthropic-sdk-go/compare/v0.2.0-beta.3...v0.2.0-beta.4)
### ⚠ BREAKING CHANGES
* **client:** clearer array variant names
* **client:** rename resp package
* **client:** improve core function names
* **client:** improve union variant names
* **client:** improve param subunions & deduplicate types
### Features
* **api:** adds web search capabilities to the Claude API ([9ca314a](https://github.com/anthropics/anthropic-sdk-go/commit/9ca314a74998f24b5f17427698a8fa709b103581))
* **api:** extract ContentBlockDelta events into their own schemas ([#165](https://github.com/anthropics/anthropic-sdk-go/issues/165)) ([6d75486](https://github.com/anthropics/anthropic-sdk-go/commit/6d75486e9f524f5511f787181106a679e3414498))
* **api:** manual updates ([d405f97](https://github.com/anthropics/anthropic-sdk-go/commit/d405f97373cd7ae863a7400441d1d79c85f0ddd5))
* **api:** manual updates ([e1326cd](https://github.com/anthropics/anthropic-sdk-go/commit/e1326cdd756beb871e939af8be8b45fd3d5fdc9a))
* **api:** manual updates ([a92a382](https://github.com/anthropics/anthropic-sdk-go/commit/a92a382976d595dd32208109b480bf26dbbdc00f))
* **api:** manual updates ([59bd507](https://github.com/anthropics/anthropic-sdk-go/commit/59bd5071282403373ddca9333fafc9efc90a16d6))
* **client:** add dynamic streaming buffer to handle large lines ([510e099](https://github.com/anthropics/anthropic-sdk-go/commit/510e099e19fa71411502650eb387f1fee79f5d0d))
* **client:** add escape hatch to omit required param fields ([#175](https://github.com/anthropics/anthropic-sdk-go/issues/175)) ([6df8184](https://github.com/anthropics/anthropic-sdk-go/commit/6df8184947d6568260fa0bc22a89a27d10eaacd0))
* **client:** add helper method to generate constant structs ([015e8bc](https://github.com/anthropics/anthropic-sdk-go/commit/015e8bc7f74582fb5a3d69021ad3d61e96d65b36))
* **client:** add support for endpoint-specific base URLs in python ([44645c9](https://github.com/anthropics/anthropic-sdk-go/commit/44645c9fd0b883db4deeb88bfee6922ec9845ace))
* **client:** add support for reading base URL from environment variable ([835e632](https://github.com/anthropics/anthropic-sdk-go/commit/835e6326b658cd40590cd8bbed0932ab219e6d2d))
* **client:** clearer array variant names ([1fdea8f](https://github.com/anthropics/anthropic-sdk-go/commit/1fdea8f9fedc470a917d12607b3b7ebe3f0f6439))
* **client:** experimental support for unmarshalling into param structs ([94c8fa4](https://github.com/anthropics/anthropic-sdk-go/commit/94c8fa41ecb4792cb7da043bde2c0f5ddafe84b0))
* **client:** improve param subunions & deduplicate types ([8daacf6](https://github.com/anthropics/anthropic-sdk-go/commit/8daacf6866e8bc706ec29e17046e53d4ed100364))
* **client:** make response union's AsAny method type safe ([#174](https://github.com/anthropics/anthropic-sdk-go/issues/174)) ([f410ed0](https://github.com/anthropics/anthropic-sdk-go/commit/f410ed025ee57a05b0cec8d72a1cb43d30e564a6))
* **client:** rename resp package ([8e7d278](https://github.com/anthropics/anthropic-sdk-go/commit/8e7d2788e9be7b954d07de731e7b27ad2e2a9e8e))
* **client:** support custom http clients ([#177](https://github.com/anthropics/anthropic-sdk-go/issues/177)) ([ff7a793](https://github.com/anthropics/anthropic-sdk-go/commit/ff7a793b43b99dc148b30e408edfdc19e19c28b2))
* **client:** support more time formats ([af2df86](https://github.com/anthropics/anthropic-sdk-go/commit/af2df86f24acbe6b9cdcc4e055c3ff754303e0ef))
* **client:** support param struct overrides ([#167](https://github.com/anthropics/anthropic-sdk-go/issues/167)) ([e0d5eb0](https://github.com/anthropics/anthropic-sdk-go/commit/e0d5eb098c6441e99d53c6d997c7bcca460a238b))
* **client:** support unions in query and forms ([#171](https://github.com/anthropics/anthropic-sdk-go/issues/171)) ([6bf1ce3](https://github.com/anthropics/anthropic-sdk-go/commit/6bf1ce36f0155dba20afd4b63bf96c4527e2baa5))
### Bug Fixes
* **client:** clean up reader resources ([2234386](https://github.com/anthropics/anthropic-sdk-go/commit/223438673ade3be3435bebf7063fd34ddf3dfb8e))
* **client:** correctly update body in WithJSONSet ([f531c77](https://github.com/anthropics/anthropic-sdk-go/commit/f531c77c15859b1f2e61d654f4d9956cdfafa082))
* **client:** deduplicate stop reason type ([#155](https://github.com/anthropics/anthropic-sdk-go/issues/155)) ([0f985ad](https://github.com/anthropics/anthropic-sdk-go/commit/0f985ad54ef47849d7d478c84d34c7350a4349b5))
* **client:** fix bug where types occasionally wouldn't generate ([8988713](https://github.com/anthropics/anthropic-sdk-go/commit/8988713904ce73d3c82de635d98da48b98532366))
* **client:** improve core function names ([0a2777f](https://github.com/anthropics/anthropic-sdk-go/commit/0a2777fd597a5eb74bcf6b1da48a9ff1988059de))
* **client:** improve union variant names ([92718fd](https://github.com/anthropics/anthropic-sdk-go/commit/92718fd4058fd8535fd888a56f83fc2d3ec505ef))
* **client:** include path for type names in example code ([5bbe836](https://github.com/anthropics/anthropic-sdk-go/commit/5bbe83639793878aa0ea52e8ff06b1d9ee72ed7c))
* **client:** resolve issue with optional multipart files ([e2af94c](https://github.com/anthropics/anthropic-sdk-go/commit/e2af94c840a8f9da566c781fc99c57084e490ec1))
* **client:** return error on bad custom url instead of panic ([#169](https://github.com/anthropics/anthropic-sdk-go/issues/169)) ([b086b55](https://github.com/anthropics/anthropic-sdk-go/commit/b086b55f4886474282d4e2ea9ee3495cbf25ec6b))
* **client:** support multipart encoding array formats ([#170](https://github.com/anthropics/anthropic-sdk-go/issues/170)) ([611a25a](https://github.com/anthropics/anthropic-sdk-go/commit/611a25a427fc5303bb311fa4a2fec836d55b0933))
* **client:** time format encoding fix ([d589846](https://github.com/anthropics/anthropic-sdk-go/commit/d589846c1a08ad56d639d60736e2b8e190f7f2b1))
* **client:** unmarshal responses properly ([8344a1c](https://github.com/anthropics/anthropic-sdk-go/commit/8344a1c58dd497abbed8e9e689efca544256eaa8))
* **client:** unmarshal stream events into fresh memory ([#168](https://github.com/anthropics/anthropic-sdk-go/issues/168)) ([9cc1257](https://github.com/anthropics/anthropic-sdk-go/commit/9cc1257a67340e446ac415ec9ddddded24bb1f9a))
* handle empty bodies in WithJSONSet ([0bad01e](https://github.com/anthropics/anthropic-sdk-go/commit/0bad01e40a2a4b5b376ba27513d7e16d604459d9))
* **internal:** fix type changes ([d8ef353](https://github.com/anthropics/anthropic-sdk-go/commit/d8ef3531840ac1dc0541d3b1cf0015d1db29e2b6))
* **pagination:** handle errors when applying options ([2381476](https://github.com/anthropics/anthropic-sdk-go/commit/2381476e64991e781b696890c98f78001e256b3b))
### Chores
* **ci:** add timeout thresholds for CI jobs ([335e9f0](https://github.com/anthropics/anthropic-sdk-go/commit/335e9f0af2275f1af21aa7062afb50bee81771b6))
* **ci:** only use depot for staging repos ([6818451](https://github.com/anthropics/anthropic-sdk-go/commit/68184515143aa1e4473208f794fa593668c94df4))
* **ci:** run on more branches and use depot runners ([b0ca09d](https://github.com/anthropics/anthropic-sdk-go/commit/b0ca09d1d39a8de390c47be804847a7647ca3c67))
* **client:** use new opt conversion ([#184](https://github.com/anthropics/anthropic-sdk-go/issues/184)) ([58dc74f](https://github.com/anthropics/anthropic-sdk-go/commit/58dc74f951aa6a0eb4355a0213c8695bfa7cb0ed))
* **docs:** doc improvements ([#173](https://github.com/anthropics/anthropic-sdk-go/issues/173)) ([aebe8f6](https://github.com/anthropics/anthropic-sdk-go/commit/aebe8f68afa3de4460cda6e4032c7859e13cda81))
* **docs:** document pre-request options ([8f5eb18](https://github.com/anthropics/anthropic-sdk-go/commit/8f5eb188146bd46ba990558a7e2348c8697d6405))
* **docs:** readme improvements ([#176](https://github.com/anthropics/anthropic-sdk-go/issues/176)) ([b5769ff](https://github.com/anthropics/anthropic-sdk-go/commit/b5769ffcf5ef5345659ae848b875227718ea2425))
* **docs:** update file uploads in README ([#166](https://github.com/anthropics/anthropic-sdk-go/issues/166)) ([a4a36bf](https://github.com/anthropics/anthropic-sdk-go/commit/a4a36bfbefa5a166774c23d8c5428fb55c1b4abe))
* **docs:** update respjson package name ([28910b5](https://github.com/anthropics/anthropic-sdk-go/commit/28910b57821cab670561a25bee413375187ed747))
* **internal:** expand CI branch coverage ([#178](https://github.com/anthropics/anthropic-sdk-go/issues/178)) ([900e2df](https://github.com/anthropics/anthropic-sdk-go/commit/900e2df3eb2d3e1309d85fdcf807998f701bea8a))
* **internal:** reduce CI branch coverage ([343f6c6](https://github.com/anthropics/anthropic-sdk-go/commit/343f6c6c295dc3d39f65aae481bc10969dbb5694))
* **internal:** remove CI condition ([#160](https://github.com/anthropics/anthropic-sdk-go/issues/160)) ([adfa1e2](https://github.com/anthropics/anthropic-sdk-go/commit/adfa1e2e349842aa88262af70b209d1a59dbb419))
* **internal:** update config ([#157](https://github.com/anthropics/anthropic-sdk-go/issues/157)) ([46f0194](https://github.com/anthropics/anthropic-sdk-go/commit/46f019497bd9533390c4b9f0ebee6863263ce009))
* **readme:** improve formatting ([66be9bb](https://github.com/anthropics/anthropic-sdk-go/commit/66be9bbb17ccc9d878e79b3c39605da3e2846297))
### Documentation
* remove or fix invalid readme examples ([142576c](https://github.com/anthropics/anthropic-sdk-go/commit/142576c73b4dab5b84a2bf2481506ad642ad31cc))
* update documentation links to be more uniform ([457122b](https://github.com/anthropics/anthropic-sdk-go/commit/457122b79646dc17fa8752c98dbf4991edffc548))
## 0.2.0-beta.3 (2025-03-27)
Full Changelog: [v0.2.0-beta.2...v0.2.0-beta.3](https://github.com/anthropics/anthropic-sdk-go/compare/v0.2.0-beta.2...v0.2.0-beta.3)
### Chores
* add hash of OpenAPI spec/config inputs to .stats.yml ([#154](https://github.com/anthropics/anthropic-sdk-go/issues/154)) ([76b91b5](https://github.com/anthropics/anthropic-sdk-go/commit/76b91b56fbf42fe8982e7b861885db179b1bdcc5))
* fix typos ([#152](https://github.com/anthropics/anthropic-sdk-go/issues/152)) ([1cf6a6a](https://github.com/anthropics/anthropic-sdk-go/commit/1cf6a6ae25231b88d2eedbe0758f1281cbe439d8))
## 0.2.0-beta.2 (2025-03-25)
Full Changelog: [v0.2.0-beta.1...v0.2.0-beta.2](https://github.com/anthropics/anthropic-sdk-go/compare/v0.2.0-beta.1...v0.2.0-beta.2)
### Bug Fixes
* **client:** use raw json for tool input ([1013c2b](https://github.com/anthropics/anthropic-sdk-go/commit/1013c2bdb87a27d2420dbe0dcadc57d1fe3589f2))
### Chores
* add request options to client tests ([#150](https://github.com/anthropics/anthropic-sdk-go/issues/150)) ([7c70ae1](https://github.com/anthropics/anthropic-sdk-go/commit/7c70ae134a345aff775694abcad255c76e7dfcba))
## 0.2.0-beta.1 (2025-03-25)
Full Changelog: [v0.2.0-alpha.13...v0.2.0-beta.1](https://github.com/anthropics/anthropic-sdk-go/compare/v0.2.0-alpha.13...v0.2.0-beta.1)
### ⚠ BREAKING CHANGES
* **api:** migrate to v2
### Features
* add SKIP_BREW env var to ./scripts/bootstrap ([#137](https://github.com/anthropics/anthropic-sdk-go/issues/137)) ([4057111](https://github.com/anthropics/anthropic-sdk-go/commit/40571110129d5c66f171ead36f5d725663262bc4))
* **api:** migrate to v2 ([fcd95eb](https://github.com/anthropics/anthropic-sdk-go/commit/fcd95eb8f45d0ffedcd1e47cd0879d7e66783540))
* **client:** accept RFC6838 JSON content types ([#139](https://github.com/anthropics/anthropic-sdk-go/issues/139)) ([78d17cd](https://github.com/anthropics/anthropic-sdk-go/commit/78d17cd4122893ba62b1e14714a1da004c128344))
* **client:** allow custom baseurls without trailing slash ([#135](https://github.com/anthropics/anthropic-sdk-go/issues/135)) ([9b30fce](https://github.com/anthropics/anthropic-sdk-go/commit/9b30fce0a71a35910315e02cd3a2f2afc1fd7962))
* **client:** improve default client options support ([07f82a6](https://github.com/anthropics/anthropic-sdk-go/commit/07f82a6f9e07bf9aadf4ca150287887cb9e75bc4))
* **client:** improve default client options support ([#142](https://github.com/anthropics/anthropic-sdk-go/issues/142)) ([f261355](https://github.com/anthropics/anthropic-sdk-go/commit/f261355e497748bcb112eecb67a95d7c7c5075c0))
* **client:** support v2 ([#147](https://github.com/anthropics/anthropic-sdk-go/issues/147)) ([6b3af98](https://github.com/anthropics/anthropic-sdk-go/commit/6b3af98e02a9b6126bd715d43f83b8adf8b861e8))
### Chores
* **docs:** clarify breaking changes ([#146](https://github.com/anthropics/anthropic-sdk-go/issues/146)) ([a2586b4](https://github.com/anthropics/anthropic-sdk-go/commit/a2586b4beb2b9a0ad252e90223fbb471e6c25bc1))
* **internal:** codegen metadata ([ce0eca2](https://github.com/anthropics/anthropic-sdk-go/commit/ce0eca25c6a83fca9ececccb41faf04e74566e2d))
* **internal:** remove extra empty newlines ([#143](https://github.com/anthropics/anthropic-sdk-go/issues/143)) ([2ed1584](https://github.com/anthropics/anthropic-sdk-go/commit/2ed1584c7d80fddf2ef5143eabbd33b8f1a4603d))
### Refactors
* tidy up dependencies ([#140](https://github.com/anthropics/anthropic-sdk-go/issues/140)) ([289cc1b](https://github.com/anthropics/anthropic-sdk-go/commit/289cc1b007094421305dfc4ef01ae68bb2d50ee5))
================================================
FILE: CONTRIBUTING.md
================================================
## Contributing to documentation
The documentation for this SDK lives at [platform.claude.com/docs/en/api/sdks/go](https://platform.claude.com/docs/en/api/sdks/go). To suggest changes, open an issue.
## Setting up the environment
To set up the repository, run:
```sh
$ ./scripts/bootstrap
$ ./scripts/lint
```
This will install all the required dependencies and build the SDK.
You can also [install go 1.22+ manually](https://go.dev/doc/install).
## Modifying/Adding code
Most of the SDK is generated code. Modifications to code will be persisted between generations, but may
result in merge conflicts between manual patches and changes from the generator. The generator will never
modify the contents of the `lib/` and `examples/` directories.
## Adding and running examples
All files in the `examples/` directory are not modified by the generator and can be freely edited or added to.
```go
# add an example to examples/<your-example>/main.go
package main
func main() {
// ...
}
```
```sh
$ go run ./examples/<your-example>
```
## Using the repository from source
To use a local version of this library from source in another project, edit the `go.mod` with a replace
directive. This can be done through the CLI with the following:
```sh
$ go mod edit -replace github.com/anthropics/anthropic-sdk-go=/path/to/anthropic-sdk-go
```
## Running tests
Most tests require you to [set up a mock server](https://github.com/dgellow/steady) against the OpenAPI spec to run the tests.
```sh
$ ./scripts/mock
```
```sh
$ ./scripts/test
```
## Formatting
This library uses the standard gofmt code formatter:
```sh
$ ./scripts/format
```
================================================
FILE: LICENSE
================================================
Copyright 2023 Anthropic, PBC.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
================================================
FILE: README.md
================================================
# Claude SDK for Go
<!-- x-release-please-start-version -->
<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go"><img src="https://pkg.go.dev/badge/github.com/anthropics/anthropic-sdk-go.svg" alt="Go Reference"></a>
<!-- x-release-please-end -->
The Claude SDK for Go provides access to the [Claude API](https://docs.anthropic.com/en/api/) from Go applications.
## Documentation
Full documentation is available at **[platform.claude.com/docs/en/api/sdks/go](https://platform.claude.com/docs/en/api/sdks/go)**.
## Installation
<!-- x-release-please-start-version -->
```go
import (
"github.com/anthropics/anthropic-sdk-go" // imported as anthropic
)
```
<!-- x-release-please-end -->
Or explicitly add the dependency:
<!-- x-release-please-start-version -->
```sh
go get -u 'github.com/anthropics/anthropic-sdk-go@v1.27.1'
```
<!-- x-release-please-end -->
## Getting started
```go
package main
import (
"context"
"fmt"
"github.com/anthropics/anthropic-sdk-go"
"github.com/anthropics/anthropic-sdk-go/option"
)
func main() {
client := anthropic.NewClient(
option.WithAPIKey("my-anthropic-api-key"), // defaults to os.LookupEnv("ANTHROPIC_API_KEY")
)
message, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
MaxTokens: 1024,
Messages: []anthropic.MessageParam{
anthropic.NewUserMessage(anthropic.NewTextBlock("What is a quaternion?")),
},
Model: anthropic.ModelClaudeOpus4_6,
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", message.Content)
}
```
## Requirements
Go 1.22+
## Contributing
See [CONTRIBUTING.md](./CONTRIBUTING.md).
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
================================================
FILE: SECURITY.md
================================================
# Security Policy
## Reporting Security Issues
This SDK is generated by [Stainless Software Inc](http://stainless.com). Stainless takes security seriously, and encourages you to report any security vulnerability promptly so that appropriate action can be taken.
To report a security issue, please contact the Stainless team at security@stainless.com.
## Responsible Disclosure
We appreciate the efforts of security researchers and individuals who help us maintain the security of
SDKs we generate. If you believe you have found a security vulnerability, please adhere to responsible
disclosure practices by allowing us a reasonable amount of time to investigate and address the issue
before making any information public.
## Reporting Non-SDK Related Security Issues
If you encounter security issues that are not directly related to SDKs but pertain to the services
or products provided by Anthropic, please follow the respective company's security reporting guidelines.
### Anthropic Terms and Policies
Please contact support@anthropic.com for any questions or concerns regarding the security of our services.
---
Thank you for helping us keep the SDKs and systems they interact with secure.
================================================
FILE: aliases.go
================================================
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
package anthropic
import (
"github.com/anthropics/anthropic-sdk-go/internal/apierror"
"github.com/anthropics/anthropic-sdk-go/packages/param"
"github.com/anthropics/anthropic-sdk-go/shared"
)
// aliased to make [param.APIUnion] private when embedding
type paramUnion = param.APIUnion
// aliased to make [param.APIObject] private when embedding
type paramObj = param.APIObject
type Error = apierror.Error
// This is an alias to an internal type.
type APIErrorObject = shared.APIErrorObject
// This is an alias to an internal type.
type AuthenticationError = shared.AuthenticationError
// This is an alias to an internal type.
type BillingError = shared.BillingError
// This is an alias to an internal type.
type ErrorObjectUnion = shared.ErrorObjectUnion
// This is an alias to an internal type.
type ErrorResponse = shared.ErrorResponse
// This is an alias to an internal type.
type GatewayTimeoutError = shared.GatewayTimeoutError
// This is an alias to an internal type.
type InvalidRequestError = shared.InvalidRequestError
// This is an alias to an internal type.
type NotFoundError = shared.NotFoundError
// This is an alias to an internal type.
type OverloadedError = shared.OverloadedError
// This is an alias to an internal type.
type PermissionError = shared.PermissionError
// This is an alias to an internal type.
type RateLimitError = shared.RateLimitError
// Backward-compatible type aliases for renamed types.
// These ensure existing code continues to compile after
// UserLocation and ErrorCode types were consolidated.
type WebSearchToolRequestErrorErrorCode = WebSearchToolResultErrorCode
type WebSearchToolResultErrorErrorCode = WebSearchToolResultErrorCode
type WebSearchTool20250305UserLocationParam = UserLocationParam
type WebSearchTool20260209UserLocationParam = UserLocationParam
const WebSearchToolRequestErrorErrorCodeInvalidToolInput = WebSearchToolResultErrorCodeInvalidToolInput
const WebSearchToolRequestErrorErrorCodeUnavailable = WebSearchToolResultErrorCodeUnavailable
const WebSearchToolRequestErrorErrorCodeMaxUsesExceeded = WebSearchToolResultErrorCodeMaxUsesExceeded
const WebSearchToolRequestErrorErrorCodeTooManyRequests = WebSearchToolResultErrorCodeTooManyRequests
const WebSearchToolRequestErrorErrorCodeQueryTooLong = WebSearchToolResultErrorCodeQueryTooLong
const WebSearchToolRequestErrorErrorCodeRequestTooLarge = WebSearchToolResultErrorCodeRequestTooLarge
const WebSearchToolResultErrorErrorCodeInvalidToolInput = WebSearchToolResultErrorCodeInvalidToolInput
const WebSearchToolResultErrorErrorCodeUnavailable = WebSearchToolResultErrorCodeUnavailable
const WebSearchToolResultErrorErrorCodeMaxUsesExceeded = WebSearchToolResultErrorCodeMaxUsesExceeded
const WebSearchToolResultErrorErrorCodeTooManyRequests = WebSearchToolResultErrorCodeTooManyRequests
const WebSearchToolResultErrorErrorCodeQueryTooLong = WebSearchToolResultErrorCodeQueryTooLong
const WebSearchToolResultErrorErrorCodeRequestTooLarge = WebSearchToolResultErrorCodeRequestTooLarge
================================================
FILE: api.md
================================================
# Shared Response Types
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/shared">shared</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/shared#APIErrorObject">APIErrorObject</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/shared">shared</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/shared#AuthenticationError">AuthenticationError</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/shared">shared</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/shared#BillingError">BillingError</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/shared">shared</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/shared#ErrorObjectUnion">ErrorObjectUnion</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/shared">shared</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/shared#ErrorResponse">ErrorResponse</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/shared">shared</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/shared#GatewayTimeoutError">GatewayTimeoutError</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/shared">shared</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/shared#InvalidRequestError">InvalidRequestError</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/shared">shared</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/shared#NotFoundError">NotFoundError</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/shared">shared</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/shared#OverloadedError">OverloadedError</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/shared">shared</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/shared#PermissionError">PermissionError</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/shared">shared</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/shared#RateLimitError">RateLimitError</a>
# Messages
Params Types:
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#Base64ImageSourceParam">Base64ImageSourceParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#Base64PDFSourceParam">Base64PDFSourceParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BashCodeExecutionOutputBlockParam">BashCodeExecutionOutputBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BashCodeExecutionResultBlockParam">BashCodeExecutionResultBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BashCodeExecutionToolResultBlockParam">BashCodeExecutionToolResultBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BashCodeExecutionToolResultErrorCode">BashCodeExecutionToolResultErrorCode</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BashCodeExecutionToolResultErrorParam">BashCodeExecutionToolResultErrorParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#CacheControlEphemeralParam">CacheControlEphemeralParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#CitationCharLocationParam">CitationCharLocationParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#CitationContentBlockLocationParam">CitationContentBlockLocationParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#CitationPageLocationParam">CitationPageLocationParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#CitationSearchResultLocationParam">CitationSearchResultLocationParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#CitationWebSearchResultLocationParam">CitationWebSearchResultLocationParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#CitationsConfigParam">CitationsConfigParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#CodeExecutionOutputBlockParam">CodeExecutionOutputBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#CodeExecutionResultBlockParam">CodeExecutionResultBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#CodeExecutionTool20250522Param">CodeExecutionTool20250522Param</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#CodeExecutionTool20250825Param">CodeExecutionTool20250825Param</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#CodeExecutionTool20260120Param">CodeExecutionTool20260120Param</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#CodeExecutionToolResultBlockParam">CodeExecutionToolResultBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#CodeExecutionToolResultBlockParamContentUnion">CodeExecutionToolResultBlockParamContentUnion</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#CodeExecutionToolResultErrorCode">CodeExecutionToolResultErrorCode</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#CodeExecutionToolResultErrorParam">CodeExecutionToolResultErrorParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ContainerUploadBlockParam">ContainerUploadBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ContentBlockParamUnion">ContentBlockParamUnion</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ContentBlockSourceParam">ContentBlockSourceParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ContentBlockSourceContentItemUnionParam">ContentBlockSourceContentItemUnionParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#DirectCallerParam">DirectCallerParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#DocumentBlockParam">DocumentBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#EncryptedCodeExecutionResultBlockParam">EncryptedCodeExecutionResultBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ImageBlockParam">ImageBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#JSONOutputFormatParam">JSONOutputFormatParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#MemoryTool20250818Param">MemoryTool20250818Param</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#MessageCountTokensToolUnionParam">MessageCountTokensToolUnionParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#MessageParam">MessageParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#MetadataParam">MetadataParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#Model">Model</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#OutputConfigParam">OutputConfigParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#PlainTextSourceParam">PlainTextSourceParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#RedactedThinkingBlockParam">RedactedThinkingBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#SearchResultBlockParam">SearchResultBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ServerToolCallerParam">ServerToolCallerParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ServerToolCaller20260120Param">ServerToolCaller20260120Param</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ServerToolUseBlockParam">ServerToolUseBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#TextBlockParam">TextBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#TextCitationParamUnion">TextCitationParamUnion</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#TextEditorCodeExecutionCreateResultBlockParam">TextEditorCodeExecutionCreateResultBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#TextEditorCodeExecutionStrReplaceResultBlockParam">TextEditorCodeExecutionStrReplaceResultBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#TextEditorCodeExecutionToolResultBlockParam">TextEditorCodeExecutionToolResultBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#TextEditorCodeExecutionToolResultErrorCode">TextEditorCodeExecutionToolResultErrorCode</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#TextEditorCodeExecutionToolResultErrorParam">TextEditorCodeExecutionToolResultErrorParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#TextEditorCodeExecutionViewResultBlockParam">TextEditorCodeExecutionViewResultBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ThinkingBlockParam">ThinkingBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ThinkingConfigAdaptiveParam">ThinkingConfigAdaptiveParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ThinkingConfigDisabledParam">ThinkingConfigDisabledParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ThinkingConfigEnabledParam">ThinkingConfigEnabledParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ThinkingConfigParamUnion">ThinkingConfigParamUnion</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ToolParam">ToolParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ToolBash20250124Param">ToolBash20250124Param</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ToolChoiceUnionParam">ToolChoiceUnionParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ToolChoiceAnyParam">ToolChoiceAnyParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ToolChoiceAutoParam">ToolChoiceAutoParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ToolChoiceNoneParam">ToolChoiceNoneParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ToolChoiceToolParam">ToolChoiceToolParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ToolReferenceBlockParam">ToolReferenceBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ToolResultBlockParam">ToolResultBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ToolSearchToolBm25_20251119Param">ToolSearchToolBm25_20251119Param</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ToolSearchToolRegex20251119Param">ToolSearchToolRegex20251119Param</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ToolSearchToolResultBlockParam">ToolSearchToolResultBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ToolSearchToolResultErrorCode">ToolSearchToolResultErrorCode</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ToolSearchToolResultErrorParam">ToolSearchToolResultErrorParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ToolSearchToolSearchResultBlockParam">ToolSearchToolSearchResultBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ToolTextEditor20250124Param">ToolTextEditor20250124Param</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ToolTextEditor20250429Param">ToolTextEditor20250429Param</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ToolTextEditor20250728Param">ToolTextEditor20250728Param</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ToolUnionParam">ToolUnionParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ToolUseBlockParam">ToolUseBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#URLImageSourceParam">URLImageSourceParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#URLPDFSourceParam">URLPDFSourceParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#UserLocationParam">UserLocationParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#WebFetchBlockParam">WebFetchBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#WebFetchTool20250910Param">WebFetchTool20250910Param</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#WebFetchTool20260209Param">WebFetchTool20260209Param</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#WebFetchTool20260309Param">WebFetchTool20260309Param</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#WebFetchToolResultBlockParam">WebFetchToolResultBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#WebFetchToolResultErrorBlockParam">WebFetchToolResultErrorBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#WebFetchToolResultErrorCode">WebFetchToolResultErrorCode</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#WebSearchResultBlockParam">WebSearchResultBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#WebSearchTool20250305Param">WebSearchTool20250305Param</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#WebSearchTool20260209Param">WebSearchTool20260209Param</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#WebSearchToolRequestErrorParam">WebSearchToolRequestErrorParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#WebSearchToolResultBlockParam">WebSearchToolResultBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#WebSearchToolResultBlockParamContentUnion">WebSearchToolResultBlockParamContentUnion</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#WebSearchToolResultErrorCode">WebSearchToolResultErrorCode</a>
Response Types:
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#Base64PDFSource">Base64PDFSource</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BashCodeExecutionOutputBlock">BashCodeExecutionOutputBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BashCodeExecutionResultBlock">BashCodeExecutionResultBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BashCodeExecutionToolResultBlock">BashCodeExecutionToolResultBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BashCodeExecutionToolResultError">BashCodeExecutionToolResultError</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BashCodeExecutionToolResultErrorCode">BashCodeExecutionToolResultErrorCode</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#CacheCreation">CacheCreation</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#CitationCharLocation">CitationCharLocation</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#CitationContentBlockLocation">CitationContentBlockLocation</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#CitationPageLocation">CitationPageLocation</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#CitationsConfig">CitationsConfig</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#CitationsDelta">CitationsDelta</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#CitationsSearchResultLocation">CitationsSearchResultLocation</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#CitationsWebSearchResultLocation">CitationsWebSearchResultLocation</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#CodeExecutionOutputBlock">CodeExecutionOutputBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#CodeExecutionResultBlock">CodeExecutionResultBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#CodeExecutionToolResultBlock">CodeExecutionToolResultBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#CodeExecutionToolResultBlockContentUnion">CodeExecutionToolResultBlockContentUnion</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#CodeExecutionToolResultError">CodeExecutionToolResultError</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#CodeExecutionToolResultErrorCode">CodeExecutionToolResultErrorCode</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#Container">Container</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ContainerUploadBlock">ContainerUploadBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ContentBlockUnion">ContentBlockUnion</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#DirectCaller">DirectCaller</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#DocumentBlock">DocumentBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#EncryptedCodeExecutionResultBlock">EncryptedCodeExecutionResultBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#InputJSONDelta">InputJSONDelta</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#Message">Message</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#MessageDeltaUsage">MessageDeltaUsage</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#MessageTokensCount">MessageTokensCount</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#Model">Model</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#PlainTextSource">PlainTextSource</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#RawContentBlockDeltaUnion">RawContentBlockDeltaUnion</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ContentBlockDeltaEvent">ContentBlockDeltaEvent</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ContentBlockStartEvent">ContentBlockStartEvent</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ContentBlockStopEvent">ContentBlockStopEvent</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#MessageDeltaEvent">MessageDeltaEvent</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#MessageStartEvent">MessageStartEvent</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#MessageStopEvent">MessageStopEvent</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#MessageStreamEventUnion">MessageStreamEventUnion</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#RedactedThinkingBlock">RedactedThinkingBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ServerToolCaller">ServerToolCaller</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ServerToolCaller20260120">ServerToolCaller20260120</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ServerToolUsage">ServerToolUsage</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ServerToolUseBlock">ServerToolUseBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#SignatureDelta">SignatureDelta</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#StopReason">StopReason</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#TextBlock">TextBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#TextCitationUnion">TextCitationUnion</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#TextDelta">TextDelta</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#TextEditorCodeExecutionCreateResultBlock">TextEditorCodeExecutionCreateResultBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#TextEditorCodeExecutionStrReplaceResultBlock">TextEditorCodeExecutionStrReplaceResultBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#TextEditorCodeExecutionToolResultBlock">TextEditorCodeExecutionToolResultBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#TextEditorCodeExecutionToolResultError">TextEditorCodeExecutionToolResultError</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#TextEditorCodeExecutionToolResultErrorCode">TextEditorCodeExecutionToolResultErrorCode</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#TextEditorCodeExecutionViewResultBlock">TextEditorCodeExecutionViewResultBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ThinkingBlock">ThinkingBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ThinkingDelta">ThinkingDelta</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ToolReferenceBlock">ToolReferenceBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ToolSearchToolResultBlock">ToolSearchToolResultBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ToolSearchToolResultError">ToolSearchToolResultError</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ToolSearchToolResultErrorCode">ToolSearchToolResultErrorCode</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ToolSearchToolSearchResultBlock">ToolSearchToolSearchResultBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ToolUseBlock">ToolUseBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#Usage">Usage</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#WebFetchBlock">WebFetchBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#WebFetchToolResultBlock">WebFetchToolResultBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#WebFetchToolResultErrorBlock">WebFetchToolResultErrorBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#WebFetchToolResultErrorCode">WebFetchToolResultErrorCode</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#WebSearchResultBlock">WebSearchResultBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#WebSearchToolResultBlock">WebSearchToolResultBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#WebSearchToolResultBlockContentUnion">WebSearchToolResultBlockContentUnion</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#WebSearchToolResultError">WebSearchToolResultError</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#WebSearchToolResultErrorCode">WebSearchToolResultErrorCode</a>
Methods:
- <code title="post /v1/messages">client.Messages.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#MessageService.New">New</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, body <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#MessageNewParams">MessageNewParams</a>) (\*<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#Message">Message</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="post /v1/messages/count_tokens">client.Messages.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#MessageService.CountTokens">CountTokens</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, body <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#MessageCountTokensParams">MessageCountTokensParams</a>) (\*<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#MessageTokensCount">MessageTokensCount</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
## Batches
Response Types:
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#DeletedMessageBatch">DeletedMessageBatch</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#MessageBatch">MessageBatch</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#MessageBatchCanceledResult">MessageBatchCanceledResult</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#MessageBatchErroredResult">MessageBatchErroredResult</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#MessageBatchExpiredResult">MessageBatchExpiredResult</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#MessageBatchIndividualResponse">MessageBatchIndividualResponse</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#MessageBatchRequestCounts">MessageBatchRequestCounts</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#MessageBatchResultUnion">MessageBatchResultUnion</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#MessageBatchSucceededResult">MessageBatchSucceededResult</a>
Methods:
- <code title="post /v1/messages/batches">client.Messages.Batches.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#MessageBatchService.New">New</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, body <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#MessageBatchNewParams">MessageBatchNewParams</a>) (\*<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#MessageBatch">MessageBatch</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /v1/messages/batches/{message_batch_id}">client.Messages.Batches.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#MessageBatchService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, messageBatchID <a href="https://pkg.go.dev/builtin#string">string</a>) (\*<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#MessageBatch">MessageBatch</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /v1/messages/batches">client.Messages.Batches.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#MessageBatchService.List">List</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, query <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#MessageBatchListParams">MessageBatchListParams</a>) (\*<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/packages/pagination">pagination</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/packages/pagination#Page">Page</a>[<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#MessageBatch">MessageBatch</a>], <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="delete /v1/messages/batches/{message_batch_id}">client.Messages.Batches.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#MessageBatchService.Delete">Delete</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, messageBatchID <a href="https://pkg.go.dev/builtin#string">string</a>) (\*<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#DeletedMessageBatch">DeletedMessageBatch</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="post /v1/messages/batches/{message_batch_id}/cancel">client.Messages.Batches.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#MessageBatchService.Cancel">Cancel</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, messageBatchID <a href="https://pkg.go.dev/builtin#string">string</a>) (\*<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#MessageBatch">MessageBatch</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /v1/messages/batches/{message_batch_id}/results">client.Messages.Batches.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#MessageBatchService.Results">Results</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, messageBatchID <a href="https://pkg.go.dev/builtin#string">string</a>) (\*<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#MessageBatchIndividualResponse">MessageBatchIndividualResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
# Models
Response Types:
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#CapabilitySupport">CapabilitySupport</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ContextManagementCapability">ContextManagementCapability</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#EffortCapability">EffortCapability</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ModelCapabilities">ModelCapabilities</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ModelInfo">ModelInfo</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ThinkingCapability">ThinkingCapability</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ThinkingTypes">ThinkingTypes</a>
Methods:
- <code title="get /v1/models/{model_id}">client.Models.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ModelService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, modelID <a href="https://pkg.go.dev/builtin#string">string</a>, query <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ModelGetParams">ModelGetParams</a>) (\*<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ModelInfo">ModelInfo</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /v1/models">client.Models.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ModelService.List">List</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, params <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ModelListParams">ModelListParams</a>) (\*<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/packages/pagination">pagination</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/packages/pagination#Page">Page</a>[<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#ModelInfo">ModelInfo</a>], <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
# Beta
Params Types:
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#AnthropicBeta">AnthropicBeta</a>
Response Types:
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaAPIError">BetaAPIError</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaAuthenticationError">BetaAuthenticationError</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaBillingError">BetaBillingError</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaErrorUnion">BetaErrorUnion</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaErrorResponse">BetaErrorResponse</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaGatewayTimeoutError">BetaGatewayTimeoutError</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaInvalidRequestError">BetaInvalidRequestError</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaNotFoundError">BetaNotFoundError</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaOverloadedError">BetaOverloadedError</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaPermissionError">BetaPermissionError</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaRateLimitError">BetaRateLimitError</a>
## Models
Response Types:
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaCapabilitySupport">BetaCapabilitySupport</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaContextManagementCapability">BetaContextManagementCapability</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaEffortCapability">BetaEffortCapability</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaModelCapabilities">BetaModelCapabilities</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaModelInfo">BetaModelInfo</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaThinkingCapability">BetaThinkingCapability</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaThinkingTypes">BetaThinkingTypes</a>
Methods:
- <code title="get /v1/models/{model_id}?beta=true">client.Beta.Models.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaModelService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, modelID <a href="https://pkg.go.dev/builtin#string">string</a>, query <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaModelGetParams">BetaModelGetParams</a>) (\*<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaModelInfo">BetaModelInfo</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /v1/models?beta=true">client.Beta.Models.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaModelService.List">List</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, params <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaModelListParams">BetaModelListParams</a>) (\*<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/packages/pagination">pagination</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/packages/pagination#Page">Page</a>[<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaModelInfo">BetaModelInfo</a>], <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
## Messages
Params Types:
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaAllThinkingTurnsParam">BetaAllThinkingTurnsParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaBase64ImageSourceParam">BetaBase64ImageSourceParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaBase64PDFSourceParam">BetaBase64PDFSourceParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaBashCodeExecutionOutputBlockParam">BetaBashCodeExecutionOutputBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaBashCodeExecutionResultBlockParam">BetaBashCodeExecutionResultBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaBashCodeExecutionToolResultBlockParam">BetaBashCodeExecutionToolResultBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaBashCodeExecutionToolResultErrorParam">BetaBashCodeExecutionToolResultErrorParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaCacheControlEphemeralParam">BetaCacheControlEphemeralParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaCitationCharLocationParam">BetaCitationCharLocationParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaCitationContentBlockLocationParam">BetaCitationContentBlockLocationParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaCitationPageLocationParam">BetaCitationPageLocationParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaCitationSearchResultLocationParam">BetaCitationSearchResultLocationParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaCitationWebSearchResultLocationParam">BetaCitationWebSearchResultLocationParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaCitationsConfigParam">BetaCitationsConfigParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaClearThinking20251015EditParam">BetaClearThinking20251015EditParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaClearToolUses20250919EditParam">BetaClearToolUses20250919EditParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaCodeExecutionOutputBlockParam">BetaCodeExecutionOutputBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaCodeExecutionResultBlockParam">BetaCodeExecutionResultBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaCodeExecutionTool20250522Param">BetaCodeExecutionTool20250522Param</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaCodeExecutionTool20250825Param">BetaCodeExecutionTool20250825Param</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaCodeExecutionTool20260120Param">BetaCodeExecutionTool20260120Param</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaCodeExecutionToolResultBlockParam">BetaCodeExecutionToolResultBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaCodeExecutionToolResultBlockParamContentUnion">BetaCodeExecutionToolResultBlockParamContentUnion</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaCodeExecutionToolResultErrorCode">BetaCodeExecutionToolResultErrorCode</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaCodeExecutionToolResultErrorParam">BetaCodeExecutionToolResultErrorParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaCompact20260112EditParam">BetaCompact20260112EditParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaCompactionBlockParam">BetaCompactionBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaContainerParams">BetaContainerParams</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaContainerUploadBlockParam">BetaContainerUploadBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaContentBlockParamUnion">BetaContentBlockParamUnion</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaContentBlockSourceParam">BetaContentBlockSourceParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaContentBlockSourceContentUnionParam">BetaContentBlockSourceContentUnionParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaContextManagementConfigParam">BetaContextManagementConfigParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaDirectCallerParam">BetaDirectCallerParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaEncryptedCodeExecutionResultBlockParam">BetaEncryptedCodeExecutionResultBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaFileDocumentSourceParam">BetaFileDocumentSourceParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaFileImageSourceParam">BetaFileImageSourceParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaImageBlockParam">BetaImageBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaInputTokensClearAtLeastParam">BetaInputTokensClearAtLeastParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaInputTokensTriggerParam">BetaInputTokensTriggerParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaJSONOutputFormatParam">BetaJSONOutputFormatParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMCPToolConfigParam">BetaMCPToolConfigParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMCPToolDefaultConfigParam">BetaMCPToolDefaultConfigParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMCPToolUseBlockParam">BetaMCPToolUseBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMCPToolsetParam">BetaMCPToolsetParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMemoryTool20250818Param">BetaMemoryTool20250818Param</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMessageParam">BetaMessageParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMetadataParam">BetaMetadataParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaOutputConfigParam">BetaOutputConfigParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaPlainTextSourceParam">BetaPlainTextSourceParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaRedactedThinkingBlockParam">BetaRedactedThinkingBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaRequestDocumentBlockParam">BetaRequestDocumentBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaRequestMCPServerToolConfigurationParam">BetaRequestMCPServerToolConfigurationParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaRequestMCPServerURLDefinitionParam">BetaRequestMCPServerURLDefinitionParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaRequestMCPToolResultBlockParam">BetaRequestMCPToolResultBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaSearchResultBlockParam">BetaSearchResultBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaServerToolCallerParam">BetaServerToolCallerParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaServerToolCaller20260120Param">BetaServerToolCaller20260120Param</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaServerToolUseBlockParam">BetaServerToolUseBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaSkillParams">BetaSkillParams</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaTextBlockParam">BetaTextBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaTextCitationParamUnion">BetaTextCitationParamUnion</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaTextEditorCodeExecutionCreateResultBlockParam">BetaTextEditorCodeExecutionCreateResultBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaTextEditorCodeExecutionStrReplaceResultBlockParam">BetaTextEditorCodeExecutionStrReplaceResultBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaTextEditorCodeExecutionToolResultBlockParam">BetaTextEditorCodeExecutionToolResultBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaTextEditorCodeExecutionToolResultErrorParam">BetaTextEditorCodeExecutionToolResultErrorParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaTextEditorCodeExecutionViewResultBlockParam">BetaTextEditorCodeExecutionViewResultBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaThinkingBlockParam">BetaThinkingBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaThinkingConfigAdaptiveParam">BetaThinkingConfigAdaptiveParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaThinkingConfigDisabledParam">BetaThinkingConfigDisabledParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaThinkingConfigEnabledParam">BetaThinkingConfigEnabledParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaThinkingConfigParamUnion">BetaThinkingConfigParamUnion</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaThinkingTurnsParam">BetaThinkingTurnsParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaToolParam">BetaToolParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaToolBash20241022Param">BetaToolBash20241022Param</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaToolBash20250124Param">BetaToolBash20250124Param</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaToolChoiceUnionParam">BetaToolChoiceUnionParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaToolChoiceAnyParam">BetaToolChoiceAnyParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaToolChoiceAutoParam">BetaToolChoiceAutoParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaToolChoiceNoneParam">BetaToolChoiceNoneParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaToolChoiceToolParam">BetaToolChoiceToolParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaToolComputerUse20241022Param">BetaToolComputerUse20241022Param</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaToolComputerUse20250124Param">BetaToolComputerUse20250124Param</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaToolComputerUse20251124Param">BetaToolComputerUse20251124Param</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaToolReferenceBlockParam">BetaToolReferenceBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaToolResultBlockParam">BetaToolResultBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaToolSearchToolBm25_20251119Param">BetaToolSearchToolBm25_20251119Param</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaToolSearchToolRegex20251119Param">BetaToolSearchToolRegex20251119Param</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaToolSearchToolResultBlockParam">BetaToolSearchToolResultBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaToolSearchToolResultErrorParam">BetaToolSearchToolResultErrorParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaToolSearchToolSearchResultBlockParam">BetaToolSearchToolSearchResultBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaToolTextEditor20241022Param">BetaToolTextEditor20241022Param</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaToolTextEditor20250124Param">BetaToolTextEditor20250124Param</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaToolTextEditor20250429Param">BetaToolTextEditor20250429Param</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaToolTextEditor20250728Param">BetaToolTextEditor20250728Param</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaToolUnionParam">BetaToolUnionParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaToolUseBlockParam">BetaToolUseBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaToolUsesKeepParam">BetaToolUsesKeepParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaToolUsesTriggerParam">BetaToolUsesTriggerParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaURLImageSourceParam">BetaURLImageSourceParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaURLPDFSourceParam">BetaURLPDFSourceParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaUserLocationParam">BetaUserLocationParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaWebFetchBlockParam">BetaWebFetchBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaWebFetchTool20250910Param">BetaWebFetchTool20250910Param</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaWebFetchTool20260209Param">BetaWebFetchTool20260209Param</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaWebFetchTool20260309Param">BetaWebFetchTool20260309Param</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaWebFetchToolResultBlockParam">BetaWebFetchToolResultBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaWebFetchToolResultErrorBlockParam">BetaWebFetchToolResultErrorBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaWebFetchToolResultErrorCode">BetaWebFetchToolResultErrorCode</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaWebSearchResultBlockParam">BetaWebSearchResultBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaWebSearchTool20250305Param">BetaWebSearchTool20250305Param</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaWebSearchTool20260209Param">BetaWebSearchTool20260209Param</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaWebSearchToolRequestErrorParam">BetaWebSearchToolRequestErrorParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaWebSearchToolResultBlockParam">BetaWebSearchToolResultBlockParam</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaWebSearchToolResultBlockParamContentUnion">BetaWebSearchToolResultBlockParamContentUnion</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaWebSearchToolResultErrorCode">BetaWebSearchToolResultErrorCode</a>
Response Types:
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaBase64PDFSource">BetaBase64PDFSource</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaBashCodeExecutionOutputBlock">BetaBashCodeExecutionOutputBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaBashCodeExecutionResultBlock">BetaBashCodeExecutionResultBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaBashCodeExecutionToolResultBlock">BetaBashCodeExecutionToolResultBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaBashCodeExecutionToolResultError">BetaBashCodeExecutionToolResultError</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaCacheCreation">BetaCacheCreation</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaCitationCharLocation">BetaCitationCharLocation</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaCitationConfig">BetaCitationConfig</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaCitationContentBlockLocation">BetaCitationContentBlockLocation</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaCitationPageLocation">BetaCitationPageLocation</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaCitationSearchResultLocation">BetaCitationSearchResultLocation</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaCitationsDelta">BetaCitationsDelta</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaCitationsWebSearchResultLocation">BetaCitationsWebSearchResultLocation</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaClearThinking20251015EditResponse">BetaClearThinking20251015EditResponse</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaClearToolUses20250919EditResponse">BetaClearToolUses20250919EditResponse</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaCodeExecutionOutputBlock">BetaCodeExecutionOutputBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaCodeExecutionResultBlock">BetaCodeExecutionResultBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaCodeExecutionToolResultBlock">BetaCodeExecutionToolResultBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaCodeExecutionToolResultBlockContentUnion">BetaCodeExecutionToolResultBlockContentUnion</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaCodeExecutionToolResultError">BetaCodeExecutionToolResultError</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaCodeExecutionToolResultErrorCode">BetaCodeExecutionToolResultErrorCode</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaCompactionBlock">BetaCompactionBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaCompactionContentBlockDelta">BetaCompactionContentBlockDelta</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaCompactionIterationUsage">BetaCompactionIterationUsage</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaContainer">BetaContainer</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaContainerUploadBlock">BetaContainerUploadBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaContentBlockUnion">BetaContentBlockUnion</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaContextManagementResponse">BetaContextManagementResponse</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaCountTokensContextManagementResponse">BetaCountTokensContextManagementResponse</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaDirectCaller">BetaDirectCaller</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaDocumentBlock">BetaDocumentBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaEncryptedCodeExecutionResultBlock">BetaEncryptedCodeExecutionResultBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaInputJSONDelta">BetaInputJSONDelta</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaIterationsUsage">BetaIterationsUsage</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMCPToolResultBlock">BetaMCPToolResultBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMCPToolUseBlock">BetaMCPToolUseBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMemoryTool20250818CommandUnion">BetaMemoryTool20250818CommandUnion</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMemoryTool20250818CreateCommand">BetaMemoryTool20250818CreateCommand</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMemoryTool20250818DeleteCommand">BetaMemoryTool20250818DeleteCommand</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMemoryTool20250818InsertCommand">BetaMemoryTool20250818InsertCommand</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMemoryTool20250818RenameCommand">BetaMemoryTool20250818RenameCommand</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMemoryTool20250818StrReplaceCommand">BetaMemoryTool20250818StrReplaceCommand</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMemoryTool20250818ViewCommand">BetaMemoryTool20250818ViewCommand</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMessage">BetaMessage</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMessageDeltaUsage">BetaMessageDeltaUsage</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMessageIterationUsage">BetaMessageIterationUsage</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMessageTokensCount">BetaMessageTokensCount</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaPlainTextSource">BetaPlainTextSource</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaRawContentBlockDeltaUnion">BetaRawContentBlockDeltaUnion</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaRawContentBlockDeltaEvent">BetaRawContentBlockDeltaEvent</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaRawContentBlockStartEvent">BetaRawContentBlockStartEvent</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaRawContentBlockStopEvent">BetaRawContentBlockStopEvent</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaRawMessageDeltaEvent">BetaRawMessageDeltaEvent</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaRawMessageStartEvent">BetaRawMessageStartEvent</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaRawMessageStopEvent">BetaRawMessageStopEvent</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaRawMessageStreamEventUnion">BetaRawMessageStreamEventUnion</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaRedactedThinkingBlock">BetaRedactedThinkingBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaServerToolCaller">BetaServerToolCaller</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaServerToolCaller20260120">BetaServerToolCaller20260120</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaServerToolUsage">BetaServerToolUsage</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaServerToolUseBlock">BetaServerToolUseBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaSignatureDelta">BetaSignatureDelta</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaSkill">BetaSkill</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaStopReason">BetaStopReason</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaTextBlock">BetaTextBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaTextCitationUnion">BetaTextCitationUnion</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaTextDelta">BetaTextDelta</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaTextEditorCodeExecutionCreateResultBlock">BetaTextEditorCodeExecutionCreateResultBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaTextEditorCodeExecutionStrReplaceResultBlock">BetaTextEditorCodeExecutionStrReplaceResultBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaTextEditorCodeExecutionToolResultBlock">BetaTextEditorCodeExecutionToolResultBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaTextEditorCodeExecutionToolResultError">BetaTextEditorCodeExecutionToolResultError</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaTextEditorCodeExecutionViewResultBlock">BetaTextEditorCodeExecutionViewResultBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaThinkingBlock">BetaThinkingBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaThinkingDelta">BetaThinkingDelta</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaToolReferenceBlock">BetaToolReferenceBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaToolSearchToolResultBlock">BetaToolSearchToolResultBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaToolSearchToolResultError">BetaToolSearchToolResultError</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaToolSearchToolSearchResultBlock">BetaToolSearchToolSearchResultBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaToolUseBlock">BetaToolUseBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaUsage">BetaUsage</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaWebFetchBlock">BetaWebFetchBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaWebFetchToolResultBlock">BetaWebFetchToolResultBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaWebFetchToolResultErrorBlock">BetaWebFetchToolResultErrorBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaWebFetchToolResultErrorCode">BetaWebFetchToolResultErrorCode</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaWebSearchResultBlock">BetaWebSearchResultBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaWebSearchToolResultBlock">BetaWebSearchToolResultBlock</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaWebSearchToolResultBlockContentUnion">BetaWebSearchToolResultBlockContentUnion</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaWebSearchToolResultError">BetaWebSearchToolResultError</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaWebSearchToolResultErrorCode">BetaWebSearchToolResultErrorCode</a>
Methods:
- <code title="post /v1/messages?beta=true">client.Beta.Messages.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMessageService.New">New</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, params <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMessageNewParams">BetaMessageNewParams</a>) (\*<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMessage">BetaMessage</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="post /v1/messages/count_tokens?beta=true">client.Beta.Messages.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMessageService.CountTokens">CountTokens</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, params <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMessageCountTokensParams">BetaMessageCountTokensParams</a>) (\*<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMessageTokensCount">BetaMessageTokensCount</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
### Batches
Response Types:
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaDeletedMessageBatch">BetaDeletedMessageBatch</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMessageBatch">BetaMessageBatch</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMessageBatchCanceledResult">BetaMessageBatchCanceledResult</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMessageBatchErroredResult">BetaMessageBatchErroredResult</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMessageBatchExpiredResult">BetaMessageBatchExpiredResult</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMessageBatchIndividualResponse">BetaMessageBatchIndividualResponse</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMessageBatchRequestCounts">BetaMessageBatchRequestCounts</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMessageBatchResultUnion">BetaMessageBatchResultUnion</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMessageBatchSucceededResult">BetaMessageBatchSucceededResult</a>
Methods:
- <code title="post /v1/messages/batches?beta=true">client.Beta.Messages.Batches.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMessageBatchService.New">New</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, params <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMessageBatchNewParams">BetaMessageBatchNewParams</a>) (\*<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMessageBatch">BetaMessageBatch</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /v1/messages/batches/{message_batch_id}?beta=true">client.Beta.Messages.Batches.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMessageBatchService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, messageBatchID <a href="https://pkg.go.dev/builtin#string">string</a>, query <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMessageBatchGetParams">BetaMessageBatchGetParams</a>) (\*<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMessageBatch">BetaMessageBatch</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /v1/messages/batches?beta=true">client.Beta.Messages.Batches.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMessageBatchService.List">List</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, params <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMessageBatchListParams">BetaMessageBatchListParams</a>) (\*<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/packages/pagination">pagination</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/packages/pagination#Page">Page</a>[<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMessageBatch">BetaMessageBatch</a>], <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="delete /v1/messages/batches/{message_batch_id}?beta=true">client.Beta.Messages.Batches.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMessageBatchService.Delete">Delete</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, messageBatchID <a href="https://pkg.go.dev/builtin#string">string</a>, body <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMessageBatchDeleteParams">BetaMessageBatchDeleteParams</a>) (\*<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaDeletedMessageBatch">BetaDeletedMessageBatch</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="post /v1/messages/batches/{message_batch_id}/cancel?beta=true">client.Beta.Messages.Batches.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMessageBatchService.Cancel">Cancel</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, messageBatchID <a href="https://pkg.go.dev/builtin#string">string</a>, body <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMessageBatchCancelParams">BetaMessageBatchCancelParams</a>) (\*<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMessageBatch">BetaMessageBatch</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /v1/messages/batches/{message_batch_id}/results?beta=true">client.Beta.Messages.Batches.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMessageBatchService.Results">Results</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, messageBatchID <a href="https://pkg.go.dev/builtin#string">string</a>, query <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMessageBatchResultsParams">BetaMessageBatchResultsParams</a>) (\*<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaMessageBatchIndividualResponse">BetaMessageBatchIndividualResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
## Files
Response Types:
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#DeletedFile">DeletedFile</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#FileMetadata">FileMetadata</a>
Methods:
- <code title="get /v1/files?beta=true">client.Beta.Files.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaFileService.List">List</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, params <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaFileListParams">BetaFileListParams</a>) (\*<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/packages/pagination">pagination</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/packages/pagination#Page">Page</a>[<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#FileMetadata">FileMetadata</a>], <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="delete /v1/files/{file_id}?beta=true">client.Beta.Files.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaFileService.Delete">Delete</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, fileID <a href="https://pkg.go.dev/builtin#string">string</a>, body <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaFileDeleteParams">BetaFileDeleteParams</a>) (\*<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#DeletedFile">DeletedFile</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /v1/files/{file_id}/content?beta=true">client.Beta.Files.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaFileService.Download">Download</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, fileID <a href="https://pkg.go.dev/builtin#string">string</a>, query <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaFileDownloadParams">BetaFileDownloadParams</a>) (\*http.Response, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /v1/files/{file_id}?beta=true">client.Beta.Files.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaFileService.GetMetadata">GetMetadata</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, fileID <a href="https://pkg.go.dev/builtin#string">string</a>, query <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaFileGetMetadataParams">BetaFileGetMetadataParams</a>) (\*<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#FileMetadata">FileMetadata</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="post /v1/files?beta=true">client.Beta.Files.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaFileService.Upload">Upload</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, params <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaFileUploadParams">BetaFileUploadParams</a>) (\*<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#FileMetadata">FileMetadata</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
## Skills
Response Types:
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaSkillNewResponse">BetaSkillNewResponse</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaSkillGetResponse">BetaSkillGetResponse</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaSkillListResponse">BetaSkillListResponse</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaSkillDeleteResponse">BetaSkillDeleteResponse</a>
Methods:
- <code title="post /v1/skills?beta=true">client.Beta.Skills.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaSkillService.New">New</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, params <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaSkillNewParams">BetaSkillNewParams</a>) (\*<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaSkillNewResponse">BetaSkillNewResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /v1/skills/{skill_id}?beta=true">client.Beta.Skills.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaSkillService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, skillID <a href="https://pkg.go.dev/builtin#string">string</a>, query <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaSkillGetParams">BetaSkillGetParams</a>) (\*<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaSkillGetResponse">BetaSkillGetResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /v1/skills?beta=true">client.Beta.Skills.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaSkillService.List">List</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, params <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaSkillListParams">BetaSkillListParams</a>) (\*<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/packages/pagination">pagination</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/packages/pagination#PageCursor">PageCursor</a>[<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaSkillListResponse">BetaSkillListResponse</a>], <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="delete /v1/skills/{skill_id}?beta=true">client.Beta.Skills.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaSkillService.Delete">Delete</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, skillID <a href="https://pkg.go.dev/builtin#string">string</a>, body <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaSkillDeleteParams">BetaSkillDeleteParams</a>) (\*<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaSkillDeleteResponse">BetaSkillDeleteResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
### Versions
Response Types:
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaSkillVersionNewResponse">BetaSkillVersionNewResponse</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaSkillVersionGetResponse">BetaSkillVersionGetResponse</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaSkillVersionListResponse">BetaSkillVersionListResponse</a>
- <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaSkillVersionDeleteResponse">BetaSkillVersionDeleteResponse</a>
Methods:
- <code title="post /v1/skills/{skill_id}/versions?beta=true">client.Beta.Skills.Versions.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaSkillVersionService.New">New</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, skillID <a href="https://pkg.go.dev/builtin#string">string</a>, params <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaSkillVersionNewParams">BetaSkillVersionNewParams</a>) (\*<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaSkillVersionNewResponse">BetaSkillVersionNewResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /v1/skills/{skill_id}/versions/{version}?beta=true">client.Beta.Skills.Versions.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaSkillVersionService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, version <a href="https://pkg.go.dev/builtin#string">string</a>, params <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaSkillVersionGetParams">BetaSkillVersionGetParams</a>) (\*<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaSkillVersionGetResponse">BetaSkillVersionGetResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /v1/skills/{skill_id}/versions?beta=true">client.Beta.Skills.Versions.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaSkillVersionService.List">List</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, skillID <a href="https://pkg.go.dev/builtin#string">string</a>, params <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaSkillVersionListParams">BetaSkillVersionListParams</a>) (\*<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/packages/pagination">pagination</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/packages/pagination#PageCursor">PageCursor</a>[<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaSkillVersionListResponse">BetaSkillVersionListResponse</a>], <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="delete /v1/skills/{skill_id}/versions/{version}?beta=true">client.Beta.Skills.Versions.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaSkillVersionService.Delete">Delete</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, version <a href="https://pkg.go.dev/builtin#string">string</a>, params <a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaSkillVersionDeleteParams">BetaSkillVersionDeleteParams</a>) (\*<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go">anthropic</a>.<a href="https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go#BetaSkillVersionDeleteResponse">BetaSkillVersionDeleteResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
================================================
FILE: bedrock/bedrock.go
================================================
package bedrock
import (
"bytes"
"context"
"crypto/sha256"
"encoding/base64"
"encoding/hex"
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
"os"
"time"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream"
"github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi"
v4 "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/smithy-go/auth/bearer"
"github.com/tidwall/gjson"
"github.com/tidwall/sjson"
"github.com/anthropics/anthropic-sdk-go/internal/requestconfig"
"github.com/anthropics/anthropic-sdk-go/option"
"github.com/anthropics/anthropic-sdk-go/packages/ssestream"
)
const DefaultVersion = "bedrock-2023-05-31"
var DefaultEndpoints = map[string]bool{
"/v1/complete": true,
"/v1/messages": true,
}
func NewStaticBearerTokenProvider(token string) *bearer.StaticTokenProvider {
return &bearer.StaticTokenProvider{
Token: bearer.Token{
Value: token,
CanExpire: false,
},
}
}
type eventstreamChunk struct {
Bytes string `json:"bytes"`
P string `json:"p"`
}
type eventstreamDecoder struct {
eventstream.Decoder
rc io.ReadCloser
evt ssestream.Event
err error
}
func (e *eventstreamDecoder) Close() error {
return e.rc.Close()
}
func (e *eventstreamDecoder) Err() error {
return e.err
}
func (e *eventstreamDecoder) Next() bool {
if e.err != nil {
return false
}
msg, err := e.Decoder.Decode(e.rc, nil)
if err != nil {
e.err = err
return false
}
messageType := msg.Headers.Get(eventstreamapi.MessageTypeHeader)
if messageType == nil {
e.err = fmt.Errorf("%s event header not present", eventstreamapi.MessageTypeHeader)
return false
}
switch messageType.String() {
case eventstreamapi.EventMessageType:
eventType := msg.Headers.Get(eventstreamapi.EventTypeHeader)
if eventType == nil {
e.err = fmt.Errorf("%s event header not present", eventstreamapi.EventTypeHeader)
return false
}
if eventType.String() == "chunk" {
chunk := eventstreamChunk{}
err = json.Unmarshal(msg.Payload, &chunk)
if err != nil {
e.err = err
return false
}
decoded, err := base64.StdEncoding.DecodeString(chunk.Bytes)
if err != nil {
e.err = err
return false
}
e.evt = ssestream.Event{
Type: gjson.GetBytes(decoded, "type").String(),
Data: decoded,
}
}
case eventstreamapi.ExceptionMessageType:
// See https://github.com/aws/aws-sdk-go-v2/blob/885de40869f9bcee29ad11d60967aa0f1b571d46/service/iotsitewise/deserializers.go#L15511C1-L15567C2
exceptionType := msg.Headers.Get(eventstreamapi.ExceptionTypeHeader)
if exceptionType == nil {
e.err = fmt.Errorf("%s event header not present", eventstreamapi.ExceptionTypeHeader)
return false
}
// See https://github.com/aws/aws-sdk-go-v2/blob/885de40869f9bcee29ad11d60967aa0f1b571d46/aws/protocol/restjson/decoder_util.go#L15-L48k
var errInfo struct {
Code string
Type string `json:"__type"`
Message string
}
err = json.Unmarshal(msg.Payload, &errInfo)
if err != nil && err != io.EOF {
e.err = fmt.Errorf("received exception %s: parsing exception payload failed: %w", exceptionType.String(), err)
return false
}
errorCode := "UnknownError"
errorMessage := errorCode
if ev := exceptionType.String(); len(ev) > 0 {
errorCode = ev
} else if len(errInfo.Code) > 0 {
errorCode = errInfo.Code
} else if len(errInfo.Type) > 0 {
errorCode = errInfo.Type
}
if len(errInfo.Message) > 0 {
errorMessage = errInfo.Message
}
e.err = fmt.Errorf("received exception %s: %s", errorCode, errorMessage)
return false
case eventstreamapi.ErrorMessageType:
errorCode := "UnknownError"
errorMessage := errorCode
if header := msg.Headers.Get(eventstreamapi.ErrorCodeHeader); header != nil {
errorCode = header.String()
}
if header := msg.Headers.Get(eventstreamapi.ErrorMessageHeader); header != nil {
errorMessage = header.String()
}
e.err = fmt.Errorf("received error %s: %s", errorCode, errorMessage)
return false
}
return true
}
func (e *eventstreamDecoder) Event() ssestream.Event {
return e.evt
}
var (
_ ssestream.Decoder = &eventstreamDecoder{}
)
func init() {
ssestream.RegisterDecoder("application/vnd.amazon.eventstream", func(rc io.ReadCloser) ssestream.Decoder {
return &eventstreamDecoder{rc: rc}
})
}
// WithLoadDefaultConfig returns a request option which loads the default config for Amazon and registers
// middleware that intercepts request to the Messages API so that this SDK can be used with Amazon Bedrock.
//
// If you already have an [aws.Config], it is recommended that you instead call [WithConfig] directly.
func WithLoadDefaultConfig(ctx context.Context, optFns ...func(*config.LoadOptions) error) option.RequestOption {
cfg, err := config.LoadDefaultConfig(ctx, optFns...)
if err != nil {
panic(err)
}
return WithConfig(cfg)
}
// WithConfig returns a request option that uses the provided config and registers middleware to
// intercept requests to the Messages API, enabling this SDK to work with Amazon Bedrock.
//
// Authentication is determined as follows: if the AWS_BEARER_TOKEN_BEDROCK environment variable is
// set, it is used for bearer token authentication. Otherwise, if cfg.BearerAuthTokenProvider is set,
// it is used. If neither is available, cfg.Credentials is used for AWS SigV4 signing and must be set.
func WithConfig(cfg aws.Config) option.RequestOption {
var credentialErr error
if cfg.BearerAuthTokenProvider == nil {
if token := os.Getenv("AWS_BEARER_TOKEN_BEDROCK"); token != "" {
cfg.BearerAuthTokenProvider = NewStaticBearerTokenProvider(token)
}
} else if cfg.BearerAuthTokenProvider == nil && cfg.Credentials == nil {
credentialErr = fmt.Errorf("expected AWS credentials to be set")
}
signer := v4.NewSigner()
middleware := bedrockMiddleware(signer, cfg)
return requestconfig.RequestOptionFunc(func(rc *requestconfig.RequestConfig) error {
if credentialErr != nil {
return credentialErr
}
return rc.Apply(
option.WithBaseURL(fmt.Sprintf("https://bedrock-runtime.%s.amazonaws.com", cfg.Region)),
option.WithMiddleware(middleware),
)
})
}
func bedrockMiddleware(signer *v4.Signer, cfg aws.Config) option.Middleware {
return func(r *http.Request, next option.MiddlewareNext) (res *http.Response, err error) {
var body []byte
if r.Body != nil {
body, err = io.ReadAll(r.Body)
if err != nil {
return nil, err
}
r.Body.Close()
if !gjson.GetBytes(body, "anthropic_version").Exists() {
body, _ = sjson.SetBytes(body, "anthropic_version", DefaultVersion)
}
// pull the betas off of the header (if set) and put them in the body
if betaHeader := r.Header.Values("anthropic-beta"); len(betaHeader) > 0 {
r.Header.Del("anthropic-beta")
body, err = sjson.SetBytes(body, "anthropic_beta", betaHeader)
if err != nil {
return nil, err
}
}
if r.Method == http.MethodPost && DefaultEndpoints[r.URL.Path] {
model := gjson.GetBytes(body, "model").String()
stream := gjson.GetBytes(body, "stream").Bool()
body, _ = sjson.DeleteBytes(body, "model")
body, _ = sjson.DeleteBytes(body, "stream")
var method string
if stream {
method = "invoke-with-response-stream"
} else {
method = "invoke"
}
r.URL.Path = fmt.Sprintf("/model/%s/%s", model, method)
r.URL.RawPath = fmt.Sprintf("/model/%s/%s", url.QueryEscape(model), method)
}
reader := bytes.NewReader(body)
r.Body = io.NopCloser(reader)
r.GetBody = func() (io.ReadCloser, error) {
_, err := reader.Seek(0, 0)
return io.NopCloser(reader), err
}
r.ContentLength = int64(len(body))
}
// Use bearer token authentication if configured, otherwise fall back to SigV4
if cfg.BearerAuthTokenProvider != nil {
token, err := cfg.BearerAuthTokenProvider.RetrieveBearerToken(r.Context())
if err != nil {
return nil, err
}
r.Header.Set("Authorization", "Bearer "+token.Value)
} else {
ctx := r.Context()
credentials, err := cfg.Credentials.Retrieve(ctx)
if err != nil {
return nil, err
}
hash := sha256.Sum256(body)
err = signer.SignHTTP(ctx, credentials, r, hex.EncodeToString(hash[:]), "bedrock", cfg.Region, time.Now())
if err != nil {
return nil, err
}
}
return next(r)
}
}
================================================
FILE: bedrock/bedrock_test.go
================================================
package bedrock
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
"testing"
"github.com/aws/aws-sdk-go-v2/aws"
v4 "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/credentials"
)
func TestBedrockURLEncoding(t *testing.T) {
testCases := []struct {
name string
model string
stream bool
expectedPath string
expectedRawPath string
}{
{
name: "regular model name",
model: "claude-3-sonnet",
stream: false,
expectedPath: "/model/claude-3-sonnet/invoke",
expectedRawPath: "/model/claude-3-sonnet/invoke",
},
{
name: "regular model name with streaming",
model: "claude-3-sonnet",
stream: true,
expectedPath: "/model/claude-3-sonnet/invoke-with-response-stream",
expectedRawPath: "/model/claude-3-sonnet/invoke-with-response-stream",
},
{
name: "inference profile ARN with slashes",
model: "arn:aws:bedrock:us-east-1:947123456126:application-inference-profile/xv9example4b",
stream: false,
expectedPath: "/model/arn:aws:bedrock:us-east-1:947123456126:application-inference-profile/xv9example4b/invoke",
expectedRawPath: "/model/arn%3Aaws%3Abedrock%3Aus-east-1%3A947123456126%3Aapplication-inference-profile%2Fxv9example4b/invoke",
},
{
name: "inference profile ARN with streaming",
model: "arn:aws:bedrock:us-east-1:947123456126:application-inference-profile/xv9example4b",
stream: true,
expectedPath: "/model/arn:aws:bedrock:us-east-1:947123456126:application-inference-profile/xv9example4b/invoke-with-response-stream",
expectedRawPath: "/model/arn%3Aaws%3Abedrock%3Aus-east-1%3A947123456126%3Aapplication-inference-profile%2Fxv9example4b/invoke-with-response-stream",
},
{
name: "foundation model ARN with colons",
model: "arn:aws:bedrock:us-east-1:123456789012:foundation-model/anthropic.claude-3-sonnet-20240229-v1:0",
stream: false,
expectedPath: "/model/arn:aws:bedrock:us-east-1:123456789012:foundation-model/anthropic.claude-3-sonnet-20240229-v1:0/invoke",
expectedRawPath: "/model/arn%3Aaws%3Abedrock%3Aus-east-1%3A123456789012%3Afoundation-model%2Fanthropic.claude-3-sonnet-20240229-v1%3A0/invoke",
},
}
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
// Create a mock AWS config
cfg := aws.Config{
Region: "us-east-1",
Credentials: credentials.StaticCredentialsProvider{
Value: aws.Credentials{
AccessKeyID: "test-access-key",
SecretAccessKey: "test-secret-key",
},
},
}
signer := v4.NewSigner()
middleware := bedrockMiddleware(signer, cfg)
// Create request body
requestBody := map[string]any{
"model": tc.model,
"stream": tc.stream,
"messages": []map[string]string{
{"role": "user", "content": "Hello"},
},
}
bodyBytes, err := json.Marshal(requestBody)
if err != nil {
t.Fatalf("Failed to marshal request body: %v", err)
}
// Create HTTP request
req, err := http.NewRequest("POST", "https://bedrock-runtime.us-east-1.amazonaws.com/v1/messages", bytes.NewReader(bodyBytes))
if err != nil {
t.Fatalf("Failed to create request: %v", err)
}
req.Header.Set("Content-Type", "application/json")
// Apply middleware
_, err = middleware(req, func(r *http.Request) (*http.Response, error) {
// Verify the URL paths are set correctly
if r.URL.Path != tc.expectedPath {
t.Errorf("Expected Path %q, got %q", tc.expectedPath, r.URL.Path)
}
if r.URL.RawPath != tc.expectedRawPath {
t.Errorf("Expected RawPath %q, got %q", tc.expectedRawPath, r.URL.RawPath)
}
// Verify that the URL string contains the properly encoded path
urlString := r.URL.String()
expectedURL := fmt.Sprintf("https://bedrock-runtime.us-east-1.amazonaws.com%s", tc.expectedRawPath)
if urlString != expectedURL {
t.Errorf("Expected URL %q, got %q", expectedURL, urlString)
}
// Return a dummy response
return &http.Response{
StatusCode: 200,
Body: http.NoBody,
}, nil
})
if err != nil {
t.Fatalf("Middleware failed: %v", err)
}
})
}
}
func TestBedrockBetaHeadersReRoutedThroughBody(t *testing.T) {
// Create a mock AWS config
cfg := aws.Config{
Region: "us-east-1",
Credentials: credentials.StaticCredentialsProvider{
Value: aws.Credentials{
AccessKeyID: "test-access-key",
SecretAccessKey: "test-secret-key",
},
},
}
signer := v4.NewSigner()
middleware := bedrockMiddleware(signer, cfg)
// Create HTTP request with beta headers
type fakeRequest struct {
Model string `json:"model"`
AnthropicBeta []string `json:"anthropic_beta,omitempty"`
Messages []map[string]string `json:"messages"`
}
reqBody := fakeRequest{
Model: "fake-model",
Messages: []map[string]string{
{"role": "user", "content": "Hello"},
},
}
requestBodyBytes, err := json.Marshal(reqBody)
if err != nil {
t.Fatalf("Failed to marshal request body: %v", err)
}
req, err := http.NewRequest("POST", "https://bedrock-runtime.us-east-1.amazonaws.com/v1/messages", bytes.NewReader(requestBodyBytes))
if err != nil {
t.Fatalf("Failed to create request: %v", err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Add("anthropic-beta", "beta-feature-1")
req.Header.Add("anthropic-beta", "beta-feature-2")
// Apply middleware
_, err = middleware(req, func(r *http.Request) (*http.Response, error) {
// Read the modified body
bodyBytes, err := io.ReadAll(r.Body)
if err != nil {
t.Fatalf("Failed to read request body: %v", err)
}
var modifiedBody fakeRequest
err = json.Unmarshal(bodyBytes, &modifiedBody)
if err != nil {
t.Fatalf("Failed to unmarshal modified body: %v", err)
}
// Verify that the anthropic_beta field is present in the body
expectedBetas := []string{"beta-feature-1", "beta-feature-2"}
if len(modifiedBody.AnthropicBeta) != len(expectedBetas) {
t.Fatalf("Expected %d beta features, got %d", len(expectedBetas), len(modifiedBody.AnthropicBeta))
}
for i, beta := range expectedBetas {
if modifiedBody.AnthropicBeta[i] != beta {
t.Errorf("Expected beta feature %q, got %q", beta, modifiedBody.AnthropicBeta[i])
}
}
// Return a dummy response
return &http.Response{
StatusCode: 200,
Body: http.NoBody,
}, nil
})
if err != nil {
t.Fatalf("Middleware failed: %v", err)
}
}
func TestBedrockBearerToken(t *testing.T) {
token := "test-bearer-token"
region := "us-west-2"
cfg := aws.Config{
Region: region,
BearerAuthTokenProvider: NewStaticBearerTokenProvider(token),
}
middleware := bedrockMiddleware(nil, cfg)
requestBody := map[string]any{
"model": "claude-3-sonnet",
"messages": []map[string]string{
{"role": "user", "content": "Hello"},
},
}
bodyBytes, err := json.Marshal(requestBody)
if err != nil {
t.Fatalf("Failed to marshal request body: %v", err)
}
req, err := http.NewRequest("POST", "https://bedrock-runtime.us-west-2.amazonaws.com/v1/messages", bytes.NewReader(bodyBytes))
if err != nil {
t.Fatalf("Failed to create request: %v", err)
}
req.Header.Set("Content-Type", "application/json")
_, err = middleware(req, func(r *http.Request) (*http.Response, error) {
authHeader := r.Header.Get("Authorization")
expectedAuth := "Bearer " + token
if authHeader != expectedAuth {
t.Errorf("Expected Authorization header %q, got %q", expectedAuth, authHeader)
}
if r.Header.Get("X-Amz-Date") != "" {
t.Error("Expected no AWS SigV4 headers when using bearer token")
}
return &http.Response{
StatusCode: 200,
Body: http.NoBody,
}, nil
})
if err != nil {
t.Fatalf("Middleware failed: %v", err)
}
}
================================================
FILE: beta.go
================================================
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
package anthropic
import (
"encoding/json"
"github.com/anthropics/anthropic-sdk-go/internal/apijson"
"github.com/anthropics/anthropic-sdk-go/option"
"github.com/anthropics/anthropic-sdk-go/packages/respjson"
"github.com/anthropics/anthropic-sdk-go/shared/constant"
)
// BetaService contains methods and other services that help with interacting with
// the anthropic API.
//
// Note, unlike clients, this service does not read variables from the environment
// automatically. You should not instantiate this service directly, and instead use
// the [NewBetaService] method instead.
type BetaService struct {
Options []option.RequestOption
Models BetaModelService
Messages BetaMessageService
Files BetaFileService
Skills BetaSkillService
}
// NewBetaService generates a new service that applies the given options to each
// request. These options are applied after the parent client's options (if there
// is one), and before any request-specific options.
func NewBetaService(opts ...option.RequestOption) (r BetaService) {
r = BetaService{}
r.Options = opts
r.Models = NewBetaModelService(opts...)
r.Messages = NewBetaMessageService(opts...)
r.Files = NewBetaFileService(opts...)
r.Skills = NewBetaSkillService(opts...)
return
}
type AnthropicBeta = string
const (
AnthropicBetaMessageBatches2024_09_24 AnthropicBeta = "message-batches-2024-09-24"
AnthropicBetaPromptCaching2024_07_31 AnthropicBeta = "prompt-caching-2024-07-31"
AnthropicBetaComputerUse2024_10_22 AnthropicBeta = "computer-use-2024-10-22"
AnthropicBetaComputerUse2025_01_24 AnthropicBeta = "computer-use-2025-01-24"
AnthropicBetaPDFs2024_09_25 AnthropicBeta = "pdfs-2024-09-25"
AnthropicBetaTokenCounting2024_11_01 AnthropicBeta = "token-counting-2024-11-01"
AnthropicBetaTokenEfficientTools2025_02_19 AnthropicBeta = "token-efficient-tools-2025-02-19"
AnthropicBetaOutput128k2025_02_19 AnthropicBeta = "output-128k-2025-02-19"
AnthropicBetaFilesAPI2025_04_14 AnthropicBeta = "files-api-2025
gitextract_ngkaakcw/
├── .devcontainer/
│ └── devcontainer.json
├── .github/
│ ├── CODEOWNERS
│ └── workflows/
│ ├── ci.yml
│ ├── claude.yml
│ ├── create-releases.yml
│ └── detect-breaking-changes.yml
├── .gitignore
├── .release-please-manifest.json
├── .stats.yml
├── Brewfile
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── SECURITY.md
├── aliases.go
├── api.md
├── bedrock/
│ ├── bedrock.go
│ └── bedrock_test.go
├── beta.go
├── betafile.go
├── betafile_test.go
├── betamessage.go
├── betamessage_test.go
├── betamessagebatch.go
├── betamessagebatch_test.go
├── betamessageutil.go
├── betamodel.go
├── betamodel_test.go
├── betaskill.go
├── betaskill_test.go
├── betaskillversion.go
├── betaskillversion_test.go
├── betatoolrunner.go
├── client.go
├── client_test.go
├── completion.go
├── completion_test.go
├── examples/
│ ├── .keep
│ ├── bedrock/
│ │ └── main.go
│ ├── bedrock-bearer-token/
│ │ └── main.go
│ ├── bedrock-streaming/
│ │ └── main.go
│ ├── file-upload/
│ │ ├── file.txt
│ │ └── main.go
│ ├── go.mod
│ ├── go.sum
│ ├── message/
│ │ └── main.go
│ ├── message-mcp-streaming/
│ │ └── main.go
│ ├── message-streaming/
│ │ └── main.go
│ ├── multimodal/
│ │ └── main.go
│ ├── structured-outputs/
│ │ └── main.go
│ ├── tool-runner/
│ │ └── main.go
│ ├── tool-runner-streaming/
│ │ └── main.go
│ ├── tools/
│ │ └── main.go
│ ├── tools-streaming/
│ │ └── main.go
│ ├── tools-streaming-jsonschema/
│ │ └── main.go
│ ├── vertex/
│ │ └── main.go
│ └── vertex-streaming/
│ └── main.go
├── field.go
├── go.mod
├── go.sum
├── internal/
│ ├── apierror/
│ │ └── apierror.go
│ ├── apiform/
│ │ ├── encoder.go
│ │ ├── form.go
│ │ ├── form_test.go
│ │ ├── richparam.go
│ │ └── tag.go
│ ├── apijson/
│ │ ├── decodeparam_test.go
│ │ ├── decoder.go
│ │ ├── decoderesp_test.go
│ │ ├── encoder.go
│ │ ├── enum.go
│ │ ├── enum_test.go
│ │ ├── field.go
│ │ ├── json_test.go
│ │ ├── port.go
│ │ ├── port_test.go
│ │ ├── registry.go
│ │ ├── subfield.go
│ │ ├── tag.go
│ │ └── union.go
│ ├── apiquery/
│ │ ├── encoder.go
│ │ ├── query.go
│ │ ├── query_test.go
│ │ ├── richparam.go
│ │ └── tag.go
│ ├── encoding/
│ │ └── json/
│ │ ├── decode.go
│ │ ├── encode.go
│ │ ├── fold.go
│ │ ├── indent.go
│ │ ├── scanner.go
│ │ ├── sentinel/
│ │ │ ├── null.go
│ │ │ └── sentinel_test.go
│ │ ├── shims/
│ │ │ └── shims.go
│ │ ├── stream.go
│ │ ├── tables.go
│ │ ├── tags.go
│ │ └── time.go
│ ├── paramutil/
│ │ ├── field.go
│ │ └── union.go
│ ├── requestconfig/
│ │ ├── requestconfig.go
│ │ └── requestconfig_test.go
│ ├── testutil/
│ │ ├── golden.go
│ │ ├── testutil.go
│ │ └── vcr.go
│ └── version.go
├── lib/
│ └── .keep
├── message.go
├── message_test.go
├── messagebatch.go
├── messagebatch_test.go
├── messageutil.go
├── messageutil_test.go
├── model.go
├── model_test.go
├── option/
│ ├── middleware.go
│ └── requestoption.go
├── packages/
│ ├── jsonl/
│ │ └── jsonl.go
│ ├── pagination/
│ │ └── pagination.go
│ ├── param/
│ │ ├── encoder.go
│ │ ├── encoder_test.go
│ │ ├── null.go
│ │ ├── null_test.go
│ │ ├── option.go
│ │ └── param.go
│ ├── respjson/
│ │ ├── decoder_test.go
│ │ └── respjson.go
│ └── ssestream/
│ └── ssestream.go
├── paginationauto_test.go
├── paginationmanual_test.go
├── release-please-config.json
├── schemautil.go
├── schemautil_test.go
├── scripts/
│ ├── bootstrap
│ ├── detect-breaking-changes
│ ├── format
│ ├── lint
│ ├── mock
│ ├── test
│ └── utils/
│ └── upload-artifact.sh
├── shared/
│ ├── constant/
│ │ └── constants.go
│ └── shared.go
├── toolrunner/
│ ├── runner_test.go
│ ├── testdata/
│ │ ├── cassettes/
│ │ │ ├── tool_runner_basic.yaml
│ │ │ ├── tool_runner_concurrent.yaml
│ │ │ ├── tool_runner_context_cancel.yaml
│ │ │ ├── tool_runner_custom_handling.yaml
│ │ │ ├── tool_runner_max_iterations.yaml
│ │ │ ├── tool_runner_next_message.yaml
│ │ │ ├── tool_runner_next_streaming.yaml
│ │ │ ├── tool_runner_run_to_completion.yaml
│ │ │ ├── tool_runner_streaming_all.yaml
│ │ │ └── tool_runner_tool_call_error.yaml
│ │ └── snapshots/
│ │ ├── tool_runner_basic.golden
│ │ ├── tool_runner_next_message_step_1.golden
│ │ ├── tool_runner_next_message_step_2.golden
│ │ ├── tool_runner_next_streaming_types.golden
│ │ ├── tool_runner_run_to_completion.golden
│ │ ├── tool_runner_streaming_all.golden
│ │ └── tool_runner_tool_call_error_assistant.golden
│ └── tool.go
├── tools.md
├── usage_test.go
└── vertex/
└── vertex.go
Showing preview only (437K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (4382 symbols across 114 files)
FILE: aliases.go
constant WebSearchToolRequestErrorErrorCodeInvalidToolInput (line 61) | WebSearchToolRequestErrorErrorCodeInvalidToolInput = WebSearchToolResult...
constant WebSearchToolRequestErrorErrorCodeUnavailable (line 62) | WebSearchToolRequestErrorErrorCodeUnavailable = WebSearchToolResultError...
constant WebSearchToolRequestErrorErrorCodeMaxUsesExceeded (line 63) | WebSearchToolRequestErrorErrorCodeMaxUsesExceeded = WebSearchToolResultE...
constant WebSearchToolRequestErrorErrorCodeTooManyRequests (line 64) | WebSearchToolRequestErrorErrorCodeTooManyRequests = WebSearchToolResultE...
constant WebSearchToolRequestErrorErrorCodeQueryTooLong (line 65) | WebSearchToolRequestErrorErrorCodeQueryTooLong = WebSearchToolResultErro...
constant WebSearchToolRequestErrorErrorCodeRequestTooLarge (line 66) | WebSearchToolRequestErrorErrorCodeRequestTooLarge = WebSearchToolResultE...
constant WebSearchToolResultErrorErrorCodeInvalidToolInput (line 67) | WebSearchToolResultErrorErrorCodeInvalidToolInput = WebSearchToolResultE...
constant WebSearchToolResultErrorErrorCodeUnavailable (line 68) | WebSearchToolResultErrorErrorCodeUnavailable = WebSearchToolResultErrorC...
constant WebSearchToolResultErrorErrorCodeMaxUsesExceeded (line 69) | WebSearchToolResultErrorErrorCodeMaxUsesExceeded = WebSearchToolResultEr...
constant WebSearchToolResultErrorErrorCodeTooManyRequests (line 70) | WebSearchToolResultErrorErrorCodeTooManyRequests = WebSearchToolResultEr...
constant WebSearchToolResultErrorErrorCodeQueryTooLong (line 71) | WebSearchToolResultErrorErrorCodeQueryTooLong = WebSearchToolResultError...
constant WebSearchToolResultErrorErrorCodeRequestTooLarge (line 72) | WebSearchToolResultErrorErrorCodeRequestTooLarge = WebSearchToolResultEr...
FILE: bedrock/bedrock.go
constant DefaultVersion (line 31) | DefaultVersion = "bedrock-2023-05-31"
function NewStaticBearerTokenProvider (line 38) | func NewStaticBearerTokenProvider(token string) *bearer.StaticTokenProvi...
type eventstreamChunk (line 47) | type eventstreamChunk struct
type eventstreamDecoder (line 52) | type eventstreamDecoder struct
method Close (line 60) | func (e *eventstreamDecoder) Close() error {
method Err (line 64) | func (e *eventstreamDecoder) Err() error {
method Next (line 68) | func (e *eventstreamDecoder) Next() bool {
method Event (line 163) | func (e *eventstreamDecoder) Event() ssestream.Event {
function init (line 171) | func init() {
function WithLoadDefaultConfig (line 181) | func WithLoadDefaultConfig(ctx context.Context, optFns ...func(*config.L...
function WithConfig (line 195) | func WithConfig(cfg aws.Config) option.RequestOption {
function bedrockMiddleware (line 220) | func bedrockMiddleware(signer *v4.Signer, cfg aws.Config) option.Middlew...
FILE: bedrock/bedrock_test.go
function TestBedrockURLEncoding (line 16) | func TestBedrockURLEncoding(t *testing.T) {
function TestBedrockBetaHeadersReRoutedThroughBody (line 130) | func TestBedrockBetaHeadersReRoutedThroughBody(t *testing.T) {
function TestBedrockBearerToken (line 206) | func TestBedrockBearerToken(t *testing.T) {
FILE: beta.go
type BetaService (line 20) | type BetaService struct
function NewBetaService (line 31) | func NewBetaService(opts ...option.RequestOption) (r BetaService) {
constant AnthropicBetaMessageBatches2024_09_24 (line 44) | AnthropicBetaMessageBatches2024_09_24 AnthropicBeta = "messa...
constant AnthropicBetaPromptCaching2024_07_31 (line 45) | AnthropicBetaPromptCaching2024_07_31 AnthropicBeta = "promp...
constant AnthropicBetaComputerUse2024_10_22 (line 46) | AnthropicBetaComputerUse2024_10_22 AnthropicBeta = "compu...
constant AnthropicBetaComputerUse2025_01_24 (line 47) | AnthropicBetaComputerUse2025_01_24 AnthropicBeta = "compu...
constant AnthropicBetaPDFs2024_09_25 (line 48) | AnthropicBetaPDFs2024_09_25 AnthropicBeta = "pdfs-...
constant AnthropicBetaTokenCounting2024_11_01 (line 49) | AnthropicBetaTokenCounting2024_11_01 AnthropicBeta = "token...
constant AnthropicBetaTokenEfficientTools2025_02_19 (line 50) | AnthropicBetaTokenEfficientTools2025_02_19 AnthropicBeta = "token...
constant AnthropicBetaOutput128k2025_02_19 (line 51) | AnthropicBetaOutput128k2025_02_19 AnthropicBeta = "outpu...
constant AnthropicBetaFilesAPI2025_04_14 (line 52) | AnthropicBetaFilesAPI2025_04_14 AnthropicBeta = "files...
constant AnthropicBetaMCPClient2025_04_04 (line 53) | AnthropicBetaMCPClient2025_04_04 AnthropicBeta = "mcp-c...
constant AnthropicBetaMCPClient2025_11_20 (line 54) | AnthropicBetaMCPClient2025_11_20 AnthropicBeta = "mcp-c...
constant AnthropicBetaDevFullThinking2025_05_14 (line 55) | AnthropicBetaDevFullThinking2025_05_14 AnthropicBeta = "dev-f...
constant AnthropicBetaInterleavedThinking2025_05_14 (line 56) | AnthropicBetaInterleavedThinking2025_05_14 AnthropicBeta = "inter...
constant AnthropicBetaCodeExecution2025_05_22 (line 57) | AnthropicBetaCodeExecution2025_05_22 AnthropicBeta = "code-...
constant AnthropicBetaExtendedCacheTTL2025_04_11 (line 58) | AnthropicBetaExtendedCacheTTL2025_04_11 AnthropicBeta = "exten...
constant AnthropicBetaContext1m2025_08_07 (line 59) | AnthropicBetaContext1m2025_08_07 AnthropicBeta = "conte...
constant AnthropicBetaContextManagement2025_06_27 (line 60) | AnthropicBetaContextManagement2025_06_27 AnthropicBeta = "conte...
constant AnthropicBetaModelContextWindowExceeded2025_08_26 (line 61) | AnthropicBetaModelContextWindowExceeded2025_08_26 AnthropicBeta = "model...
constant AnthropicBetaSkills2025_10_02 (line 62) | AnthropicBetaSkills2025_10_02 AnthropicBeta = "skill...
constant AnthropicBetaFastMode2026_02_01 (line 63) | AnthropicBetaFastMode2026_02_01 AnthropicBeta = "fast-...
type BetaAPIError (line 66) | type BetaAPIError struct
method RawJSON (line 79) | func (r BetaAPIError) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 80) | func (r *BetaAPIError) UnmarshalJSON(data []byte) error {
method implBetaErrorUnion (line 154) | func (BetaAPIError) implBetaErrorUnion() {}
type BetaAuthenticationError (line 84) | type BetaAuthenticationError struct
method RawJSON (line 97) | func (r BetaAuthenticationError) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 98) | func (r *BetaAuthenticationError) UnmarshalJSON(data []byte) error {
method implBetaErrorUnion (line 148) | func (BetaAuthenticationError) implBetaErrorUnion() {}
type BetaBillingError (line 102) | type BetaBillingError struct
method RawJSON (line 115) | func (r BetaBillingError) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 116) | func (r *BetaBillingError) UnmarshalJSON(data []byte) error {
method implBetaErrorUnion (line 149) | func (BetaBillingError) implBetaErrorUnion() {}
type BetaErrorUnion (line 128) | type BetaErrorUnion struct
method AsAny (line 172) | func (u BetaErrorUnion) AsAny() anyBetaError {
method AsInvalidRequestError (line 196) | func (u BetaErrorUnion) AsInvalidRequestError() (v BetaInvalidRequestE...
method AsAuthenticationError (line 201) | func (u BetaErrorUnion) AsAuthenticationError() (v BetaAuthenticationE...
method AsBillingError (line 206) | func (u BetaErrorUnion) AsBillingError() (v BetaBillingError) {
method AsPermissionError (line 211) | func (u BetaErrorUnion) AsPermissionError() (v BetaPermissionError) {
method AsNotFoundError (line 216) | func (u BetaErrorUnion) AsNotFoundError() (v BetaNotFoundError) {
method AsRateLimitError (line 221) | func (u BetaErrorUnion) AsRateLimitError() (v BetaRateLimitError) {
method AsTimeoutError (line 226) | func (u BetaErrorUnion) AsTimeoutError() (v BetaGatewayTimeoutError) {
method AsAPIError (line 231) | func (u BetaErrorUnion) AsAPIError() (v BetaAPIError) {
method AsOverloadedError (line 236) | func (u BetaErrorUnion) AsOverloadedError() (v BetaOverloadedError) {
method RawJSON (line 242) | func (u BetaErrorUnion) RawJSON() string { return u.JSON.raw }
method UnmarshalJSON (line 244) | func (r *BetaErrorUnion) UnmarshalJSON(data []byte) error {
type anyBetaError (line 143) | type anyBetaError interface
type BetaErrorResponse (line 248) | type BetaErrorResponse struct
method RawJSON (line 263) | func (r BetaErrorResponse) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 264) | func (r *BetaErrorResponse) UnmarshalJSON(data []byte) error {
type BetaGatewayTimeoutError (line 268) | type BetaGatewayTimeoutError struct
method implBetaErrorUnion (line 153) | func (BetaGatewayTimeoutError) implBetaErrorUnion() {}
method RawJSON (line 281) | func (r BetaGatewayTimeoutError) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 282) | func (r *BetaGatewayTimeoutError) UnmarshalJSON(data []byte) error {
type BetaInvalidRequestError (line 286) | type BetaInvalidRequestError struct
method implBetaErrorUnion (line 147) | func (BetaInvalidRequestError) implBetaErrorUnion() {}
method RawJSON (line 299) | func (r BetaInvalidRequestError) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 300) | func (r *BetaInvalidRequestError) UnmarshalJSON(data []byte) error {
type BetaNotFoundError (line 304) | type BetaNotFoundError struct
method implBetaErrorUnion (line 151) | func (BetaNotFoundError) implBetaErrorUnion() {}
method RawJSON (line 317) | func (r BetaNotFoundError) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 318) | func (r *BetaNotFoundError) UnmarshalJSON(data []byte) error {
type BetaOverloadedError (line 322) | type BetaOverloadedError struct
method implBetaErrorUnion (line 155) | func (BetaOverloadedError) implBetaErrorUnion() {}
method RawJSON (line 335) | func (r BetaOverloadedError) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 336) | func (r *BetaOverloadedError) UnmarshalJSON(data []byte) error {
type BetaPermissionError (line 340) | type BetaPermissionError struct
method implBetaErrorUnion (line 150) | func (BetaPermissionError) implBetaErrorUnion() {}
method RawJSON (line 353) | func (r BetaPermissionError) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 354) | func (r *BetaPermissionError) UnmarshalJSON(data []byte) error {
type BetaRateLimitError (line 358) | type BetaRateLimitError struct
method implBetaErrorUnion (line 152) | func (BetaRateLimitError) implBetaErrorUnion() {}
method RawJSON (line 371) | func (r BetaRateLimitError) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 372) | func (r *BetaRateLimitError) UnmarshalJSON(data []byte) error {
FILE: betafile.go
type BetaFileService (line 34) | type BetaFileService struct
method List (line 48) | func (r *BetaFileService) List(ctx context.Context, params BetaFileLis...
method ListAutoPaging (line 69) | func (r *BetaFileService) ListAutoPaging(ctx context.Context, params B...
method Delete (line 74) | func (r *BetaFileService) Delete(ctx context.Context, fileID string, b...
method Download (line 90) | func (r *BetaFileService) Download(ctx context.Context, fileID string,...
method GetMetadata (line 106) | func (r *BetaFileService) GetMetadata(ctx context.Context, fileID stri...
method Upload (line 122) | func (r *BetaFileService) Upload(ctx context.Context, params BetaFileU...
function NewBetaFileService (line 41) | func NewBetaFileService(opts ...option.RequestOption) (r BetaFileService) {
type DeletedFile (line 133) | type DeletedFile struct
method RawJSON (line 152) | func (r DeletedFile) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 153) | func (r *DeletedFile) UnmarshalJSON(data []byte) error {
type DeletedFileType (line 160) | type DeletedFileType
constant DeletedFileTypeFileDeleted (line 163) | DeletedFileTypeFileDeleted DeletedFileType = "file_deleted"
type FileMetadata (line 166) | type FileMetadata struct
method RawJSON (line 200) | func (r FileMetadata) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 201) | func (r *FileMetadata) UnmarshalJSON(data []byte) error {
type BetaFileListParams (line 205) | type BetaFileListParams struct
method URLQuery (line 222) | func (r BetaFileListParams) URLQuery() (v url.Values, err error) {
type BetaFileDeleteParams (line 229) | type BetaFileDeleteParams struct
type BetaFileDownloadParams (line 235) | type BetaFileDownloadParams struct
type BetaFileGetMetadataParams (line 241) | type BetaFileGetMetadataParams struct
type BetaFileUploadParams (line 247) | type BetaFileUploadParams struct
method MarshalMultipart (line 255) | func (r BetaFileUploadParams) MarshalMultipart() (data []byte, content...
FILE: betafile_test.go
function TestBetaFileListWithOptionalParams (line 20) | func TestBetaFileListWithOptionalParams(t *testing.T) {
function TestBetaFileDeleteWithOptionalParams (line 47) | func TestBetaFileDeleteWithOptionalParams(t *testing.T) {
function TestBetaFileDownloadWithOptionalParams (line 75) | func TestBetaFileDownloadWithOptionalParams(t *testing.T) {
function TestBetaFileGetMetadataWithOptionalParams (line 115) | func TestBetaFileGetMetadataWithOptionalParams(t *testing.T) {
function TestBetaFileUploadWithOptionalParams (line 143) | func TestBetaFileUploadWithOptionalParams(t *testing.T) {
FILE: betamessage.go
type BetaMessageService (line 29) | type BetaMessageService struct
method New (line 54) | func (r *BetaMessageService) New(ctx context.Context, params BetaMessa...
method NewStreaming (line 83) | func (r *BetaMessageService) NewStreaming(ctx context.Context, params ...
method CountTokens (line 105) | func (r *BetaMessageService) CountTokens(ctx context.Context, params B...
function NewBetaMessageService (line 37) | func NewBetaMessageService(opts ...option.RequestOption) (r BetaMessageS...
function NewBetaAllThinkingTurnsParam (line 115) | func NewBetaAllThinkingTurnsParam() BetaAllThinkingTurnsParam {
type BetaAllThinkingTurnsParam (line 123) | type BetaAllThinkingTurnsParam struct
method MarshalJSON (line 128) | func (r BetaAllThinkingTurnsParam) MarshalJSON() (data []byte, err err...
method UnmarshalJSON (line 132) | func (r *BetaAllThinkingTurnsParam) UnmarshalJSON(data []byte) error {
type BetaBase64ImageSourceParam (line 137) | type BetaBase64ImageSourceParam struct
method MarshalJSON (line 146) | func (r BetaBase64ImageSourceParam) MarshalJSON() (data []byte, err er...
method UnmarshalJSON (line 150) | func (r *BetaBase64ImageSourceParam) UnmarshalJSON(data []byte) error {
type BetaBase64ImageSourceMediaType (line 154) | type BetaBase64ImageSourceMediaType
constant BetaBase64ImageSourceMediaTypeImageJPEG (line 157) | BetaBase64ImageSourceMediaTypeImageJPEG BetaBase64ImageSourceMediaType =...
constant BetaBase64ImageSourceMediaTypeImagePNG (line 158) | BetaBase64ImageSourceMediaTypeImagePNG BetaBase64ImageSourceMediaType =...
constant BetaBase64ImageSourceMediaTypeImageGIF (line 159) | BetaBase64ImageSourceMediaTypeImageGIF BetaBase64ImageSourceMediaType =...
constant BetaBase64ImageSourceMediaTypeImageWebP (line 160) | BetaBase64ImageSourceMediaTypeImageWebP BetaBase64ImageSourceMediaType =...
type BetaBase64PDFSource (line 163) | type BetaBase64PDFSource struct
method RawJSON (line 178) | func (r BetaBase64PDFSource) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 179) | func (r *BetaBase64PDFSource) UnmarshalJSON(data []byte) error {
method ToParam (line 188) | func (r BetaBase64PDFSource) ToParam() BetaBase64PDFSourceParam {
method implBetaDocumentBlockSourceUnion (line 3760) | func (BetaBase64PDFSource) implBetaDocumentBlockSourceUnion() {}
type BetaBase64PDFSourceParam (line 193) | type BetaBase64PDFSourceParam struct
method MarshalJSON (line 202) | func (r BetaBase64PDFSourceParam) MarshalJSON() (data []byte, err erro...
method UnmarshalJSON (line 206) | func (r *BetaBase64PDFSourceParam) UnmarshalJSON(data []byte) error {
type BetaBashCodeExecutionOutputBlock (line 210) | type BetaBashCodeExecutionOutputBlock struct
method RawJSON (line 223) | func (r BetaBashCodeExecutionOutputBlock) RawJSON() string { return r....
method UnmarshalJSON (line 224) | func (r *BetaBashCodeExecutionOutputBlock) UnmarshalJSON(data []byte) ...
type BetaBashCodeExecutionOutputBlockParam (line 229) | type BetaBashCodeExecutionOutputBlockParam struct
method MarshalJSON (line 237) | func (r BetaBashCodeExecutionOutputBlockParam) MarshalJSON() (data []b...
method UnmarshalJSON (line 241) | func (r *BetaBashCodeExecutionOutputBlockParam) UnmarshalJSON(data []b...
type BetaBashCodeExecutionResultBlock (line 245) | type BetaBashCodeExecutionResultBlock struct
method RawJSON (line 264) | func (r BetaBashCodeExecutionResultBlock) RawJSON() string { return r....
method UnmarshalJSON (line 265) | func (r *BetaBashCodeExecutionResultBlock) UnmarshalJSON(data []byte) ...
type BetaBashCodeExecutionResultBlockParam (line 270) | type BetaBashCodeExecutionResultBlockParam struct
method MarshalJSON (line 281) | func (r BetaBashCodeExecutionResultBlockParam) MarshalJSON() (data []b...
method UnmarshalJSON (line 285) | func (r *BetaBashCodeExecutionResultBlockParam) UnmarshalJSON(data []b...
type BetaBashCodeExecutionToolResultBlock (line 289) | type BetaBashCodeExecutionToolResultBlock struct
method RawJSON (line 304) | func (r BetaBashCodeExecutionToolResultBlock) RawJSON() string { retur...
method UnmarshalJSON (line 305) | func (r *BetaBashCodeExecutionToolResultBlock) UnmarshalJSON(data []by...
method implBetaContentBlockUnion (line 2053) | func (BetaBashCodeExecutionToolResultBlock) implBetaContentBlockUnion(...
method implBetaRawContentBlockStartEventContentBlockUnion (line 5154) | func (BetaBashCodeExecutionToolResultBlock) implBetaRawContentBlockSta...
type BetaBashCodeExecutionToolResultBlockContentUnion (line 314) | type BetaBashCodeExecutionToolResultBlockContentUnion struct
method AsResponseBashCodeExecutionToolResultError (line 337) | func (u BetaBashCodeExecutionToolResultBlockContentUnion) AsResponseBa...
method AsResponseBashCodeExecutionResultBlock (line 342) | func (u BetaBashCodeExecutionToolResultBlockContentUnion) AsResponseBa...
method RawJSON (line 348) | func (u BetaBashCodeExecutionToolResultBlockContentUnion) RawJSON() st...
method UnmarshalJSON (line 350) | func (r *BetaBashCodeExecutionToolResultBlockContentUnion) UnmarshalJS...
type BetaBashCodeExecutionToolResultBlockParam (line 355) | type BetaBashCodeExecutionToolResultBlockParam struct
method MarshalJSON (line 366) | func (r BetaBashCodeExecutionToolResultBlockParam) MarshalJSON() (data...
method UnmarshalJSON (line 370) | func (r *BetaBashCodeExecutionToolResultBlockParam) UnmarshalJSON(data...
type BetaBashCodeExecutionToolResultBlockParamContentUnion (line 377) | type BetaBashCodeExecutionToolResultBlockParamContentUnion struct
method MarshalJSON (line 383) | func (u BetaBashCodeExecutionToolResultBlockParamContentUnion) Marshal...
method UnmarshalJSON (line 386) | func (u *BetaBashCodeExecutionToolResultBlockParamContentUnion) Unmars...
method asAny (line 390) | func (u *BetaBashCodeExecutionToolResultBlockParamContentUnion) asAny(...
method GetErrorCode (line 400) | func (u BetaBashCodeExecutionToolResultBlockParamContentUnion) GetErro...
method GetContent (line 408) | func (u BetaBashCodeExecutionToolResultBlockParamContentUnion) GetCont...
method GetReturnCode (line 416) | func (u BetaBashCodeExecutionToolResultBlockParamContentUnion) GetRetu...
method GetStderr (line 424) | func (u BetaBashCodeExecutionToolResultBlockParamContentUnion) GetStde...
method GetStdout (line 432) | func (u BetaBashCodeExecutionToolResultBlockParamContentUnion) GetStdo...
method GetType (line 440) | func (u BetaBashCodeExecutionToolResultBlockParamContentUnion) GetType...
type BetaBashCodeExecutionToolResultError (line 449) | type BetaBashCodeExecutionToolResultError struct
method RawJSON (line 464) | func (r BetaBashCodeExecutionToolResultError) RawJSON() string { retur...
method UnmarshalJSON (line 465) | func (r *BetaBashCodeExecutionToolResultError) UnmarshalJSON(data []by...
type BetaBashCodeExecutionToolResultErrorErrorCode (line 469) | type BetaBashCodeExecutionToolResultErrorErrorCode
constant BetaBashCodeExecutionToolResultErrorErrorCodeInvalidToolInput (line 472) | BetaBashCodeExecutionToolResultErrorErrorCodeInvalidToolInput BetaB...
constant BetaBashCodeExecutionToolResultErrorErrorCodeUnavailable (line 473) | BetaBashCodeExecutionToolResultErrorErrorCodeUnavailable BetaB...
constant BetaBashCodeExecutionToolResultErrorErrorCodeTooManyRequests (line 474) | BetaBashCodeExecutionToolResultErrorErrorCodeTooManyRequests BetaB...
constant BetaBashCodeExecutionToolResultErrorErrorCodeExecutionTimeExceeded (line 475) | BetaBashCodeExecutionToolResultErrorErrorCodeExecutionTimeExceeded BetaB...
constant BetaBashCodeExecutionToolResultErrorErrorCodeOutputFileTooLarge (line 476) | BetaBashCodeExecutionToolResultErrorErrorCodeOutputFileTooLarge BetaB...
type BetaBashCodeExecutionToolResultErrorParam (line 480) | type BetaBashCodeExecutionToolResultErrorParam struct
method MarshalJSON (line 490) | func (r BetaBashCodeExecutionToolResultErrorParam) MarshalJSON() (data...
method UnmarshalJSON (line 494) | func (r *BetaBashCodeExecutionToolResultErrorParam) UnmarshalJSON(data...
type BetaBashCodeExecutionToolResultErrorParamErrorCode (line 498) | type BetaBashCodeExecutionToolResultErrorParamErrorCode
constant BetaBashCodeExecutionToolResultErrorParamErrorCodeInvalidToolInput (line 501) | BetaBashCodeExecutionToolResultErrorParamErrorCodeInvalidToolInput ...
constant BetaBashCodeExecutionToolResultErrorParamErrorCodeUnavailable (line 502) | BetaBashCodeExecutionToolResultErrorParamErrorCodeUnavailable ...
constant BetaBashCodeExecutionToolResultErrorParamErrorCodeTooManyRequests (line 503) | BetaBashCodeExecutionToolResultErrorParamErrorCodeTooManyRequests ...
constant BetaBashCodeExecutionToolResultErrorParamErrorCodeExecutionTimeExceeded (line 504) | BetaBashCodeExecutionToolResultErrorParamErrorCodeExecutionTimeExceeded ...
constant BetaBashCodeExecutionToolResultErrorParamErrorCodeOutputFileTooLarge (line 505) | BetaBashCodeExecutionToolResultErrorParamErrorCodeOutputFileTooLarge ...
function NewBetaCacheControlEphemeralParam (line 508) | func NewBetaCacheControlEphemeralParam() BetaCacheControlEphemeralParam {
type BetaCacheControlEphemeralParam (line 516) | type BetaCacheControlEphemeralParam struct
method MarshalJSON (line 532) | func (r BetaCacheControlEphemeralParam) MarshalJSON() (data []byte, er...
method UnmarshalJSON (line 536) | func (r *BetaCacheControlEphemeralParam) UnmarshalJSON(data []byte) er...
type BetaCacheControlEphemeralTTL (line 548) | type BetaCacheControlEphemeralTTL
constant BetaCacheControlEphemeralTTLTTL5m (line 551) | BetaCacheControlEphemeralTTLTTL5m BetaCacheControlEphemeralTTL = "5m"
constant BetaCacheControlEphemeralTTLTTL1h (line 552) | BetaCacheControlEphemeralTTLTTL1h BetaCacheControlEphemeralTTL = "1h"
type BetaCacheCreation (line 555) | type BetaCacheCreation struct
method RawJSON (line 570) | func (r BetaCacheCreation) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 571) | func (r *BetaCacheCreation) UnmarshalJSON(data []byte) error {
type BetaCitationCharLocation (line 575) | type BetaCitationCharLocation struct
method RawJSON (line 598) | func (r BetaCitationCharLocation) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 599) | func (r *BetaCitationCharLocation) UnmarshalJSON(data []byte) error {
method implBetaCitationsDeltaCitationUnion (line 904) | func (BetaCitationCharLocation) implBetaCitationsDeltaCitationUnion() ...
method implBetaTextCitationUnion (line 6503) | func (BetaCitationCharLocation) implBetaTextCitationUnion() ...
type BetaCitationCharLocationParam (line 605) | type BetaCitationCharLocationParam struct
method MarshalJSON (line 616) | func (r BetaCitationCharLocationParam) MarshalJSON() (data []byte, err...
method UnmarshalJSON (line 620) | func (r *BetaCitationCharLocationParam) UnmarshalJSON(data []byte) err...
type BetaCitationConfig (line 624) | type BetaCitationConfig struct
method RawJSON (line 635) | func (r BetaCitationConfig) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 636) | func (r *BetaCitationConfig) UnmarshalJSON(data []byte) error {
type BetaCitationContentBlockLocation (line 640) | type BetaCitationContentBlockLocation struct
method RawJSON (line 663) | func (r BetaCitationContentBlockLocation) RawJSON() string { return r....
method UnmarshalJSON (line 664) | func (r *BetaCitationContentBlockLocation) UnmarshalJSON(data []byte) ...
method implBetaCitationsDeltaCitationUnion (line 906) | func (BetaCitationContentBlockLocation) implBetaCitationsDeltaCitation...
method implBetaTextCitationUnion (line 6505) | func (BetaCitationContentBlockLocation) implBetaTextCitationUnion() ...
type BetaCitationContentBlockLocationParam (line 670) | type BetaCitationContentBlockLocationParam struct
method MarshalJSON (line 682) | func (r BetaCitationContentBlockLocationParam) MarshalJSON() (data []b...
method UnmarshalJSON (line 686) | func (r *BetaCitationContentBlockLocationParam) UnmarshalJSON(data []b...
type BetaCitationPageLocation (line 690) | type BetaCitationPageLocation struct
method RawJSON (line 713) | func (r BetaCitationPageLocation) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 714) | func (r *BetaCitationPageLocation) UnmarshalJSON(data []byte) error {
method implBetaCitationsDeltaCitationUnion (line 905) | func (BetaCitationPageLocation) implBetaCitationsDeltaCitationUnion() ...
method implBetaTextCitationUnion (line 6504) | func (BetaCitationPageLocation) implBetaTextCitationUnion() ...
type BetaCitationPageLocationParam (line 720) | type BetaCitationPageLocationParam struct
method MarshalJSON (line 731) | func (r BetaCitationPageLocationParam) MarshalJSON() (data []byte, err...
method UnmarshalJSON (line 735) | func (r *BetaCitationPageLocationParam) UnmarshalJSON(data []byte) err...
type BetaCitationSearchResultLocation (line 739) | type BetaCitationSearchResultLocation struct
method RawJSON (line 762) | func (r BetaCitationSearchResultLocation) RawJSON() string { return r....
method UnmarshalJSON (line 763) | func (r *BetaCitationSearchResultLocation) UnmarshalJSON(data []byte) ...
method implBetaCitationsDeltaCitationUnion (line 908) | func (BetaCitationSearchResultLocation) implBetaCitationsDeltaCitation...
method implBetaTextCitationUnion (line 6507) | func (BetaCitationSearchResultLocation) implBetaTextCitationUnion() ...
type BetaCitationSearchResultLocationParam (line 769) | type BetaCitationSearchResultLocationParam struct
method MarshalJSON (line 782) | func (r BetaCitationSearchResultLocationParam) MarshalJSON() (data []b...
method UnmarshalJSON (line 786) | func (r *BetaCitationSearchResultLocationParam) UnmarshalJSON(data []b...
type BetaCitationWebSearchResultLocationParam (line 791) | type BetaCitationWebSearchResultLocationParam struct
method MarshalJSON (line 802) | func (r BetaCitationWebSearchResultLocationParam) MarshalJSON() (data ...
method UnmarshalJSON (line 806) | func (r *BetaCitationWebSearchResultLocationParam) UnmarshalJSON(data ...
type BetaCitationsConfigParam (line 810) | type BetaCitationsConfigParam struct
method MarshalJSON (line 815) | func (r BetaCitationsConfigParam) MarshalJSON() (data []byte, err erro...
method UnmarshalJSON (line 819) | func (r *BetaCitationsConfigParam) UnmarshalJSON(data []byte) error {
type BetaCitationsDelta (line 823) | type BetaCitationsDelta struct
method RawJSON (line 836) | func (r BetaCitationsDelta) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 837) | func (r *BetaCitationsDelta) UnmarshalJSON(data []byte) error {
method implBetaRawContentBlockDeltaUnion (line 4954) | func (BetaCitationsDelta) implBetaRawContentBlockDeltaUnion() ...
type BetaCitationsDeltaCitationUnion (line 849) | type BetaCitationsDeltaCitationUnion struct
method AsAny (line 921) | func (u BetaCitationsDeltaCitationUnion) AsAny() anyBetaCitationsDelta...
method AsCharLocation (line 937) | func (u BetaCitationsDeltaCitationUnion) AsCharLocation() (v BetaCitat...
method AsPageLocation (line 942) | func (u BetaCitationsDeltaCitationUnion) AsPageLocation() (v BetaCitat...
method AsContentBlockLocation (line 947) | func (u BetaCitationsDeltaCitationUnion) AsContentBlockLocation() (v B...
method AsWebSearchResultLocation (line 952) | func (u BetaCitationsDeltaCitationUnion) AsWebSearchResultLocation() (...
method AsSearchResultLocation (line 957) | func (u BetaCitationsDeltaCitationUnion) AsSearchResultLocation() (v B...
method RawJSON (line 963) | func (u BetaCitationsDeltaCitationUnion) RawJSON() string { return u.J...
method UnmarshalJSON (line 965) | func (r *BetaCitationsDeltaCitationUnion) UnmarshalJSON(data []byte) e...
type anyBetaCitationsDeltaCitation (line 900) | type anyBetaCitationsDeltaCitation interface
type BetaCitationsWebSearchResultLocation (line 969) | type BetaCitationsWebSearchResultLocation struct
method implBetaCitationsDeltaCitationUnion (line 907) | func (BetaCitationsWebSearchResultLocation) implBetaCitationsDeltaCita...
method RawJSON (line 988) | func (r BetaCitationsWebSearchResultLocation) RawJSON() string { retur...
method UnmarshalJSON (line 989) | func (r *BetaCitationsWebSearchResultLocation) UnmarshalJSON(data []by...
method implBetaTextCitationUnion (line 6506) | func (BetaCitationsWebSearchResultLocation) implBetaTextCitationUnion(...
type BetaClearThinking20251015EditParam (line 994) | type BetaClearThinking20251015EditParam struct
method MarshalJSON (line 1004) | func (r BetaClearThinking20251015EditParam) MarshalJSON() (data []byte...
method UnmarshalJSON (line 1008) | func (r *BetaClearThinking20251015EditParam) UnmarshalJSON(data []byte...
type BetaClearThinking20251015EditKeepUnionParam (line 1015) | type BetaClearThinking20251015EditKeepUnionParam struct
method MarshalJSON (line 1023) | func (u BetaClearThinking20251015EditKeepUnionParam) MarshalJSON() ([]...
method UnmarshalJSON (line 1026) | func (u *BetaClearThinking20251015EditKeepUnionParam) UnmarshalJSON(da...
method asAny (line 1030) | func (u *BetaClearThinking20251015EditKeepUnionParam) asAny() any {
method GetValue (line 1042) | func (u BetaClearThinking20251015EditKeepUnionParam) GetValue() *int64 {
method GetType (line 1050) | func (u BetaClearThinking20251015EditKeepUnionParam) GetType() *string {
type BetaClearThinking20251015EditResponse (line 1059) | type BetaClearThinking20251015EditResponse struct
method RawJSON (line 1077) | func (r BetaClearThinking20251015EditResponse) RawJSON() string { retu...
method UnmarshalJSON (line 1078) | func (r *BetaClearThinking20251015EditResponse) UnmarshalJSON(data []b...
method implBetaContextManagementResponseAppliedEditUnion (line 3608) | func (BetaClearThinking20251015EditResponse) implBetaContextManagement...
type BetaClearToolUses20250919EditParam (line 1083) | type BetaClearToolUses20250919EditParam struct
method MarshalJSON (line 1101) | func (r BetaClearToolUses20250919EditParam) MarshalJSON() (data []byte...
method UnmarshalJSON (line 1105) | func (r *BetaClearToolUses20250919EditParam) UnmarshalJSON(data []byte...
type BetaClearToolUses20250919EditClearToolInputsUnionParam (line 1112) | type BetaClearToolUses20250919EditClearToolInputsUnionParam struct
method MarshalJSON (line 1118) | func (u BetaClearToolUses20250919EditClearToolInputsUnionParam) Marsha...
method UnmarshalJSON (line 1121) | func (u *BetaClearToolUses20250919EditClearToolInputsUnionParam) Unmar...
method asAny (line 1125) | func (u *BetaClearToolUses20250919EditClearToolInputsUnionParam) asAny...
type BetaClearToolUses20250919EditTriggerUnionParam (line 1137) | type BetaClearToolUses20250919EditTriggerUnionParam struct
method MarshalJSON (line 1143) | func (u BetaClearToolUses20250919EditTriggerUnionParam) MarshalJSON() ...
method UnmarshalJSON (line 1146) | func (u *BetaClearToolUses20250919EditTriggerUnionParam) UnmarshalJSON...
method asAny (line 1150) | func (u *BetaClearToolUses20250919EditTriggerUnionParam) asAny() any {
method GetType (line 1160) | func (u BetaClearToolUses20250919EditTriggerUnionParam) GetType() *str...
method GetValue (line 1170) | func (u BetaClearToolUses20250919EditTriggerUnionParam) GetValue() *in...
function init (line 1179) | func init() {
function init (line 1188) | func init() {
function init (line 1214) | func init() {
function init (line 1223) | func init() {
function init (line 1232) | func init() {
function init (line 1243) | func init() {
function init (line 1252) | func init() {
function init (line 1263) | func init() {
function init (line 1272) | func init() {
function init (line 1282) | func init() {
function init (line 1293) | func init() {
function init (line 1302) | func init() {
function init (line 1311) | func init() {
type BetaClearToolUses20250919EditResponse (line 1320) | type BetaClearToolUses20250919EditResponse struct
method RawJSON (line 1338) | func (r BetaClearToolUses20250919EditResponse) RawJSON() string { retu...
method UnmarshalJSON (line 1339) | func (r *BetaClearToolUses20250919EditResponse) UnmarshalJSON(data []b...
method implBetaContextManagementResponseAppliedEditUnion (line 3607) | func (BetaClearToolUses20250919EditResponse) implBetaContextManagement...
type BetaCodeExecutionOutputBlock (line 1343) | type BetaCodeExecutionOutputBlock struct
method RawJSON (line 1356) | func (r BetaCodeExecutionOutputBlock) RawJSON() string { return r.JSON...
method UnmarshalJSON (line 1357) | func (r *BetaCodeExecutionOutputBlock) UnmarshalJSON(data []byte) error {
type BetaCodeExecutionOutputBlockParam (line 1362) | type BetaCodeExecutionOutputBlockParam struct
method MarshalJSON (line 1370) | func (r BetaCodeExecutionOutputBlockParam) MarshalJSON() (data []byte,...
method UnmarshalJSON (line 1374) | func (r *BetaCodeExecutionOutputBlockParam) UnmarshalJSON(data []byte)...
type BetaCodeExecutionResultBlock (line 1378) | type BetaCodeExecutionResultBlock struct
method RawJSON (line 1397) | func (r BetaCodeExecutionResultBlock) RawJSON() string { return r.JSON...
method UnmarshalJSON (line 1398) | func (r *BetaCodeExecutionResultBlock) UnmarshalJSON(data []byte) error {
type BetaCodeExecutionResultBlockParam (line 1403) | type BetaCodeExecutionResultBlockParam struct
method MarshalJSON (line 1414) | func (r BetaCodeExecutionResultBlockParam) MarshalJSON() (data []byte,...
method UnmarshalJSON (line 1418) | func (r *BetaCodeExecutionResultBlockParam) UnmarshalJSON(data []byte)...
type BetaCodeExecutionTool20250522Param (line 1423) | type BetaCodeExecutionTool20250522Param struct
method MarshalJSON (line 1445) | func (r BetaCodeExecutionTool20250522Param) MarshalJSON() (data []byte...
method UnmarshalJSON (line 1449) | func (r *BetaCodeExecutionTool20250522Param) UnmarshalJSON(data []byte...
type BetaCodeExecutionTool20250825Param (line 1454) | type BetaCodeExecutionTool20250825Param struct
method MarshalJSON (line 1476) | func (r BetaCodeExecutionTool20250825Param) MarshalJSON() (data []byte...
method UnmarshalJSON (line 1480) | func (r *BetaCodeExecutionTool20250825Param) UnmarshalJSON(data []byte...
type BetaCodeExecutionTool20260120Param (line 1488) | type BetaCodeExecutionTool20260120Param struct
method MarshalJSON (line 1510) | func (r BetaCodeExecutionTool20260120Param) MarshalJSON() (data []byte...
method UnmarshalJSON (line 1514) | func (r *BetaCodeExecutionTool20260120Param) UnmarshalJSON(data []byte...
type BetaCodeExecutionToolResultBlock (line 1518) | type BetaCodeExecutionToolResultBlock struct
method RawJSON (line 1534) | func (r BetaCodeExecutionToolResultBlock) RawJSON() string { return r....
method UnmarshalJSON (line 1535) | func (r *BetaCodeExecutionToolResultBlock) UnmarshalJSON(data []byte) ...
method implBetaContentBlockUnion (line 2052) | func (BetaCodeExecutionToolResultBlock) implBetaContentBlockUnion() ...
method implBetaRawContentBlockStartEventContentBlockUnion (line 5153) | func (BetaCodeExecutionToolResultBlock) implBetaRawContentBlockStartEv...
type BetaCodeExecutionToolResultBlockContentUnion (line 1544) | type BetaCodeExecutionToolResultBlockContentUnion struct
method AsResponseCodeExecutionToolResultError (line 1567) | func (u BetaCodeExecutionToolResultBlockContentUnion) AsResponseCodeEx...
method AsResponseCodeExecutionResultBlock (line 1572) | func (u BetaCodeExecutionToolResultBlockContentUnion) AsResponseCodeEx...
method AsResponseEncryptedCodeExecutionResultBlock (line 1577) | func (u BetaCodeExecutionToolResultBlockContentUnion) AsResponseEncryp...
method RawJSON (line 1583) | func (u BetaCodeExecutionToolResultBlockContentUnion) RawJSON() string...
method UnmarshalJSON (line 1585) | func (r *BetaCodeExecutionToolResultBlockContentUnion) UnmarshalJSON(d...
type BetaCodeExecutionToolResultBlockParam (line 1590) | type BetaCodeExecutionToolResultBlockParam struct
method MarshalJSON (line 1602) | func (r BetaCodeExecutionToolResultBlockParam) MarshalJSON() (data []b...
method UnmarshalJSON (line 1606) | func (r *BetaCodeExecutionToolResultBlockParam) UnmarshalJSON(data []b...
function BetaNewCodeExecutionToolRequestError (line 1610) | func BetaNewCodeExecutionToolRequestError(errorCode BetaCodeExecutionToo...
type BetaCodeExecutionToolResultBlockParamContentUnion (line 1619) | type BetaCodeExecutionToolResultBlockParamContentUnion struct
method MarshalJSON (line 1626) | func (u BetaCodeExecutionToolResultBlockParamContentUnion) MarshalJSON...
method UnmarshalJSON (line 1629) | func (u *BetaCodeExecutionToolResultBlockParamContentUnion) UnmarshalJ...
method asAny (line 1633) | func (u *BetaCodeExecutionToolResultBlockParamContentUnion) asAny() any {
method GetErrorCode (line 1645) | func (u BetaCodeExecutionToolResultBlockParamContentUnion) GetErrorCod...
method GetStdout (line 1653) | func (u BetaCodeExecutionToolResultBlockParamContentUnion) GetStdout()...
method GetEncryptedStdout (line 1661) | func (u BetaCodeExecutionToolResultBlockParamContentUnion) GetEncrypte...
method GetType (line 1669) | func (u BetaCodeExecutionToolResultBlockParamContentUnion) GetType() *...
method GetReturnCode (line 1681) | func (u BetaCodeExecutionToolResultBlockParamContentUnion) GetReturnCo...
method GetStderr (line 1691) | func (u BetaCodeExecutionToolResultBlockParamContentUnion) GetStderr()...
method GetContent (line 1701) | func (u BetaCodeExecutionToolResultBlockParamContentUnion) GetContent(...
type BetaCodeExecutionToolResultError (line 1710) | type BetaCodeExecutionToolResultError struct
method RawJSON (line 1725) | func (r BetaCodeExecutionToolResultError) RawJSON() string { return r....
method UnmarshalJSON (line 1726) | func (r *BetaCodeExecutionToolResultError) UnmarshalJSON(data []byte) ...
type BetaCodeExecutionToolResultErrorCode (line 1730) | type BetaCodeExecutionToolResultErrorCode
constant BetaCodeExecutionToolResultErrorCodeInvalidToolInput (line 1733) | BetaCodeExecutionToolResultErrorCodeInvalidToolInput BetaCodeExecut...
constant BetaCodeExecutionToolResultErrorCodeUnavailable (line 1734) | BetaCodeExecutionToolResultErrorCodeUnavailable BetaCodeExecut...
constant BetaCodeExecutionToolResultErrorCodeTooManyRequests (line 1735) | BetaCodeExecutionToolResultErrorCodeTooManyRequests BetaCodeExecut...
constant BetaCodeExecutionToolResultErrorCodeExecutionTimeExceeded (line 1736) | BetaCodeExecutionToolResultErrorCodeExecutionTimeExceeded BetaCodeExecut...
type BetaCodeExecutionToolResultErrorParam (line 1740) | type BetaCodeExecutionToolResultErrorParam struct
method MarshalJSON (line 1750) | func (r BetaCodeExecutionToolResultErrorParam) MarshalJSON() (data []b...
method UnmarshalJSON (line 1754) | func (r *BetaCodeExecutionToolResultErrorParam) UnmarshalJSON(data []b...
type BetaCompact20260112EditParam (line 1762) | type BetaCompact20260112EditParam struct
method MarshalJSON (line 1774) | func (r BetaCompact20260112EditParam) MarshalJSON() (data []byte, err ...
method UnmarshalJSON (line 1778) | func (r *BetaCompact20260112EditParam) UnmarshalJSON(data []byte) error {
type BetaCompactionBlock (line 1787) | type BetaCompactionBlock struct
method RawJSON (line 1801) | func (r BetaCompactionBlock) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 1802) | func (r *BetaCompactionBlock) UnmarshalJSON(data []byte) error {
method implBetaContentBlockUnion (line 2059) | func (BetaCompactionBlock) implBetaContentBlockUnion() ...
method implBetaRawContentBlockStartEventContentBlockUnion (line 5161) | func (BetaCompactionBlock) implBetaRawContentBlockStartEventContentBlo...
type BetaCompactionBlockParam (line 1815) | type BetaCompactionBlockParam struct
method MarshalJSON (line 1825) | func (r BetaCompactionBlockParam) MarshalJSON() (data []byte, err erro...
method UnmarshalJSON (line 1829) | func (r *BetaCompactionBlockParam) UnmarshalJSON(data []byte) error {
type BetaCompactionContentBlockDelta (line 1833) | type BetaCompactionContentBlockDelta struct
method RawJSON (line 1846) | func (r BetaCompactionContentBlockDelta) RawJSON() string { return r.J...
method UnmarshalJSON (line 1847) | func (r *BetaCompactionContentBlockDelta) UnmarshalJSON(data []byte) e...
method implBetaRawContentBlockDeltaUnion (line 4957) | func (BetaCompactionContentBlockDelta) implBetaRawContentBlockDeltaUni...
type BetaCompactionIterationUsage (line 1852) | type BetaCompactionIterationUsage struct
method RawJSON (line 1879) | func (r BetaCompactionIterationUsage) RawJSON() string { return r.JSON...
method UnmarshalJSON (line 1880) | func (r *BetaCompactionIterationUsage) UnmarshalJSON(data []byte) error {
method implBetaIterationsUsageItemUnion (line 4053) | func (BetaCompactionIterationUsage) implBetaIterationsUsageItemUnion() {}
type BetaContainer (line 1886) | type BetaContainer struct
method RawJSON (line 1904) | func (r BetaContainer) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 1905) | func (r *BetaContainer) UnmarshalJSON(data []byte) error {
type BetaContainerParams (line 1910) | type BetaContainerParams struct
method MarshalJSON (line 1918) | func (r BetaContainerParams) MarshalJSON() (data []byte, err error) {
method UnmarshalJSON (line 1922) | func (r *BetaContainerParams) UnmarshalJSON(data []byte) error {
type BetaContainerUploadBlock (line 1927) | type BetaContainerUploadBlock struct
method RawJSON (line 1940) | func (r BetaContainerUploadBlock) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 1941) | func (r *BetaContainerUploadBlock) UnmarshalJSON(data []byte) error {
method implBetaContentBlockUnion (line 2058) | func (BetaContainerUploadBlock) implBetaContentBlockUnion() ...
method implBetaRawContentBlockStartEventContentBlockUnion (line 5160) | func (BetaContainerUploadBlock) implBetaRawContentBlockStartEventConte...
type BetaContainerUploadBlockParam (line 1949) | type BetaContainerUploadBlockParam struct
method MarshalJSON (line 1958) | func (r BetaContainerUploadBlockParam) MarshalJSON() (data []byte, err...
method UnmarshalJSON (line 1962) | func (r *BetaContainerUploadBlockParam) UnmarshalJSON(data []byte) err...
type BetaContentBlockUnion (line 1978) | type BetaContentBlockUnion struct
method AsAny (line 2082) | func (u BetaContentBlockUnion) AsAny() anyBetaContentBlock {
method AsText (line 2118) | func (u BetaContentBlockUnion) AsText() (v BetaTextBlock) {
method AsThinking (line 2123) | func (u BetaContentBlockUnion) AsThinking() (v BetaThinkingBlock) {
method AsRedactedThinking (line 2128) | func (u BetaContentBlockUnion) AsRedactedThinking() (v BetaRedactedThi...
method AsToolUse (line 2133) | func (u BetaContentBlockUnion) AsToolUse() (v BetaToolUseBlock) {
method AsServerToolUse (line 2138) | func (u BetaContentBlockUnion) AsServerToolUse() (v BetaServerToolUseB...
method AsWebSearchToolResult (line 2143) | func (u BetaContentBlockUnion) AsWebSearchToolResult() (v BetaWebSearc...
method AsWebFetchToolResult (line 2148) | func (u BetaContentBlockUnion) AsWebFetchToolResult() (v BetaWebFetchT...
method AsCodeExecutionToolResult (line 2153) | func (u BetaContentBlockUnion) AsCodeExecutionToolResult() (v BetaCode...
method AsBashCodeExecutionToolResult (line 2158) | func (u BetaContentBlockUnion) AsBashCodeExecutionToolResult() (v Beta...
method AsTextEditorCodeExecutionToolResult (line 2163) | func (u BetaContentBlockUnion) AsTextEditorCodeExecutionToolResult() (...
method AsToolSearchToolResult (line 2168) | func (u BetaContentBlockUnion) AsToolSearchToolResult() (v BetaToolSea...
method AsMCPToolUse (line 2173) | func (u BetaContentBlockUnion) AsMCPToolUse() (v BetaMCPToolUseBlock) {
method AsMCPToolResult (line 2178) | func (u BetaContentBlockUnion) AsMCPToolResult() (v BetaMCPToolResultB...
method AsContainerUpload (line 2183) | func (u BetaContentBlockUnion) AsContainerUpload() (v BetaContainerUpl...
method AsCompaction (line 2188) | func (u BetaContentBlockUnion) AsCompaction() (v BetaCompactionBlock) {
method RawJSON (line 2194) | func (u BetaContentBlockUnion) RawJSON() string { return u.JSON.raw }
method UnmarshalJSON (line 2196) | func (r *BetaContentBlockUnion) UnmarshalJSON(data []byte) error {
type anyBetaContentBlock (line 2040) | type anyBetaContentBlock interface
type BetaContentBlockUnionCaller (line 2206) | type BetaContentBlockUnionCaller struct
method UnmarshalJSON (line 2216) | func (r *BetaContentBlockUnionCaller) UnmarshalJSON(data []byte) error {
type BetaContentBlockUnionContent (line 2230) | type BetaContentBlockUnionContent struct
method UnmarshalJSON (line 2315) | func (r *BetaContentBlockUnionContent) UnmarshalJSON(data []byte) error {
type BetaContentBlockUnionContentContent (line 2328) | type BetaContentBlockUnionContentContent struct
method UnmarshalJSON (line 2353) | func (r *BetaContentBlockUnionContentContent) UnmarshalJSON(data []byt...
function NewBetaTextBlock (line 2357) | func NewBetaTextBlock(text string) BetaContentBlockParamUnion {
function NewBetaImageBlock (line 2363) | func NewBetaImageBlock[
function NewBetaDocumentBlock (line 2378) | func NewBetaDocumentBlock[
function NewBetaSearchResultBlock (line 2397) | func NewBetaSearchResultBlock(content []BetaTextBlockParam, source strin...
function NewBetaThinkingBlock (line 2405) | func NewBetaThinkingBlock(signature string, thinking string) BetaContent...
function NewBetaRedactedThinkingBlock (line 2412) | func NewBetaRedactedThinkingBlock(data string) BetaContentBlockParamUnion {
function NewBetaToolUseBlock (line 2418) | func NewBetaToolUseBlock(id string, input any, name string) BetaContentB...
function NewBetaToolResultBlock (line 2426) | func NewBetaToolResultBlock(toolUseID string, content string, isError bo...
function NewBetaServerToolUseBlock (line 2436) | func NewBetaServerToolUseBlock(id string, input any, name BetaServerTool...
function NewBetaWebSearchToolResultBlock (line 2444) | func NewBetaWebSearchToolResultBlock[
function NewBetaWebFetchToolResultBlock (line 2458) | func NewBetaWebFetchToolResultBlock[
function NewBetaCodeExecutionToolResultBlock (line 2472) | func NewBetaCodeExecutionToolResultBlock[
function NewBetaBashCodeExecutionToolResultBlock (line 2488) | func NewBetaBashCodeExecutionToolResultBlock[
function NewBetaTextEditorCodeExecutionToolResultBlock (line 2502) | func NewBetaTextEditorCodeExecutionToolResultBlock[
function NewBetaToolSearchToolResultBlock (line 2520) | func NewBetaToolSearchToolResultBlock[
function NewBetaMCPToolResultBlock (line 2534) | func NewBetaMCPToolResultBlock(toolUseID string) BetaContentBlockParamUn...
function NewBetaContainerUploadBlock (line 2540) | func NewBetaContainerUploadBlock(fileID string) BetaContentBlockParamUni...
function NewBetaCompactionBlock (line 2546) | func NewBetaCompactionBlock(content string) BetaContentBlockParamUnion {
type BetaContentBlockParamUnion (line 2555) | type BetaContentBlockParamUnion struct
method MarshalJSON (line 2578) | func (u BetaContentBlockParamUnion) MarshalJSON() ([]byte, error) {
method UnmarshalJSON (line 2599) | func (u *BetaContentBlockParamUnion) UnmarshalJSON(data []byte) error {
method asAny (line 2603) | func (u *BetaContentBlockParamUnion) asAny() any {
method GetText (line 2647) | func (u BetaContentBlockParamUnion) GetText() *string {
method GetContext (line 2655) | func (u BetaContentBlockParamUnion) GetContext() *string {
method GetSignature (line 2663) | func (u BetaContentBlockParamUnion) GetSignature() *string {
method GetThinking (line 2671) | func (u BetaContentBlockParamUnion) GetThinking() *string {
method GetData (line 2679) | func (u BetaContentBlockParamUnion) GetData() *string {
method GetServerName (line 2687) | func (u BetaContentBlockParamUnion) GetServerName() *string {
method GetFileID (line 2695) | func (u BetaContentBlockParamUnion) GetFileID() *string {
method GetType (line 2703) | func (u BetaContentBlockParamUnion) GetType() *string {
method GetTitle (line 2747) | func (u BetaContentBlockParamUnion) GetTitle() *string {
method GetID (line 2757) | func (u BetaContentBlockParamUnion) GetID() *string {
method GetName (line 2769) | func (u BetaContentBlockParamUnion) GetName() *string {
method GetToolUseID (line 2781) | func (u BetaContentBlockParamUnion) GetToolUseID() *string {
method GetIsError (line 2803) | func (u BetaContentBlockParamUnion) GetIsError() *bool {
method GetCacheControl (line 2813) | func (u BetaContentBlockParamUnion) GetCacheControl() *BetaCacheContro...
method GetCitations (line 2855) | func (u BetaContentBlockParamUnion) GetCitations() (res betaContentBlo...
method GetSource (line 2892) | func (u BetaContentBlockParamUnion) GetSource() (res betaContentBlockP...
method GetContent (line 2994) | func (u BetaContentBlockParamUnion) GetContent() (res betaContentBlock...
method GetInput (line 3304) | func (u BetaContentBlockParamUnion) GetInput() *any {
method GetCaller (line 3318) | func (u BetaContentBlockParamUnion) GetCaller() (res betaContentBlockP...
type betaContentBlockParamUnionCitations (line 2868) | type betaContentBlockParamUnionCitations struct
method AsAny (line 2878) | func (u betaContentBlockParamUnionCitations) AsAny() any { return u.any }
method GetEnabled (line 2881) | func (u betaContentBlockParamUnionCitations) GetEnabled() *bool {
type betaContentBlockParamUnionSource (line 2908) | type betaContentBlockParamUnionSource struct
method AsAny (line 2925) | func (u betaContentBlockParamUnionSource) AsAny() any { return u.any }
method GetContent (line 2928) | func (u betaContentBlockParamUnionSource) GetContent() *BetaContentBlo...
method GetData (line 2937) | func (u betaContentBlockParamUnionSource) GetData() *string {
method GetMediaType (line 2948) | func (u betaContentBlockParamUnionSource) GetMediaType() *string {
method GetType (line 2959) | func (u betaContentBlockParamUnionSource) GetType() *string {
method GetURL (line 2970) | func (u betaContentBlockParamUnionSource) GetURL() *string {
method GetFileID (line 2981) | func (u betaContentBlockParamUnionSource) GetFileID() *string {
type betaContentBlockParamUnionContent (line 3032) | type betaContentBlockParamUnionContent struct
method AsAny (line 3057) | func (u betaContentBlockParamUnionContent) AsAny() any { return u.any }
method GetURL (line 3060) | func (u betaContentBlockParamUnionContent) GetURL() *string {
method GetRetrievedAt (line 3069) | func (u betaContentBlockParamUnionContent) GetRetrievedAt() *string {
method GetEncryptedStdout (line 3078) | func (u betaContentBlockParamUnionContent) GetEncryptedStdout() *string {
method GetErrorMessage (line 3087) | func (u betaContentBlockParamUnionContent) GetErrorMessage() *string {
method GetFileType (line 3096) | func (u betaContentBlockParamUnionContent) GetFileType() *string {
method GetNumLines (line 3105) | func (u betaContentBlockParamUnionContent) GetNumLines() *int64 {
method GetStartLine (line 3114) | func (u betaContentBlockParamUnionContent) GetStartLine() *int64 {
method GetTotalLines (line 3123) | func (u betaContentBlockParamUnionContent) GetTotalLines() *int64 {
method GetIsFileUpdate (line 3132) | func (u betaContentBlockParamUnionContent) GetIsFileUpdate() *bool {
method GetLines (line 3141) | func (u betaContentBlockParamUnionContent) GetLines() []string {
method GetNewLines (line 3150) | func (u betaContentBlockParamUnionContent) GetNewLines() *int64 {
method GetNewStart (line 3159) | func (u betaContentBlockParamUnionContent) GetNewStart() *int64 {
method GetOldLines (line 3168) | func (u betaContentBlockParamUnionContent) GetOldLines() *int64 {
method GetOldStart (line 3177) | func (u betaContentBlockParamUnionContent) GetOldStart() *int64 {
method GetToolReferences (line 3186) | func (u betaContentBlockParamUnionContent) GetToolReferences() []BetaT...
method GetErrorCode (line 3195) | func (u betaContentBlockParamUnionContent) GetErrorCode() *string {
method GetType (line 3216) | func (u betaContentBlockParamUnionContent) GetType() *string {
method GetReturnCode (line 3237) | func (u betaContentBlockParamUnionContent) GetReturnCode() *int64 {
method GetStderr (line 3248) | func (u betaContentBlockParamUnionContent) GetStderr() *string {
method GetStdout (line 3259) | func (u betaContentBlockParamUnionContent) GetStdout() *string {
method GetContent (line 3272) | func (u betaContentBlockParamUnionContent) GetContent() (res betaConte...
type betaContentBlockParamUnionContentContent (line 3289) | type betaContentBlockParamUnionContentContent struct
method AsAny (line 3301) | func (u betaContentBlockParamUnionContentContent) AsAny() any { return...
type betaContentBlockParamUnionCaller (line 3333) | type betaContentBlockParamUnionCaller struct
method AsAny (line 3344) | func (u betaContentBlockParamUnionCaller) AsAny() any { return u.any }
method GetType (line 3347) | func (u betaContentBlockParamUnionCaller) GetType() *string {
method GetToolID (line 3362) | func (u betaContentBlockParamUnionCaller) GetToolID() *string {
type BetaContentBlockSourceParam (line 3377) | type BetaContentBlockSourceParam struct
method MarshalJSON (line 3384) | func (r BetaContentBlockSourceParam) MarshalJSON() (data []byte, err e...
method UnmarshalJSON (line 3388) | func (r *BetaContentBlockSourceParam) UnmarshalJSON(data []byte) error {
type BetaContentBlockSourceContentUnionParam (line 3395) | type BetaContentBlockSourceContentUnionParam struct
method MarshalJSON (line 3401) | func (u BetaContentBlockSourceContentUnionParam) MarshalJSON() ([]byte...
method UnmarshalJSON (line 3404) | func (u *BetaContentBlockSourceContentUnionParam) UnmarshalJSON(data [...
method asAny (line 3408) | func (u *BetaContentBlockSourceContentUnionParam) asAny() any {
type BetaContextManagementConfigParam (line 3417) | type BetaContextManagementConfigParam struct
method MarshalJSON (line 3423) | func (r BetaContextManagementConfigParam) MarshalJSON() (data []byte, ...
method UnmarshalJSON (line 3427) | func (r *BetaContextManagementConfigParam) UnmarshalJSON(data []byte) ...
type BetaContextManagementConfigEditUnionParam (line 3434) | type BetaContextManagementConfigEditUnionParam struct
method MarshalJSON (line 3441) | func (u BetaContextManagementConfigEditUnionParam) MarshalJSON() ([]by...
method UnmarshalJSON (line 3444) | func (u *BetaContextManagementConfigEditUnionParam) UnmarshalJSON(data...
method asAny (line 3448) | func (u *BetaContextManagementConfigEditUnionParam) asAny() any {
method GetClearAtLeast (line 3460) | func (u BetaContextManagementConfigEditUnionParam) GetClearAtLeast() *...
method GetClearToolInputs (line 3468) | func (u BetaContextManagementConfigEditUnionParam) GetClearToolInputs(...
method GetExcludeTools (line 3476) | func (u BetaContextManagementConfigEditUnionParam) GetExcludeTools() [...
method GetInstructions (line 3484) | func (u BetaContextManagementConfigEditUnionParam) GetInstructions() *...
method GetPauseAfterCompaction (line 3492) | func (u BetaContextManagementConfigEditUnionParam) GetPauseAfterCompac...
method GetType (line 3500) | func (u BetaContextManagementConfigEditUnionParam) GetType() *string {
method GetKeep (line 3514) | func (u BetaContextManagementConfigEditUnionParam) GetKeep() (res beta...
type betaContextManagementConfigEditUnionParamKeep (line 3524) | type betaContextManagementConfigEditUnionParamKeep struct
method AsAny (line 3534) | func (u betaContextManagementConfigEditUnionParamKeep) AsAny() any { r...
method GetType (line 3537) | func (u betaContextManagementConfigEditUnionParamKeep) GetType() *stri...
method GetValue (line 3548) | func (u betaContextManagementConfigEditUnionParamKeep) GetValue() *int...
type BetaContextManagementResponse (line 3558) | type BetaContextManagementResponse struct
method RawJSON (line 3570) | func (r BetaContextManagementResponse) RawJSON() string { return r.JSO...
method UnmarshalJSON (line 3571) | func (r *BetaContextManagementResponse) UnmarshalJSON(data []byte) err...
type BetaContextManagementResponseAppliedEditUnion (line 3583) | type BetaContextManagementResponseAppliedEditUnion struct
method AsAny (line 3618) | func (u BetaContextManagementResponseAppliedEditUnion) AsAny() anyBeta...
method AsClearToolUses20250919 (line 3628) | func (u BetaContextManagementResponseAppliedEditUnion) AsClearToolUses...
method AsClearThinking20251015 (line 3633) | func (u BetaContextManagementResponseAppliedEditUnion) AsClearThinking...
method RawJSON (line 3639) | func (u BetaContextManagementResponseAppliedEditUnion) RawJSON() strin...
method UnmarshalJSON (line 3641) | func (r *BetaContextManagementResponseAppliedEditUnion) UnmarshalJSON(...
type anyBetaContextManagementResponseAppliedEdit (line 3603) | type anyBetaContextManagementResponseAppliedEdit interface
type BetaCountTokensContextManagementResponse (line 3645) | type BetaCountTokensContextManagementResponse struct
method RawJSON (line 3657) | func (r BetaCountTokensContextManagementResponse) RawJSON() string { r...
method UnmarshalJSON (line 3658) | func (r *BetaCountTokensContextManagementResponse) UnmarshalJSON(data ...
type BetaDirectCaller (line 3663) | type BetaDirectCaller struct
method RawJSON (line 3674) | func (r BetaDirectCaller) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 3675) | func (r *BetaDirectCaller) UnmarshalJSON(data []byte) error {
method ToParam (line 3684) | func (r BetaDirectCaller) ToParam() BetaDirectCallerParam {
method implBetaServerToolUseBlockCallerUnion (line 6167) | func (BetaDirectCaller) implBetaServerToolUseBlockCallerUnion() ...
method implBetaToolUseBlockCallerUnion (line 9371) | func (BetaDirectCaller) implBetaToolUseBlockCallerUnion() {}
method implBetaWebFetchToolResultBlockCallerUnion (line 9920) | func (BetaDirectCaller) implBetaWebFetchToolResultBlockCallerUnion() ...
method implBetaWebSearchToolResultBlockCallerUnion (line 10356) | func (BetaDirectCaller) implBetaWebSearchToolResultBlockCallerUnion() ...
function NewBetaDirectCallerParam (line 3688) | func NewBetaDirectCallerParam() BetaDirectCallerParam {
type BetaDirectCallerParam (line 3697) | type BetaDirectCallerParam struct
method MarshalJSON (line 3702) | func (r BetaDirectCallerParam) MarshalJSON() (data []byte, err error) {
method UnmarshalJSON (line 3706) | func (r *BetaDirectCallerParam) UnmarshalJSON(data []byte) error {
type BetaDocumentBlock (line 3710) | type BetaDocumentBlock struct
method RawJSON (line 3729) | func (r BetaDocumentBlock) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 3730) | func (r *BetaDocumentBlock) UnmarshalJSON(data []byte) error {
type BetaDocumentBlockSourceUnion (line 3740) | type BetaDocumentBlockSourceUnion struct
method AsAny (line 3771) | func (u BetaDocumentBlockSourceUnion) AsAny() anyBetaDocumentBlockSour...
method AsBase64 (line 3781) | func (u BetaDocumentBlockSourceUnion) AsBase64() (v BetaBase64PDFSourc...
method AsText (line 3786) | func (u BetaDocumentBlockSourceUnion) AsText() (v BetaPlainTextSource) {
method RawJSON (line 3792) | func (u BetaDocumentBlockSourceUnion) RawJSON() string { return u.JSON...
method UnmarshalJSON (line 3794) | func (r *BetaDocumentBlockSourceUnion) UnmarshalJSON(data []byte) error {
type anyBetaDocumentBlockSource (line 3756) | type anyBetaDocumentBlockSource interface
type BetaEncryptedCodeExecutionResultBlock (line 3799) | type BetaEncryptedCodeExecutionResultBlock struct
method RawJSON (line 3818) | func (r BetaEncryptedCodeExecutionResultBlock) RawJSON() string { retu...
method UnmarshalJSON (line 3819) | func (r *BetaEncryptedCodeExecutionResultBlock) UnmarshalJSON(data []b...
type BetaEncryptedCodeExecutionResultBlockParam (line 3826) | type BetaEncryptedCodeExecutionResultBlockParam struct
method MarshalJSON (line 3837) | func (r BetaEncryptedCodeExecutionResultBlockParam) MarshalJSON() (dat...
method UnmarshalJSON (line 3841) | func (r *BetaEncryptedCodeExecutionResultBlockParam) UnmarshalJSON(dat...
type BetaFileDocumentSourceParam (line 3846) | type BetaFileDocumentSourceParam struct
method MarshalJSON (line 3853) | func (r BetaFileDocumentSourceParam) MarshalJSON() (data []byte, err e...
method UnmarshalJSON (line 3857) | func (r *BetaFileDocumentSourceParam) UnmarshalJSON(data []byte) error {
type BetaFileImageSourceParam (line 3862) | type BetaFileImageSourceParam struct
method MarshalJSON (line 3869) | func (r BetaFileImageSourceParam) MarshalJSON() (data []byte, err erro...
method UnmarshalJSON (line 3873) | func (r *BetaFileImageSourceParam) UnmarshalJSON(data []byte) error {
type BetaImageBlockParam (line 3878) | type BetaImageBlockParam struct
method MarshalJSON (line 3887) | func (r BetaImageBlockParam) MarshalJSON() (data []byte, err error) {
method UnmarshalJSON (line 3891) | func (r *BetaImageBlockParam) UnmarshalJSON(data []byte) error {
type BetaImageBlockParamSourceUnion (line 3898) | type BetaImageBlockParamSourceUnion struct
method MarshalJSON (line 3905) | func (u BetaImageBlockParamSourceUnion) MarshalJSON() ([]byte, error) {
method UnmarshalJSON (line 3908) | func (u *BetaImageBlockParamSourceUnion) UnmarshalJSON(data []byte) er...
method asAny (line 3912) | func (u *BetaImageBlockParamSourceUnion) asAny() any {
method GetData (line 3924) | func (u BetaImageBlockParamSourceUnion) GetData() *string {
method GetMediaType (line 3932) | func (u BetaImageBlockParamSourceUnion) GetMediaType() *string {
method GetURL (line 3940) | func (u BetaImageBlockParamSourceUnion) GetURL() *string {
method GetFileID (line 3948) | func (u BetaImageBlockParamSourceUnion) GetFileID() *string {
method GetType (line 3956) | func (u BetaImageBlockParamSourceUnion) GetType() *string {
type BetaInputJSONDelta (line 3967) | type BetaInputJSONDelta struct
method RawJSON (line 3980) | func (r BetaInputJSONDelta) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 3981) | func (r *BetaInputJSONDelta) UnmarshalJSON(data []byte) error {
method implBetaRawContentBlockDeltaUnion (line 4953) | func (BetaInputJSONDelta) implBetaRawContentBlockDeltaUnion() ...
type BetaInputTokensClearAtLeastParam (line 3986) | type BetaInputTokensClearAtLeastParam struct
method MarshalJSON (line 3993) | func (r BetaInputTokensClearAtLeastParam) MarshalJSON() (data []byte, ...
method UnmarshalJSON (line 3997) | func (r *BetaInputTokensClearAtLeastParam) UnmarshalJSON(data []byte) ...
type BetaInputTokensTriggerParam (line 4002) | type BetaInputTokensTriggerParam struct
method MarshalJSON (line 4009) | func (r BetaInputTokensTriggerParam) MarshalJSON() (data []byte, err e...
method UnmarshalJSON (line 4013) | func (r *BetaInputTokensTriggerParam) UnmarshalJSON(data []byte) error {
type BetaIterationsUsage (line 4017) | type BetaIterationsUsage
type BetaIterationsUsageItemUnion (line 4025) | type BetaIterationsUsageItemUnion struct
method AsAny (line 4063) | func (u BetaIterationsUsageItemUnion) AsAny() anyBetaIterationsUsageIt...
method AsMessage (line 4073) | func (u BetaIterationsUsageItemUnion) AsMessage() (v BetaMessageIterat...
method AsCompaction (line 4078) | func (u BetaIterationsUsageItemUnion) AsCompaction() (v BetaCompaction...
method RawJSON (line 4084) | func (u BetaIterationsUsageItemUnion) RawJSON() string { return u.JSON...
method UnmarshalJSON (line 4086) | func (r *BetaIterationsUsageItemUnion) UnmarshalJSON(data []byte) error {
type anyBetaIterationsUsageItem (line 4048) | type anyBetaIterationsUsageItem interface
type BetaJSONOutputFormatParam (line 4091) | type BetaJSONOutputFormatParam struct
method MarshalJSON (line 4099) | func (r BetaJSONOutputFormatParam) MarshalJSON() (data []byte, err err...
method UnmarshalJSON (line 4103) | func (r *BetaJSONOutputFormatParam) UnmarshalJSON(data []byte) error {
type BetaMCPToolConfigParam (line 4108) | type BetaMCPToolConfigParam struct
method MarshalJSON (line 4114) | func (r BetaMCPToolConfigParam) MarshalJSON() (data []byte, err error) {
method UnmarshalJSON (line 4118) | func (r *BetaMCPToolConfigParam) UnmarshalJSON(data []byte) error {
type BetaMCPToolDefaultConfigParam (line 4123) | type BetaMCPToolDefaultConfigParam struct
method MarshalJSON (line 4129) | func (r BetaMCPToolDefaultConfigParam) MarshalJSON() (data []byte, err...
method UnmarshalJSON (line 4133) | func (r *BetaMCPToolDefaultConfigParam) UnmarshalJSON(data []byte) err...
type BetaMCPToolResultBlock (line 4137) | type BetaMCPToolResultBlock struct
method implBetaContentBlockUnion (line 2057) | func (BetaMCPToolResultBlock) implBetaContentBlockUnion() ...
method RawJSON (line 4154) | func (r BetaMCPToolResultBlock) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 4155) | func (r *BetaMCPToolResultBlock) UnmarshalJSON(data []byte) error {
method implBetaRawContentBlockStartEventContentBlockUnion (line 5159) | func (BetaMCPToolResultBlock) implBetaRawContentBlockStartEventContent...
type BetaMCPToolResultBlockContentUnion (line 4166) | type BetaMCPToolResultBlockContentUnion struct
method AsString (line 4179) | func (u BetaMCPToolResultBlockContentUnion) AsString() (v string) {
method AsBetaMCPToolResultBlockContent (line 4184) | func (u BetaMCPToolResultBlockContentUnion) AsBetaMCPToolResultBlockCo...
method RawJSON (line 4190) | func (u BetaMCPToolResultBlockContentUnion) RawJSON() string { return ...
method UnmarshalJSON (line 4192) | func (r *BetaMCPToolResultBlockContentUnion) UnmarshalJSON(data []byte...
type BetaMCPToolUseBlock (line 4196) | type BetaMCPToolUseBlock struct
method implBetaContentBlockUnion (line 2056) | func (BetaMCPToolUseBlock) implBetaContentBlockUnion() ...
method RawJSON (line 4217) | func (r BetaMCPToolUseBlock) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 4218) | func (r *BetaMCPToolUseBlock) UnmarshalJSON(data []byte) error {
method implBetaRawContentBlockStartEventContentBlockUnion (line 5158) | func (BetaMCPToolUseBlock) implBetaRawContentBlockStartEventContentBlo...
type BetaMCPToolUseBlockParam (line 4223) | type BetaMCPToolUseBlockParam struct
method MarshalJSON (line 4236) | func (r BetaMCPToolUseBlockParam) MarshalJSON() (data []byte, err erro...
method UnmarshalJSON (line 4240) | func (r *BetaMCPToolUseBlockParam) UnmarshalJSON(data []byte) error {
type BetaMCPToolsetParam (line 4250) | type BetaMCPToolsetParam struct
method MarshalJSON (line 4264) | func (r BetaMCPToolsetParam) MarshalJSON() (data []byte, err error) {
method UnmarshalJSON (line 4268) | func (r *BetaMCPToolsetParam) UnmarshalJSON(data []byte) error {
type BetaMemoryTool20250818Param (line 4273) | type BetaMemoryTool20250818Param struct
method MarshalJSON (line 4295) | func (r BetaMemoryTool20250818Param) MarshalJSON() (data []byte, err e...
method UnmarshalJSON (line 4299) | func (r *BetaMemoryTool20250818Param) UnmarshalJSON(data []byte) error {
type BetaMemoryTool20250818CommandUnion (line 4313) | type BetaMemoryTool20250818CommandUnion struct
method AsAny (line 4374) | func (u BetaMemoryTool20250818CommandUnion) AsAny() anyBetaMemoryTool2...
method AsView (line 4392) | func (u BetaMemoryTool20250818CommandUnion) AsView() (v BetaMemoryTool...
method AsCreate (line 4397) | func (u BetaMemoryTool20250818CommandUnion) AsCreate() (v BetaMemoryTo...
method AsStrReplace (line 4402) | func (u BetaMemoryTool20250818CommandUnion) AsStrReplace() (v BetaMemo...
method AsInsert (line 4407) | func (u BetaMemoryTool20250818CommandUnion) AsInsert() (v BetaMemoryTo...
method AsDelete (line 4412) | func (u BetaMemoryTool20250818CommandUnion) AsDelete() (v BetaMemoryTo...
method AsRename (line 4417) | func (u BetaMemoryTool20250818CommandUnion) AsRename() (v BetaMemoryTo...
method RawJSON (line 4423) | func (u BetaMemoryTool20250818CommandUnion) RawJSON() string { return ...
method UnmarshalJSON (line 4425) | func (r *BetaMemoryTool20250818CommandUnion) UnmarshalJSON(data []byte...
type anyBetaMemoryTool20250818Command (line 4351) | type anyBetaMemoryTool20250818Command interface
type BetaMemoryTool20250818CreateCommand (line 4429) | type BetaMemoryTool20250818CreateCommand struct
method implBetaMemoryTool20250818CommandUnion (line 4356) | func (BetaMemoryTool20250818CreateCommand) implBetaMemoryTool20250818C...
method RawJSON (line 4447) | func (r BetaMemoryTool20250818CreateCommand) RawJSON() string { return...
method UnmarshalJSON (line 4448) | func (r *BetaMemoryTool20250818CreateCommand) UnmarshalJSON(data []byt...
type BetaMemoryTool20250818DeleteCommand (line 4452) | type BetaMemoryTool20250818DeleteCommand struct
method implBetaMemoryTool20250818CommandUnion (line 4359) | func (BetaMemoryTool20250818DeleteCommand) implBetaMemoryTool20250818C...
method RawJSON (line 4467) | func (r BetaMemoryTool20250818DeleteCommand) RawJSON() string { return...
method UnmarshalJSON (line 4468) | func (r *BetaMemoryTool20250818DeleteCommand) UnmarshalJSON(data []byt...
type BetaMemoryTool20250818InsertCommand (line 4472) | type BetaMemoryTool20250818InsertCommand struct
method implBetaMemoryTool20250818CommandUnion (line 4358) | func (BetaMemoryTool20250818InsertCommand) implBetaMemoryTool20250818C...
method RawJSON (line 4493) | func (r BetaMemoryTool20250818InsertCommand) RawJSON() string { return...
method UnmarshalJSON (line 4494) | func (r *BetaMemoryTool20250818InsertCommand) UnmarshalJSON(data []byt...
type BetaMemoryTool20250818RenameCommand (line 4498) | type BetaMemoryTool20250818RenameCommand struct
method implBetaMemoryTool20250818CommandUnion (line 4360) | func (BetaMemoryTool20250818RenameCommand) implBetaMemoryTool20250818C...
method RawJSON (line 4516) | func (r BetaMemoryTool20250818RenameCommand) RawJSON() string { return...
method UnmarshalJSON (line 4517) | func (r *BetaMemoryTool20250818RenameCommand) UnmarshalJSON(data []byt...
type BetaMemoryTool20250818StrReplaceCommand (line 4521) | type BetaMemoryTool20250818StrReplaceCommand struct
method implBetaMemoryTool20250818CommandUnion (line 4357) | func (BetaMemoryTool20250818StrReplaceCommand) implBetaMemoryTool20250...
method RawJSON (line 4542) | func (r BetaMemoryTool20250818StrReplaceCommand) RawJSON() string { re...
method UnmarshalJSON (line 4543) | func (r *BetaMemoryTool20250818StrReplaceCommand) UnmarshalJSON(data [...
type BetaMemoryTool20250818ViewCommand (line 4547) | type BetaMemoryTool20250818ViewCommand struct
method implBetaMemoryTool20250818CommandUnion (line 4355) | func (BetaMemoryTool20250818ViewCommand) implBetaMemoryTool20250818Com...
method RawJSON (line 4565) | func (r BetaMemoryTool20250818ViewCommand) RawJSON() string { return r...
method UnmarshalJSON (line 4566) | func (r *BetaMemoryTool20250818ViewCommand) UnmarshalJSON(data []byte)...
type BetaMessage (line 4570) | type BetaMessage struct
method RawJSON (line 4687) | func (r BetaMessage) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 4688) | func (r *BetaMessage) UnmarshalJSON(data []byte) error {
type BetaMessageDeltaUsage (line 4693) | type BetaMessageDeltaUsage struct
method RawJSON (line 4727) | func (r BetaMessageDeltaUsage) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 4728) | func (r *BetaMessageDeltaUsage) UnmarshalJSON(data []byte) error {
type BetaMessageIterationUsage (line 4733) | type BetaMessageIterationUsage struct
method implBetaIterationsUsageItemUnion (line 4052) | func (BetaMessageIterationUsage) implBetaIterationsUsageItemUnion() {}
method RawJSON (line 4760) | func (r BetaMessageIterationUsage) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 4761) | func (r *BetaMessageIterationUsage) UnmarshalJSON(data []byte) error {
type BetaMessageParam (line 4766) | type BetaMessageParam struct
method MarshalJSON (line 4780) | func (r BetaMessageParam) MarshalJSON() (data []byte, err error) {
method UnmarshalJSON (line 4784) | func (r *BetaMessageParam) UnmarshalJSON(data []byte) error {
function NewBetaUserMessage (line 4773) | func NewBetaUserMessage(blocks ...BetaContentBlockParamUnion) BetaMessag...
type BetaMessageParamRole (line 4788) | type BetaMessageParamRole
constant BetaMessageParamRoleUser (line 4791) | BetaMessageParamRoleUser BetaMessageParamRole = "user"
constant BetaMessageParamRoleAssistant (line 4792) | BetaMessageParamRoleAssistant BetaMessageParamRole = "assistant"
type BetaMessageTokensCount (line 4795) | type BetaMessageTokensCount struct
method RawJSON (line 4811) | func (r BetaMessageTokensCount) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 4812) | func (r *BetaMessageTokensCount) UnmarshalJSON(data []byte) error {
type BetaMetadataParam (line 4816) | type BetaMetadataParam struct
method MarshalJSON (line 4826) | func (r BetaMetadataParam) MarshalJSON() (data []byte, err error) {
method UnmarshalJSON (line 4830) | func (r *BetaMetadataParam) UnmarshalJSON(data []byte) error {
type BetaOutputConfigParam (line 4834) | type BetaOutputConfigParam struct
method MarshalJSON (line 4845) | func (r BetaOutputConfigParam) MarshalJSON() (data []byte, err error) {
method UnmarshalJSON (line 4849) | func (r *BetaOutputConfigParam) UnmarshalJSON(data []byte) error {
type BetaOutputConfigEffort (line 4854) | type BetaOutputConfigEffort
constant BetaOutputConfigEffortLow (line 4857) | BetaOutputConfigEffortLow BetaOutputConfigEffort = "low"
constant BetaOutputConfigEffortMedium (line 4858) | BetaOutputConfigEffortMedium BetaOutputConfigEffort = "medium"
constant BetaOutputConfigEffortHigh (line 4859) | BetaOutputConfigEffortHigh BetaOutputConfigEffort = "high"
constant BetaOutputConfigEffortMax (line 4860) | BetaOutputConfigEffortMax BetaOutputConfigEffort = "max"
type BetaPlainTextSource (line 4863) | type BetaPlainTextSource struct
method implBetaDocumentBlockSourceUnion (line 3761) | func (BetaPlainTextSource) implBetaDocumentBlockSourceUnion() {}
method RawJSON (line 4878) | func (r BetaPlainTextSource) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 4879) | func (r *BetaPlainTextSource) UnmarshalJSON(data []byte) error {
method ToParam (line 4888) | func (r BetaPlainTextSource) ToParam() BetaPlainTextSourceParam {
type BetaPlainTextSourceParam (line 4893) | type BetaPlainTextSourceParam struct
method MarshalJSON (line 4902) | func (r BetaPlainTextSourceParam) MarshalJSON() (data []byte, err erro...
method UnmarshalJSON (line 4906) | func (r *BetaPlainTextSourceParam) UnmarshalJSON(data []byte) error {
type BetaRawContentBlockDeltaUnion (line 4917) | type BetaRawContentBlockDeltaUnion struct
method AsAny (line 4971) | func (u BetaRawContentBlockDeltaUnion) AsAny() anyBetaRawContentBlockD...
method AsTextDelta (line 4989) | func (u BetaRawContentBlockDeltaUnion) AsTextDelta() (v BetaTextDelta) {
method AsInputJSONDelta (line 4994) | func (u BetaRawContentBlockDeltaUnion) AsInputJSONDelta() (v BetaInput...
method AsCitationsDelta (line 4999) | func (u BetaRawContentBlockDeltaUnion) AsCitationsDelta() (v BetaCitat...
method AsThinkingDelta (line 5004) | func (u BetaRawContentBlockDeltaUnion) AsThinkingDelta() (v BetaThinki...
method AsSignatureDelta (line 5009) | func (u BetaRawContentBlockDeltaUnion) AsSignatureDelta() (v BetaSigna...
method AsCompactionDelta (line 5014) | func (u BetaRawContentBlockDeltaUnion) AsCompactionDelta() (v BetaComp...
method RawJSON (line 5020) | func (u BetaRawContentBlockDeltaUnion) RawJSON() string { return u.JSO...
method UnmarshalJSON (line 5022) | func (r *BetaRawContentBlockDeltaUnion) UnmarshalJSON(data []byte) err...
type anyBetaRawContentBlockDelta (line 4948) | type anyBetaRawContentBlockDelta interface
type BetaRawContentBlockDeltaEvent (line 5026) | type BetaRawContentBlockDeltaEvent struct
method RawJSON (line 5041) | func (r BetaRawContentBlockDeltaEvent) RawJSON() string { return r.JSO...
method UnmarshalJSON (line 5042) | func (r *BetaRawContentBlockDeltaEvent) UnmarshalJSON(data []byte) err...
method implBetaRawMessageStreamEventUnion (line 5623) | func (BetaRawContentBlockDeltaEvent) implBetaRawMessageStreamEventUnio...
type BetaRawContentBlockStartEvent (line 5046) | type BetaRawContentBlockStartEvent struct
method RawJSON (line 5062) | func (r BetaRawContentBlockStartEvent) RawJSON() string { return r.JSO...
method UnmarshalJSON (line 5063) | func (r *BetaRawContentBlockStartEvent) UnmarshalJSON(data []byte) err...
method implBetaRawMessageStreamEventUnion (line 5622) | func (BetaRawContentBlockStartEvent) implBetaRawMessageStreamEventUnio...
type BetaRawContentBlockStartEventContentBlockUnion (line 5080) | type BetaRawContentBlockStartEventContentBlockUnion struct
method AsAny (line 5184) | func (u BetaRawContentBlockStartEventContentBlockUnion) AsAny() anyBet...
method AsText (line 5220) | func (u BetaRawContentBlockStartEventContentBlockUnion) AsText() (v Be...
method AsThinking (line 5225) | func (u BetaRawContentBlockStartEventContentBlockUnion) AsThinking() (...
method AsRedactedThinking (line 5230) | func (u BetaRawContentBlockStartEventContentBlockUnion) AsRedactedThin...
method AsToolUse (line 5235) | func (u BetaRawContentBlockStartEventContentBlockUnion) AsToolUse() (v...
method AsServerToolUse (line 5240) | func (u BetaRawContentBlockStartEventContentBlockUnion) AsServerToolUs...
method AsWebSearchToolResult (line 5245) | func (u BetaRawContentBlockStartEventContentBlockUnion) AsWebSearchToo...
method AsWebFetchToolResult (line 5250) | func (u BetaRawContentBlockStartEventContentBlockUnion) AsWebFetchTool...
method AsCodeExecutionToolResult (line 5255) | func (u BetaRawContentBlockStartEventContentBlockUnion) AsCodeExecutio...
method AsBashCodeExecutionToolResult (line 5260) | func (u BetaRawContentBlockStartEventContentBlockUnion) AsBashCodeExec...
method AsTextEditorCodeExecutionToolResult (line 5265) | func (u BetaRawContentBlockStartEventContentBlockUnion) AsTextEditorCo...
method AsToolSearchToolResult (line 5270) | func (u BetaRawContentBlockStartEventContentBlockUnion) AsToolSearchTo...
method AsMCPToolUse (line 5275) | func (u BetaRawContentBlockStartEventContentBlockUnion) AsMCPToolUse()...
method AsMCPToolResult (line 5280) | func (u BetaRawContentBlockStartEventContentBlockUnion) AsMCPToolResul...
method AsContainerUpload (line 5285) | func (u BetaRawContentBlockStartEventContentBlockUnion) AsContainerUpl...
method AsCompaction (line 5290) | func (u BetaRawContentBlockStartEventContentBlockUnion) AsCompaction()...
method RawJSON (line 5296) | func (u BetaRawContentBlockStartEventContentBlockUnion) RawJSON() stri...
method UnmarshalJSON (line 5298) | func (r *BetaRawContentBlockStartEventContentBlockUnion) UnmarshalJSON...
type anyBetaRawContentBlockStartEventContentBlock (line 5142) | type anyBetaRawContentBlockStartEventContentBlock interface
type BetaRawContentBlockStartEventContentBlockUnionCaller (line 5309) | type BetaRawContentBlockStartEventContentBlockUnionCaller struct
method UnmarshalJSON (line 5319) | func (r *BetaRawContentBlockStartEventContentBlockUnionCaller) Unmarsh...
type BetaRawContentBlockStartEventContentBlockUnionContent (line 5334) | type BetaRawContentBlockStartEventContentBlockUnionContent struct
method UnmarshalJSON (line 5419) | func (r *BetaRawContentBlockStartEventContentBlockUnionContent) Unmars...
type BetaRawContentBlockStartEventContentBlockUnionContentContent (line 5433) | type BetaRawContentBlockStartEventContentBlockUnionContentContent struct
method UnmarshalJSON (line 5458) | func (r *BetaRawContentBlockStartEventContentBlockUnionContentContent)...
type BetaRawContentBlockStopEvent (line 5462) | type BetaRawContentBlockStopEvent struct
method RawJSON (line 5475) | func (r BetaRawContentBlockStopEvent) RawJSON() string { return r.JSON...
method UnmarshalJSON (line 5476) | func (r *BetaRawContentBlockStopEvent) UnmarshalJSON(data []byte) error {
method implBetaRawMessageStreamEventUnion (line 5624) | func (BetaRawContentBlockStopEvent) implBetaRawMessageStreamEventUnion...
type BetaRawMessageDeltaEvent (line 5480) | type BetaRawMessageDeltaEvent struct
method RawJSON (line 5513) | func (r BetaRawMessageDeltaEvent) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 5514) | func (r *BetaRawMessageDeltaEvent) UnmarshalJSON(data []byte) error {
method implBetaRawMessageStreamEventUnion (line 5620) | func (BetaRawMessageDeltaEvent) implBetaRawMessageStreamEventUnion() ...
type BetaRawMessageDeltaEventDelta (line 5518) | type BetaRawMessageDeltaEventDelta struct
method RawJSON (line 5537) | func (r BetaRawMessageDeltaEventDelta) RawJSON() string { return r.JSO...
method UnmarshalJSON (line 5538) | func (r *BetaRawMessageDeltaEventDelta) UnmarshalJSON(data []byte) err...
type BetaRawMessageStartEvent (line 5542) | type BetaRawMessageStartEvent struct
method RawJSON (line 5555) | func (r BetaRawMessageStartEvent) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 5556) | func (r *BetaRawMessageStartEvent) UnmarshalJSON(data []byte) error {
method implBetaRawMessageStreamEventUnion (line 5619) | func (BetaRawMessageStartEvent) implBetaRawMessageStreamEventUnion() ...
type BetaRawMessageStopEvent (line 5560) | type BetaRawMessageStopEvent struct
method RawJSON (line 5571) | func (r BetaRawMessageStopEvent) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 5572) | func (r *BetaRawMessageStopEvent) UnmarshalJSON(data []byte) error {
method implBetaRawMessageStreamEventUnion (line 5621) | func (BetaRawMessageStopEvent) implBetaRawMessageStreamEventUnion() ...
type BetaRawMessageStreamEventUnion (line 5584) | type BetaRawMessageStreamEventUnion struct
method AsAny (line 5638) | func (u BetaRawMessageStreamEventUnion) AsAny() anyBetaRawMessageStrea...
method AsMessageStart (line 5656) | func (u BetaRawMessageStreamEventUnion) AsMessageStart() (v BetaRawMes...
method AsMessageDelta (line 5661) | func (u BetaRawMessageStreamEventUnion) AsMessageDelta() (v BetaRawMes...
method AsMessageStop (line 5666) | func (u BetaRawMessageStreamEventUnion) AsMessageStop() (v BetaRawMess...
method AsContentBlockStart (line 5671) | func (u BetaRawMessageStreamEventUnion) AsContentBlockStart() (v BetaR...
method AsContentBlockDelta (line 5676) | func (u BetaRawMessageStreamEventUnion) AsContentBlockDelta() (v BetaR...
method AsContentBlockStop (line 5681) | func (u BetaRawMessageStreamEventUnion) AsContentBlockStop() (v BetaRa...
method RawJSON (line 5687) | func (u BetaRawMessageStreamEventUnion) RawJSON() string { return u.JS...
method UnmarshalJSON (line 5689) | func (r *BetaRawMessageStreamEventUnion) UnmarshalJSON(data []byte) er...
type anyBetaRawMessageStreamEvent (line 5615) | type anyBetaRawMessageStreamEvent interface
type BetaRawMessageStreamEventUnionDelta (line 5699) | type BetaRawMessageStreamEventUnionDelta struct
method UnmarshalJSON (line 5734) | func (r *BetaRawMessageStreamEventUnionDelta) UnmarshalJSON(data []byt...
type BetaRedactedThinkingBlock (line 5738) | type BetaRedactedThinkingBlock struct
method implBetaContentBlockUnion (line 2047) | func (BetaRedactedThinkingBlock) implBetaContentBlockUnion() ...
method implBetaRawContentBlockStartEventContentBlockUnion (line 5148) | func (BetaRedactedThinkingBlock) implBetaRawContentBlockStartEventCont...
method RawJSON (line 5751) | func (r BetaRedactedThinkingBlock) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 5752) | func (r *BetaRedactedThinkingBlock) UnmarshalJSON(data []byte) error {
type BetaRedactedThinkingBlockParam (line 5757) | type BetaRedactedThinkingBlockParam struct
method MarshalJSON (line 5765) | func (r BetaRedactedThinkingBlockParam) MarshalJSON() (data []byte, er...
method UnmarshalJSON (line 5769) | func (r *BetaRedactedThinkingBlockParam) UnmarshalJSON(data []byte) er...
type BetaRequestDocumentBlockParam (line 5774) | type BetaRequestDocumentBlockParam struct
method MarshalJSON (line 5786) | func (r BetaRequestDocumentBlockParam) MarshalJSON() (data []byte, err...
method UnmarshalJSON (line 5790) | func (r *BetaRequestDocumentBlockParam) UnmarshalJSON(data []byte) err...
type BetaRequestDocumentBlockSourceUnionParam (line 5797) | type BetaRequestDocumentBlockSourceUnionParam struct
method MarshalJSON (line 5806) | func (u BetaRequestDocumentBlockSourceUnionParam) MarshalJSON() ([]byt...
method UnmarshalJSON (line 5813) | func (u *BetaRequestDocumentBlockSourceUnionParam) UnmarshalJSON(data ...
method asAny (line 5817) | func (u *BetaRequestDocumentBlockSourceUnionParam) asAny() any {
method GetContent (line 5833) | func (u BetaRequestDocumentBlockSourceUnionParam) GetContent() *BetaCo...
method GetURL (line 5841) | func (u BetaRequestDocumentBlockSourceUnionParam) GetURL() *string {
method GetFileID (line 5849) | func (u BetaRequestDocumentBlockSourceUnionParam) GetFileID() *string {
method GetData (line 5857) | func (u BetaRequestDocumentBlockSourceUnionParam) GetData() *string {
method GetMediaType (line 5867) | func (u BetaRequestDocumentBlockSourceUnionParam) GetMediaType() *stri...
method GetType (line 5877) | func (u BetaRequestDocumentBlockSourceUnionParam) GetType() *string {
type BetaRequestMCPServerToolConfigurationParam (line 5892) | type BetaRequestMCPServerToolConfigurationParam struct
method MarshalJSON (line 5898) | func (r BetaRequestMCPServerToolConfigurationParam) MarshalJSON() (dat...
method UnmarshalJSON (line 5902) | func (r *BetaRequestMCPServerToolConfigurationParam) UnmarshalJSON(dat...
type BetaRequestMCPServerURLDefinitionParam (line 5907) | type BetaRequestMCPServerURLDefinitionParam struct
method MarshalJSON (line 5917) | func (r BetaRequestMCPServerURLDefinitionParam) MarshalJSON() (data []...
method UnmarshalJSON (line 5921) | func (r *BetaRequestMCPServerURLDefinitionParam) UnmarshalJSON(data []...
type BetaRequestMCPToolResultBlockParam (line 5926) | type BetaRequestMCPToolResultBlockParam struct
method MarshalJSON (line 5937) | func (r BetaRequestMCPToolResultBlockParam) MarshalJSON() (data []byte...
method UnmarshalJSON (line 5941) | func (r *BetaRequestMCPToolResultBlockParam) UnmarshalJSON(data []byte...
type BetaRequestMCPToolResultBlockParamContentUnion (line 5948) | type BetaRequestMCPToolResultBlockParamContentUnion struct
method MarshalJSON (line 5954) | func (u BetaRequestMCPToolResultBlockParamContentUnion) MarshalJSON() ...
method UnmarshalJSON (line 5957) | func (u *BetaRequestMCPToolResultBlockParamContentUnion) UnmarshalJSON...
method asAny (line 5961) | func (u *BetaRequestMCPToolResultBlockParamContentUnion) asAny() any {
type BetaSearchResultBlockParam (line 5971) | type BetaSearchResultBlockParam struct
method MarshalJSON (line 5983) | func (r BetaSearchResultBlockParam) MarshalJSON() (data []byte, err er...
method UnmarshalJSON (line 5987) | func (r *BetaSearchResultBlockParam) UnmarshalJSON(data []byte) error {
type BetaServerToolCaller (line 5992) | type BetaServerToolCaller struct
method RawJSON (line 6005) | func (r BetaServerToolCaller) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 6006) | func (r *BetaServerToolCaller) UnmarshalJSON(data []byte) error {
method ToParam (line 6015) | func (r BetaServerToolCaller) ToParam() BetaServerToolCallerParam {
method implBetaServerToolUseBlockCallerUnion (line 6168) | func (BetaServerToolCaller) implBetaServerToolUseBlockCallerUnion() ...
method implBetaToolUseBlockCallerUnion (line 9372) | func (BetaServerToolCaller) implBetaToolUseBlockCallerUnion() {}
method implBetaWebFetchToolResultBlockCallerUnion (line 9921) | func (BetaServerToolCaller) implBetaWebFetchToolResultBlockCallerUnion...
method implBetaWebSearchToolResultBlockCallerUnion (line 10357) | func (BetaServerToolCaller) implBetaWebSearchToolResultBlockCallerUnio...
type BetaServerToolCallerParam (line 6022) | type BetaServerToolCallerParam struct
method MarshalJSON (line 6030) | func (r BetaServerToolCallerParam) MarshalJSON() (data []byte, err err...
method UnmarshalJSON (line 6034) | func (r *BetaServerToolCallerParam) UnmarshalJSON(data []byte) error {
type BetaServerToolCaller20260120 (line 6038) | type BetaServerToolCaller20260120 struct
method RawJSON (line 6051) | func (r BetaServerToolCaller20260120) RawJSON() string { return r.JSON...
method UnmarshalJSON (line 6052) | func (r *BetaServerToolCaller20260120) UnmarshalJSON(data []byte) error {
method ToParam (line 6062) | func (r BetaServerToolCaller20260120) ToParam() BetaServerToolCaller20...
method implBetaServerToolUseBlockCallerUnion (line 6169) | func (BetaServerToolCaller20260120) implBetaServerToolUseBlockCallerUn...
method implBetaToolUseBlockCallerUnion (line 9373) | func (BetaServerToolCaller20260120) implBetaToolUseBlockCallerUnion() {}
method implBetaWebFetchToolResultBlockCallerUnion (line 9922) | func (BetaServerToolCaller20260120) implBetaWebFetchToolResultBlockCal...
method implBetaWebSearchToolResultBlockCallerUnion (line 10358) | func (BetaServerToolCaller20260120) implBetaWebSearchToolResultBlockCa...
type BetaServerToolCaller20260120Param (line 6067) | type BetaServerToolCaller20260120Param struct
method MarshalJSON (line 6075) | func (r BetaServerToolCaller20260120Param) MarshalJSON() (data []byte,...
method UnmarshalJSON (line 6079) | func (r *BetaServerToolCaller20260120Param) UnmarshalJSON(data []byte)...
type BetaServerToolUsage (line 6083) | type BetaServerToolUsage struct
method RawJSON (line 6098) | func (r BetaServerToolUsage) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 6099) | func (r *BetaServerToolUsage) UnmarshalJSON(data []byte) error {
type BetaServerToolUseBlock (line 6103) | type BetaServerToolUseBlock struct
method implBetaContentBlockUnion (line 2049) | func (BetaServerToolUseBlock) implBetaContentBlockUnion() ...
method implBetaRawContentBlockStartEventContentBlockUnion (line 5150) | func (BetaServerToolUseBlock) implBetaRawContentBlockStartEventContent...
method RawJSON (line 6125) | func (r BetaServerToolUseBlock) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 6126) | func (r *BetaServerToolUseBlock) UnmarshalJSON(data []byte) error {
type BetaServerToolUseBlockName (line 6130) | type BetaServerToolUseBlockName
constant BetaServerToolUseBlockNameWebSearch (line 6133) | BetaServerToolUseBlockNameWebSearch BetaServerToolUseBlock...
constant BetaServerToolUseBlockNameWebFetch (line 6134) | BetaServerToolUseBlockNameWebFetch BetaServerToolUseBlock...
constant BetaServerToolUseBlockNameCodeExecution (line 6135) | BetaServerToolUseBlockNameCodeExecution BetaServerToolUseBlock...
constant BetaServerToolUseBlockNameBashCodeExecution (line 6136) | BetaServerToolUseBlockNameBashCodeExecution BetaServerToolUseBlock...
constant BetaServerToolUseBlockNameTextEditorCodeExecution (line 6137) | BetaServerToolUseBlockNameTextEditorCodeExecution BetaServerToolUseBlock...
constant BetaServerToolUseBlockNameToolSearchToolRegex (line 6138) | BetaServerToolUseBlockNameToolSearchToolRegex BetaServerToolUseBlock...
constant BetaServerToolUseBlockNameToolSearchToolBm25 (line 6139) | BetaServerToolUseBlockNameToolSearchToolBm25 BetaServerToolUseBlock...
type BetaServerToolUseBlockCallerUnion (line 6149) | type BetaServerToolUseBlockCallerUnion struct
method AsAny (line 6180) | func (u BetaServerToolUseBlockCallerUnion) AsAny() anyBetaServerToolUs...
method AsDirect (line 6192) | func (u BetaServerToolUseBlockCallerUnion) AsDirect() (v BetaDirectCal...
method AsCodeExecution20250825 (line 6197) | func (u BetaServerToolUseBlockCallerUnion) AsCodeExecution20250825() (...
method AsCodeExecution20260120 (line 6202) | func (u BetaServerToolUseBlockCallerUnion) AsCodeExecution20260120() (...
method RawJSON (line 6208) | func (u BetaServerToolUseBlockCallerUnion) RawJSON() string { return u...
method UnmarshalJSON (line 6210) | func (r *BetaServerToolUseBlockCallerUnion) UnmarshalJSON(data []byte)...
type anyBetaServerToolUseBlockCaller (line 6163) | type anyBetaServerToolUseBlockCaller interface
type BetaServerToolUseBlockParam (line 6215) | type BetaServerToolUseBlockParam struct
method MarshalJSON (line 6230) | func (r BetaServerToolUseBlockParam) MarshalJSON() (data []byte, err e...
method UnmarshalJSON (line 6234) | func (r *BetaServerToolUseBlockParam) UnmarshalJSON(data []byte) error {
type BetaServerToolUseBlockParamName (line 6238) | type BetaServerToolUseBlockParamName
constant BetaServerToolUseBlockParamNameWebSearch (line 6241) | BetaServerToolUseBlockParamNameWebSearch BetaServerToolUse...
constant BetaServerToolUseBlockParamNameWebFetch (line 6242) | BetaServerToolUseBlockParamNameWebFetch BetaServerToolUse...
constant BetaServerToolUseBlockParamNameCodeExecution (line 6243) | BetaServerToolUseBlockParamNameCodeExecution BetaServerToolUse...
constant BetaServerToolUseBlockParamNameBashCodeExecution (line 6244) | BetaServerToolUseBlockParamNameBashCodeExecution BetaServerToolUse...
constant BetaServerToolUseBlockParamNameTextEditorCodeExecution (line 6245) | BetaServerToolUseBlockParamNameTextEditorCodeExecution BetaServerToolUse...
constant BetaServerToolUseBlockParamNameToolSearchToolRegex (line 6246) | BetaServerToolUseBlockParamNameToolSearchToolRegex BetaServerToolUse...
constant BetaServerToolUseBlockParamNameToolSearchToolBm25 (line 6247) | BetaServerToolUseBlockParamNameToolSearchToolBm25 BetaServerToolUse...
type BetaServerToolUseBlockParamCallerUnion (line 6253) | type BetaServerToolUseBlockParamCallerUnion struct
method MarshalJSON (line 6260) | func (u BetaServerToolUseBlockParamCallerUnion) MarshalJSON() ([]byte,...
method UnmarshalJSON (line 6263) | func (u *BetaServerToolUseBlockParamCallerUnion) UnmarshalJSON(data []...
method asAny (line 6267) | func (u *BetaServerToolUseBlockParamCallerUnion) asAny() any {
method GetType (line 6279) | func (u BetaServerToolUseBlockParamCallerUnion) GetType() *string {
method GetToolID (line 6291) | func (u BetaServerToolUseBlockParamCallerUnion) GetToolID() *string {
type BetaSignatureDelta (line 6300) | type BetaSignatureDelta struct
method implBetaRawContentBlockDeltaUnion (line 4956) | func (BetaSignatureDelta) implBetaRawContentBlockDeltaUnion() ...
method RawJSON (line 6313) | func (r BetaSignatureDelta) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 6314) | func (r *BetaSignatureDelta) UnmarshalJSON(data []byte) error {
type BetaSkill (line 6319) | type BetaSkill struct
method RawJSON (line 6339) | func (r BetaSkill) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 6340) | func (r *BetaSkill) UnmarshalJSON(data []byte) error {
type BetaSkillType (line 6345) | type BetaSkillType
constant BetaSkillTypeAnthropic (line 6348) | BetaSkillTypeAnthropic BetaSkillType = "anthropic"
constant BetaSkillTypeCustom (line 6349) | BetaSkillTypeCustom BetaSkillType = "custom"
type BetaSkillParams (line 6355) | type BetaSkillParams struct
method MarshalJSON (line 6367) | func (r BetaSkillParams) MarshalJSON() (data []byte, err error) {
method UnmarshalJSON (line 6371) | func (r *BetaSkillParams) UnmarshalJSON(data []byte) error {
type BetaSkillParamsType (line 6376) | type BetaSkillParamsType
constant BetaSkillParamsTypeAnthropic (line 6379) | BetaSkillParamsTypeAnthropic BetaSkillParamsType = "anthropic"
constant BetaSkillParamsTypeCustom (line 6380) | BetaSkillParamsTypeCustom BetaSkillParamsType = "custom"
type BetaStopReason (line 6383) | type BetaStopReason
constant BetaStopReasonEndTurn (line 6386) | BetaStopReasonEndTurn BetaStopReason = "end_turn"
constant BetaStopReasonMaxTokens (line 6387) | BetaStopReasonMaxTokens BetaStopReason = "max_tokens"
constant BetaStopReasonStopSequence (line 6388) | BetaStopReasonStopSequence BetaStopReason = "stop_sequence"
constant BetaStopReasonToolUse (line 6389) | BetaStopReasonToolUse BetaStopReason = "tool_use"
constant BetaStopReasonPauseTurn (line 6390) | BetaStopReasonPauseTurn BetaStopReason = "pause_turn"
constant BetaStopReasonCompaction (line 6391) | BetaStopReasonCompaction BetaStopReason = "compaction"
constant BetaStopReasonRefusal (line 6392) | BetaStopReasonRefusal BetaStopReason = "refusal"
constant BetaStopReasonModelContextWindowExceeded (line 6393) | BetaStopReasonModelContextWindowExceeded BetaStopReason = "model_context...
type BetaTextBlock (line 6396) | type BetaTextBlock struct
method implBetaContentBlockUnion (line 2045) | func (BetaTextBlock) implBetaContentBlockUnion() ...
method implBetaRawContentBlockStartEventContentBlockUnion (line 5146) | func (BetaTextBlock) implBetaRawContentBlockStartEventContentBlockUnio...
method RawJSON (line 6416) | func (r BetaTextBlock) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 6417) | func (r *BetaTextBlock) UnmarshalJSON(data []byte) error {
type BetaTextBlockParam (line 6422) | type BetaTextBlockParam struct
method MarshalJSON (line 6432) | func (r BetaTextBlockParam) MarshalJSON() (data []byte, err error) {
method UnmarshalJSON (line 6436) | func (r *BetaTextBlockParam) UnmarshalJSON(data []byte) error {
type BetaTextCitationUnion (line 6448) | type BetaTextCitationUnion struct
method AsAny (line 6520) | func (u BetaTextCitationUnion) AsAny() anyBetaTextCitation {
method AsCharLocation (line 6536) | func (u BetaTextCitationUnion) AsCharLocation() (v BetaCitationCharLoc...
method AsPageLocation (line 6541) | func (u BetaTextCitationUnion) AsPageLocation() (v BetaCitationPageLoc...
method AsContentBlockLocation (line 6546) | func (u BetaTextCitationUnion) AsContentBlockLocation() (v BetaCitatio...
method AsWebSearchResultLocation (line 6551) | func (u BetaTextCitationUnion) AsWebSearchResultLocation() (v BetaCita...
method AsSearchResultLocation (line 6556) | func (u BetaTextCitationUnion) AsSearchResultLocation() (v BetaCitatio...
method RawJSON (line 6562) | func (u BetaTextCitationUnion) RawJSON() string { return u.JSON.raw }
method UnmarshalJSON (line 6564) | func (r *BetaTextCitationUnion) UnmarshalJSON(data []byte) error {
type anyBetaTextCitation (line 6498) | type anyBetaTextCitation interface
type BetaTextCitationParamUnion (line 6571) | type BetaTextCitationParamUnion struct
method MarshalJSON (line 6580) | func (u BetaTextCitationParamUnion) MarshalJSON() ([]byte, error) {
method UnmarshalJSON (line 6587) | func (u *BetaTextCitationParamUnion) UnmarshalJSON(data []byte) error {
method asAny (line 6591) | func (u *BetaTextCitationParamUnion) asAny() any {
method GetEndCharIndex (line 6607) | func (u BetaTextCitationParamUnion) GetEndCharIndex() *int64 {
method GetStartCharIndex (line 6615) | func (u BetaTextCitationParamUnion) GetStartCharIndex() *int64 {
method GetEndPageNumber (line 6623) | func (u BetaTextCitationParamUnion) GetEndPageNumber() *int64 {
method GetStartPageNumber (line 6631) | func (u BetaTextCitationParamUnion) GetStartPageNumber() *int64 {
method GetEncryptedIndex (line 6639) | func (u BetaTextCitationParamUnion) GetEncryptedIndex() *string {
method GetURL (line 6647) | func (u BetaTextCitationParamUnion) GetURL() *string {
method GetSearchResultIndex (line 6655) | func (u BetaTextCitationParamUnion) GetSearchResultIndex() *int64 {
method GetSource (line 6663) | func (u BetaTextCitationParamUnion) GetSource() *string {
method GetCitedText (line 6671) | func (u BetaTextCitationParamUnion) GetCitedText() *string {
method GetDocumentIndex (line 6687) | func (u BetaTextCitationParamUnion) GetDocumentIndex() *int64 {
method GetDocumentTitle (line 6699) | func (u BetaTextCitationParamUnion) GetDocumentTitle() *string {
method GetType (line 6711) | func (u BetaTextCitationParamUnion) GetType() *string {
method GetEndBlockIndex (line 6727) | func (u BetaTextCitationParamUnion) GetEndBlockIndex() *int64 {
method GetStartBlockIndex (line 6737) | func (u BetaTextCitationParamUnion) GetStartBlockIndex() *int64 {
method GetTitle (line 6747) | func (u BetaTextCitationParamUnion) GetTitle() *string {
type BetaTextDelta (line 6756) | type BetaTextDelta struct
method implBetaRawContentBlockDeltaUnion (line 4952) | func (BetaTextDelta) implBetaRawContentBlockDeltaUnion() ...
method RawJSON (line 6769) | func (r BetaTextDelta) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 6770) | func (r *BetaTextDelta) UnmarshalJSON(data []byte) error {
type BetaTextEditorCodeExecutionCreateResultBlock (line 6774) | type BetaTextEditorCodeExecutionCreateResultBlock struct
method RawJSON (line 6787) | func (r BetaTextEditorCodeExecutionCreateResultBlock) RawJSON() string...
method UnmarshalJSON (line 6788) | func (r *BetaTextEditorCodeExecutionCreateResultBlock) UnmarshalJSON(d...
type BetaTextEditorCodeExecutionCreateResultBlockParam (line 6793) | type BetaTextEditorCodeExecutionCreateResultBlockParam struct
method MarshalJSON (line 6801) | func (r BetaTextEditorCodeExecutionCreateResultBlockParam) MarshalJSON...
method UnmarshalJSON (line 6805) | func (r *BetaTextEditorCodeExecutionCreateResultBlockParam) UnmarshalJ...
type BetaTextEditorCodeExecutionStrReplaceResultBlock (line 6809) | type BetaTextEditorCodeExecutionStrReplaceResultBlock struct
method RawJSON (line 6830) | func (r BetaTextEditorCodeExecutionStrReplaceResultBlock) RawJSON() st...
method UnmarshalJSON (line 6831) | func (r *BetaTextEditorCodeExecutionStrReplaceResultBlock) UnmarshalJS...
type BetaTextEditorCodeExecutionStrReplaceResultBlockParam (line 6836) | type BetaTextEditorCodeExecutionStrReplaceResultBlockParam struct
method MarshalJSON (line 6848) | func (r BetaTextEditorCodeExecutionStrReplaceResultBlockParam) Marshal...
method UnmarshalJSON (line 6852) | func (r *BetaTextEditorCodeExecutionStrReplaceResultBlockParam) Unmars...
type BetaTextEditorCodeExecutionToolResultBlock (line 6856) | type BetaTextEditorCodeExecutionToolResultBlock struct
method implBetaContentBlockUnion (line 2054) | func (BetaTextEditorCodeExecutionToolResultBlock) implBetaContentBlock...
method implBetaRawContentBlockStartEventContentBlockUnion (line 5155) | func (BetaTextEditorCodeExecutionToolResultBlock) implBetaRawContentBl...
method RawJSON (line 6871) | func (r BetaTextEditorCodeExecutionToolResultBlock) RawJSON() string {...
method UnmarshalJSON (line 6872) | func (r *BetaTextEditorCodeExecutionToolResultBlock) UnmarshalJSON(dat...
type BetaTextEditorCodeExecutionToolResultBlockContentUnion (line 6883) | type BetaTextEditorCodeExecutionToolResultBlockContentUnion struct
method AsResponseTextEditorCodeExecutionToolResultError (line 6930) | func (u BetaTextEditorCodeExecutionToolResultBlockContentUnion) AsResp...
method AsResponseTextEditorCodeExecutionViewResultBlock (line 6935) | func (u BetaTextEditorCodeExecutionToolResultBlockContentUnion) AsResp...
method AsResponseTextEditorCodeExecutionCreateResultBlock (line 6940) | func (u BetaTextEditorCodeExecutionToolResultBlockContentUnion) AsResp...
method AsResponseTextEditorCodeExecutionStrReplaceResultBlock (line 6945) | func (u BetaTextEditorCodeExecutionToolResultBlockContentUnion) AsResp...
method RawJSON (line 6951) | func (u BetaTextEditorCodeExecutionToolResultBlockContentUnion) RawJSO...
method UnmarshalJSON (line 6953) | func (r *BetaTextEditorCodeExecutionToolResultBlockContentUnion) Unmar...
type BetaTextEditorCodeExecutionToolResultBlockParam (line 6958) | type BetaTextEditorCodeExecutionToolResultBlockParam struct
method MarshalJSON (line 6969) | func (r BetaTextEditorCodeExecutionToolResultBlockParam) MarshalJSON()...
method UnmarshalJSON (line 6973) | func (r *BetaTextEditorCodeExecutionToolResultBlockParam) UnmarshalJSO...
type BetaTextEditorCodeExecutionToolResultBlockParamContentUnion (line 6980) | type BetaTextEditorCodeExecutionToolResultBlockParamContentUnion struct
method MarshalJSON (line 6988) | func (u BetaTextEditorCodeExecutionToolResultBlockParamContentUnion) M...
method UnmarshalJSON (line 6991) | func (u *BetaTextEditorCodeExecutionToolResultBlockParamContentUnion) ...
method asAny (line 6995) | func (u *BetaTextEditorCodeExecutionToolResultBlockParamContentUnion) ...
method GetErrorCode (line 7009) | func (u BetaTextEditorCodeExecutionToolResultBlockParamContentUnion) G...
method GetErrorMessage (line 7017) | func (u BetaTextEditorCodeExecutionToolResultBlockParamContentUnion) G...
method GetContent (line 7025) | func (u BetaTextEditorCodeExecutionToolResultBlockParamContentUnion) G...
method GetFileType (line 7033) | func (u BetaTextEditorCodeExecutionToolResultBlockParamContentUnion) G...
method GetNumLines (line 7041) | func (u BetaTextEditorCodeExecutionToolResultBlockParamContentUnion) G...
method GetStartLine (line 7049) | func (u BetaTextEditorCodeExecutionToolResultBlockParamContentUnion) G...
method GetTotalLines (line 7057) | func (u BetaTextEditorCodeExecutionToolResultBlockParamContentUnion) G...
method GetIsFileUpdate (line 7065) | func (u BetaTextEditorCodeExecutionToolResultBlockParamContentUnion) G...
method GetLines (line 7073) | func (u BetaTextEditorCodeExecutionToolResultBlockParamContentUnion) G...
method GetNewLines (line 7081) | func (u BetaTextEditorCodeExecutionToolResultBlockParamContentUnion) G...
method GetNewStart (line 7089) | func (u BetaTextEditorCodeExecutionToolResultBlockParamContentUnion) G...
method GetOldLines (line 7097) | func (u BetaTextEditorCodeExecutionToolResultBlockParamContentUnion) G...
method GetOldStart (line 7105) | func (u BetaTextEditorCodeExecutionToolResultBlockParamContentUnion) G...
method GetType (line 7113) | func (u BetaTextEditorCodeExecutionToolResultBlockParamContentUnion) G...
type BetaTextEditorCodeExecutionToolResultError (line 7126) | type BetaTextEditorCodeExecutionToolResultError struct
method RawJSON (line 7143) | func (r BetaTextEditorCodeExecutionToolResultError) RawJSON() string {...
method UnmarshalJSON (line 7144) | func (r *BetaTextEditorCodeExecutionToolResultError) UnmarshalJSON(dat...
type BetaTextEditorCodeExecutionToolResultErrorErrorCode (line 7148) | type BetaTextEditorCodeExecutionToolResultErrorErrorCode
constant BetaTextEditorCodeExecutionToolResultErrorErrorCodeInvalidToolInput (line 7151) | BetaTextEditorCodeExecutionToolResultErrorErrorCodeInvalidToolInput ...
constant BetaTextEditorCodeExecutionToolResultErrorErrorCodeUnavailable (line 7152) | BetaTextEditorCodeExecutionToolResultErrorErrorCodeUnavailable ...
constant BetaTextEditorCodeExecutionToolResultErrorErrorCodeTooManyRequests (line 7153) | BetaTextEditorCodeExecutionToolResultErrorErrorCodeTooManyRequests ...
constant BetaTextEditorCodeExecutionToolResultErrorErrorCodeExecutionTimeExceeded (line 7154) | BetaTextEditorCodeExecutionToolResultErrorErrorCodeExecutionTimeExceeded...
constant BetaTextEditorCodeExecutionToolResultErrorErrorCodeFileNotFound (line 7155) | BetaTextEditorCodeExecutionToolResultErrorErrorCodeFileNotFound ...
type BetaTextEditorCodeExecutionToolResultErrorParam (line 7159) | type BetaTextEditorCodeExecutionToolResultErrorParam struct
method MarshalJSON (line 7170) | func (r BetaTextEditorCodeExecutionToolResultErrorParam) MarshalJSON()...
method UnmarshalJSON (line 7174) | func (r *BetaTextEditorCodeExecutionToolResultErrorParam) UnmarshalJSO...
type BetaTextEditorCodeExecutionToolResultErrorParamErrorCode (line 7178) | type BetaTextEditorCodeExecutionToolResultErrorParamErrorCode
constant BetaTextEditorCodeExecutionToolResultErrorParamErrorCodeInvalidToolInput (line 7181) | BetaTextEditorCodeExecutionToolResultErrorParamErrorCodeInvalidToolInput...
constant BetaTextEditorCodeExecutionToolResultErrorParamErrorCodeUnavailable (line 7182) | BetaTextEditorCodeExecutionToolResultErrorParamErrorCodeUnavailable ...
constant BetaTextEditorCodeExecutionToolResultErrorParamErrorCodeTooManyRequests (line 7183) | BetaTextEditorCodeExecutionToolResultErrorParamErrorCodeTooManyRequests ...
constant BetaTextEditorCodeExecutionToolResultErrorParamErrorCodeExecutionTimeExceeded (line 7184) | BetaTextEditorCodeExecutionToolResultErrorParamErrorCodeExecutionTimeExc...
constant BetaTextEditorCodeExecutionToolResultErrorParamErrorCodeFileNotFound (line 7185) | BetaTextEditorCodeExecutionToolResultErrorParamErrorCodeFileNotFound ...
type BetaTextEditorCodeExecutionViewResultBlock (line 7188) | type BetaTextEditorCodeExecutionViewResultBlock struct
method RawJSON (line 7210) | func (r BetaTextEditorCodeExecutionViewResultBlock) RawJSON() string {...
method UnmarshalJSON (line 7211) | func (r *BetaTextEditorCodeExecutionViewResultBlock) UnmarshalJSON(dat...
type BetaTextEditorCodeExecutionViewResultBlockFileType (line 7215) | type BetaTextEditorCodeExecutionViewResultBlockFileType
constant BetaTextEditorCodeExecutionViewResultBlockFileTypeText (line 7218) | BetaTextEditorCodeExecutionViewResultBlockFileTypeText BetaTextEditorCo...
constant BetaTextEditorCodeExecutionViewResultBlockFileTypeImage (line 7219) | BetaTextEditorCodeExecutionViewResultBlockFileTypeImage BetaTextEditorCo...
constant BetaTextEditorCodeExecutionViewResultBlockFileTypePDF (line 7220) | BetaTextEditorCodeExecutionViewResultBlockFileTypePDF BetaTextEditorCo...
type BetaTextEditorCodeExecutionViewResultBlockParam (line 7224) | type BetaTextEditorCodeExecutionViewResultBlockParam struct
method MarshalJSON (line 7237) | func (r BetaTextEditorCodeExecutionViewResultBlockParam) MarshalJSON()...
method UnmarshalJSON (line 7241) | func (r *BetaTextEditorCodeExecutionViewResultBlockParam) UnmarshalJSO...
type BetaTextEditorCodeExecutionViewResultBlockParamFileType (line 7245) | type BetaTextEditorCodeExecutionViewResultBlockParamFileType
constant BetaTextEditorCodeExecutionViewResultBlockParamFileTypeText (line 7248) | BetaTextEditorCodeExecutionViewResultBlockParamFileTypeText BetaTextEdi...
constant BetaTextEditorCodeExecutionViewResultBlockParamFileTypeImage (line 7249) | BetaTextEditorCodeExecutionViewResultBlockParamFileTypeImage BetaTextEdi...
constant BetaTextEditorCodeExecutionViewResultBlockParamFileTypePDF (line 7250) | BetaTextEditorCodeExecutionViewResultBlockParamFileTypePDF BetaTextEdi...
type BetaThinkingBlock (line 7253) | type BetaThinkingBlock struct
method implBetaContentBlockUnion (line 2046) | func (BetaThinkingBlock) implBetaContentBlockUnion() ...
method implBetaRawContentBlockStartEventContentBlockUnion (line 5147) | func (BetaThinkingBlock) implBetaRawContentBlockStartEventContentBlock...
method RawJSON (line 7268) | func (r BetaThinkingBlock) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 7269) | func (r *BetaThinkingBlock) UnmarshalJSON(data []byte) error {
type BetaThinkingBlockParam (line 7274) | type BetaThinkingBlockParam struct
method MarshalJSON (line 7282) | func (r BetaThinkingBlockParam) MarshalJSON() (data []byte, err error) {
method UnmarshalJSON (line 7286) | func (r *BetaThinkingBlockParam) UnmarshalJSON(data []byte) error {
type BetaThinkingConfigAdaptiveParam (line 7291) | type BetaThinkingConfigAdaptiveParam struct
method MarshalJSON (line 7304) | func (r BetaThinkingConfigAdaptiveParam) MarshalJSON() (data []byte, e...
method UnmarshalJSON (line 7308) | func (r *BetaThinkingConfigAdaptiveParam) UnmarshalJSON(data []byte) e...
type BetaThinkingConfigAdaptiveDisplay (line 7316) | type BetaThinkingConfigAdaptiveDisplay
constant BetaThinkingConfigAdaptiveDisplaySummarized (line 7319) | BetaThinkingConfigAdaptiveDisplaySummarized BetaThinkingConfigAdaptiveDi...
constant BetaThinkingConfigAdaptiveDisplayOmitted (line 7320) | BetaThinkingConfigAdaptiveDisplayOmitted BetaThinkingConfigAdaptiveDi...
function NewBetaThinkingConfigDisabledParam (line 7323) | func NewBetaThinkingConfigDisabledParam() BetaThinkingConfigDisabledParam {
type BetaThinkingConfigDisabledParam (line 7331) | type BetaThinkingConfigDisabledParam struct
method MarshalJSON (line 7336) | func (r BetaThinkingConfigDisabledParam) MarshalJSON() (data []byte, e...
method UnmarshalJSON (line 7340) | func (r *BetaThinkingConfigDisabledParam) UnmarshalJSON(data []byte) e...
type BetaThinkingConfigEnabledParam (line 7345) | type BetaThinkingConfigEnabledParam struct
method MarshalJSON (line 7368) | func (r BetaThinkingConfigEnabledParam) MarshalJSON() (data []byte, er...
method UnmarshalJSON (line 7372) | func (r *BetaThinkingConfigEnabledParam) UnmarshalJSON(data []byte) er...
type BetaThinkingConfigEnabledDisplay (line 7380) | type BetaThinkingConfigEnabledDisplay
constant BetaThinkingConfigEnabledDisplaySummarized (line 7383) | BetaThinkingConfigEnabledDisplaySummarized BetaThinkingConfigEnabledDisp...
constant BetaThinkingConfigEnabledDisplayOmitted (line 7384) | BetaThinkingConfigEnabledDisplayOmitted BetaThinkingConfigEnabledDisp...
function BetaThinkingConfigParamOfEnabled (line 7387) | func BetaThinkingConfigParamOfEnabled(budgetTokens int64) BetaThinkingCo...
type BetaThinkingConfigParamUnion (line 7396) | type BetaThinkingConfigParamUnion struct
method MarshalJSON (line 7403) | func (u BetaThinkingConfigParamUnion) MarshalJSON() ([]byte, error) {
method UnmarshalJSON (line 7406) | func (u *BetaThinkingConfigParamUnion) UnmarshalJSON(data []byte) error {
method asAny (line 7410) | func (u *BetaThinkingConfigParamUnion) asAny() any {
method GetBudgetTokens (line 7422) | func (u BetaThinkingConfigParamUnion) GetBudgetTokens() *int64 {
method GetType (line 7430) | func (u BetaThinkingConfigParamUnion) GetType() *string {
method GetDisplay (line 7442) | func (u BetaThinkingConfigParamUnion) GetDisplay() *string {
type BetaThinkingDelta (line 7451) | type BetaThinkingDelta struct
method implBetaRawContentBlockDeltaUnion (line 4955) | func (BetaThinkingDelta) implBetaRawContentBlockDeltaUnion() ...
method RawJSON (line 7464) | func (r BetaThinkingDelta) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 7465) | func (r *BetaThinkingDelta) UnmarshalJSON(data []byte) error {
type BetaThinkingTurnsParam (line 7470) | type BetaThinkingTurnsParam struct
method MarshalJSON (line 7477) | func (r BetaThinkingTurnsParam) MarshalJSON() (data []byte, err error) {
method UnmarshalJSON (line 7481) | func (r *BetaThinkingTurnsParam) UnmarshalJSON(data []byte) error {
type BetaToolParam (line 7486) | type BetaToolParam struct
method MarshalJSON (line 7524) | func (r BetaToolParam) MarshalJSON() (data []byte, err error) {
method UnmarshalJSON (line 7528) | func (r *BetaToolParam) UnmarshalJSON(data []byte) error {
type BetaToolInputSchemaParam (line 7538) | type BetaToolInputSchemaParam struct
method MarshalJSON (line 7547) | func (r BetaToolInputSchemaParam) MarshalJSON() (data []byte, err erro...
method UnmarshalJSON (line 7551) | func (r *BetaToolInputSchemaParam) UnmarshalJSON(data []byte) error {
type BetaToolType (line 7555) | type BetaToolType
constant BetaToolTypeCustom (line 7558) | BetaToolTypeCustom BetaToolType = "custom"
type BetaToolBash20241022Param (line 7562) | type BetaToolBash20241022Param struct
method MarshalJSON (line 7584) | func (r BetaToolBash20241022Param) MarshalJSON() (data []byte, err err...
method UnmarshalJSON (line 7588) | func (r *BetaToolBash20241022Param) UnmarshalJSON(data []byte) error {
type BetaToolBash20250124Param (line 7593) | type BetaToolBash20250124Param struct
method MarshalJSON (line 7615) | func (r BetaToolBash20250124Param) MarshalJSON() (data []byte, err err...
method UnmarshalJSON (line 7619) | func (r *BetaToolBash20250124Param) UnmarshalJSON(data []byte) error {
function BetaToolChoiceParamOfTool (line 7623) | func BetaToolChoiceParamOfTool(name string) BetaToolChoiceUnionParam {
type BetaToolChoiceUnionParam (line 7632) | type BetaToolChoiceUnionParam struct
method MarshalJSON (line 7640) | func (u BetaToolChoiceUnionParam) MarshalJSON() ([]byte, error) {
method UnmarshalJSON (line 7643) | func (u *BetaToolChoiceUnionParam) UnmarshalJSON(data []byte) error {
method asAny (line 7647) | func (u *BetaToolChoiceUnionParam) asAny() any {
method GetName (line 7661) | func (u BetaToolChoiceUnionParam) GetName() *string {
method GetType (line 7669) | func (u BetaToolChoiceUnionParam) GetType() *string {
method GetDisableParallelToolUse (line 7683) | func (u BetaToolChoiceUnionParam) GetDisableParallelToolUse() *bool {
type BetaToolChoiceAnyParam (line 7697) | type BetaToolChoiceAnyParam struct
method MarshalJSON (line 7708) | func (r BetaToolChoiceAnyParam) MarshalJSON() (data []byte, err error) {
method UnmarshalJSON (line 7712) | func (r *BetaToolChoiceAnyParam) UnmarshalJSON(data []byte) error {
type BetaToolChoiceAutoParam (line 7719) | type BetaToolChoiceAutoParam struct
method MarshalJSON (line 7730) | func (r BetaToolChoiceAutoParam) MarshalJSON() (data []byte, err error) {
method UnmarshalJSON (line 7734) | func (r *BetaToolChoiceAutoParam) UnmarshalJSON(data []byte) error {
function NewBetaToolChoiceNoneParam (line 7738) | func NewBetaToolChoiceNoneParam() BetaToolChoiceNoneParam {
type BetaToolChoiceNoneParam (line 7748) | type BetaToolChoiceNoneParam struct
method MarshalJSON (line 7753) | func (r BetaToolChoiceNoneParam) MarshalJSON() (data []byte, err error) {
method UnmarshalJSON (line 7757) | func (r *BetaToolChoiceNoneParam) UnmarshalJSON(data []byte) error {
type BetaToolChoiceToolParam (line 7764) | type BetaToolChoiceToolParam struct
method MarshalJSON (line 7777) | func (r BetaToolChoiceToolParam) MarshalJSON() (data []byte, err error) {
method UnmarshalJSON (line 7781) | func (r *BetaToolChoiceToolParam) UnmarshalJSON(data []byte) error {
type BetaToolComputerUse20241022Param (line 7786) | type BetaToolComputerUse20241022Param struct
method MarshalJSON (line 7815) | func (r BetaToolComputerUse20241022Param) MarshalJSON() (data []byte, ...
method UnmarshalJSON (line 7819) | func (r *BetaToolComputerUse20241022Param) UnmarshalJSON(data []byte) ...
type BetaToolComputerUse20250124Param (line 7824) | type BetaToolComputerUse20250124Param struct
method MarshalJSON (line 7853) | func (r BetaToolComputerUse20250124Param) MarshalJSON() (data []byte, ...
method UnmarshalJSON (line 7857) | func (r *BetaToolComputerUse20250124Param) UnmarshalJSON(data []byte) ...
type BetaToolComputerUse20251124Param (line 7862) | type BetaToolComputerUse20251124Param struct
method MarshalJSON (line 7893) | func (r BetaToolComputerUse20251124Param) MarshalJSON() (data []byte, ...
method UnmarshalJSON (line 7897) | func (r *BetaToolComputerUse20251124Param) UnmarshalJSON(data []byte) ...
type BetaToolReferenceBlock (line 7901) | type BetaToolReferenceBlock struct
method RawJSON (line 7914) | func (r BetaToolReferenceBlock) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 7915) | func (r *BetaToolReferenceBlock) UnmarshalJSON(data []byte) error {
type BetaToolReferenceBlockParam (line 7922) | type BetaToolReferenceBlockParam struct
method MarshalJSON (line 7931) | func (r BetaToolReferenceBlockParam) MarshalJSON() (data []byte, err e...
method UnmarshalJSON (line 7935) | func (r *BetaToolReferenceBlockParam) UnmarshalJSON(data []byte) error {
type BetaToolResultBlockParam (line 7940) | type BetaToolResultBlockParam struct
method MarshalJSON (line 7951) | func (r BetaToolResultBlockParam) MarshalJSON() (data []byte, err erro...
method UnmarshalJSON (line 7955) | func (r *BetaToolResultBlockParam) UnmarshalJSON(data []byte) error {
function NewBetaToolResultTextBlockParam (line 7959) | func NewBetaToolResultTextBlockParam(toolUseID string, text string, isEr...
type BetaToolResultBlockParamContentUnion (line 7972) | type BetaToolResultBlockParamContentUnion struct
method MarshalJSON (line 7981) | func (u BetaToolResultBlockParamContentUnion) MarshalJSON() ([]byte, e...
method UnmarshalJSON (line 7988) | func (u *BetaToolResultBlockParamContentUnion) UnmarshalJSON(data []by...
method asAny (line 7992) | func (u *BetaToolResultBlockParamContentUnion) asAny() any {
method GetText (line 8008) | func (u BetaToolResultBlockParamContentUnion) GetText() *string {
method GetContent (line 8016) | func (u BetaToolResultBlockParamContentUnion) GetContent() []BetaTextB...
method GetContext (line 8024) | func (u BetaToolResultBlockParamContentUnion) GetContext() *string {
method GetToolName (line 8032) | func (u BetaToolResultBlockParamContentUnion) GetToolName() *string {
method GetType (line 8040) | func (u BetaToolResultBlockParamContentUnion) GetType() *string {
method GetTitle (line 8056) | func (u BetaToolResultBlockParamContentUnion) GetTitle() *string {
method GetCacheControl (line 8066) | func (u BetaToolResultBlockParamContentUnion) GetCacheControl() *BetaC...
method GetCitations (line 8084) | func (u BetaToolResultBlockParamContentUnion) GetCitations() (res beta...
method GetSource (line 8121) | func (u BetaToolResultBlockParamContentUnion) GetSource() (res betaToo...
type betaToolResultBlockParamContentUnionCitations (line 8097) | type betaToolResultBlockParamContentUnionCitations struct
method AsAny (line 8107) | func (u betaToolResultBlockParamContentUnionCitations) AsAny() any { r...
method GetEnabled (line 8110) | func (u betaToolResultBlockParamContentUnionCitations) GetEnabled() *b...
type betaToolResultBlockParamContentUnionSource (line 8137) | type betaToolResultBlockParamContentUnionSource struct
method AsAny (line 8154) | func (u betaToolResultBlockParamContentUnionSource) AsAny() any { retu...
method GetContent (line 8157) | func (u betaToolResultBlockParamContentUnionSource) GetContent() *Beta...
method GetData (line 8166) | func (u betaToolResultBlockParamContentUnionSource) GetData() *string {
method GetMediaType (line 8177) | func (u betaToolResultBlockParamContentUnionSource) GetMediaType() *st...
method GetType (line 8188) | func (u betaToolResultBlockParamContentUnionSource) GetType() *string {
method GetURL (line 8199) | func (u betaToolResultBlockParamContentUnionSource) GetURL() *string {
method GetFileID (line 8210) | func (u betaToolResultBlockParamContentUnionSource) GetFileID() *string {
type BetaToolSearchToolBm25_20251119Param (line 8221) | type BetaToolSearchToolBm25_20251119Param struct
method MarshalJSON (line 8244) | func (r BetaToolSearchToolBm25_20251119Param) MarshalJSON() (data []by...
method UnmarshalJSON (line 8248) | func (r *BetaToolSearchToolBm25_20251119Param) UnmarshalJSON(data []by...
type BetaToolSearchToolBm25_20251119Type (line 8252) | type BetaToolSearchToolBm25_20251119Type
constant BetaToolSearchToolBm25_20251119TypeToolSearchToolBm25_20251119 (line 8255) | BetaToolSearchToolBm25_20251119TypeToolSearchToolBm25_20251119 BetaToolS...
constant BetaToolSearchToolBm25_20251119TypeToolSearchToolBm25 (line 8256) | BetaToolSearchToolBm25_20251119TypeToolSearchToolBm25 BetaToolS...
type BetaToolSearchToolRegex20251119Param (line 8260) | type BetaToolSearchToolRegex20251119Param struct
method MarshalJSON (line 8282) | func (r BetaToolSearchToolRegex20251119Param) MarshalJSON() (data []by...
method UnmarshalJSON (line 8286) | func (r *BetaToolSearchToolRegex20251119Param) UnmarshalJSON(data []by...
type BetaToolSearchToolRegex20251119Type (line 8290) | type BetaToolSearchToolRegex20251119Type
constant BetaToolSearchToolRegex20251119TypeToolSearchToolRegex20251119 (line 8293) | BetaToolSearchToolRegex20251119TypeToolSearchToolRegex20251119 BetaToolS...
constant BetaToolSearchToolRegex20251119TypeToolSearchToolRegex (line 8294) | BetaToolSearchToolRegex20251119TypeToolSearchToolRegex BetaToolS...
type BetaToolSearchToolResultBlock (line 8297) | type BetaToolSearchToolResultBlock struct
method implBetaContentBlockUnion (line 2055) | func (BetaToolSearchToolResultBlock) implBetaContentBlockUnion() ...
method implBetaRawContentBlockStartEventContentBlockUnion (line 5157) | func (BetaToolSearchToolResultBlock) implBetaRawContentBlockStartEvent...
method RawJSON (line 8312) | func (r BetaToolSearchToolResultBlock) RawJSON() string { return r.JSO...
method UnmarshalJSON (line 8313) | func (r *BetaToolSearchToolResultBlock) UnmarshalJSON(data []byte) err...
type BetaToolSearchToolResultBlockContentUnion (line 8322) | type BetaToolSearchToolResultBlockContentUnion struct
method AsResponseToolSearchToolResultError (line 8339) | func (u BetaToolSearchToolResultBlockContentUnion) AsResponseToolSearc...
method AsResponseToolSearchToolSearchResultBlock (line 8344) | func (u BetaToolSearchToolResultBlockContentUnion) AsResponseToolSearc...
method RawJSON (line 8350) | func (u BetaToolSearchToolResultBlockContentUnion) RawJSON() string { ...
method UnmarshalJSON (line 8352) | func (r *BetaToolSearchToolResultBlockContentUnion) UnmarshalJSON(data...
type BetaToolSearchToolResultBlockParam (line 8357) | type BetaToolSearchToolResultBlockParam struct
method MarshalJSON (line 8368) | func (r BetaToolSearchToolResultBlockParam) MarshalJSON() (data []byte...
method UnmarshalJSON (line 8372) | func (r *BetaToolSearchToolResultBlockParam) UnmarshalJSON(data []byte...
type BetaToolSearchToolResultBlockParamContentUnion (line 8379) | type BetaToolSearchToolResultBlockParamContentUnion struct
method MarshalJSON (line 8385) | func (u BetaToolSearchToolResultBlockParamContentUnion) MarshalJSON() ...
method UnmarshalJSON (line 8388) | func (u *BetaToolSearchToolResultBlockParamContentUnion) UnmarshalJSON...
method asAny (line 8392) | func (u *BetaToolSearchToolResultBlockParamContentUnion) asAny() any {
method GetErrorCode (line 8402) | func (u BetaToolSearchToolResultBlockParamContentUnion) GetErrorCode()...
method GetToolReferences (line 8410) | func (u BetaToolSearchToolResultBlockParamContentUnion) GetToolReferen...
method GetType (line 8418) | func (u BetaToolSearchToolResultBlockParamContentUnion) GetType() *str...
type BetaToolSearchToolResultError (line 8427) | type BetaToolSearchToolResultError struct
method RawJSON (line 8444) | func (r BetaToolSearchToolResultError) RawJSON() string { return r.JSO...
method UnmarshalJSON (line 8445) | func (r *BetaToolSearchToolResultError) UnmarshalJSON(data []byte) err...
type BetaToolSearchToolResultErrorErrorCode (line 8449) | type BetaToolSearchToolResultErrorErrorCode
constant BetaToolSearchToolResultErrorErrorCodeInvalidToolInput (line 8452) | BetaToolSearchToolResultErrorErrorCodeInvalidToolInput BetaToolSear...
constant BetaToolSearchToolResultErrorErrorCodeUnavailable (line 8453) | BetaToolSearchToolResultErrorErrorCodeUnavailable BetaToolSear...
constant BetaToolSearchToolResultErrorErrorCodeTooManyRequests (line 8454) | BetaToolSearchToolResultErrorErrorCodeTooManyRequests BetaToolSear...
constant BetaToolSearchToolResultErrorErrorCodeExecutionTimeExceeded (line 8455) | BetaToolSearchToolResultErrorErrorCodeExecutionTimeExceeded BetaToolSear...
type BetaToolSearchToolResultErrorParam (line 8459) | type BetaToolSearchToolResultErrorParam struct
method MarshalJSON (line 8469) | func (r BetaToolSearchToolResultErrorParam) MarshalJSON() (data []byte...
method UnmarshalJSON (line 8473) | func (r *BetaToolSearchToolResultErrorParam) UnmarshalJSON(data []byte...
type BetaToolSearchToolResultErrorParamErrorCode (line 8477) | type BetaToolSearchToolResultErrorParamErrorCode
constant BetaToolSearchToolResultErrorParamErrorCodeInvalidToolInput (line 8480) | BetaToolSearchToolResultErrorParamErrorCodeInvalidToolInput BetaToo...
constant BetaToolSearchToolResultErrorParamErrorCodeUnavailable (line 8481) | BetaToolSearchToolResultErrorParamErrorCodeUnavailable BetaToo...
constant BetaToolSearchToolResultErrorParamErrorCodeTooManyRequests (line 8482) | BetaToolSearchToolResultErrorParamErrorCodeTooManyRequests BetaToo...
constant BetaToolSearchToolResultErrorParamErrorCodeExecutionTimeExceeded (line 8483) | BetaToolSearchToolResultErrorParamErrorCodeExecutionTimeExceeded BetaToo...
type BetaToolSearchToolSearchResultBlock (line 8486) | type BetaToolSearchToolSearchResultBlock struct
method RawJSON (line 8499) | func (r BetaToolSearchToolSearchResultBlock) RawJSON() string { return...
method UnmarshalJSON (line 8500) | func (r *BetaToolSearchToolSearchResultBlock) UnmarshalJSON(data []byt...
type BetaToolSearchToolSearchResultBlockParam (line 8505) | type BetaToolSearchToolSearchResultBlockParam struct
method MarshalJSON (line 8513) | func (r BetaToolSearchToolSearchResultBlockParam) MarshalJSON() (data ...
method UnmarshalJSON (line 8517) | func (r *BetaToolSearchToolSearchResultBlockParam) UnmarshalJSON(data ...
type BetaToolTextEditor20241022Param (line 8522) | type BetaToolTextEditor20241022Param struct
method MarshalJSON (line 8546) | func (r BetaToolTextEditor20241022Param) MarshalJSON() (data []byte, e...
method UnmarshalJSON (line 8550) | func (r *BetaToolTextEditor20241022Param) UnmarshalJSON(data []byte) e...
type BetaToolTextEditor20250124Param (line 8555) | type BetaToolTextEditor20250124Param struct
method MarshalJSON (line 8579) | func (r BetaToolTextEditor20250124Param) MarshalJSON() (data []byte, e...
method UnmarshalJSON (line 8583) | func (r *BetaToolTextEditor20250124Param) UnmarshalJSON(data []byte) e...
type BetaToolTextEditor20250429Param (line 8588) | type BetaToolTextEditor20250429Param struct
method MarshalJSON (line 8612) | func (r BetaToolTextEditor20250429Param) MarshalJSON() (data []byte, e...
method UnmarshalJSON (line 8616) | func (r *BetaToolTextEditor20250429Param) UnmarshalJSON(data []byte) e...
type BetaToolTextEditor20250728Param (line 8621) | type BetaToolTextEditor20250728Param struct
method MarshalJSON (line 8648) | func (r BetaToolTextEditor20250728Param) MarshalJSON() (data []byte, e...
method UnmarshalJSON (line 8652) | func (r *BetaToolTextEditor20250728Param) UnmarshalJSON(data []byte) e...
function BetaToolUnionParamOfTool (line 8656) | func BetaToolUnionParamOfTool(inputSchema BetaToolInputSchemaParam, name...
function BetaToolUnionParamOfComputerUseTool20241022 (line 8663) | func BetaToolUnionParamOfComputerUseTool20241022(displayHeightPx int64, ...
function BetaToolUnionParamOfComputerUseTool20250124 (line 8670) | func BetaToolUnionParamOfComputerUseTool20250124(displayHeightPx int64, ...
function BetaToolUnionParamOfComputerUseTool20251124 (line 8677) | func BetaToolUnionParamOfComputerUseTool20251124(displayHeightPx int64, ...
function BetaToolUnionParamOfToolSearchToolBm25_20251119 (line 8684) | func BetaToolUnionParamOfToolSearchToolBm25_20251119(type_ BetaToolSearc...
function BetaToolUnionParamOfToolSearchToolRegex20251119 (line 8690) | func BetaToolUnionParamOfToolSearchToolRegex20251119(type_ BetaToolSearc...
function BetaToolUnionParamOfMCPToolset (line 8696) | func BetaToolUnionParamOfMCPToolset(mcpServerName string) BetaToolUnionP...
type BetaToolUnionParam (line 8705) | type BetaToolUnionParam struct
method MarshalJSON (line 8731) | func (u BetaToolUnionParam) MarshalJSON() ([]byte, error) {
method UnmarshalJSON (line 8755) | func (u *BetaToolUnionParam) UnmarshalJSON(data []byte) error {
method asAny (line 8759) | func (u *BetaToolUnionParam) asAny() any {
method GetInputSchema (line 8809) | func (u BetaToolUnionParam) GetInputSchema() *BetaToolInputSchemaParam {
method GetDescription (line 8817) | func (u BetaToolUnionParam) GetDescription() *string {
method GetEagerInputStreaming (line 8825) | func (u BetaToolUnionParam) GetEagerInputStreaming() *bool {
method GetEnableZoom (line 8833) | func (u BetaToolUnionParam) GetEnableZoom() *bool {
method GetMaxCharacters (line 8841) | func (u BetaToolUnionParam) GetMaxCharacters() *int64 {
method GetUseCache (line 8849) | func (u BetaToolUnionParam) GetUseCache() *bool {
method GetMCPServerName (line 8857) | func (u BetaToolUnionParam) GetMCPServerName() *string {
method GetConfigs (line 8865) | func (u BetaToolUnionParam) GetConfigs() map[string]BetaMCPToolConfigP...
method GetDefaultConfig (line 8873) | func (u BetaToolUnionParam) GetDefaultConfig() *BetaMCPToolDefaultConf...
method GetName (line 8881) | func (u BetaToolUnionParam) GetName() *string {
method GetDeferLoading (line 8929) | func (u BetaToolUnionParam) GetDeferLoading() *bool {
method GetStrict (line 8977) | func (u BetaToolUnionParam) GetStrict() *bool {
method GetType (line 9025) | func (u BetaToolUnionParam) GetType() *string {
method GetDisplayHeightPx (line 9075) | func (u BetaToolUnionParam) GetDisplayHeightPx() *int64 {
method GetDisplayWidthPx (line 9087) | func (u BetaToolUnionParam) GetDisplayWidthPx() *int64 {
method GetDisplayNumber (line 9099) | func (u BetaToolUnionParam) GetDisplayNumber() *int64 {
method GetMaxUses (line 9111) | func (u BetaToolUnionParam) GetMaxUses() *int64 {
method GetMaxContentTokens (line 9127) | func (u BetaToolUnionParam) GetMaxContentTokens() *int64 {
method GetAllowedCallers (line 9140) | func (u BetaToolUnionParam) GetAllowedCallers() []string {
method GetCacheControl (line 9188) | func (u BetaToolUnionParam) GetCacheControl() *BetaCacheControlEphemer...
method GetInputExamples (line 9239) | func (u BetaToolUnionParam) GetInputExamples() []map[string]any {
method GetAllowedDomains (line 9268) | func (u BetaToolUnionParam) GetAllowedDomains() []string {
method GetBlockedDomains (line 9285) | func (u BetaToolUnionParam) GetBlockedDomains() []string {
method GetUserLocation (line 9301) | func (u BetaToolUnionParam) GetUserLocation() *BetaUserLocationParam {
method GetCitations (line 9311) | func (u BetaToolUnionParam) GetCitations() *BetaCitationsConfigParam {
type BetaToolUseBlock (line 9322) | type BetaToolUseBlock struct
method implBetaContentBlockUnion (line 2048) | func (BetaToolUseBlock) implBetaContentBlockUnion() ...
method implBetaRawContentBlockStartEventContentBlockUnion (line 5149) | func (BetaToolUseBlock) implBetaRawContentBlockStartEventContentBlockU...
method RawJSON (line 9342) | func (r BetaToolUseBlock) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 9343) | func (r *BetaToolUseBlock) UnmarshalJSON(data []byte) error {
type BetaToolUseBlockCallerUnion (line 9353) | type BetaToolUseBlockCallerUnion struct
method AsAny (line 9384) | func (u BetaToolUseBlockCallerUnion) AsAny() anyBetaToolUseBlockCaller {
method AsDirect (line 9396) | func (u BetaToolUseBlockCallerUnion) AsDirect() (v BetaDirectCaller) {
method AsCodeExecution20250825 (line 9401) | func (u BetaToolUseBlockCallerUnion) AsCodeExecution20250825() (v Beta...
method AsCodeExecution20260120 (line 9406) | func (u BetaToolUseBlockCallerUnion) AsCodeExecution20260120() (v Beta...
method RawJSON (line 9412) | func (u BetaToolUseBlockCallerUnion) RawJSON() string { return u.JSON....
method UnmarshalJSON (line 9414) | func (r *BetaToolUseBlockCallerUnion) UnmarshalJSON(data []byte) error {
type anyBetaToolUseBlockCaller (line 9367) | type anyBetaToolUseBlockCaller interface
type BetaToolUseBlockParam (line 9419) | type BetaToolUseBlockParam struct
method MarshalJSON (line 9432) | func (r BetaToolUseBlockParam) MarshalJSON() (data []byte, err error) {
method UnmarshalJSON (line 9436) | func (r *BetaToolUseBlockParam) UnmarshalJSON(data []byte) error {
type BetaToolUseBlockParamCallerUnion (line 9443) | type BetaToolUseBlockParamCallerUnion struct
method MarshalJSON (line 9450) | func (u BetaToolUseBlockParamCallerUnion) MarshalJSON() ([]byte, error) {
method UnmarshalJSON (line 9453) | func (u *BetaToolUseBlockParamCallerUnion) UnmarshalJSON(data []byte) ...
method asAny (line 9457) | func (u *BetaToolUseBlockParamCallerUnion) asAny() any {
method GetType (line 9469) | func (u BetaToolUseBlockParamCallerUnion) GetType() *string {
method GetToolID (line 9481) | func (u BetaToolUseBlockParamCallerUnion) GetToolID() *string {
type BetaToolUsesKeepParam (line 9491) | type BetaToolUsesKeepParam struct
method MarshalJSON (line 9498) | func (r BetaToolUsesKeepParam) MarshalJSON() (data []byte, err error) {
method UnmarshalJSON (line 9502) | func (r *BetaToolUsesKeepParam) UnmarshalJSON(data []byte) error {
type BetaToolUsesTriggerParam (line 9507) | type BetaToolUsesTriggerParam struct
method MarshalJSON (line 9514) | func (r BetaToolUsesTriggerParam) MarshalJSON() (data []byte, err erro...
method UnmarshalJSON (line 9518) | func (r *BetaToolUsesTriggerParam) UnmarshalJSON(data []byte) error {
type BetaURLImageSourceParam (line 9523) | type BetaURLImageSourceParam struct
method MarshalJSON (line 9530) | func (r BetaURLImageSourceParam) MarshalJSON() (data []byte, err error) {
method UnmarshalJSON (line 9534) | func (r *BetaURLImageSourceParam) UnmarshalJSON(data []byte) error {
type BetaURLPDFSourceParam (line 9539) | type BetaURLPDFSourceParam struct
method MarshalJSON (line 9546) | func (r BetaURLPDFSourceParam) MarshalJSON() (data []byte, err error) {
method UnmarshalJSON (line 9550) | func (r *BetaURLPDFSourceParam) UnmarshalJSON(data []byte) error {
type BetaUsage (line 9554) | type BetaUsage struct
method RawJSON (line 9604) | func (r BetaUsage) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 9605) | func (r *BetaUsage) UnmarshalJSON(data []byte) error {
type BetaUsageServiceTier (line 9610) | type BetaUsageServiceTier
constant BetaUsageServiceTierStandard (line 9613) | BetaUsageServiceTierStandard BetaUsageServiceTier = "standard"
constant BetaUsageServiceTierPriority (line 9614) | BetaUsageServiceTierPriority BetaUsageServiceTier = "priority"
constant BetaUsageServiceTierBatch (line 9615) | BetaUsageServiceTierBatch BetaUsageServiceTier = "batch"
type BetaUsageSpeed (line 9619) | type BetaUsageSpeed
constant BetaUsageSpeedStandard (line 9622) | BetaUsageSpeedStandard BetaUsageSpeed = "standard"
constant BetaUsageSpeedFast (line 9623) | BetaUsageSpeedFast BetaUsageSpeed = "fast"
type BetaUserLocationParam (line 9627) | type BetaUserLocationParam struct
method MarshalJSON (line 9643) | func (r BetaUserLocationParam) MarshalJSON() (data []byte, err error) {
method UnmarshalJSON (line 9647) | func (r *BetaUserLocationParam) UnmarshalJSON(data []byte) error {
type BetaWebFetchBlock (line 9651) | type BetaWebFetchBlock struct
method RawJSON (line 9670) | func (r BetaWebFetchBlock) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 9671) | func (r *BetaWebFetchBlock) UnmarshalJSON(data []byte) error {
type BetaWebFetchBlockParam (line 9676) | type BetaWebFetchBlockParam struct
method MarshalJSON (line 9687) | func (r BetaWebFetchBlockParam) MarshalJSON() (data []byte, err error) {
method UnmarshalJSON (line 9691) | func (r *BetaWebFetchBlockParam) UnmarshalJSON(data []byte) error {
type BetaWebFetchTool20250910Param (line 9696) | type BetaWebFetchTool20250910Param struct
method MarshalJSON (line 9730) | func (r BetaWebFetchTool20250910Param) MarshalJSON() (data []byte, err...
method UnmarshalJSON (line 9734) | func (r *BetaWebFetchTool20250910Param) UnmarshalJSON(data []byte) err...
type BetaWebFetchTool20260209Param (line 9739) | type BetaWebFetchTool20260209Param struct
method MarshalJSON (line 9773) | func (r BetaWebFetchTool20260209Param) MarshalJSON() (data []byte, err...
method UnmarshalJSON (line 9777) | func (r *BetaWebFetchTool20260209Param) UnmarshalJSON(data []byte) err...
type BetaWebFetchTool20260309Param (line 9784) | type BetaWebFetchTool20260309Param struct
method MarshalJSON (line 9822) | func (r BetaWebFetchTool20260309Param) MarshalJSON() (data []byte, err...
method UnmarshalJSON (line 9826) | func (r *BetaWebFetchTool20260309Param) UnmarshalJSON(data []byte) err...
type BetaWebFetchToolResultBlock (line 9830) | type BetaWebFetchToolResultBlock struct
method implBetaContentBlockUnion (line 2051) | func (BetaWebFetchToolResultBlock) implBetaContentBlockUnion() ...
method implBetaRawContentBlockStartEventContentBlockUnion (line 5152) | func (BetaWebFetchToolResultBlock) implBetaRawContentBlockStartEventCo...
method RawJSON (line 9848) | func (r BetaWebFetchToolResultBlock) RawJSON() string { return r.JSON....
method UnmarshalJSON (line 9849) | func (r *BetaWebFetchToolResultBlock) UnmarshalJSON(data []byte) error {
type BetaWebFetchToolResultBlockContentUnion (line 9857) | type BetaWebFetchToolResultBlockContentUnion struct
method AsResponseWebFetchToolResultError (line 9877) | func (u BetaWebFetchToolResultBlockContentUnion) AsResponseWebFetchToo...
method AsResponseWebFetchResultBlock (line 9882) | func (u BetaWebFetchToolResultBlockContentUnion) AsResponseWebFetchRes...
method RawJSON (line 9888) | func (u BetaWebFetchToolResultBlockContentUnion) RawJSON() string { re...
method UnmarshalJSON (line 9890) | func (r *BetaWebFetchToolResultBlockContentUnion) UnmarshalJSON(data [...
type BetaWebFetchToolResultBlockCallerUnion (line 9902) | type BetaWebFetchToolResultBlockCallerUnion struct
method AsAny (line 9933) | func (u BetaWebFetchToolResultBlockCallerUnion) AsAny() anyBetaWebFetc...
method AsDirect (line 9945) | func (u BetaWebFetchToolResultBlockCallerUnion) AsDirect() (v BetaDire...
method AsCodeExecution20250825 (line 9950) | func (u BetaWebFetchToolResultBlockCallerUnion) AsCodeExecution2025082...
method AsCodeExecution20260120 (line 9955) | func (u BetaWebFetchToolResultBlockCallerUnion) AsCodeExecution2026012...
method RawJSON (line 9961) | func (u BetaWebFetchToolResultBlockCallerUnion) RawJSON() string { ret...
method UnmarshalJSON (line 9963) | func (r *BetaWebFetchToolResultBlockCallerUnion) UnmarshalJSON(data []...
type anyBetaWebFetchToolResultBlockCaller (line 9916) | type anyBetaWebFetchToolResultBlockCaller interface
type BetaWebFetchToolResultBlockParam (line 9968) | type BetaWebFetchToolResultBlockParam struct
method MarshalJSON (line 9981) | func (r BetaWebFetchToolResultBlockParam) MarshalJSON() (data []byte, ...
method UnmarshalJSON (line 9985) | func (r *BetaWebFetchToolResultBlockParam) UnmarshalJSON(data []byte) ...
type BetaWebFetchToolResultBlockParamContentUnion (line 9992) | type BetaWebFetchToolResultBlockParamContentUnion struct
method MarshalJSON (line 9998) | func (u BetaWebFetchToolResultBlockParamContentUnion) MarshalJSON() ([...
method UnmarshalJSON (line 10001) | func (u *BetaWebFetchToolResultBlockParamContentUnion) UnmarshalJSON(d...
method asAny (line 10005) | func (u *BetaWebFetchToolResultBlockParamContentUnion) asAny() any {
method GetErrorCode (line 10015) | func (u BetaWebFetchToolResultBlockParamContentUnion) GetErrorCode() *...
method GetContent (line 10023) | func (u BetaWebFetchToolResultBlockParamContentUnion) GetContent() *Be...
method GetURL (line 10031) | func (u BetaWebFetchToolResultBlockParamContentUnion) GetURL() *string {
method GetRetrievedAt (line 10039) | func (u BetaWebFetchToolResultBlockParamContentUnion) GetRetrievedAt()...
method GetType (line 10047) | func (u BetaWebFetchToolResultBlockParamContentUnion) GetType() *string {
type BetaWebFetchToolResultBlockParamCallerUnion (line 10059) | type BetaWebFetchToolResultBlockParamCallerUnion struct
method MarshalJSON (line 10066) | func (u BetaWebFetchToolResultBlockParamCallerUnion) MarshalJSON() ([]...
method UnmarshalJSON (line 10069) | func (u *BetaWebFetchToolResultBlockParamCallerUnion) UnmarshalJSON(da...
method asAny (line 10073) | func (u *BetaWebFetchToolResultBlockParamCallerUnion) asAny() any {
method GetType (line 10085) | func (u BetaWebFetchToolResultBlockParamCallerUnion) GetType() *string {
method GetToolID (line 10097) | func (u BetaWebFetchToolResultBlockParamCallerUnion) GetToolID() *stri...
type BetaWebFetchToolResultErrorBlock (line 10106) | type BetaWebFetchToolResultErrorBlock struct
method RawJSON (line 10122) | func (r BetaWebFetchToolResultErrorBlock) RawJSON() string { return r....
method UnmarshalJSON (line 10123) | func (r *BetaWebFetchToolResultErrorBlock) UnmarshalJSON(data []byte) ...
type BetaWebFetchToolResultErrorBlockParam (line 10128) | type BetaWebFetchToolResultErrorBlockParam struct
method MarshalJSON (line 10139) | func (r BetaWebFetchToolResultErrorBlockParam) MarshalJSON() (data []b...
method UnmarshalJSON (line 10143) | func (r *BetaWebFetchToolResultErrorBlockParam) UnmarshalJSON(data []b...
type BetaWebFetchToolResultErrorCode (line 10147) | type BetaWebFetchToolResultErrorCode
constant BetaWebFetchToolResultErrorCodeInvalidToolInput (line 10150) | BetaWebFetchToolResultErrorCodeInvalidToolInput BetaWebFetchToolRe...
constant BetaWebFetchToolResultErrorCodeURLTooLong (line 10151) | BetaWebFetchToolResultErrorCodeURLTooLong BetaWebFetchToolRe...
constant BetaWebFetchToolResultErrorCodeURLNotAllowed (line 10152) | BetaWebFetchToolResultErrorCodeURLNotAllowed BetaWebFetchToolRe...
constant BetaWebFetchToolResultErrorCodeURLNotAccessible (line 10153) | BetaWebFetchToolResultErrorCodeURLNotAccessible BetaWebFetchToolRe...
constant BetaWebFetchToolResultErrorCodeUnsupportedContentType (line 10154) | BetaWebFetchToolResultErrorCodeUnsupportedContentType BetaWebFetchToolRe...
constant BetaWebFetchToolResultErrorCodeTooManyRequests (line 10155) | BetaWebFetchToolResultErrorCodeTooManyRequests BetaWebFetchToolRe...
constant BetaWebFetchToolResultErrorCodeMaxUsesExceeded (line 10156) | BetaWebFetchToolResultErrorCodeMaxUsesExceeded BetaWebFetchToolRe...
constant BetaWebFetchToolResultErrorCodeUnavailable (line 10157) | BetaWebFetchToolResultErrorCodeUnavailable BetaWebFetchToolRe...
type BetaWebSearchResultBlock (line 10160) | type BetaWebSearchResultBlock struct
method RawJSON (line 10179) | func (r BetaWebSearchResultBlock) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 10180) | func (r *BetaWebSearchResultBlock) UnmarshalJSON(data []byte) error {
type BetaWebSearchResultBlockParam (line 10185) | type BetaWebSearchResultBlockParam struct
method MarshalJSON (line 10196) | func (r BetaWebSearchResultBlockParam) MarshalJSON() (data []byte, err...
method UnmarshalJSON (line 10200) | func (r *BetaWebSearchResultBlockParam) UnmarshalJSON(data []byte) err...
type BetaWebSearchTool20250305Param (line 10205) | type BetaWebSearchTool20250305Param struct
method MarshalJSON (line 10238) | func (r BetaWebSearchTool20250305Param) MarshalJSON() (data []byte, er...
method UnmarshalJSON (line 10242) | func (r *BetaWebSearchTool20250305Param) UnmarshalJSON(data []byte) er...
type BetaWebSearchTool20260209Param (line 10247) | type BetaWebSearchTool20260209Param struct
method MarshalJSON (line 10280) | func (r BetaWebSearchTool20260209Param) MarshalJSON() (data []byte, er...
method UnmarshalJSON (line 10284) | func (r *BetaWebSearchTool20260209Param) UnmarshalJSON(data []byte) er...
type BetaWebSearchToolRequestErrorParam (line 10289) | type BetaWebSearchToolRequestErrorParam struct
method MarshalJSON (line 10299) | func (r BetaWebSearchToolRequestErrorParam) MarshalJSON() (data []byte...
method UnmarshalJSON (line 10303) | func (r *BetaWebSearchToolRequestErrorParam) UnmarshalJSON(data []byte...
type BetaWebSearchToolResultBlock (line 10307) | type BetaWebSearchToolResultBlock struct
method implBetaContentBlockUnion (line 2050) | func (BetaWebSearchToolResultBlock) implBetaContentBlockUnion() ...
method implBetaRawContentBlockStartEventContentBlockUnion (line 5151) | func (BetaWebSearchToolResultBlock) implBetaRawContentBlockStartEventC...
method RawJSON (line 10325) | func (r BetaWebSearchToolResultBlock) RawJSON() string { return r.JSON...
method UnmarshalJSON (line 10326) | func (r *BetaWebSearchToolResultBlock) UnmarshalJSON(data []byte) error {
type BetaWebSearchToolResultBlockCallerUnion (line 10338) | type BetaWebSearchToolResultBlockCallerUnion struct
method AsAny (line 10369) | func (u BetaWebSearchToolResultBlockCallerUnion) AsAny() anyBetaWebSea...
method AsDirect (line 10381) | func (u BetaWebSearchToolResultBlockCallerUnion) AsDirect() (v BetaDir...
method AsCodeExecution20250825 (line 10386) | func (u BetaWebSearchToolResultBlockCallerUnion) AsCodeExecution202508...
method AsCodeExecution20260120 (line 10391) | func (u BetaWebSearchToolResultBlockCallerUnion) AsCodeExecution202601...
method RawJSON (line 10397) | func (u BetaWebSearchToolResultBlockCallerUnion) RawJSON() string { re...
method UnmarshalJSON (line 10399) | func (r *BetaWebSearchToolResultBlockCallerUnion) UnmarshalJSON(data [...
type anyBetaWebSearchToolResultBlockCaller (line 10352) | type anyBetaWebSearchToolResultBlockCaller interface
type BetaWebSearchToolResultBlockContentUnion (line 10410) | type BetaWebSearchToolResultBlockContentUnion struct
method AsResponseWebSearchToolResultError (line 10426) | func (u BetaWebSearchToolResultBlockContentUnion) AsResponseWebSearchT...
method AsBetaWebSearchResultBlockArray (line 10431) | func (u BetaWebSearchToolResultBlockContentUnion) AsBetaWebSearchResul...
method RawJSON (line 10437) | func (u BetaWebSearchToolResultBlockContentUnion) RawJSON() string { r...
method UnmarshalJSON (line 10439) | func (r *BetaWebSearchToolResultBlockContentUnion) UnmarshalJSON(data ...
type BetaWebSearchToolResultBlockParam (line 10444) | type BetaWebSearchToolResultBlockParam struct
method MarshalJSON (line 10457) | func (r BetaWebSearchToolResultBlockParam) MarshalJSON() (data []byte,...
method UnmarshalJSON (line 10461) | func (r *BetaWebSearchToolResultBlockParam) UnmarshalJSON(data []byte)...
type BetaWebSearchToolResultBlockParamCallerUnion (line 10468) | type BetaWebSearchToolResultBlockParamCallerUnion struct
method MarshalJSON (line 10475) | func (u BetaWebSearchToolResultBlockParamCallerUnion) MarshalJSON() ([...
method UnmarshalJSON (line 10478) | func (u *BetaWebSearchToolResultBlockParamCallerUnion) UnmarshalJSON(d...
method asAny (line 10482) | func (u *BetaWebSearchToolResultBlockParamCallerUnion) asAny() any {
method GetType (line 10494) | func (u BetaWebSearchToolResultBlockParamCallerUnion) GetType() *string {
method GetToolID (line 10506) | func (u BetaWebSearchToolResultBlockParamCallerUnion) GetToolID() *str...
function BetaNewWebSearchToolRequestError (line 10515) | func BetaNewWebSearchToolRequestError(errorCode BetaWebSearchToolResultE...
type BetaWebSearchToolResultBlockParamContentUnion (line 10524) | type BetaWebSearchToolResultBlockParamContentUnion struct
method MarshalJSON (line 10530) | func (u BetaWebSearchToolResultBlockParamContentUnion) MarshalJSON() (...
method UnmarshalJSON (line 10533) | func (u *BetaWebSearchToolResultBlockParamContentUnion) UnmarshalJSON(...
method asAny (line 10537) | func (u *BetaWebSearchToolResultBlockParamContentUnion) asAny() any {
type BetaWebSearchToolResultError (line 10546) | type BetaWebSearchToolResultError struct
method RawJSON (line 10561) | func (r BetaWebSearchToolResultError) RawJSON() string { return r.JSON...
method UnmarshalJSON (line 10562) | func (r *BetaWebSearchToolResultError) UnmarshalJSON(data []byte) error {
type BetaWebSearchToolResultErrorCode (line 10566) | type BetaWebSearchToolResultErrorCode
constant BetaWebSearchToolResultErrorCodeInvalidToolInput (line 10569) | BetaWebSearchToolResultErrorCodeInvalidToolInput BetaWebSearchToolResult...
constant BetaWebSearchToolResultErrorCodeUnavailable (line 10570) | BetaWebSearchToolResultErrorCodeUnavailable BetaWebSearchToolResult...
constant BetaWebSearchToolResultErrorCodeMaxUsesExceeded (line 10571) | BetaWebSearchToolResultErrorCodeMaxUsesExceeded BetaWebSearchToolResult...
constant BetaWebSearchToolResultErrorCodeTooManyRequests (line 10572) | BetaWebSearchToolResultErrorCodeTooManyRequests BetaWebSearchToolResult...
constant BetaWebSearchToolResultErrorCodeQueryTooLong (line 10573) | BetaWebSearchToolResultErrorCodeQueryTooLong BetaWebSearchToolResult...
constant BetaWebSearchToolResultErrorCodeRequestTooLarge (line 10574) | BetaWebSearchToolResultErrorCodeRequestTooLarge BetaWebSearchToolResult...
type BetaMessageNewParams (line 10577) | type BetaMessageNewParams struct
method MarshalJSON (line 10841) | func (r BetaMessageNewParams) MarshalJSON() (data []byte, err error) {
method UnmarshalJSON (line 10845) | func (r *BetaMessageNewParams) UnmarshalJSON(data []byte) error {
type BetaMessageNewParamsContainerUnion (line 10852) | type BetaMessageNewParamsContainerUnion struct
method MarshalJSON (line 10858) | func (u BetaMessageNewParamsContainerUnion) MarshalJSON() ([]byte, err...
method UnmarshalJSON (line 10861) | func (u *BetaMessageNewParamsContainerUnion) UnmarshalJSON(data []byte...
method asAny (line 10865) | func (u *BetaMessageNewParamsContainerUnion) asAny() any {
type BetaMessageNewParamsServiceTier (line 10879) | type BetaMessageNewParamsServiceTier
constant BetaMessageNewParamsServiceTierAuto (line 10882) | BetaMessageNewParamsServiceTierAuto BetaMessageNewParamsServiceT...
constant BetaMessageNewParamsServiceTierStandardOnly (line 10883) | BetaMessageNewParamsServiceTierStandardOnly BetaMessageNewParamsServiceT...
type BetaMessageNewParamsSpeed (line 10888) | type BetaMessageNewParamsSpeed
constant BetaMessageNewParamsSpeedStandard (line 10891) | BetaMessageNewParamsSpeedStandard BetaMessageNewParamsSpeed = "standard"
constant BetaMessageNewParamsSpeedFast (line 10892) | BetaMessageNewParamsSpeedFast BetaMessageNewParamsSpeed = "fast"
type BetaMessageCountTokensParams (line 10895) | type BetaMessageCountTokensParams struct
method MarshalJSON (line 11099) | func (r BetaMessageCountTokensParams) MarshalJSON() (data []byte, err ...
method UnmarshalJSON (line 11103) | func (r *BetaMessageCountTokensParams) UnmarshalJSON(data []byte) error {
type BetaMessageCountTokensParamsSpeed (line 11109) | type BetaMessageCountTokensParamsSpeed
constant BetaMessageCountTokensParamsSpeedStandard (line 11112) | BetaMessageCountTokensParamsSpeedStandard BetaMessageCountTokensParamsSp...
constant BetaMessageCountTokensParamsSpeedFast (line 11113) | BetaMessageCountTokensParamsSpeedFast BetaMessageCountTokensParamsSp...
type BetaMessageCountTokensParamsSystemUnion (line 11119) | type BetaMessageCountTokensParamsSystemUnion struct
method MarshalJSON (line 11125) | func (u BetaMessageCountTokensParamsSystemUnion) MarshalJSON() ([]byte...
method UnmarshalJSON (line 11128) | func (u *BetaMessageCountTokensParamsSystemUnion) UnmarshalJSON(data [...
method asAny (line 11132) | func (u *BetaMessageCountTokensParamsSystemUnion) asAny() any {
type BetaMessageCountTokensParamsToolUnion (line 11144) | type BetaMessageCountTokensParamsToolUnion struct
method MarshalJSON (line 11170) | func (u BetaMessageCountTokensParamsToolUnion) MarshalJSON() ([]byte, ...
method UnmarshalJSON (line 11194) | func (u *BetaMessageCountTokensParamsToolUnion) UnmarshalJSON(data []b...
method asAny (line 11198) | func (u *BetaMessageCountTokensParamsToolUnion) asAny() any {
method GetInputSchema (line 11248) | func (u BetaMessageCountTokensParamsToolUnion) GetInputSchema() *BetaT...
method GetDescription (line 11256) | func (u BetaMessageCountTokensParamsToolUnion) GetDescription() *string {
method GetEagerInputStreaming (line 11264) | func (u BetaMessageCountTokensParamsToolUnion) GetEagerInputStreaming(...
method GetEnableZoom (line 11272) | func (u BetaMessageCountTokensParamsToolUnion) GetEnableZoom() *bool {
method GetMaxCharacters (line 11280) | func (u BetaMessageCountTokensParamsToolUnion) GetMaxCharacters() *int...
method GetUseCache (line 11288) | func (u BetaMessageCountTokensParamsToolUnion) GetUseCache() *bool {
method GetMCPServerName (line 11296) | func (u BetaMessageCountTokensParamsToolUnion) GetMCPServerName() *str...
method GetConfigs (line 11304) | func (u BetaMessageCountTokensParamsToolUnion) GetConfigs() map[string...
method GetDefaultConfig (line 11312) | func (u BetaMessageCountTokensParamsToolUnion) GetDefaultConfig() *Bet...
method GetName (line 11320) | func (u BetaMessageCountTokensParamsToolUnion) GetName() *string {
method GetDeferLoading (line 11368) | func (u BetaMessageCountTokensParamsToolUnion) GetDeferLoading() *bool {
method GetStrict (line 11416) | func (u BetaMessageCountTokensParamsToolUnion) GetStrict() *bool {
method GetType (line 11464) | func (u BetaMessageCountTokensParamsToolUnion) GetType() *string {
method GetDisplayHeightPx (line 11514) | func (u BetaMessageCountTokensParamsToolUnion) GetDisplayHeightPx() *i...
method GetDisplayWidthPx (line 11526) | func (u BetaMessageCountTokensParamsToolUnion) GetDisplayWidthPx() *in...
method GetDisplayNumber (line 11538) | func (u BetaMessageCountTokensParamsToolUnion) GetDisplayNumber() *int...
method GetMaxUses (line 11550) | func (u BetaMessageCountTokensParamsToolUnion) GetMaxUses() *int64 {
method GetMaxContentTokens (line 11566) | func (u BetaMessageCountTokensParamsToolUnion) GetMaxContentTokens() *...
method GetAllowedCallers (line 11579) | func (u BetaMessageCountTokensParamsToolUnion) GetAllowedCallers() []s...
method GetCacheControl (line 11627) | func (u BetaMessageCountTokensParamsToolUnion) GetCacheControl() *Beta...
method GetInputExamples (line 11678) | func (u BetaMessageCountTokensParamsToolUnion) GetInputExamples() []ma...
method GetAllowedDomains (line 11707) | func (u BetaMessageCountTokensParamsToolUnion) GetAllowedDomains() []s...
method GetBlockedDomains (line 11724) | func (u BetaMessageCountTokensParamsToolUnion) GetBlockedDomains() []s...
method GetUserLocation (line 11740) | func (u BetaMessageCountTokensParamsToolUnion) GetUserLocation() *Beta...
method GetCitations (line 11750) | func (u BetaMessageCountTokensParamsToolUnion) GetCitations() *BetaCit...
FILE: betamessage_test.go
function TestBetaMessageNewWithOptionalParams (line 17) | func TestBetaMessageNewWithOptionalParams(t *testing.T) {
function TestBetaMessageCountTokensWithOptionalParams (line 178) | func TestBetaMessageCountTokensWithOptionalParams(t *testing.T) {
function TestBetaAccumulate (line 321) | func TestBetaAccumulate(t *testing.T) {
FILE: betamessagebatch.go
type BetaMessageBatchService (line 32) | type BetaMessageBatchService struct
method New (line 53) | func (r *BetaMessageBatchService) New(ctx context.Context, params Beta...
method Get (line 70) | func (r *BetaMessageBatchService) Get(ctx context.Context, messageBatc...
method List (line 90) | func (r *BetaMessageBatchService) List(ctx context.Context, params Bet...
method ListAutoPaging (line 115) | func (r *BetaMessageBatchService) ListAutoPaging(ctx context.Context, ...
method Delete (line 126) | func (r *BetaMessageBatchService) Delete(ctx context.Context, messageB...
method Cancel (line 153) | func (r *BetaMessageBatchService) Cancel(ctx context.Context, messageB...
method ResultsStreaming (line 176) | func (r *BetaMessageBatchService) ResultsStreaming(ctx context.Context...
function NewBetaMessageBatchService (line 39) | func NewBetaMessageBatchService(opts ...option.RequestOption) (r BetaMes...
type BetaDeletedMessageBatch (line 195) | type BetaDeletedMessageBatch struct
method RawJSON (line 212) | func (r BetaDeletedMessageBatch) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 213) | func (r *BetaDeletedMessageBatch) UnmarshalJSON(data []byte) error {
type BetaMessageBatch (line 217) | type BetaMessageBatch struct
method RawJSON (line 278) | func (r BetaMessageBatch) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 279) | func (r *BetaMessageBatch) UnmarshalJSON(data []byte) error {
type BetaMessageBatchProcessingStatus (line 284) | type BetaMessageBatchProcessingStatus
constant BetaMessageBatchProcessingStatusInProgress (line 287) | BetaMessageBatchProcessingStatusInProgress BetaMessageBatchProcessingSta...
constant BetaMessageBatchProcessingStatusCanceling (line 288) | BetaMessageBatchProcessingStatusCanceling BetaMessageBatchProcessingSta...
constant BetaMessageBatchProcessingStatusEnded (line 289) | BetaMessageBatchProcessingStatusEnded BetaMessageBatchProcessingSta...
type BetaMessageBatchCanceledResult (line 292) | type BetaMessageBatchCanceledResult struct
method RawJSON (line 303) | func (r BetaMessageBatchCanceledResult) RawJSON() string { return r.JS...
method UnmarshalJSON (line 304) | func (r *BetaMessageBatchCanceledResult) UnmarshalJSON(data []byte) er...
method implBetaMessageBatchResultUnion (line 439) | func (BetaMessageBatchCanceledResult) implBetaMessageBatchResultUnion(...
type BetaMessageBatchErroredResult (line 308) | type BetaMessageBatchErroredResult struct
method RawJSON (line 321) | func (r BetaMessageBatchErroredResult) RawJSON() string { return r.JSO...
method UnmarshalJSON (line 322) | func (r *BetaMessageBatchErroredResult) UnmarshalJSON(data []byte) err...
method implBetaMessageBatchResultUnion (line 438) | func (BetaMessageBatchErroredResult) implBetaMessageBatchResultUnion()...
type BetaMessageBatchExpiredResult (line 326) | type BetaMessageBatchExpiredResult struct
method RawJSON (line 337) | func (r BetaMessageBatchExpiredResult) RawJSON() string { return r.JSO...
method UnmarshalJSON (line 338) | func (r *BetaMessageBatchExpiredResult) UnmarshalJSON(data []byte) err...
method implBetaMessageBatchResultUnion (line 440) | func (BetaMessageBatchExpiredResult) implBetaMessageBatchResultUnion()...
type BetaMessageBatchIndividualResponse (line 344) | type BetaMessageBatchIndividualResponse struct
method RawJSON (line 366) | func (r BetaMessageBatchIndividualResponse) RawJSON() string { return ...
method UnmarshalJSON (line 367) | func (r *BetaMessageBatchIndividualResponse) UnmarshalJSON(data []byte...
type BetaMessageBatchRequestCounts (line 371) | type BetaMessageBatchRequestCounts struct
method RawJSON (line 403) | func (r BetaMessageBatchRequestCounts) RawJSON() string { return r.JSO...
method UnmarshalJSON (line 404) | func (r *BetaMessageBatchRequestCounts) UnmarshalJSON(data []byte) err...
type BetaMessageBatchResultUnion (line 415) | type BetaMessageBatchResultUnion struct
method AsAny (line 452) | func (u BetaMessageBatchResultUnion) AsAny() anyBetaMessageBatchResult {
method AsSucceeded (line 466) | func (u BetaMessageBatchResultUnion) AsSucceeded() (v BetaMessageBatch...
method AsErrored (line 471) | func (u BetaMessageBatchResultUnion) AsErrored() (v BetaMessageBatchEr...
method AsCanceled (line 476) | func (u BetaMessageBatchResultUnion) AsCanceled() (v BetaMessageBatchC...
method AsExpired (line 481) | func (u BetaMessageBatchResultUnion) AsExpired() (v BetaMessageBatchEx...
method RawJSON (line 487) | func (u BetaMessageBatchResultUnion) RawJSON() string { return u.JSON....
method UnmarshalJSON (line 489) | func (r *BetaMessageBatchResultUnion) UnmarshalJSON(data []byte) error {
type anyBetaMessageBatchResult (line 433) | type anyBetaMessageBatchResult interface
type BetaMessageBatchSucceededResult (line 493) | type BetaMessageBatchSucceededResult struct
method implBetaMessageBatchResultUnion (line 437) | func (BetaMessageBatchSucceededResult) implBetaMessageBatchResultUnion...
method RawJSON (line 506) | func (r BetaMessageBatchSucceededResult) RawJSON() string { return r.J...
method UnmarshalJSON (line 507) | func (r *BetaMessageBatchSucceededResult) UnmarshalJSON(data []byte) e...
type BetaMessageBatchNewParams (line 511) | type BetaMessageBatchNewParams struct
method MarshalJSON (line 520) | func (r BetaMessageBatchNewParams) MarshalJSON() (data []byte, err err...
method UnmarshalJSON (line 524) | func (r *BetaMessageBatchNewParams) UnmarshalJSON(data []byte) error {
type BetaMessageBatchNewParamsRequest (line 529) | type BetaMessageBatchNewParamsRequest struct
method MarshalJSON (line 543) | func (r BetaMessageBatchNewParamsRequest) MarshalJSON() (data []byte, ...
method UnmarshalJSON (line 547) | func (r *BetaMessageBatchNewParamsRequest) UnmarshalJSON(data []byte) ...
type BetaMessageBatchNewParamsRequestParams (line 557) | type BetaMessageBatchNewParamsRequestParams struct
method MarshalJSON (line 825) | func (r BetaMessageBatchNewParamsRequestParams) MarshalJSON() (data []...
method UnmarshalJSON (line 829) | func (r *BetaMessageBatchNewParamsRequestParams) UnmarshalJSON(data []...
function init (line 833) | func init() {
type BetaMessageBatchNewParamsRequestParamsContainerUnion (line 845) | type BetaMessageBatchNewParamsRequestParamsContainerUnion struct
method MarshalJSON (line 851) | func (u BetaMessageBatchNewParamsRequestParamsContainerUnion) MarshalJ...
method UnmarshalJSON (line 854) | func (u *BetaMessageBatchNewParamsRequestParamsContainerUnion) Unmarsh...
method asAny (line 858) | func (u *BetaMessageBatchNewParamsRequestParamsContainerUnion) asAny()...
type BetaMessageBatchGetParams (line 867) | type BetaMessageBatchGetParams struct
type BetaMessageBatchListParams (line 873) | type BetaMessageBatchListParams struct
method URLQuery (line 891) | func (r BetaMessageBatchListParams) URLQuery() (v url.Values, err erro...
type BetaMessageBatchDeleteParams (line 898) | type BetaMessageBatchDeleteParams struct
type BetaMessageBatchCancelParams (line 904) | type BetaMessageBatchCancelParams struct
type BetaMessageBatchResultsParams (line 910) | type BetaMessageBatchResultsParams struct
FILE: betamessagebatch_test.go
function TestBetaMessageBatchNewWithOptionalParams (line 16) | func TestBetaMessageBatchNewWithOptionalParams(t *testing.T) {
function TestBetaMessageBatchGetWithOptionalParams (line 183) | func TestBetaMessageBatchGetWithOptionalParams(t *testing.T) {
function TestBetaMessageBatchListWithOptionalParams (line 211) | func TestBetaMessageBatchListWithOptionalParams(t *testing.T) {
function TestBetaMessageBatchDeleteWithOptionalParams (line 238) | func TestBetaMessageBatchDeleteWithOptionalParams(t *testing.T) {
function TestBetaMessageBatchCancelWithOptionalParams (line 266) | func TestBetaMessageBatchCancelWithOptionalParams(t *testing.T) {
FILE: betamessageutil.go
method Accumulate (line 20) | func (acc *BetaMessage) Accumulate(event BetaRawMessageStreamEventUnion)...
method ToParam (line 97) | func (r BetaContentBlockUnion) ToParam() BetaContentBlockParamUnion {
method toParamUnion (line 101) | func (variant BetaTextBlock) toParamUnion() BetaContentBlockParamUnion {
method toParamUnion (line 106) | func (variant BetaToolUseBlock) toParamUnion() BetaContentBlockParamUnion {
method toParamUnion (line 111) | func (variant BetaThinkingBlock) toParamUnion() BetaContentBlockParamUni...
method toParamUnion (line 116) | func (variant BetaRedactedThinkingBlock) toParamUnion() BetaContentBlock...
method toParamUnion (line 121) | func (variant BetaWebSearchToolResultBlock) toParamUnion() BetaContentBl...
method toParamUnion (line 126) | func (variant BetaBashCodeExecutionToolResultBlock) toParamUnion() BetaC...
method toParamUnion (line 131) | func (variant BetaCodeExecutionToolResultBlock) toParamUnion() BetaConte...
method toParamUnion (line 136) | func (variant BetaContainerUploadBlock) toParamUnion() BetaContentBlockP...
method toParamUnion (line 141) | func (variant BetaMCPToolResultBlock) toParamUnion() BetaContentBlockPar...
method toParamUnion (line 146) | func (variant BetaMCPToolUseBlock) toParamUnion() BetaContentBlockParamU...
method toParamUnion (line 151) | func (variant BetaServerToolUseBlock) toParamUnion() BetaContentBlockPar...
method toParamUnion (line 156) | func (variant BetaTextEditorCodeExecutionToolResultBlock) toParamUnion()...
method toParamUnion (line 161) | func (variant BetaWebFetchToolResultBlock) toParamUnion() BetaContentBlo...
method toParamUnion (line 166) | func (variant BetaToolSearchToolResultBlock) toParamUnion() BetaContentB...
method toParamUnion (line 171) | func (variant BetaCompactionBlock) toParamUnion() BetaContentBlockParamU...
method ToParam (line 176) | func (r BetaMessage) ToParam() BetaMessageParam {
method ToParam (line 187) | func (r BetaRedactedThinkingBlock) ToParam() BetaRedactedThinkingBlockPa...
method ToParam (line 194) | func (r BetaTextBlock) ToParam() BetaTextBlockParam {
method toParamUnion (line 210) | func (r BetaCitationCharLocation) toParamUnion() BetaTextCitationParamUn...
method toParamUnion (line 221) | func (citationVariant BetaCitationPageLocation) toParamUnion() BetaTextC...
method toParamUnion (line 231) | func (citationVariant BetaCitationContentBlockLocation) toParamUnion() B...
method toParamUnion (line 242) | func (citationVariant BetaCitationsWebSearchResultLocation) toParamUnion...
method toParamUnion (line 250) | func (citationVariant BetaCitationSearchResultLocation) toParamUnion() B...
method ToParam (line 261) | func (r BetaThinkingBlock) ToParam() BetaThinkingBlockParam {
method ToParam (line 269) | func (r BetaToolUseBlock) ToParam() BetaToolUseBlockParam {
method ToParam (line 278) | func (r BetaWebSearchResultBlock) ToParam() BetaWebSearchResultBlockParam {
method ToParam (line 288) | func (r BetaWebSearchToolResultBlock) ToParam() BetaWebSearchToolResultB...
method ToParam (line 306) | func (r BetaWebFetchToolResultBlock) ToParam() BetaWebFetchToolResultBlo...
method ToParam (line 313) | func (r BetaMCPToolUseBlock) ToParam() BetaMCPToolUseBlockParam {
method ToParam (line 323) | func (r BetaContainerUploadBlock) ToParam() BetaContainerUploadBlockParam {
method ToParam (line 330) | func (r BetaServerToolUseBlock) ToParam() BetaServerToolUseBlockParam {
method ToParam (line 339) | func (r BetaTextEditorCodeExecutionToolResultBlock) ToParam() BetaTextEd...
method ToParam (line 354) | func (r BetaMCPToolResultBlock) ToParam() BetaRequestMCPToolResultBlockP...
method ToParam (line 368) | func (r BetaBashCodeExecutionToolResultBlock) ToParam() BetaBashCodeExec...
method ToParam (line 392) | func (r BetaBashCodeExecutionOutputBlock) ToParam() BetaBashCodeExecutio...
method ToParam (line 399) | func (r BetaCodeExecutionToolResultBlock) ToParam() BetaCodeExecutionToo...
method ToParam (line 420) | func (r BetaCodeExecutionOutputBlock) ToParam() BetaCodeExecutionOutputB...
method ToParam (line 427) | func (r BetaToolSearchToolResultBlock) ToParam() BetaToolSearchToolResul...
method ToParam (line 447) | func (r BetaToolReferenceBlock) ToParam() BetaToolReferenceBlockParam {
method ToParam (line 454) | func (r BetaCompactionBlock) ToParam() BetaCompactionBlockParam {
FILE: betamodel.go
type BetaModelService (line 30) | type BetaModelService struct
method Get (line 47) | func (r *BetaModelService) Get(ctx context.Context, modelID string, qu...
method List (line 65) | func (r *BetaModelService) List(ctx context.Context, params BetaModelL...
method ListAutoPaging (line 89) | func (r *BetaModelService) ListAutoPaging(ctx context.Context, params ...
function NewBetaModelService (line 37) | func NewBetaModelService(opts ...option.RequestOption) (r BetaModelServi...
type BetaCapabilitySupport (line 94) | type BetaCapabilitySupport struct
method RawJSON (line 106) | func (r BetaCapabilitySupport) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 107) | func (r *BetaCapabilitySupport) UnmarshalJSON(data []byte) error {
type BetaContextManagementCapability (line 112) | type BetaContextManagementCapability struct
method RawJSON (line 133) | func (r BetaContextManagementCapability) RawJSON() string { return r.J...
method UnmarshalJSON (line 134) | func (r *BetaContextManagementCapability) UnmarshalJSON(data []byte) e...
type BetaEffortCapability (line 139) | type BetaEffortCapability struct
method RawJSON (line 163) | func (r BetaEffortCapability) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 164) | func (r *BetaEffortCapability) UnmarshalJSON(data []byte) error {
type BetaModelCapabilities (line 169) | type BetaModelCapabilities struct
method RawJSON (line 205) | func (r BetaModelCapabilities) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 206) | func (r *BetaModelCapabilities) UnmarshalJSON(data []byte) error {
type BetaModelInfo (line 210) | type BetaModelInfo struct
method RawJSON (line 243) | func (r BetaModelInfo) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 244) | func (r *BetaModelInfo) UnmarshalJSON(data []byte) error {
type BetaThinkingCapability (line 249) | type BetaThinkingCapability struct
method RawJSON (line 264) | func (r BetaThinkingCapability) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 265) | func (r *BetaThinkingCapability) UnmarshalJSON(data []byte) error {
type BetaThinkingTypes (line 270) | type BetaThinkingTypes struct
method RawJSON (line 285) | func (r BetaThinkingTypes) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 286) | func (r *BetaThinkingTypes) UnmarshalJSON(data []byte) error {
type BetaModelGetParams (line 290) | type BetaModelGetParams struct
type BetaModelListParams (line 296) | type BetaModelListParams struct
method URLQuery (line 313) | func (r BetaModelListParams) URLQuery() (v url.Values, err error) {
FILE: betamodel_test.go
function TestBetaModelGetWithOptionalParams (line 16) | func TestBetaModelGetWithOptionalParams(t *testing.T) {
function TestBetaModelListWithOptionalParams (line 44) | func TestBetaModelListWithOptionalParams(t *testing.T) {
FILE: betaskill.go
type BetaSkillService (line 32) | type BetaSkillService struct
method New (line 48) | func (r *BetaSkillService) New(ctx context.Context, params BetaSkillNe...
method Get (line 60) | func (r *BetaSkillService) Get(ctx context.Context, skillID string, qu...
method List (line 76) | func (r *BetaSkillService) List(ctx context.Context, params BetaSkillL...
method ListAutoPaging (line 97) | func (r *BetaSkillService) ListAutoPaging(ctx context.Context, params ...
method Delete (line 102) | func (r *BetaSkillService) Delete(ctx context.Context, skillID string,...
function NewBetaSkillService (line 40) | func NewBetaSkillService(opts ...option.RequestOption) (r BetaSkillServi...
type BetaSkillNewResponse (line 117) | type BetaSkillNewResponse struct
method RawJSON (line 161) | func (r BetaSkillNewResponse) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 162) | func (r *BetaSkillNewResponse) UnmarshalJSON(data []byte) error {
type BetaSkillGetResponse (line 166) | type BetaSkillGetResponse struct
method RawJSON (line 210) | func (r BetaSkillGetResponse) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 211) | func (r *BetaSkillGetResponse) UnmarshalJSON(data []byte) error {
type BetaSkillListResponse (line 215) | type BetaSkillListResponse struct
method RawJSON (line 259) | func (r BetaSkillListResponse) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 260) | func (r *BetaSkillListResponse) UnmarshalJSON(data []byte) error {
type BetaSkillDeleteResponse (line 264) | type BetaSkillDeleteResponse struct
method RawJSON (line 283) | func (r BetaSkillDeleteResponse) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 284) | func (r *BetaSkillDeleteResponse) UnmarshalJSON(data []byte) error {
type BetaSkillNewParams (line 288) | type BetaSkillNewParams struct
method MarshalMultipart (line 304) | func (r BetaSkillNewParams) MarshalMultipart() (data []byte, contentTy...
type BetaSkillGetParams (line 322) | type BetaSkillGetParams struct
type BetaSkillListParams (line 328) | type BetaSkillListParams struct
method URLQuery (line 351) | func (r BetaSkillListParams) URLQuery() (v url.Values, err error) {
type BetaSkillDeleteParams (line 358) | type BetaSkillDeleteParams struct
FILE: betaskill_test.go
function TestBetaSkillNewWithOptionalParams (line 18) | func TestBetaSkillNewWithOptionalParams(t *testing.T) {
function TestBetaSkillGetWithOptionalParams (line 44) | func TestBetaSkillGetWithOptionalParams(t *testing.T) {
function TestBetaSkillListWithOptionalParams (line 72) | func TestBetaSkillListWithOptionalParams(t *testing.T) {
function TestBetaSkillDeleteWithOptionalParams (line 99) | func TestBetaSkillDeleteWithOptionalParams(t *testing.T) {
FILE: betaskillversion.go
type BetaSkillVersionService (line 32) | type BetaSkillVersionService struct
method New (line 46) | func (r *BetaSkillVersionService) New(ctx context.Context, skillID str...
method Get (line 62) | func (r *BetaSkillVersionService) Get(ctx context.Context, version str...
method List (line 82) | func (r *BetaSkillVersionService) List(ctx context.Context, skillID st...
method ListAutoPaging (line 107) | func (r *BetaSkillVersionService) ListAutoPaging(ctx context.Context, ...
method Delete (line 112) | func (r *BetaSkillVersionService) Delete(ctx context.Context, version ...
function NewBetaSkillVersionService (line 39) | func NewBetaSkillVersionService(opts ...option.RequestOption) (r BetaSki...
type BetaSkillVersionNewResponse (line 131) | type BetaSkillVersionNewResponse struct
method RawJSON (line 176) | func (r BetaSkillVersionNewResponse) RawJSON() string { return r.JSON....
method UnmarshalJSON (line 177) | func (r *BetaSkillVersionNewResponse) UnmarshalJSON(data []byte) error {
type BetaSkillVersionGetResponse (line 181) | type BetaSkillVersionGetResponse struct
method RawJSON (line 226) | func (r BetaSkillVersionGetResponse) RawJSON() string { return r.JSON....
method UnmarshalJSON (line 227) | func (r *BetaSkillVersionGetResponse) UnmarshalJSON(data []byte) error {
type BetaSkillVersionListResponse (line 231) | type BetaSkillVersionListResponse struct
method RawJSON (line 276) | func (r BetaSkillVersionListResponse) RawJSON() string { return r.JSON...
method UnmarshalJSON (line 277) | func (r *BetaSkillVersionListResponse) UnmarshalJSON(data []byte) error {
type BetaSkillVersionDeleteResponse (line 281) | type BetaSkillVersionDeleteResponse struct
method RawJSON (line 300) | func (r BetaSkillVersionDeleteResponse) RawJSON() string { return r.JS...
method UnmarshalJSON (line 301) | func (r *BetaSkillVersionDeleteResponse) UnmarshalJSON(data []byte) er...
type BetaSkillVersionNewParams (line 305) | type BetaSkillVersionNewParams struct
method MarshalMultipart (line 316) | func (r BetaSkillVersionNewParams) MarshalMultipart() (data []byte, co...
type BetaSkillVersionGetParams (line 334) | type BetaSkillVersionGetParams struct
type BetaSkillVersionListParams (line 344) | type BetaSkillVersionListParams struct
method URLQuery (line 358) | func (r BetaSkillVersionListParams) URLQuery() (v url.Values, err erro...
type BetaSkillVersionDeleteParams (line 365) | type BetaSkillVersionDeleteParams struct
FILE: betaskillversion_test.go
function TestBetaSkillVersionNewWithOptionalParams (line 18) | func TestBetaSkillVersionNewWithOptionalParams(t *testing.T) {
function TestBetaSkillVersionGetWithOptionalParams (line 47) | func TestBetaSkillVersionGetWithOptionalParams(t *testing.T) {
function TestBetaSkillVersionListWithOptionalParams (line 76) | func TestBetaSkillVersionListWithOptionalParams(t *testing.T) {
function TestBetaSkillVersionDeleteWithOptionalParams (line 106) | func TestBetaSkillVersionDeleteWithOptionalParams(t *testing.T) {
FILE: betatoolrunner.go
type BetaTool (line 14) | type BetaTool interface
type BetaToolRunnerParams (line 26) | type BetaToolRunnerParams struct
type betaToolRunnerBase (line 34) | type betaToolRunnerBase struct
method LastMessage (line 75) | func (b *betaToolRunnerBase) LastMessage() *BetaMessage {
method AppendMessages (line 83) | func (b *betaToolRunnerBase) AppendMessages(messages ...BetaMessagePar...
method Messages (line 89) | func (b *betaToolRunnerBase) Messages() []BetaMessageParam {
method IterationCount (line 97) | func (b *betaToolRunnerBase) IterationCount() int {
method IsCompleted (line 103) | func (b *betaToolRunnerBase) IsCompleted() bool {
method Err (line 110) | func (b *betaToolRunnerBase) Err() error {
method executeTools (line 119) | func (b *betaToolRunnerBase) executeTools(ctx context.Context, message...
method executeToolUse (line 165) | func (b *betaToolRunnerBase) executeToolUse(ctx context.Context, toolU...
function newBetaToolRunnerBase (line 47) | func newBetaToolRunnerBase(messageService *BetaMessageService, tools []B...
function newBetaToolResultErrorBlockParam (line 160) | func newBetaToolResultErrorBlockParam(toolUseID string, errorText string...
type BetaToolRunner (line 205) | type BetaToolRunner struct
method NextMessage (line 226) | func (r *BetaToolRunner) NextMessage(ctx context.Context) (*BetaMessag...
method RunToCompletion (line 273) | func (r *BetaToolRunner) RunToCompletion(ctx context.Context) (*BetaMe...
method All (line 296) | func (r *BetaToolRunner) All(ctx context.Context) iter.Seq2[*BetaMessa...
method NewToolRunner (line 213) | func (r *BetaMessageService) NewToolRunner(tools []BetaTool, params Beta...
type BetaToolRunnerStreaming (line 322) | type BetaToolRunnerStreaming struct
method NextStreaming (line 345) | func (r *BetaToolRunnerStreaming) NextStreaming(ctx context.Context) i...
method AllStreaming (line 426) | func (r *BetaToolRunnerStreaming) AllStreaming(ctx context.Context) it...
method NewToolRunnerStreaming (line 330) | func (r *BetaMessageService) NewToolRunnerStreaming(tools []BetaTool, pa...
FILE: client.go
type Client (line 21) | type Client struct
method Execute (line 94) | func (r *Client) Execute(ctx context.Context, method string, path stri...
method Get (line 101) | func (r *Client) Get(ctx context.Context, path string, params any, res...
method Post (line 108) | func (r *Client) Post(ctx context.Context, path string, params any, re...
method Put (line 114) | func (r *Client) Put(ctx context.Context, path string, params any, res...
method Patch (line 121) | func (r *Client) Patch(ctx context.Context, path string, params any, r...
method Delete (line 128) | func (r *Client) Delete(ctx context.Context, path string, params any, ...
function DefaultClientOptions (line 32) | func DefaultClientOptions() []option.RequestOption {
function NewClient (line 50) | func NewClient(opts ...option.RequestOption) (r Client) {
function CalculateNonStreamingTimeout (line 134) | func CalculateNonStreamingTimeout(maxTokens int, model Model, opts []opt...
FILE: client_test.go
type closureTransport (line 19) | type closureTransport struct
method RoundTrip (line 23) | func (t *closureTransport) RoundTrip(req *http.Request) (*http.Respons...
function TestUserAgentHeader (line 27) | func TestUserAgentHeader(t *testing.T) {
function TestRetryAfter (line 59) | func TestRetryAfter(t *testing.T) {
function TestDeleteRetryCountHeader (line 104) | func TestDeleteRetryCountHeader(t *testing.T) {
function TestOverwriteRetryCountHeader (line 145) | func TestOverwriteRetryCountHeader(t *testing.T) {
function TestRetryAfterMs (line 186) | func TestRetryAfterMs(t *testing.T) {
function TestContextCancel (line 224) | func TestContextCancel(t *testing.T) {
function TestContextCancelDelay (line 255) | func TestContextCancelDelay(t *testing.T) {
function TestContextDeadline (line 286) | func TestContextDeadline(t *testing.T) {
function TestContextDeadlineStreaming (line 334) | func TestContextDeadlineStreaming(t *testing.T) {
function TestContextDeadlineStreamingWithRequestTimeout (line 393) | func TestContextDeadlineStreamingWithRequestTimeout(t *testing.T) {
type readerFunc (line 453) | type readerFunc
method Read (line 455) | func (f readerFunc) Read(p []byte) (int, error) { return f(p) }
method Close (line 456) | func (f readerFunc) Close() error { return nil }
FILE: completion.go
type CompletionService (line 26) | type CompletionService struct
method New (line 49) | func (r *CompletionService) New(ctx context.Context, params Completion...
method NewStreaming (line 69) | func (r *CompletionService) NewStreaming(ctx context.Context, params C...
function NewCompletionService (line 33) | func NewCompletionService(opts ...option.RequestOption) (r CompletionSer...
type Completion (line 84) | type Completion struct
method RawJSON (line 120) | func (r Completion) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 121) | func (r *Completion) UnmarshalJSON(data []byte) error {
type CompletionNewParams (line 125) | type CompletionNewParams struct
method MarshalJSON (line 188) | func (r CompletionNewParams) MarshalJSON() (data []byte, err error) {
method UnmarshalJSON (line 192) | func (r *CompletionNewParams) UnmarshalJSON(data []byte) error {
FILE: completion_test.go
function TestCompletionNewWithOptionalParams (line 16) | func TestCompletionNewWithOptionalParams(t *testing.T) {
FILE: examples/bedrock-bearer-token/main.go
function main (line 10) | func main() {
FILE: examples/bedrock-streaming/main.go
function main (line 10) | func main() {
FILE: examples/bedrock/main.go
function main (line 10) | func main() {
FILE: examples/file-upload/main.go
function main (line 11) | func main() {
FILE: examples/message-mcp-streaming/main.go
function main (line 12) | func main() {
FILE: examples/message-streaming/main.go
function main (line 9) | func main() {
FILE: examples/message/main.go
function main (line 9) | func main() {
FILE: examples/multimodal/main.go
function main (line 13) | func main() {
FILE: examples/structured-outputs/main.go
type WeatherQuery (line 13) | type WeatherQuery struct
function main (line 21) | func main() {
function generateJSONSchema (line 59) | func generateJSONSchema(t any) map[string]any {
function printJSON (line 77) | func printJSON(v any) {
FILE: examples/tool-runner-streaming/main.go
type WeatherRequest (line 12) | type WeatherRequest struct
function colorWith (line 18) | func colorWith(code string, s string) string { return fmt.Sprintf("\033[...
function colorUser (line 19) | func colorUser(s string) string { return colorWith("36", s) }
function colorAssistant (line 20) | func colorAssistant(s string) string { return colorWith("32", s) }
function colorTool (line 21) | func colorTool(s string) string { return colorWith("33", s) }
function colorThinking (line 22) | func colorThinking(s string) string { return colorWith("90", s) }
function getWeather (line 24) | func getWeather(ctx context.Context, req WeatherRequest) (anthropic.Beta...
function main (line 39) | func main() {
FILE: examples/tool-runner/main.go
type CalculatorInput (line 13) | type CalculatorInput struct
function calculate (line 19) | func calculate(ctx context.Context, calc CalculatorInput) (anthropic.Bet...
function main (line 43) | func main() {
FILE: examples/tools-streaming-jsonschema/main.go
function main (line 12) | func main() {
type GetCoordinatesInput (line 136) | type GetCoordinatesInput struct
type GetCoordinateResponse (line 142) | type GetCoordinateResponse struct
function GetCoordinates (line 147) | func GetCoordinates(location string) GetCoordinateResponse {
type GetTemperatureUnitInput (line 156) | type GetTemperatureUnitInput struct
function GetTemperatureUnit (line 162) | func GetTemperatureUnit(country string) string {
type GetWeatherInput (line 168) | type GetWeatherInput struct
type GetWeatherResponse (line 176) | type GetWeatherResponse struct
function GetWeather (line 181) | func GetWeather(lat, long float64, unit string) GetWeatherResponse {
function GenerateSchema (line 188) | func GenerateSchema[T any]() anthropic.ToolInputSchemaParam {
function color (line 202) | func color(s string) string {
FILE: examples/tools-streaming/main.go
function main (line 11) | func main() {
type CoordinateResponse (line 171) | type CoordinateResponse struct
function GetCoordinates (line 176) | func GetCoordinates(location string) CoordinateResponse {
function GetTemperatureUnit (line 183) | func GetTemperatureUnit(country string) string {
type WeatherResponse (line 187) | type WeatherResponse struct
function GetWeather (line 192) | func GetWeather(lat, long float64, unit string) WeatherResponse {
function color (line 199) | func color(s string) string {
FILE: examples/tools/main.go
function main (line 11) | func main() {
type CoordinateResponse (line 162) | type CoordinateResponse struct
function GetCoordinates (line 167) | func GetCoordinates(location string) CoordinateResponse {
function GetTemperatureUnit (line 174) | func GetTemperatureUnit(country string) string {
type WeatherResponse (line 178) | type WeatherResponse struct
function GetWeather (line 183) | func GetWeather(lat, long float64, unit string) WeatherResponse {
function color (line 190) | func color(s string) string {
FILE: examples/vertex-streaming/main.go
function main (line 9) | func main() {
FILE: examples/vertex/main.go
function main (line 10) | func main() {
FILE: field.go
function String (line 9) | func String(s string) param.Opt[string] { return param.NewOpt(s) }
function Int (line 10) | func Int(i int64) param.Opt[int64] { return param.NewOpt(i) }
function Bool (line 11) | func Bool(b bool) param.Opt[bool] { return param.NewOpt(b) }
function Float (line 12) | func Float(f float64) param.Opt[float64] { return param.NewOpt(f) }
function Time (line 13) | func Time(t time.Time) param.Opt[time.Time] { return param.NewOpt(t) }
function Opt (line 15) | func Opt[T comparable](v T) param.Opt[T] { return param.NewOpt(v) }
function Ptr (line 16) | func Ptr[T any](v T) *T { return &v }
function IntPtr (line 18) | func IntPtr(v int64) *int64 { return &v }
function BoolPtr (line 19) | func BoolPtr(v bool) *bool { return &v }
function FloatPtr (line 20) | func FloatPtr(v float64) *float64 { return &v }
function StringPtr (line 21) | func StringPtr(v string) *string { return &v }
function TimePtr (line 22) | func TimePtr(v time.Time) *time.Time { return &v }
function File (line 24) | func File(rdr io.Reader, filename string, contentType string) file {
type file (line 28) | type file struct
method Filename (line 34) | func (f file) Filename() string {
method ContentType (line 43) | func (f file) ContentType() string {
FILE: internal/apierror/apierror.go
type Error (line 17) | type Error struct
method RawJSON (line 30) | func (r Error) RawJSON() string { return r.JSON.raw }
method UnmarshalJSON (line 31) | func (r *Error) UnmarshalJSON(data []byte) error {
method Error (line 35) | func (r *Error) Error() string {
method DumpRequest (line 46) | func (r *Error) DumpRequest(body bool) []byte {
method DumpResponse (line 54) | func (r *Error) DumpResponse(body bool) []byte {
FILE: internal/apiform/encoder.go
function Marshal (line 21) | func Marshal(value any, writer *multipart.Writer) error {
function MarshalRoot (line 29) | func MarshalRoot(value any, writer *multipart.Writer) error {
function MarshalWithSettings (line 38) | func MarshalWithSettings(value any, writer *multipart.Writer, arrayForma...
type encoder (line 46) | type encoder struct
method marshal (line 67) | func (e *encoder) marshal(value any, writer *multipart.Writer) error {
method typeEncoder (line 77) | func (e *encoder) typeEncoder(t reflect.Type) encoderFunc {
method newTypeEncoder (line 113) | func (e *encoder) newTypeEncoder(t reflect.Type) encoderFunc {
method newPrimitiveTypeEncoder (line 145) | func (e *encoder) newPrimitiveTypeEncoder(t reflect.Type) encoderFunc {
method newArrayTypeEncoder (line 183) | func (e *encoder) newArrayTypeEncoder(t reflect.Type) encoderFunc {
method newStructTypeEncoder (line 200) | func (e *encoder) newStructTypeEncoder(t reflect.Type) encoderFunc {
method newStructUnionTypeEncoder (line 305) | func (e *encoder) newStructUnionTypeEncoder(t reflect.Type) encoderFunc {
method newTimeTypeEncoder (line 329) | func (e *encoder) newTimeTypeEncoder() encoderFunc {
method newInterfaceEncoder (line 336) | func (e encoder) newInterfaceEncoder() encoderFunc {
method newReaderTypeEncoder (line 352) | func (e *encoder) newReaderTypeEncoder() encoderFunc {
method arrayKeyEncoder (line 382) | func (e encoder) arrayKeyEncoder() func(string, int) string {
method objKeyEncoder (line 407) | func (e encoder) objKeyEncoder(parent string) func(string) string {
method encodeMapEntries (line 421) | func (e *encoder) encodeMapEntries(key string, v reflect.Value, writer...
method newMapEncoder (line 455) | func (e *encoder) newMapEncoder(_ reflect.Type) encoderFunc {
type encoderFunc (line 52) | type encoderFunc
type encoderField (line 54) | type encoderField struct
type encoderEntry (line 60) | type encoderEntry struct
function escapeQuotes (line 348) | func escapeQuotes(s string) string {
function WriteExtras (line 461) | func WriteExtras(writer *multipart.Writer, extras map[string]any) (err e...
FILE: internal/apiform/form.go
type Marshaler (line 3) | type Marshaler interface
FILE: internal/apiform/form_test.go
function P (line 13) | func P[T any](v T) *T { return &v }
type Primitives (line 15) | type Primitives struct
type int_ (line 26) | type int_
type PrimitivesBrackets (line 27) | type PrimitivesBrackets struct
type PrimitivePointers (line 31) | type PrimitivePointers struct
type Slices (line 40) | type Slices struct
type DateTime (line 44) | type DateTime struct
type AdditionalProperties (line 49) | type AdditionalProperties struct
type TypedAdditionalProperties (line 54) | type TypedAdditionalProperties struct
type EmbeddedStructs (line 59) | type EmbeddedStructs struct
type Recursive (line 65) | type Recursive struct
type UnknownStruct (line 70) | type UnknownStruct struct
type UnionStruct (line 74) | type UnionStruct struct
type Union
Condensed preview — 164 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,068K chars).
[
{
"path": ".devcontainer/devcontainer.json",
"chars": 296,
"preview": "// For format details, see https://aka.ms/devcontainer.json. For config options, see the\n// README at: https://github.co"
},
{
"path": ".github/CODEOWNERS",
"chars": 204,
"preview": "# This file is used to automatically assign reviewers to PRs\n# For more information see: https://help.github.com/en/gith"
},
{
"path": ".github/workflows/ci.yml",
"chars": 2361,
"preview": "name: CI\non:\n push:\n branches:\n - '**'\n - '!integrated/**'\n - '!stl-preview-head/**'\n - '!stl-pr"
},
{
"path": ".github/workflows/claude.yml",
"chars": 1874,
"preview": "name: Claude Code\n\non:\n issue_comment:\n types: [created]\n pull_request_review_comment:\n types: [created]\n issue"
},
{
"path": ".github/workflows/create-releases.yml",
"chars": 932,
"preview": "name: Create releases\non:\n schedule:\n - cron: '0 5 * * *' # every day at 5am UTC\n push:\n branches:\n - main\n"
},
{
"path": ".github/workflows/detect-breaking-changes.yml",
"chars": 1127,
"preview": "name: CI\non:\n pull_request:\n branches:\n - main\n - next\n\njobs:\n detect_breaking_changes:\n runs-on: 'ubu"
},
{
"path": ".gitignore",
"chars": 49,
"preview": ".prism.log\ncodegen.log\nBrewfile.lock.json\n.idea/\n"
},
{
"path": ".release-please-manifest.json",
"chars": 20,
"preview": "{\n \".\": \"1.27.1\"\n}\n"
},
{
"path": ".stats.yml",
"chars": 291,
"preview": "configured_endpoints: 34\nopenapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/anthropic%2Fanthro"
},
{
"path": "Brewfile",
"chars": 10,
"preview": "brew \"go\"\n"
},
{
"path": "CHANGELOG.md",
"chars": 44004,
"preview": "# Changelog\n\n## 1.27.1 (2026-03-18)\n\nFull Changelog: [v1.27.0...v1.27.1](https://github.com/anthropics/anthropic-sdk-go/"
},
{
"path": "CONTRIBUTING.md",
"chars": 1652,
"preview": "## Contributing to documentation\n\nThe documentation for this SDK lives at [platform.claude.com/docs/en/api/sdks/go](http"
},
{
"path": "LICENSE",
"chars": 1056,
"preview": "Copyright 2023 Anthropic, PBC.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this sof"
},
{
"path": "README.md",
"chars": 1734,
"preview": "# Claude SDK for Go\n\n<!-- x-release-please-start-version -->\n\n<a href=\"https://pkg.go.dev/github.com/anthropics/anthropi"
},
{
"path": "SECURITY.md",
"chars": 1204,
"preview": "# Security Policy\n\n## Reporting Security Issues\n\nThis SDK is generated by [Stainless Software Inc](http://stainless.com)"
},
{
"path": "aliases.go",
"chars": 3108,
"preview": "// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\npackage anthropic\n\nimport (\n\t\"gi"
},
{
"path": "api.md",
"chars": 119084,
"preview": "# Shared Response Types\n\n- <a href=\"https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/shared\">shared</a>.<a href"
},
{
"path": "bedrock/bedrock.go",
"chars": 8367,
"preview": "package bedrock\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"crypto/sha256\"\n\t\"encoding/base64\"\n\t\"encoding/hex\"\n\t\"encoding/json\"\n\t\"fmt"
},
{
"path": "bedrock/bedrock_test.go",
"chars": 7914,
"preview": "package bedrock\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"testing\"\n\n\t\"github.com/aws/aws-sdk-go-v2/"
},
{
"path": "beta.go",
"chars": 13632,
"preview": "// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\npackage anthropic\n\nimport (\n\t\"en"
},
{
"path": "betafile.go",
"chars": 9802,
"preview": "// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\npackage anthropic\n\nimport (\n\t\"by"
},
{
"path": "betafile_test.go",
"chars": 4439,
"preview": "// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\npackage anthropic_test\n\nimport ("
},
{
"path": "betamessage.go",
"chars": 465065,
"preview": "// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\npackage anthropic\n\nimport (\n\t\"co"
},
{
"path": "betamessage_test.go",
"chars": 19443,
"preview": "// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\npackage anthropic_test\n\nimport ("
},
{
"path": "betamessagebatch.go",
"chars": 37368,
"preview": "// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\npackage anthropic\n\nimport (\n\t\"co"
},
{
"path": "betamessagebatch_test.go",
"chars": 9117,
"preview": "// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\npackage anthropic_test\n\nimport ("
},
{
"path": "betamessageutil.go",
"chars": 15588,
"preview": "package anthropic\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/anthropics/anthropic-sdk-go/internal/paramutil\"\n\t\"gith"
},
{
"path": "betamodel.go",
"chars": 12663,
"preview": "// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\npackage anthropic\n\nimport (\n\t\"co"
},
{
"path": "betamodel_test.go",
"chars": 1834,
"preview": "// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\npackage anthropic_test\n\nimport ("
},
{
"path": "betaskill.go",
"chars": 13084,
"preview": "// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\npackage anthropic\n\nimport (\n\t\"by"
},
{
"path": "betaskill_test.go",
"chars": 3382,
"preview": "// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\npackage anthropic_test\n\nimport ("
},
{
"path": "betaskillversion.go",
"chars": 14031,
"preview": "// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\npackage anthropic\n\nimport (\n\t\"by"
},
{
"path": "betaskillversion_test.go",
"chars": 3469,
"preview": "// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\npackage anthropic_test\n\nimport ("
},
{
"path": "betatoolrunner.go",
"chars": 14123,
"preview": "package anthropic\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"iter\"\n\n\t\"github.com/anthropics/anthropic-sdk-go/option\""
},
{
"path": "client.go",
"chars": 6776,
"preview": "// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\npackage anthropic\n\nimport (\n\t\"co"
},
{
"path": "client_test.go",
"chars": 12795,
"preview": "// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\npackage anthropic_test\n\nimport ("
},
{
"path": "completion.go",
"chars": 8105,
"preview": "// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\npackage anthropic\n\nimport (\n\t\"co"
},
{
"path": "completion_test.go",
"chars": 1410,
"preview": "// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\npackage anthropic_test\n\nimport ("
},
{
"path": "examples/.keep",
"chars": 239,
"preview": "File generated from our OpenAPI spec by Stainless.\n\nThis directory can be used to store example files demonstrating usag"
},
{
"path": "examples/bedrock/main.go",
"chars": 804,
"preview": "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/anthropics/anthropic-sdk-go\"\n\t\"github.com/anthropics/anthropic-sdk-go/be"
},
{
"path": "examples/bedrock-bearer-token/main.go",
"chars": 1251,
"preview": "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/anthropics/anthropic-sdk-go\"\n\t\"github.com/anthropics/anthropic-sdk-go/be"
},
{
"path": "examples/bedrock-streaming/main.go",
"chars": 1137,
"preview": "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/anthropics/anthropic-sdk-go\"\n\t\"github.com/anthropics/anthropic-sdk-go/be"
},
{
"path": "examples/file-upload/file.txt",
"chars": 155,
"preview": "My top 5 favorite types of birds are, in no particular order:\n\n- Flycatchers (especially the Eastern Phoebe)\n- Hummingbi"
},
{
"path": "examples/file-upload/main.go",
"chars": 1370,
"preview": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/anthropics/anthropic-sdk-go\"\n)\n\nfunc main() {\n\tctx := conte"
},
{
"path": "examples/go.mod",
"chars": 3067,
"preview": "module github.com/anthropic/anthropic-sdk-go/examples\n\nreplace github.com/anthropics/anthropic-sdk-go => ../\n\ngo 1.23.0\n"
},
{
"path": "examples/go.sum",
"chars": 19454,
"preview": "cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=\ncloud.google.com/go/auth v0.7.2 h1:ui"
},
{
"path": "examples/message/main.go",
"chars": 690,
"preview": "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/anthropics/anthropic-sdk-go\"\n)\n\nfunc main() {\n\tclient := anthropic.NewCl"
},
{
"path": "examples/message-mcp-streaming/main.go",
"chars": 1730,
"preview": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/anthropics/anthropic-sdk-go\"\n\t\"github.com/anthropics/anthropic-sd"
},
{
"path": "examples/message-streaming/main.go",
"chars": 1023,
"preview": "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/anthropics/anthropic-sdk-go\"\n)\n\nfunc main() {\n\tclient := anthropic.NewCl"
},
{
"path": "examples/multimodal/main.go",
"chars": 1070,
"preview": "package main\n\nimport (\n\t\"context\"\n\t\"encoding/base64\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\n\t\"github.com/anthropics/anthropic-sdk-go\"\n)\n\nfu"
},
{
"path": "examples/structured-outputs/main.go",
"chars": 2348,
"preview": "package main\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/anthropics/anthropic-sdk-go\"\n\t\"github.com/invopo"
},
{
"path": "examples/tool-runner/main.go",
"chars": 2395,
"preview": "// Example demonstrating the Tool Runner framework\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"strconv\"\n\n\t\"github.com/ant"
},
{
"path": "examples/tool-runner-streaming/main.go",
"chars": 3953,
"preview": "// Example demonstrating the Tool Runner framework with streaming\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com"
},
{
"path": "examples/tools/main.go",
"chars": 4576,
"preview": "package main\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/anthropics/anthropic-sdk-go\"\n)\n\nfunc main() {\n\tc"
},
{
"path": "examples/tools-streaming/main.go",
"chars": 4845,
"preview": "package main\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/anthropics/anthropic-sdk-go\"\n)\n\nfunc main() {\n\tc"
},
{
"path": "examples/tools-streaming-jsonschema/main.go",
"chars": 5024,
"preview": "package main\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/anthropics/anthropic-sdk-go\"\n\t\"github.com/invopo"
},
{
"path": "examples/vertex/main.go",
"chars": 802,
"preview": "package main\n\nimport (\n\t\"context\"\n\t\"github.com/anthropics/anthropic-sdk-go/vertex\"\n\n\t\"github.com/anthropics/anthropic-sd"
},
{
"path": "examples/vertex-streaming/main.go",
"chars": 1116,
"preview": "package main\n\nimport (\n\t\"context\"\n\t\"github.com/anthropics/anthropic-sdk-go\"\n\t\"github.com/anthropics/anthropic-sdk-go/ver"
},
{
"path": "field.go",
"chars": 1261,
"preview": "package anthropic\n\nimport (\n\t\"github.com/anthropics/anthropic-sdk-go/packages/param\"\n\t\"io\"\n\t\"time\"\n)\n\nfunc String(s stri"
},
{
"path": "go.mod",
"chars": 2971,
"preview": "module github.com/anthropics/anthropic-sdk-go\n\ngo 1.23.0\n\ntoolchain go1.24.3\n\nrequire (\n\tgithub.com/aws/aws-sdk-go-v2 v1"
},
{
"path": "go.sum",
"chars": 19889,
"preview": "cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=\ncloud.google.com/go/auth v0.7.2 h1:ui"
},
{
"path": "internal/apierror/apierror.go",
"chars": 1622,
"preview": "// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\npackage apierror\n\nimport (\n\t\"fmt"
},
{
"path": "internal/apiform/encoder.go",
"chars": 12916,
"preview": "package apiform\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"mime/multipart\"\n\t\"net/textproto\"\n\t\"path\"\n\t\"reflect\"\n\t\"sort\"\n\t\"strconv\"\n\t\"string"
},
{
"path": "internal/apiform/form.go",
"chars": 90,
"preview": "package apiform\n\ntype Marshaler interface {\n\tMarshalMultipart() ([]byte, string, error)\n}\n"
},
{
"path": "internal/apiform/form_test.go",
"chars": 10406,
"preview": "package apiform\n\nimport (\n\t\"bytes\"\n\t\"github.com/anthropics/anthropic-sdk-go/packages/param\"\n\t\"io\"\n\t\"mime/multipart\"\n\t\"st"
},
{
"path": "internal/apiform/richparam.go",
"chars": 570,
"preview": "package apiform\n\nimport (\n\t\"github.com/anthropics/anthropic-sdk-go/packages/param\"\n\t\"mime/multipart\"\n\t\"reflect\"\n)\n\nfunc "
},
{
"path": "internal/apiform/tag.go",
"chars": 1373,
"preview": "package apiform\n\nimport (\n\t\"reflect\"\n\t\"strings\"\n)\n\nconst apiStructTag = \"api\"\nconst jsonStructTag = \"json\"\nconst formStr"
},
{
"path": "internal/apijson/decodeparam_test.go",
"chars": 12624,
"preview": "package apijson_test\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"github.com/anthropics/anthropic-sdk-go/internal/apijson\"\n\t\"gith"
},
{
"path": "internal/apijson/decoder.go",
"chars": 20229,
"preview": "// The deserialization algorithm from apijson may be subject to improvements\n// between minor versions, particularly wit"
},
{
"path": "internal/apijson/decoderesp_test.go",
"chars": 727,
"preview": "package apijson_test\n\nimport (\n\t\"encoding/json\"\n\t\"github.com/anthropics/anthropic-sdk-go/internal/apijson\"\n\t\"github.com/"
},
{
"path": "internal/apijson/encoder.go",
"chars": 9745,
"preview": "package apijson\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"reflect\"\n\t\"sort\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\t\"g"
},
{
"path": "internal/apijson/enum.go",
"chars": 3448,
"preview": "package apijson\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n\t\"slices\"\n\n\t\"github.com/tidwall/gjson\"\n)\n\n/********************/\n/* Validati"
},
{
"path": "internal/apijson/enum_test.go",
"chars": 2787,
"preview": "package apijson\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n)\n\ntype EnumStruct struct {\n\tNormalString string `json:\"normal_st"
},
{
"path": "internal/apijson/field.go",
"chars": 611,
"preview": "package apijson\n\ntype status uint8\n\nconst (\n\tmissing status = iota\n\tnull\n\tinvalid\n\tvalid\n)\n\ntype Field struct {\n\traw "
},
{
"path": "internal/apijson/json_test.go",
"chars": 14991,
"preview": "package apijson\n\nimport (\n\t\"reflect\"\n\t\"strings\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/tidwall/gjson\"\n)\n\nfunc P[T any](v T) *T"
},
{
"path": "internal/apijson/port.go",
"chars": 3364,
"preview": "package apijson\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n)\n\n// Port copies over values from one struct to another struct.\nfunc Port(f"
},
{
"path": "internal/apijson/port_test.go",
"chars": 6235,
"preview": "package apijson\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n)\n\ntype Metadata struct {\n\tCreatedAt string `json:\"created_at\"`\n}\n\n// Ca"
},
{
"path": "internal/apijson/registry.go",
"chars": 1509,
"preview": "package apijson\n\nimport (\n\t\"reflect\"\n\n\t\"github.com/tidwall/gjson\"\n)\n\ntype UnionVariant struct {\n\tTypeFilter gjso"
},
{
"path": "internal/apijson/subfield.go",
"chars": 1657,
"preview": "package apijson\n\nimport (\n\t\"github.com/anthropics/anthropic-sdk-go/packages/respjson\"\n\t\"reflect\"\n)\n\nfunc getSubField(roo"
},
{
"path": "internal/apijson/tag.go",
"chars": 1359,
"preview": "package apijson\n\nimport (\n\t\"reflect\"\n\t\"strings\"\n)\n\nconst apiStructTag = \"api\"\nconst jsonStructTag = \"json\"\nconst formatS"
},
{
"path": "internal/apijson/union.go",
"chars": 5640,
"preview": "package apijson\n\nimport (\n\t\"errors\"\n\t\"github.com/anthropics/anthropic-sdk-go/packages/param\"\n\t\"reflect\"\n\n\t\"github.com/ti"
},
{
"path": "internal/apiquery/encoder.go",
"chars": 10511,
"preview": "package apiquery\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"reflect\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/anthro"
},
{
"path": "internal/apiquery/query.go",
"chars": 991,
"preview": "package apiquery\n\nimport (\n\t\"net/url\"\n\t\"reflect\"\n\t\"time\"\n)\n\nfunc MarshalWithSettings(value any, settings QuerySettings) "
},
{
"path": "internal/apiquery/query_test.go",
"chars": 9203,
"preview": "package apiquery\n\nimport (\n\t\"github.com/anthropics/anthropic-sdk-go/packages/param\"\n\t\"net/url\"\n\t\"testing\"\n\t\"time\"\n)\n\nfun"
},
{
"path": "internal/apiquery/richparam.go",
"chars": 518,
"preview": "package apiquery\n\nimport (\n\t\"github.com/anthropics/anthropic-sdk-go/packages/param\"\n\t\"reflect\"\n)\n\nfunc (e *encoder) newR"
},
{
"path": "internal/apiquery/tag.go",
"chars": 825,
"preview": "package apiquery\n\nimport (\n\t\"reflect\"\n\t\"strings\"\n)\n\nconst queryStructTag = \"query\"\nconst formatStructTag = \"format\"\n\ntyp"
},
{
"path": "internal/encoding/json/decode.go",
"chars": 36902,
"preview": "// Vendored from Go 1.24.0-pre-release\n// To find alterations, check package shims, and comments beginning in SHIM().\n//"
},
{
"path": "internal/encoding/json/encode.go",
"chars": 40633,
"preview": "// Vendored from Go 1.24.0-pre-release\n// To find alterations, check package shims, and comments beginning in SHIM().\n//"
},
{
"path": "internal/encoding/json/fold.go",
"chars": 1089,
"preview": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "internal/encoding/json/indent.go",
"chars": 5490,
"preview": "// Copyright 2010 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "internal/encoding/json/scanner.go",
"chars": 16524,
"preview": "// Copyright 2010 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "internal/encoding/json/sentinel/null.go",
"chars": 1012,
"preview": "package sentinel\n\nimport (\n\t\"github.com/anthropics/anthropic-sdk-go/internal/encoding/json/shims\"\n\t\"reflect\"\n\t\"sync\"\n)\n\n"
},
{
"path": "internal/encoding/json/sentinel/sentinel_test.go",
"chars": 2858,
"preview": "package sentinel_test\n\nimport (\n\t\"github.com/anthropics/anthropic-sdk-go/internal/encoding/json/sentinel\"\n\t\"github.com/a"
},
{
"path": "internal/encoding/json/shims/shims.go",
"chars": 3032,
"preview": "// This package provides shims over Go 1.2{2,3} APIs\n// which are missing from Go 1.22, and used by the Go 1.24 encoding"
},
{
"path": "internal/encoding/json/stream.go",
"chars": 13221,
"preview": "// Copyright 2010 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "internal/encoding/json/tables.go",
"chars": 4260,
"preview": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "internal/encoding/json/tags.go",
"chars": 972,
"preview": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "internal/encoding/json/time.go",
"chars": 1293,
"preview": "// EDIT(begin): custom time marshaler\npackage json\n\nimport (\n\t\"github.com/anthropics/anthropic-sdk-go/internal/encoding/"
},
{
"path": "internal/paramutil/field.go",
"chars": 657,
"preview": "package paramutil\n\nimport (\n\t\"github.com/anthropics/anthropic-sdk-go/packages/param\"\n\t\"github.com/anthropics/anthropic-s"
},
{
"path": "internal/paramutil/union.go",
"chars": 1153,
"preview": "package paramutil\n\nimport (\n\t\"fmt\"\n\t\"github.com/anthropics/anthropic-sdk-go/packages/param\"\n\t\"reflect\"\n)\n\nvar paramUnion"
},
{
"path": "internal/requestconfig/requestconfig.go",
"chars": 17512,
"preview": "// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\npackage requestconfig\n\nimport (\n"
},
{
"path": "internal/requestconfig/requestconfig_test.go",
"chars": 2152,
"preview": "package requestconfig\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"net/http/httptest\"\n\t\"net/url\"\n\t\"testing\"\n\n\t\"github.com/anthropi"
},
{
"path": "internal/testutil/golden.go",
"chars": 861,
"preview": "package testutil\n\nimport (\n\t\"os\"\n\t\"path/filepath\"\n\t\"testing\"\n)\n\n// CompareGolden compares the given string with the gold"
},
{
"path": "internal/testutil/testutil.go",
"chars": 789,
"preview": "package testutil\n\nimport (\n\t\"net/http\"\n\t\"os\"\n\t\"strconv\"\n\t\"testing\"\n)\n\nfunc CheckTestServer(t *testing.T, url string) boo"
},
{
"path": "internal/testutil/vcr.go",
"chars": 920,
"preview": "package testutil\n\nimport (\n\t\"net/http\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"testing\"\n\n\t\"github.com/dnaeon/go-vcr/recorder\"\n)\n\n// New"
},
{
"path": "internal/version.go",
"chars": 166,
"preview": "// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\npackage internal\n\nconst PackageV"
},
{
"path": "lib/.keep",
"chars": 224,
"preview": "File generated from our OpenAPI spec by Stainless.\n\nThis directory can be used to store custom files to expand the SDK.\n"
},
{
"path": "message.go",
"chars": 365514,
"preview": "// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\npackage anthropic\n\nimport (\n\t\"co"
},
{
"path": "message_test.go",
"chars": 21751,
"preview": "// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\npackage anthropic_test\n\nimport ("
},
{
"path": "messagebatch.go",
"chars": 32445,
"preview": "// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\npackage anthropic\n\nimport (\n\t\"co"
},
{
"path": "messagebatch_test.go",
"chars": 6677,
"preview": "// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\npackage anthropic_test\n\nimport ("
},
{
"path": "messageutil.go",
"chars": 13682,
"preview": "package anthropic\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/anthropics/anthropic-sdk-go/internal/paramutil\"\n\t\"gith"
},
{
"path": "messageutil_test.go",
"chars": 2412,
"preview": "package anthropic_test\n\nimport (\n\t\"encoding/json\"\n\t\"testing\"\n\n\t\"github.com/anthropics/anthropic-sdk-go\"\n\t\"github.com/ant"
},
{
"path": "model.go",
"chars": 12399,
"preview": "// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\npackage anthropic\n\nimport (\n\t\"co"
},
{
"path": "model_test.go",
"chars": 1808,
"preview": "// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\npackage anthropic_test\n\nimport ("
},
{
"path": "option/middleware.go",
"chars": 1017,
"preview": "// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\npackage option\n\nimport (\n\t\"log\"\n"
},
{
"path": "option/requestoption.go",
"chars": 9931,
"preview": "// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\npackage option\n\nimport (\n\t\"bytes"
},
{
"path": "packages/jsonl/jsonl.go",
"chars": 947,
"preview": "// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\npackage jsonl\n\nimport (\n\t\"bufio\""
},
{
"path": "packages/pagination/pagination.go",
"chars": 8017,
"preview": "// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\npackage pagination\n\nimport (\n\t\"n"
},
{
"path": "packages/param/encoder.go",
"chars": 3078,
"preview": "package param\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"reflect\"\n\t\"strings\"\n\t\"time\"\n\n\tshimjson \"github.com/anthropics/anthropi"
},
{
"path": "packages/param/encoder_test.go",
"chars": 9774,
"preview": "package param_test\n\nimport (\n\t\"encoding/json\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/anthropics/anthropic-sdk-go/packages/para"
},
{
"path": "packages/param/null.go",
"chars": 773,
"preview": "package param\n\nimport \"github.com/anthropics/anthropic-sdk-go/internal/encoding/json/sentinel\"\n\n// NullMap returns a non"
},
{
"path": "packages/param/null_test.go",
"chars": 1048,
"preview": "package param_test\n\nimport (\n\t\"encoding/json\"\n\t\"github.com/anthropics/anthropic-sdk-go/packages/param\"\n\t\"testing\"\n)\n\ntyp"
},
{
"path": "packages/param/option.go",
"chars": 2464,
"preview": "package param\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\tshimjson \"github.com/anthropics/anthropic-sdk-go/internal/encoding/json"
},
{
"path": "packages/param/param.go",
"chars": 5130,
"preview": "package param\n\nimport (\n\t\"encoding/json\"\n\t\"github.com/anthropics/anthropic-sdk-go/internal/encoding/json/sentinel\"\n\t\"ref"
},
{
"path": "packages/respjson/decoder_test.go",
"chars": 6890,
"preview": "package respjson_test\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"github.com/anthropics/anthropic-sdk-go/internal/apijson\"\n\trj \""
},
{
"path": "packages/respjson/respjson.go",
"chars": 1914,
"preview": "package respjson\n\n// A Field provides metadata to indicate the presence of a value.\n//\n// Use [Field.Valid] to check if "
},
{
"path": "packages/ssestream/ssestream.go",
"chars": 3746,
"preview": "// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\npackage ssestream\n\nimport (\n\t\"bu"
},
{
"path": "paginationauto_test.go",
"chars": 1013,
"preview": "// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\npackage anthropic_test\n\nimport ("
},
{
"path": "paginationmanual_test.go",
"chars": 1150,
"preview": "// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\npackage anthropic_test\n\nimport ("
},
{
"path": "release-please-config.json",
"chars": 1377,
"preview": "{\n \"packages\": {\n \".\": {}\n },\n \"$schema\": \"https://raw.githubusercontent.com/stainless-api/release-please/main/sch"
},
{
"path": "schemautil.go",
"chars": 6530,
"preview": "package anthropic\n\nimport (\n\t\"fmt\"\n\t\"maps\"\n\t\"slices\"\n\t\"sort\"\n\t\"strings\"\n)\n\n// BetaJSONSchemaOutputFormat creates a BetaJ"
},
{
"path": "schemautil_test.go",
"chars": 4704,
"preview": "package anthropic\n\nimport (\n\t\"encoding/json\"\n\t\"reflect\"\n\t\"testing\"\n)\n\nfunc TestTransformSchema(t *testing.T) {\n\ttests :="
},
{
"path": "scripts/bootstrap",
"chars": 452,
"preview": "#!/usr/bin/env bash\n\nset -e\n\ncd \"$(dirname \"$0\")/..\"\n\nif [ -f \"Brewfile\" ] && [ \"$(uname -s)\" = \"Darwin\" ] && [ \"$SKIP_B"
},
{
"path": "scripts/detect-breaking-changes",
"chars": 719,
"preview": "#!/usr/bin/env bash\n\nset -e\n\ncd \"$(dirname \"$0\")/..\"\n\necho \"==> Detecting breaking changes\"\n\nTEST_PATHS=(\n\tclient_test.g"
},
{
"path": "scripts/format",
"chars": 99,
"preview": "#!/usr/bin/env bash\n\nset -e\n\ncd \"$(dirname \"$0\")/..\"\n\necho \"==> Running gofmt -s -w\"\ngofmt -s -w .\n"
},
{
"path": "scripts/lint",
"chars": 214,
"preview": "#!/usr/bin/env bash\n\nset -e\n\ncd \"$(dirname \"$0\")/..\"\n\necho \"==> Running Go build\"\ngo build ./...\n\necho \"==> Checking tes"
},
{
"path": "scripts/mock",
"chars": 1430,
"preview": "#!/usr/bin/env bash\n\nset -e\n\ncd \"$(dirname \"$0\")/..\"\n\nif [[ -n \"$1\" && \"$1\" != '--'* ]]; then\n URL=\"$1\"\n shift\nelse\n "
},
{
"path": "scripts/test",
"chars": 1467,
"preview": "#!/usr/bin/env bash\n\nset -e\n\ncd \"$(dirname \"$0\")/..\"\n\nRED='\\033[0;31m'\nGREEN='\\033[0;32m'\nYELLOW='\\033[0;33m'\nNC='\\033[0"
},
{
"path": "scripts/utils/upload-artifact.sh",
"chars": 1361,
"preview": "#!/usr/bin/env bash\nset -exuo pipefail\n\nDIST_DIR=\"dist\"\nFILENAME=\"source.zip\"\n\nmapfile -d '' files < <(\n find . -type f"
},
{
"path": "shared/constant/constants.go",
"chars": 38205,
"preview": "// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\npackage constant\n\nimport (\n\tshim"
},
{
"path": "shared/shared.go",
"chars": 10696,
"preview": "// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\npackage shared\n\nimport (\n\t\"encod"
},
{
"path": "toolrunner/runner_test.go",
"chars": 19738,
"preview": "package toolrunner_test\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"sort\"\n\t\"strings\"\n\t\"sync\"\n\t\"sync/atomic\"\n\t\"testing"
},
{
"path": "toolrunner/testdata/cassettes/tool_runner_basic.yaml",
"chars": 6561,
"preview": "---\nversion: 1\ninteractions:\n- request:\n body: '{\"max_tokens\":512,\"messages\":[{\"content\":[{\"text\":\"What''s the weathe"
},
{
"path": "toolrunner/testdata/cassettes/tool_runner_concurrent.yaml",
"chars": 14850,
"preview": "---\nversion: 1\ninteractions:\n- request:\n body: '{\"max_tokens\":512,\"messages\":[{\"content\":[{\"text\":\"What''s the weathe"
},
{
"path": "toolrunner/testdata/cassettes/tool_runner_context_cancel.yaml",
"chars": 3024,
"preview": "---\nversion: 1\ninteractions:\n- request:\n body: '{\"max_tokens\":512,\"messages\":[{\"content\":[{\"text\":\"Call the slow_tool"
},
{
"path": "toolrunner/testdata/cassettes/tool_runner_custom_handling.yaml",
"chars": 6210,
"preview": "---\nversion: 1\ninteractions:\n- request:\n body: '{\"max_tokens\":512,\"messages\":[{\"content\":[{\"text\":\"What''s the weathe"
},
{
"path": "toolrunner/testdata/cassettes/tool_runner_max_iterations.yaml",
"chars": 6687,
"preview": "---\nversion: 1\ninteractions:\n- request:\n body: '{\"max_tokens\":512,\"messages\":[{\"content\":[{\"text\":\"Check weather in S"
},
{
"path": "toolrunner/testdata/cassettes/tool_runner_next_message.yaml",
"chars": 6518,
"preview": "---\nversion: 1\ninteractions:\n- request:\n body: '{\"max_tokens\":512,\"messages\":[{\"content\":[{\"text\":\"What''s the weathe"
},
{
"path": "toolrunner/testdata/cassettes/tool_runner_next_streaming.yaml",
"chars": 6251,
"preview": "---\nversion: 1\ninteractions:\n- request:\n body: '{\"max_tokens\":512,\"messages\":[{\"content\":[{\"text\":\"Weather in SF?\",\"t"
},
{
"path": "toolrunner/testdata/cassettes/tool_runner_run_to_completion.yaml",
"chars": 6577,
"preview": "---\nversion: 1\ninteractions:\n- request:\n body: '{\"max_tokens\":512,\"messages\":[{\"content\":[{\"text\":\"What''s the weathe"
},
{
"path": "toolrunner/testdata/cassettes/tool_runner_streaming_all.yaml",
"chars": 10980,
"preview": "---\nversion: 1\ninteractions:\n- request:\n body: '{\"max_tokens\":512,\"messages\":[{\"content\":[{\"text\":\"Weather in SF in f"
},
{
"path": "toolrunner/testdata/cassettes/tool_runner_tool_call_error.yaml",
"chars": 10340,
"preview": "---\nversion: 1\ninteractions:\n- request:\n body: '{\"max_tokens\":512,\"messages\":[{\"content\":[{\"text\":\"Weather in San Fra"
},
{
"path": "toolrunner/testdata/snapshots/tool_runner_basic.golden",
"chars": 67,
"preview": "The current temperature in San Francisco is 68 degrees Fahrenheit.\n"
},
{
"path": "toolrunner/testdata/snapshots/tool_runner_next_message_step_1.golden",
"chars": 69,
"preview": "I'll check the weather in San Francisco for you using Celsius units.\n"
},
{
"path": "toolrunner/testdata/snapshots/tool_runner_next_message_step_2.golden",
"chars": 60,
"preview": "The current weather in San Francisco is 20 degrees Celsius.\n"
},
{
"path": "toolrunner/testdata/snapshots/tool_runner_next_streaming_types.golden",
"chars": 459,
"preview": "content_block_delta\ncontent_block_delta\ncontent_block_delta\ncontent_block_delta\ncontent_block_delta\ncontent_block_delta\n"
},
{
"path": "toolrunner/testdata/snapshots/tool_runner_run_to_completion.golden",
"chars": 65,
"preview": "The weather in San Francisco is currently 68 degrees Fahrenheit.\n"
},
{
"path": "toolrunner/testdata/snapshots/tool_runner_streaming_all.golden",
"chars": 132,
"preview": "I'll get the current weather in San Francisco for you in Fahrenheit.\nThe current weather in San Francisco is 68 degrees "
},
{
"path": "toolrunner/testdata/snapshots/tool_runner_tool_call_error_assistant.golden",
"chars": 74,
"preview": "The current weather in San Francisco is sunny with a temperature of 68°F.\n"
},
{
"path": "toolrunner/tool.go",
"chars": 4414,
"preview": "package toolrunner\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\n\tanthropic \"github.com/anthropics/anthropic-sdk-go\"\n\t\"g"
},
{
"path": "tools.md",
"chars": 8031,
"preview": "# Tool Helpers\n\nThe SDK provides helper functions for defining tools and automatically running the conversation loop bet"
},
{
"path": "usage_test.go",
"chars": 1081,
"preview": "// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\npackage anthropic_test\n\nimport ("
},
{
"path": "vertex/vertex.go",
"chars": 3738,
"preview": "package vertex\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\n\t\"golang.org/x/oauth2/google\"\n\t\"google.golang.org"
}
]
About this extraction
This page contains the full source code of the anthropics/anthropic-sdk-go GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 164 files (1.8 MB), approximately 528.8k tokens, and a symbol index with 4382 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.