Skip to content

Latest commit

 

History

History
217 lines (183 loc) · 8.32 KB

api.md

File metadata and controls

217 lines (183 loc) · 8.32 KB

Shared Types

from anthropic.types import (
    APIErrorObject,
    AuthenticationError,
    BillingError,
    ErrorObject,
    ErrorResponse,
    GatewayTimeoutError,
    InvalidRequestError,
    NotFoundError,
    OverloadedError,
    PermissionError,
    RateLimitError,
)

Messages

Types:

from anthropic.types import (
    Base64PDFSource,
    CacheControlEphemeral,
    ContentBlock,
    ContentBlockDeltaEvent,
    ContentBlockParam,
    ContentBlockStartEvent,
    ContentBlockStopEvent,
    DocumentBlockParam,
    ImageBlockParam,
    InputJSONDelta,
    Message,
    MessageDeltaEvent,
    MessageDeltaUsage,
    MessageParam,
    MessageStartEvent,
    MessageStopEvent,
    MessageStreamEvent,
    MessageTokensCount,
    Metadata,
    Model,
    RawContentBlockDeltaEvent,
    RawContentBlockStartEvent,
    RawContentBlockStopEvent,
    RawMessageDeltaEvent,
    RawMessageStartEvent,
    RawMessageStopEvent,
    RawMessageStreamEvent,
    TextBlock,
    TextBlockParam,
    TextDelta,
    Tool,
    ToolChoice,
    ToolChoiceAny,
    ToolChoiceAuto,
    ToolChoiceTool,
    ToolResultBlockParam,
    ToolUseBlock,
    ToolUseBlockParam,
    Usage,
)

Methods:

Batches

Types:

from anthropic.types.messages import (
    MessageBatch,
    MessageBatchCanceledResult,
    MessageBatchErroredResult,
    MessageBatchExpiredResult,
    MessageBatchIndividualResponse,
    MessageBatchRequestCounts,
    MessageBatchResult,
    MessageBatchSucceededResult,
)

Methods:

Models

Types:

from anthropic.types import ModelInfo

Methods:

Beta

Types:

from anthropic.types import (
    AnthropicBeta,
    BetaAPIError,
    BetaAuthenticationError,
    BetaBillingError,
    BetaError,
    BetaErrorResponse,
    BetaGatewayTimeoutError,
    BetaInvalidRequestError,
    BetaNotFoundError,
    BetaOverloadedError,
    BetaPermissionError,
    BetaRateLimitError,
)

Models

Types:

from anthropic.types.beta import BetaModelInfo

Methods:

Messages

Types:

from anthropic.types.beta import (
    BetaBase64PDFBlock,
    BetaBase64PDFSource,
    BetaCacheControlEphemeral,
    BetaContentBlock,
    BetaContentBlockParam,
    BetaImageBlockParam,
    BetaInputJSONDelta,
    BetaMessage,
    BetaMessageDeltaUsage,
    BetaMessageParam,
    BetaMessageTokensCount,
    BetaMetadata,
    BetaRawContentBlockDeltaEvent,
    BetaRawContentBlockStartEvent,
    BetaRawContentBlockStopEvent,
    BetaRawMessageDeltaEvent,
    BetaRawMessageStartEvent,
    BetaRawMessageStopEvent,
    BetaRawMessageStreamEvent,
    BetaTextBlock,
    BetaTextBlockParam,
    BetaTextDelta,
    BetaTool,
    BetaToolBash20241022,
    BetaToolChoice,
    BetaToolChoiceAny,
    BetaToolChoiceAuto,
    BetaToolChoiceTool,
    BetaToolComputerUse20241022,
    BetaToolResultBlockParam,
    BetaToolTextEditor20241022,
    BetaToolUnion,
    BetaToolUseBlock,
    BetaToolUseBlockParam,
    BetaUsage,
)

Methods:

Batches

Types:

from anthropic.types.beta.messages import (
    BetaMessageBatch,
    BetaMessageBatchCanceledResult,
    BetaMessageBatchErroredResult,
    BetaMessageBatchExpiredResult,
    BetaMessageBatchIndividualResponse,
    BetaMessageBatchRequestCounts,
    BetaMessageBatchResult,
    BetaMessageBatchSucceededResult,
)

Methods: