Shared Response Types
- shared.APIErrorObject
 - shared.AuthenticationError
 - shared.BillingError
 - shared.ErrorObjectUnion
 - shared.ErrorResponse
 - shared.GatewayTimeoutError
 - shared.InvalidRequestError
 - shared.NotFoundError
 - shared.OverloadedError
 - shared.PermissionError
 - shared.RateLimitError
 
Messages
Params Types:
- anthropic.Base64ImageSourceParam
 - anthropic.Base64PDFSourceParam
 - anthropic.CacheControlEphemeralParam
 - anthropic.CitationCharLocationParam
 - anthropic.CitationContentBlockLocationParam
 - anthropic.CitationPageLocationParam
 - anthropic.CitationWebSearchResultLocationParam
 - anthropic.CitationsConfigParam
 - anthropic.ContentBlockParamUnion
 - anthropic.ContentBlockSourceParam
 - anthropic.ContentBlockSourceContentUnionParam
 - anthropic.DocumentBlockParam
 - anthropic.ImageBlockParam
 - anthropic.MessageCountTokensToolUnionParam
 - anthropic.MessageParam
 - anthropic.MetadataParam
 - anthropic.Model
 - anthropic.PlainTextSourceParam
 - anthropic.RedactedThinkingBlockParam
 - anthropic.ServerToolUseBlockParam
 - anthropic.TextBlockParam
 - anthropic.TextCitationParamUnion
 - anthropic.ThinkingBlockParam
 - anthropic.ThinkingConfigDisabledParam
 - anthropic.ThinkingConfigEnabledParam
 - anthropic.ThinkingConfigParamUnion
 - anthropic.ToolParam
 - anthropic.ToolBash20250124Param
 - anthropic.ToolChoiceUnionParam
 - anthropic.ToolChoiceAnyParam
 - anthropic.ToolChoiceAutoParam
 - anthropic.ToolChoiceNoneParam
 - anthropic.ToolChoiceToolParam
 - anthropic.ToolResultBlockParam
 - anthropic.ToolTextEditor20250124Param
 - anthropic.ToolUnionParam
 - anthropic.ToolUseBlockParam
 - anthropic.URLImageSourceParam
 - anthropic.URLPDFSourceParam
 - anthropic.WebSearchResultBlockParam
 - anthropic.WebSearchTool20250305Param
 - anthropic.WebSearchToolRequestErrorParam
 - anthropic.WebSearchToolResultBlockParam
 - anthropic.WebSearchToolResultBlockParamContentUnion
 
Response Types:
- anthropic.CitationCharLocation
 - anthropic.CitationContentBlockLocation
 - anthropic.CitationPageLocation
 - anthropic.CitationsDelta
 - anthropic.CitationsWebSearchResultLocation
 - anthropic.ContentBlockUnion
 - anthropic.InputJSONDelta
 - anthropic.Message
 - anthropic.MessageDeltaUsage
 - anthropic.MessageTokensCount
 - anthropic.Model
 - anthropic.RawContentBlockDeltaUnion
 - anthropic.ContentBlockDeltaEvent
 - anthropic.ContentBlockStartEvent
 - anthropic.ContentBlockStopEvent
 - anthropic.MessageDeltaEvent
 - anthropic.MessageStartEvent
 - anthropic.MessageStopEvent
 - anthropic.MessageStreamEventUnion
 - anthropic.RedactedThinkingBlock
 - anthropic.ServerToolUsage
 - anthropic.ServerToolUseBlock
 - anthropic.SignatureDelta
 - anthropic.StopReason
 - anthropic.TextBlock
 - anthropic.TextCitationUnion
 - anthropic.TextDelta
 - anthropic.ThinkingBlock
 - anthropic.ThinkingDelta
 - anthropic.ToolUseBlock
 - anthropic.Usage
 - anthropic.WebSearchResultBlock
 - anthropic.WebSearchToolResultBlock
 - anthropic.WebSearchToolResultBlockContentUnion
 - anthropic.WebSearchToolResultError
 
Methods:
client.Messages.New(ctx context.Context, body anthropic.MessageNewParams) (anthropic.Message, error)client.Messages.CountTokens(ctx context.Context, body anthropic.MessageCountTokensParams) (anthropic.MessageTokensCount, error)
Batches
Response Types:
- anthropic.DeletedMessageBatch
 - anthropic.MessageBatch
 - anthropic.MessageBatchCanceledResult
 - anthropic.MessageBatchErroredResult
 - anthropic.MessageBatchExpiredResult
 - anthropic.MessageBatchIndividualResponse
 - anthropic.MessageBatchRequestCounts
 - anthropic.MessageBatchResultUnion
 - anthropic.MessageBatchSucceededResult
 
Methods:
client.Messages.Batches.New(ctx context.Context, body anthropic.MessageBatchNewParams) (anthropic.MessageBatch, error)client.Messages.Batches.Get(ctx context.Context, messageBatchID string) (anthropic.MessageBatch, error)client.Messages.Batches.List(ctx context.Context, query anthropic.MessageBatchListParams) (pagination.Page[anthropic.MessageBatch], error)client.Messages.Batches.Delete(ctx context.Context, messageBatchID string) (anthropic.DeletedMessageBatch, error)client.Messages.Batches.Cancel(ctx context.Context, messageBatchID string) (anthropic.MessageBatch, error)client.Messages.Batches.Results(ctx context.Context, messageBatchID string) (anthropic.MessageBatchIndividualResponse, error)
Models
Response Types:
Methods:
client.Models.Get(ctx context.Context, modelID string, query anthropic.ModelGetParams) (anthropic.ModelInfo, error)client.Models.List(ctx context.Context, params anthropic.ModelListParams) (pagination.Page[anthropic.ModelInfo], error)
Beta
Params Types:
Response Types:
- anthropic.BetaAPIError
 - anthropic.BetaAuthenticationError
 - anthropic.BetaBillingError
 - anthropic.BetaErrorUnion
 - anthropic.BetaErrorResponse
 - anthropic.BetaGatewayTimeoutError
 - anthropic.BetaInvalidRequestError
 - anthropic.BetaNotFoundError
 - anthropic.BetaOverloadedError
 - anthropic.BetaPermissionError
 - anthropic.BetaRateLimitError
 
Models
Response Types:
Methods:
client.Beta.Models.Get(ctx context.Context, modelID string, query anthropic.BetaModelGetParams) (anthropic.BetaModelInfo, error)client.Beta.Models.List(ctx context.Context, params anthropic.BetaModelListParams) (pagination.Page[anthropic.BetaModelInfo], error)
Messages
Params Types:
- anthropic.BetaBase64ImageSourceParam
 - anthropic.BetaBase64PDFBlockParam
 - anthropic.BetaBase64PDFSourceParam
 - anthropic.BetaCacheControlEphemeralParam
 - anthropic.BetaCitationCharLocationParam
 - anthropic.BetaCitationContentBlockLocationParam
 - anthropic.BetaCitationPageLocationParam
 - anthropic.BetaCitationWebSearchResultLocationParam
 - anthropic.BetaCitationsConfigParam
 - anthropic.BetaCodeExecutionOutputBlockParam
 - anthropic.BetaCodeExecutionResultBlockParam
 - anthropic.BetaCodeExecutionTool20250522Param
 - anthropic.BetaCodeExecutionToolResultBlockParam
 - anthropic.BetaCodeExecutionToolResultBlockParamContentUnion
 - anthropic.BetaCodeExecutionToolResultErrorCode
 - anthropic.BetaCodeExecutionToolResultErrorParam
 - anthropic.BetaContainerUploadBlockParam
 - anthropic.BetaContentBlockParamUnion
 - anthropic.BetaContentBlockSourceParam
 - anthropic.BetaContentBlockSourceContentUnionParam
 - anthropic.BetaFileDocumentSourceParam
 - anthropic.BetaFileImageSourceParam
 - anthropic.BetaImageBlockParam
 - anthropic.BetaMCPToolUseBlockParam
 - anthropic.BetaMessageParam
 - anthropic.BetaMetadataParam
 - anthropic.BetaPlainTextSourceParam
 - anthropic.BetaRedactedThinkingBlockParam
 - anthropic.BetaRequestMCPServerToolConfigurationParam
 - anthropic.BetaRequestMCPServerURLDefinitionParam
 - anthropic.BetaRequestMCPToolResultBlockParam
 - anthropic.BetaServerToolUseBlockParam
 - anthropic.BetaTextBlockParam
 - anthropic.BetaTextCitationParamUnion
 - anthropic.BetaThinkingBlockParam
 - anthropic.BetaThinkingConfigDisabledParam
 - anthropic.BetaThinkingConfigEnabledParam
 - anthropic.BetaThinkingConfigParamUnion
 - anthropic.BetaToolParam
 - anthropic.BetaToolBash20241022Param
 - anthropic.BetaToolBash20250124Param
 - anthropic.BetaToolChoiceUnionParam
 - anthropic.BetaToolChoiceAnyParam
 - anthropic.BetaToolChoiceAutoParam
 - anthropic.BetaToolChoiceNoneParam
 - anthropic.BetaToolChoiceToolParam
 - anthropic.BetaToolComputerUse20241022Param
 - anthropic.BetaToolComputerUse20250124Param
 - anthropic.BetaToolResultBlockParam
 - anthropic.BetaToolTextEditor20241022Param
 - anthropic.BetaToolTextEditor20250124Param
 - anthropic.BetaToolTextEditor20250429Param
 - anthropic.BetaToolUnionParam
 - anthropic.BetaToolUseBlockParam
 - anthropic.BetaURLImageSourceParam
 - anthropic.BetaURLPDFSourceParam
 - anthropic.BetaWebSearchResultBlockParam
 - anthropic.BetaWebSearchTool20250305Param
 - anthropic.BetaWebSearchToolRequestErrorParam
 - anthropic.BetaWebSearchToolResultBlockParam
 - anthropic.BetaWebSearchToolResultBlockParamContentUnion
 - anthropic.BetaWebSearchToolResultErrorCode
 
Response Types:
- anthropic.BetaCacheCreation
 - anthropic.BetaCitationCharLocation
 - anthropic.BetaCitationContentBlockLocation
 - anthropic.BetaCitationPageLocation
 - anthropic.BetaCitationsDelta
 - anthropic.BetaCitationsWebSearchResultLocation
 - anthropic.BetaCodeExecutionOutputBlock
 - anthropic.BetaCodeExecutionResultBlock
 - anthropic.BetaCodeExecutionToolResultBlock
 - anthropic.BetaCodeExecutionToolResultBlockContentUnion
 - anthropic.BetaCodeExecutionToolResultError
 - anthropic.BetaCodeExecutionToolResultErrorCode
 - anthropic.BetaContainer
 - anthropic.BetaContainerUploadBlock
 - anthropic.BetaContentBlockUnion
 - anthropic.BetaInputJSONDelta
 - anthropic.BetaMCPToolResultBlock
 - anthropic.BetaMCPToolUseBlock
 - anthropic.BetaMessage
 - anthropic.BetaMessageDeltaUsage
 - anthropic.BetaMessageTokensCount
 - anthropic.BetaRawContentBlockDeltaUnion
 - anthropic.BetaRawContentBlockDeltaEvent
 - anthropic.BetaRawContentBlockStartEvent
 - anthropic.BetaRawContentBlockStopEvent
 - anthropic.BetaRawMessageDeltaEvent
 - anthropic.BetaRawMessageStartEvent
 - anthropic.BetaRawMessageStopEvent
 - anthropic.BetaRawMessageStreamEventUnion
 - anthropic.BetaRedactedThinkingBlock
 - anthropic.BetaServerToolUsage
 - anthropic.BetaServerToolUseBlock
 - anthropic.BetaSignatureDelta
 - anthropic.BetaStopReason
 - anthropic.BetaTextBlock
 - anthropic.BetaTextCitationUnion
 - anthropic.BetaTextDelta
 - anthropic.BetaThinkingBlock
 - anthropic.BetaThinkingDelta
 - anthropic.BetaToolUseBlock
 - anthropic.BetaUsage
 - anthropic.BetaWebSearchResultBlock
 - anthropic.BetaWebSearchToolResultBlock
 - anthropic.BetaWebSearchToolResultBlockContentUnion
 - anthropic.BetaWebSearchToolResultError
 - anthropic.BetaWebSearchToolResultErrorCode
 
Methods:
client.Beta.Messages.New(ctx context.Context, params anthropic.BetaMessageNewParams) (anthropic.BetaMessage, error)client.Beta.Messages.CountTokens(ctx context.Context, params anthropic.BetaMessageCountTokensParams) (anthropic.BetaMessageTokensCount, error)
Batches
Response Types:
- anthropic.BetaDeletedMessageBatch
 - anthropic.BetaMessageBatch
 - anthropic.BetaMessageBatchCanceledResult
 - anthropic.BetaMessageBatchErroredResult
 - anthropic.BetaMessageBatchExpiredResult
 - anthropic.BetaMessageBatchIndividualResponse
 - anthropic.BetaMessageBatchRequestCounts
 - anthropic.BetaMessageBatchResultUnion
 - anthropic.BetaMessageBatchSucceededResult
 
Methods:
client.Beta.Messages.Batches.New(ctx context.Context, params anthropic.BetaMessageBatchNewParams) (anthropic.BetaMessageBatch, error)client.Beta.Messages.Batches.Get(ctx context.Context, messageBatchID string, query anthropic.BetaMessageBatchGetParams) (anthropic.BetaMessageBatch, error)client.Beta.Messages.Batches.List(ctx context.Context, params anthropic.BetaMessageBatchListParams) (pagination.Page[anthropic.BetaMessageBatch], error)client.Beta.Messages.Batches.Delete(ctx context.Context, messageBatchID string, body anthropic.BetaMessageBatchDeleteParams) (anthropic.BetaDeletedMessageBatch, error)client.Beta.Messages.Batches.Cancel(ctx context.Context, messageBatchID string, body anthropic.BetaMessageBatchCancelParams) (anthropic.BetaMessageBatch, error)client.Beta.Messages.Batches.Results(ctx context.Context, messageBatchID string, query anthropic.BetaMessageBatchResultsParams) (anthropic.BetaMessageBatchIndividualResponse, error)
Files
Response Types:
Methods:
client.Beta.Files.List(ctx context.Context, params anthropic.BetaFileListParams) (pagination.Page[anthropic.FileMetadata], error)client.Beta.Files.Delete(ctx context.Context, fileID string, body anthropic.BetaFileDeleteParams) (anthropic.DeletedFile, error)client.Beta.Files.Download(ctx context.Context, fileID string, query anthropic.BetaFileDownloadParams) (http.Response, error)client.Beta.Files.GetMetadata(ctx context.Context, fileID string, query anthropic.BetaFileGetMetadataParams) (anthropic.FileMetadata, error)client.Beta.Files.Upload(ctx context.Context, params anthropic.BetaFileUploadParams) (anthropic.FileMetadata, error)