diff --git a/src/tests/AutoSDK.UnitTests/Snapshots/Validation/ConvertedSpecs/anthropic.yaml/ValidationTests.Validation_NewWarnings.verified.txt b/src/tests/AutoSDK.UnitTests/Snapshots/Validation/ConvertedSpecs/anthropic.yaml/ValidationTests.Validation_NewWarnings.verified.txt index ad47dbb93f..371d7581e2 100644 --- a/src/tests/AutoSDK.UnitTests/Snapshots/Validation/ConvertedSpecs/anthropic.yaml/ValidationTests.Validation_NewWarnings.verified.txt +++ b/src/tests/AutoSDK.UnitTests/Snapshots/Validation/ConvertedSpecs/anthropic.yaml/ValidationTests.Validation_NewWarnings.verified.txt @@ -1 +1,47 @@ -[] \ No newline at end of file +[ + { + RuleName: SchemaMismatchedDataType, + Message: Data and type mismatch found., + Pointer: #/components/schemas/BetaCountMessageTokensParams/properties/tools/example + }, + { + RuleName: SchemaMismatchedDataType, + Message: Data and type mismatch found., + Pointer: #/components/schemas/BetaCreateMessageParams/properties/tools/example + }, + { + RuleName: SchemaMismatchedDataType, + Message: Data and type mismatch found., + Pointer: #/components/schemas/BetaUsage/properties/cache_creation_input_tokens/default + }, + { + RuleName: SchemaMismatchedDataType, + Message: Data and type mismatch found., + Pointer: #/components/schemas/BetaUsage/properties/cache_read_input_tokens/default + }, + { + RuleName: SchemaMismatchedDataType, + Message: Data and type mismatch found., + Pointer: #/components/schemas/CreateMessageParams/properties/tools/example + }, + { + RuleName: SchemaMismatchedDataType, + Message: Data and type mismatch found., + Pointer: #/components/schemas/PromptCachingBetaCreateMessageParams/properties/tools/example + }, + { + RuleName: SchemaMismatchedDataType, + Message: Data and type mismatch found., + Pointer: #/components/schemas/PromptCachingBetaUsage/properties/cache_creation_input_tokens/default + }, + { + RuleName: SchemaMismatchedDataType, + Message: Data and type mismatch found., + Pointer: #/components/schemas/PromptCachingBetaUsage/properties/cache_read_input_tokens/default + }, + { + RuleName: SchemaMismatchedDataType, + Message: Data and type mismatch found., + Pointer: #/components/schemas/CreateMessageParamsWithoutStream/properties/tools/example + } +] \ No newline at end of file diff --git a/src/tests/AutoSDK.UnitTests/Snapshots/Validation/ConvertedSpecs/anthropic.yaml/ValidationTests.Validation_OriginalWarnings.verified.txt b/src/tests/AutoSDK.UnitTests/Snapshots/Validation/ConvertedSpecs/anthropic.yaml/ValidationTests.Validation_OriginalWarnings.verified.txt index ad47dbb93f..371d7581e2 100644 --- a/src/tests/AutoSDK.UnitTests/Snapshots/Validation/ConvertedSpecs/anthropic.yaml/ValidationTests.Validation_OriginalWarnings.verified.txt +++ b/src/tests/AutoSDK.UnitTests/Snapshots/Validation/ConvertedSpecs/anthropic.yaml/ValidationTests.Validation_OriginalWarnings.verified.txt @@ -1 +1,47 @@ -[] \ No newline at end of file +[ + { + RuleName: SchemaMismatchedDataType, + Message: Data and type mismatch found., + Pointer: #/components/schemas/BetaCountMessageTokensParams/properties/tools/example + }, + { + RuleName: SchemaMismatchedDataType, + Message: Data and type mismatch found., + Pointer: #/components/schemas/BetaCreateMessageParams/properties/tools/example + }, + { + RuleName: SchemaMismatchedDataType, + Message: Data and type mismatch found., + Pointer: #/components/schemas/BetaUsage/properties/cache_creation_input_tokens/default + }, + { + RuleName: SchemaMismatchedDataType, + Message: Data and type mismatch found., + Pointer: #/components/schemas/BetaUsage/properties/cache_read_input_tokens/default + }, + { + RuleName: SchemaMismatchedDataType, + Message: Data and type mismatch found., + Pointer: #/components/schemas/CreateMessageParams/properties/tools/example + }, + { + RuleName: SchemaMismatchedDataType, + Message: Data and type mismatch found., + Pointer: #/components/schemas/PromptCachingBetaCreateMessageParams/properties/tools/example + }, + { + RuleName: SchemaMismatchedDataType, + Message: Data and type mismatch found., + Pointer: #/components/schemas/PromptCachingBetaUsage/properties/cache_creation_input_tokens/default + }, + { + RuleName: SchemaMismatchedDataType, + Message: Data and type mismatch found., + Pointer: #/components/schemas/PromptCachingBetaUsage/properties/cache_read_input_tokens/default + }, + { + RuleName: SchemaMismatchedDataType, + Message: Data and type mismatch found., + Pointer: #/components/schemas/CreateMessageParamsWithoutStream/properties/tools/example + } +] \ No newline at end of file diff --git a/src/tests/AutoSDK.UnitTests/Snapshots/Validation/ConvertedSpecs/anthropic.yaml/_.verified.txt b/src/tests/AutoSDK.UnitTests/Snapshots/Validation/ConvertedSpecs/anthropic.yaml/_.verified.txt index e624abe511..9c3072d4b5 100644 --- a/src/tests/AutoSDK.UnitTests/Snapshots/Validation/ConvertedSpecs/anthropic.yaml/_.verified.txt +++ b/src/tests/AutoSDK.UnitTests/Snapshots/Validation/ConvertedSpecs/anthropic.yaml/_.verified.txt @@ -1,75 +1,2559 @@ openapi: 3.0.1 info: title: Anthropic API - description: API Spec for Anthropic API. Please see https://docs.anthropic.com/en/api for more details. - version: '1' + version: 0.0.0 servers: - url: https://api.anthropic.com/v1 paths: - /messages: + /v1/messages: post: tags: - Messages summary: Create a Message - description: "Send a structured list of input messages with text and/or image content, and the\nmodel will generate the next message in the conversation.\n\nThe Messages API can be used for either single queries or stateless multi-turn\nconversations.\n" - operationId: createMessage + description: "Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversation.\n\nThe Messages API can be used for either single queries or stateless multi-turn conversations." + operationId: messages_post + parameters: + - name: anthropic-version + in: header + description: "The version of the Anthropic API you want to use.\n\nRead more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning)." + schema: + title: Anthropic-Version + type: string + description: "The version of the Anthropic API you want to use.\n\nRead more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning)." requestBody: content: application/json: schema: - $ref: '#/components/schemas/CreateMessageRequest' + $ref: '#/components/schemas/CreateMessageParams' required: true responses: '200': - description: OK + description: Message object. content: application/json: schema: $ref: '#/components/schemas/Message' - /messages/batches: + 4XX: + description: "Error response.\n\nSee our [errors documentation](https://docs.anthropic.com/en/api/errors) for more details." + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + /v1/complete: + post: + tags: + - Text Completions + summary: Create a Text Completion + description: "[Legacy] Create a Text Completion.\n\nThe Text Completions API is a legacy API. We recommend using the [Messages API](https://docs.anthropic.com/en/api/messages) going forward.\n\nFuture models and features will not be compatible with Text Completions. See our [migration guide](https://docs.anthropic.com/en/api/migrating-from-text-completions-to-messages) for guidance in migrating from Text Completions to Messages." + operationId: complete_post + parameters: + - name: anthropic-version + in: header + description: "The version of the Anthropic API you want to use.\n\nRead more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning)." + schema: + title: Anthropic-Version + type: string + description: "The version of the Anthropic API you want to use.\n\nRead more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning)." + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompletionRequest' + required: true + responses: + '200': + description: Text Completion object. + content: + application/json: + schema: + $ref: '#/components/schemas/CompletionResponse' + 4XX: + description: "Error response.\n\nSee our [errors documentation](https://docs.anthropic.com/en/api/errors) for more details." + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + /v1/messages?beta=true: post: tags: - Messages + summary: Create a Message + description: "Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversation.\n\nThe Messages API can be used for either single queries or stateless multi-turn conversations." + operationId: beta_messages_post + parameters: + - name: anthropic-beta + in: header + description: "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + schema: + title: Anthropic-Beta + type: string + items: + type: string + description: "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + x-stainless-override-schema: + x-stainless-param: betas + x-stainless-extend-default: true + type: array + description: Optional header to specify the beta version(s) you want to use. + items: + $ref: '#/components/schemas/AnthropicBeta' + - name: anthropic-version + in: header + description: "The version of the Anthropic API you want to use.\n\nRead more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning)." + schema: + title: Anthropic-Version + type: string + description: "The version of the Anthropic API you want to use.\n\nRead more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning)." + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BetaCreateMessageParams' + required: true + responses: + '200': + description: Message object. + content: + application/json: + schema: + $ref: '#/components/schemas/BetaMessage' + 4XX: + description: "Error response.\n\nSee our [errors documentation](https://docs.anthropic.com/en/api/errors) for more details." + content: + application/json: + schema: + $ref: '#/components/schemas/BetaErrorResponse' + /v1/messages/batches?beta=true: + post: + tags: + - Message Batches summary: Create a Message Batch - description: Send a batch of Message creation requests. - operationId: createMessageBatch + description: "Send a batch of Message creation requests.\n\nThe Message Batches API can be used to process multiple Messages API requests at once. Once a Message Batch is created, it begins processing immediately. Batches can take up to 24 hours to complete." + operationId: beta_message_batches_post + parameters: + - name: anthropic-beta + in: header + description: "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + schema: + title: Anthropic-Beta + type: string + items: + type: string + description: "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + x-stainless-override-schema: + x-stainless-param: betas + x-stainless-extend-default: true + type: array + description: Optional header to specify the beta version(s) you want to use. + items: + $ref: '#/components/schemas/AnthropicBeta' + - name: anthropic-version + in: header + description: "The version of the Anthropic API you want to use.\n\nRead more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning)." + schema: + title: Anthropic-Version + type: string + description: "The version of the Anthropic API you want to use.\n\nRead more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning)." requestBody: content: application/json: schema: - $ref: '#/components/schemas/CreateMessageBatchRequest' + $ref: '#/components/schemas/BetaCreateMessageBatchParams' required: true responses: '200': - description: OK + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/BetaMessageBatch' + 4XX: + description: "Error response.\n\nSee our [errors documentation](https://docs.anthropic.com/en/api/errors) for more details." + content: + application/json: + schema: + $ref: '#/components/schemas/BetaErrorResponse' + get: + tags: + - Message Batches + summary: List Message Batches + description: List all Message Batches within a Workspace. Most recently created batches are returned first. + operationId: beta_message_batches_list + parameters: + - name: before_id + in: query + description: 'ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object.' + schema: + title: Before Id + type: string + description: 'ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object.' + - name: after_id + in: query + description: 'ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object.' + schema: + title: After Id + type: string + description: 'ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object.' + - name: limit + in: query + description: "Number of items to return per page.\n\nDefaults to `20`. Ranges from `1` to `100`." + schema: + title: Limit + maximum: 100 + minimum: 1 + type: integer + description: "Number of items to return per page.\n\nDefaults to `20`. Ranges from `1` to `100`." + default: 20 + - name: anthropic-beta + in: header + description: "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + schema: + title: Anthropic-Beta + type: string + items: + type: string + description: "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + x-stainless-override-schema: + x-stainless-param: betas + x-stainless-extend-default: true + type: array + description: Optional header to specify the beta version(s) you want to use. + items: + $ref: '#/components/schemas/AnthropicBeta' + - name: anthropic-version + in: header + description: "The version of the Anthropic API you want to use.\n\nRead more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning)." + schema: + title: Anthropic-Version + type: string + description: "The version of the Anthropic API you want to use.\n\nRead more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning)." + - name: x-api-key + in: header + description: "Your unique API key for authentication. \n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace." + schema: + title: X-Api-Key + type: string + description: "Your unique API key for authentication. \n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace." + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/BetaListResponse_MessageBatch_' + 4XX: + description: "Error response.\n\nSee our [errors documentation](https://docs.anthropic.com/en/api/errors) for more details." + content: + application/json: + schema: + $ref: '#/components/schemas/BetaErrorResponse' + '/v1/messages/batches/{message_batch_id}?beta=true': + get: + tags: + - Message Batches + summary: Retrieve a Message Batch + description: 'This endpoint is idempotent and can be used to poll for Message Batch completion. To access the results of a Message Batch, make a request to the `results_url` field in the response.' + operationId: beta_message_batches_retrieve + parameters: + - name: message_batch_id + in: path + description: ID of the Message Batch. + required: true + schema: + title: Message Batch Id + type: string + description: ID of the Message Batch. + - name: anthropic-beta + in: header + description: "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + schema: + title: Anthropic-Beta + type: string + items: + type: string + description: "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + x-stainless-override-schema: + x-stainless-param: betas + x-stainless-extend-default: true + type: array + description: Optional header to specify the beta version(s) you want to use. + items: + $ref: '#/components/schemas/AnthropicBeta' + - name: anthropic-version + in: header + description: "The version of the Anthropic API you want to use.\n\nRead more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning)." + schema: + title: Anthropic-Version + type: string + description: "The version of the Anthropic API you want to use.\n\nRead more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning)." + - name: x-api-key + in: header + description: "Your unique API key for authentication. \n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace." + schema: + title: X-Api-Key + type: string + description: "Your unique API key for authentication. \n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace." + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/BetaMessageBatch' + 4XX: + description: "Error response.\n\nSee our [errors documentation](https://docs.anthropic.com/en/api/errors) for more details." + content: + application/json: + schema: + $ref: '#/components/schemas/BetaErrorResponse' + '/v1/messages/batches/{message_batch_id}/cancel?beta=true': + post: + tags: + - Message Batches + summary: Cancel a Message Batch + description: "Batches may be canceled any time before processing ends. Once cancellation is initiated, the batch enters a `canceling` state, at which time the system may complete any in-progress, non-interruptible requests before finalizing cancellation.\n\nThe number of canceled requests is specified in `request_counts`. To determine which requests were canceled, check the individual results within the batch. Note that cancellation may not result in any canceled requests if they were non-interruptible." + operationId: beta_message_batches_cancel + parameters: + - name: message_batch_id + in: path + description: ID of the Message Batch. + required: true + schema: + title: Message Batch Id + type: string + description: ID of the Message Batch. + - name: anthropic-beta + in: header + description: "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + schema: + title: Anthropic-Beta + type: string + items: + type: string + description: "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + x-stainless-override-schema: + x-stainless-param: betas + x-stainless-extend-default: true + type: array + description: Optional header to specify the beta version(s) you want to use. + items: + $ref: '#/components/schemas/AnthropicBeta' + - name: anthropic-version + in: header + description: "The version of the Anthropic API you want to use.\n\nRead more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning)." + schema: + title: Anthropic-Version + type: string + description: "The version of the Anthropic API you want to use.\n\nRead more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning)." + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/BetaMessageBatch' + 4XX: + description: "Error response.\n\nSee our [errors documentation](https://docs.anthropic.com/en/api/errors) for more details." content: application/json: schema: - $ref: '#/components/schemas/MessageBatch' - '/messages/batches/{id}': + $ref: '#/components/schemas/BetaErrorResponse' + '/v1/messages/batches/{message_batch_id}/results?beta=true': get: + tags: + - Message Batches + summary: Retrieve Message Batch results + description: "Streams the results of a Message Batch as a `.jsonl` file.\n\nEach line in the file is a JSON object containing the result of a single request in the Message Batch. Results are not guaranteed to be in the same order as requests. Use the `custom_id` field to match results to requests." + operationId: beta_message_batches_results + parameters: + - name: message_batch_id + in: path + description: ID of the Message Batch. + required: true + schema: + title: Message Batch Id + type: string + description: ID of the Message Batch. + - name: anthropic-beta + in: header + description: "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + schema: + title: Anthropic-Beta + type: string + items: + type: string + description: "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + x-stainless-override-schema: + x-stainless-param: betas + x-stainless-extend-default: true + type: array + description: Optional header to specify the beta version(s) you want to use. + items: + $ref: '#/components/schemas/AnthropicBeta' + - name: anthropic-version + in: header + description: "The version of the Anthropic API you want to use.\n\nRead more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning)." + schema: + title: Anthropic-Version + type: string + description: "The version of the Anthropic API you want to use.\n\nRead more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning)." + - name: x-api-key + in: header + description: "Your unique API key for authentication. \n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace." + schema: + title: X-Api-Key + type: string + description: "Your unique API key for authentication. \n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace." + responses: + '200': + description: Successful Response + content: + application/x-jsonl: + schema: + type: string + format: binary + x-line-schema: + $ref: '#/components/schemas/BetaMessageBatchIndividualResponse' + 4XX: + description: "Error response.\n\nSee our [errors documentation](https://docs.anthropic.com/en/api/errors) for more details." + content: + application/json: + schema: + $ref: '#/components/schemas/BetaErrorResponse' + /v1/messages/count_tokens?beta=true: + post: + tags: + - Messages + summary: Count tokens in a Message + description: "Count the number of tokens in a Message.\n\nThe Token Count API can be used to count the number of tokens in a Message, including tools, images, and documents, without creating it." + operationId: beta_messages_count_tokens_post + parameters: + - name: anthropic-beta + in: header + description: "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + schema: + title: Anthropic-Beta + type: string + items: + type: string + description: "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + x-stainless-override-schema: + x-stainless-param: betas + x-stainless-extend-default: true + type: array + description: Optional header to specify the beta version(s) you want to use. + items: + $ref: '#/components/schemas/AnthropicBeta' + - name: anthropic-version + in: header + description: "The version of the Anthropic API you want to use.\n\nRead more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning)." + schema: + title: Anthropic-Version + type: string + description: "The version of the Anthropic API you want to use.\n\nRead more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning)." + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BetaCountMessageTokensParams' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/BetaCountMessageTokensResponse' + 4XX: + description: "Error response.\n\nSee our [errors documentation](https://docs.anthropic.com/en/api/errors) for more details." + content: + application/json: + schema: + $ref: '#/components/schemas/BetaErrorResponse' + /v1/messages?beta=prompt_caching: + post: tags: - Messages + summary: Create a Message + description: "Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversation.\n\nThe Messages API can be used for either single queries or stateless multi-turn conversations." + operationId: prompt_caching_beta_messages_post + parameters: + - name: anthropic-beta + in: header + description: "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + schema: + title: Anthropic-Beta + type: string + items: + type: string + description: "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + x-stainless-override-schema: + x-stainless-param: betas + x-stainless-extend-default: true + type: array + description: Optional header to specify the beta version(s) you want to use. + items: + $ref: '#/components/schemas/AnthropicBeta' + - name: anthropic-version + in: header + description: "The version of the Anthropic API you want to use.\n\nRead more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning)." + schema: + title: Anthropic-Version + type: string + description: "The version of the Anthropic API you want to use.\n\nRead more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning)." + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PromptCachingBetaCreateMessageParams' + required: true + responses: + '200': + description: Message object. + content: + application/json: + schema: + $ref: '#/components/schemas/PromptCachingBetaMessage' + 4XX: + description: "Error response.\n\nSee our [errors documentation](https://docs.anthropic.com/en/api/errors) for more details." + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + /v1/messages/batches: + post: + tags: + - Message Batches + summary: Create a Message Batch + description: "Send a batch of Message creation requests.\n\nThe Message Batches API can be used to process multiple Messages API requests at once. Once a Message Batch is created, it begins processing immediately. Batches can take up to 24 hours to complete." + operationId: beta_message_batches_post + parameters: + - name: anthropic-beta + in: header + description: "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + schema: + title: Anthropic-Beta + type: string + items: + type: string + description: "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + x-stainless-override-schema: + x-stainless-param: betas + x-stainless-extend-default: true + type: array + description: Optional header to specify the beta version(s) you want to use. + items: + $ref: '#/components/schemas/AnthropicBeta' + - name: anthropic-version + in: header + description: "The version of the Anthropic API you want to use.\n\nRead more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning)." + schema: + title: Anthropic-Version + type: string + description: "The version of the Anthropic API you want to use.\n\nRead more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning)." + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BetaCreateMessageBatchParams' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/BetaMessageBatch' + 4XX: + description: "Error response.\n\nSee our [errors documentation](https://docs.anthropic.com/en/api/errors) for more details." + content: + application/json: + schema: + $ref: '#/components/schemas/BetaErrorResponse' + get: + tags: + - Message Batches + summary: List Message Batches + description: List all Message Batches within a Workspace. Most recently created batches are returned first. + operationId: beta_message_batches_list + parameters: + - name: before_id + in: query + description: 'ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object.' + schema: + title: Before Id + type: string + description: 'ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object.' + - name: after_id + in: query + description: 'ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object.' + schema: + title: After Id + type: string + description: 'ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object.' + - name: limit + in: query + description: "Number of items to return per page.\n\nDefaults to `20`. Ranges from `1` to `100`." + schema: + title: Limit + maximum: 100 + minimum: 1 + type: integer + description: "Number of items to return per page.\n\nDefaults to `20`. Ranges from `1` to `100`." + default: 20 + - name: anthropic-beta + in: header + description: "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + schema: + title: Anthropic-Beta + type: string + items: + type: string + description: "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + x-stainless-override-schema: + x-stainless-param: betas + x-stainless-extend-default: true + type: array + description: Optional header to specify the beta version(s) you want to use. + items: + $ref: '#/components/schemas/AnthropicBeta' + - name: anthropic-version + in: header + description: "The version of the Anthropic API you want to use.\n\nRead more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning)." + schema: + title: Anthropic-Version + type: string + description: "The version of the Anthropic API you want to use.\n\nRead more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning)." + - name: x-api-key + in: header + description: "Your unique API key for authentication. \n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace." + schema: + title: X-Api-Key + type: string + description: "Your unique API key for authentication. \n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace." + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/BetaListResponse_MessageBatch_' + 4XX: + description: "Error response.\n\nSee our [errors documentation](https://docs.anthropic.com/en/api/errors) for more details." + content: + application/json: + schema: + $ref: '#/components/schemas/BetaErrorResponse' + '/v1/messages/batches/{message_batch_id}': + get: + tags: + - Message Batches summary: Retrieve a Message Batch - description: "This endpoint is idempotent and can be used to poll for Message Batch\ncompletion. To access the results of a Message Batch, make a request to the\n`results_url` field in the response.\n" - operationId: retrieveMessageBatch + description: 'This endpoint is idempotent and can be used to poll for Message Batch completion. To access the results of a Message Batch, make a request to the `results_url` field in the response.' + operationId: beta_message_batches_retrieve parameters: - - name: id + - name: message_batch_id in: path - description: The ID of the message batch to retrieve. + description: ID of the Message Batch. required: true schema: + title: Message Batch Id + type: string + description: ID of the Message Batch. + - name: anthropic-beta + in: header + description: "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + schema: + title: Anthropic-Beta + type: string + items: + type: string + description: "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + x-stainless-override-schema: + x-stainless-param: betas + x-stainless-extend-default: true + type: array + description: Optional header to specify the beta version(s) you want to use. + items: + $ref: '#/components/schemas/AnthropicBeta' + - name: anthropic-version + in: header + description: "The version of the Anthropic API you want to use.\n\nRead more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning)." + schema: + title: Anthropic-Version + type: string + description: "The version of the Anthropic API you want to use.\n\nRead more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning)." + - name: x-api-key + in: header + description: "Your unique API key for authentication. \n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace." + schema: + title: X-Api-Key type: string + description: "Your unique API key for authentication. \n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace." responses: '200': - description: OK + description: Successful Response content: application/json: schema: - $ref: '#/components/schemas/MessageBatch' -components: - schemas: - CreateMessageRequest: + $ref: '#/components/schemas/BetaMessageBatch' + 4XX: + description: "Error response.\n\nSee our [errors documentation](https://docs.anthropic.com/en/api/errors) for more details." + content: + application/json: + schema: + $ref: '#/components/schemas/BetaErrorResponse' + '/v1/messages/batches/{message_batch_id}/cancel': + post: + tags: + - Message Batches + summary: Cancel a Message Batch + description: "Batches may be canceled any time before processing ends. Once cancellation is initiated, the batch enters a `canceling` state, at which time the system may complete any in-progress, non-interruptible requests before finalizing cancellation.\n\nThe number of canceled requests is specified in `request_counts`. To determine which requests were canceled, check the individual results within the batch. Note that cancellation may not result in any canceled requests if they were non-interruptible." + operationId: beta_message_batches_cancel + parameters: + - name: message_batch_id + in: path + description: ID of the Message Batch. + required: true + schema: + title: Message Batch Id + type: string + description: ID of the Message Batch. + - name: anthropic-beta + in: header + description: "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + schema: + title: Anthropic-Beta + type: string + items: + type: string + description: "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + x-stainless-override-schema: + x-stainless-param: betas + x-stainless-extend-default: true + type: array + description: Optional header to specify the beta version(s) you want to use. + items: + $ref: '#/components/schemas/AnthropicBeta' + - name: anthropic-version + in: header + description: "The version of the Anthropic API you want to use.\n\nRead more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning)." + schema: + title: Anthropic-Version + type: string + description: "The version of the Anthropic API you want to use.\n\nRead more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning)." + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/BetaMessageBatch' + 4XX: + description: "Error response.\n\nSee our [errors documentation](https://docs.anthropic.com/en/api/errors) for more details." + content: + application/json: + schema: + $ref: '#/components/schemas/BetaErrorResponse' + '/v1/messages/batches/{message_batch_id}/results': + get: + tags: + - Message Batches + summary: Retrieve Message Batch results + description: "Streams the results of a Message Batch as a `.jsonl` file.\n\nEach line in the file is a JSON object containing the result of a single request in the Message Batch. Results are not guaranteed to be in the same order as requests. Use the `custom_id` field to match results to requests." + operationId: beta_message_batches_results + parameters: + - name: message_batch_id + in: path + description: ID of the Message Batch. + required: true + schema: + title: Message Batch Id + type: string + description: ID of the Message Batch. + - name: anthropic-beta + in: header + description: "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + schema: + title: Anthropic-Beta + type: string + items: + type: string + description: "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + x-stainless-override-schema: + x-stainless-param: betas + x-stainless-extend-default: true + type: array + description: Optional header to specify the beta version(s) you want to use. + items: + $ref: '#/components/schemas/AnthropicBeta' + - name: anthropic-version + in: header + description: "The version of the Anthropic API you want to use.\n\nRead more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning)." + schema: + title: Anthropic-Version + type: string + description: "The version of the Anthropic API you want to use.\n\nRead more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning)." + - name: x-api-key + in: header + description: "Your unique API key for authentication. \n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace." + schema: + title: X-Api-Key + type: string + description: "Your unique API key for authentication. \n\nThis key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace." + responses: + '200': + description: Successful Response + content: + application/x-jsonl: + schema: + type: string + format: binary + x-line-schema: + $ref: '#/components/schemas/BetaMessageBatchIndividualResponse' + 4XX: + description: "Error response.\n\nSee our [errors documentation](https://docs.anthropic.com/en/api/errors) for more details." + content: + application/json: + schema: + $ref: '#/components/schemas/BetaErrorResponse' + /v1/messages/count_tokens: + post: + tags: + - Messages + summary: Count tokens in a Message + description: "Count the number of tokens in a Message.\n\nThe Token Count API can be used to count the number of tokens in a Message, including tools, images, and documents, without creating it." + operationId: beta_messages_count_tokens_post + parameters: + - name: anthropic-beta + in: header + description: "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + schema: + title: Anthropic-Beta + type: string + items: + type: string + description: "Optional header to specify the beta version(s) you want to use.\n\nTo use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta." + x-stainless-override-schema: + x-stainless-param: betas + x-stainless-extend-default: true + type: array + description: Optional header to specify the beta version(s) you want to use. + items: + $ref: '#/components/schemas/AnthropicBeta' + - name: anthropic-version + in: header + description: "The version of the Anthropic API you want to use.\n\nRead more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning)." + schema: + title: Anthropic-Version + type: string + description: "The version of the Anthropic API you want to use.\n\nRead more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning)." + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BetaCountMessageTokensParams' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/BetaCountMessageTokensResponse' + 4XX: + description: "Error response.\n\nSee our [errors documentation](https://docs.anthropic.com/en/api/errors) for more details." + content: + application/json: + schema: + $ref: '#/components/schemas/BetaErrorResponse' +components: + schemas: + APIError: + title: APIError + required: + - type + - message + type: object + properties: + type: + title: Type + enum: + - api_error + type: string + default: api_error + message: + title: Message + type: string + default: Internal server error + AuthenticationError: + title: AuthenticationError + required: + - type + - message + type: object + properties: + type: + title: Type + enum: + - authentication_error + type: string + default: authentication_error + message: + title: Message + type: string + default: Authentication error + Base64ImageSource: + title: Base64ImageSource + required: + - type + - media_type + - data + type: object + properties: + type: + title: Type + enum: + - base64 + type: string + media_type: + title: Media Type + enum: + - image/jpeg + - image/png + - image/gif + - image/webp + type: string + data: + title: Data + type: string + format: byte + additionalProperties: false + BetaAPIError: + title: APIError + required: + - type + - message + type: object + properties: + type: + title: Type + enum: + - api_error + type: string + default: api_error + message: + title: Message + type: string + default: Internal server error + BetaAuthenticationError: + title: AuthenticationError + required: + - type + - message + type: object + properties: + type: + title: Type + enum: + - authentication_error + type: string + default: authentication_error + message: + title: Message + type: string + default: Authentication error + BetaBase64ImageSource: + title: Base64ImageSource + required: + - type + - media_type + - data + type: object + properties: + type: + title: Type + enum: + - base64 + type: string + media_type: + title: Media Type + enum: + - image/jpeg + - image/png + - image/gif + - image/webp + type: string + data: + title: Data + type: string + format: byte + additionalProperties: false + BetaBase64PDFSource: + title: Base64PDFSource + required: + - type + - media_type + - data + type: object + properties: + type: + title: Type + enum: + - base64 + type: string + media_type: + title: Media Type + enum: + - application/pdf + type: string + data: + title: Data + type: string + format: byte + additionalProperties: false + BetaBashTool_20241022: + title: BashTool_20241022 + required: + - type + - name + type: object + properties: + cache_control: + title: Cache Control + type: 'null' + oneOf: + - $ref: '#/components/schemas/BetaCacheControlEphemeral' + nullable: true + discriminator: + propertyName: type + mapping: + ephemeral: '#/components/schemas/BetaCacheControlEphemeral' + type: + title: Type + enum: + - bash_20241022 + type: string + name: + title: Name + enum: + - bash + type: string + description: "Name of the tool.\n\nThis is how the tool will be called by the model and in tool_use blocks." + additionalProperties: false + BetaCacheControlEphemeral: + title: CacheControlEphemeral + required: + - type + type: object + properties: + type: + title: Type + enum: + - ephemeral + type: string + additionalProperties: false + BetaCanceledResult: + title: CanceledResult + required: + - type + type: object + properties: + type: + title: Type + enum: + - canceled + type: string + default: canceled + BetaComputerUseTool_20241022: + title: ComputerUseTool_20241022 + required: + - type + - name + - display_height_px + - display_width_px + type: object + properties: + cache_control: + title: Cache Control + type: 'null' + oneOf: + - $ref: '#/components/schemas/BetaCacheControlEphemeral' + nullable: true + discriminator: + propertyName: type + mapping: + ephemeral: '#/components/schemas/BetaCacheControlEphemeral' + type: + title: Type + enum: + - computer_20241022 + type: string + name: + title: Name + enum: + - computer + type: string + description: "Name of the tool.\n\nThis is how the tool will be called by the model and in tool_use blocks." + display_height_px: + title: Display Height Px + minimum: 1 + type: integer + description: The height of the display in pixels. + display_width_px: + title: Display Width Px + minimum: 1 + type: integer + description: The width of the display in pixels. + display_number: + title: Display Number + minimum: 0 + type: integer + description: 'The X11 display number (e.g. 0, 1) for the display.' + nullable: true + additionalProperties: false + BetaContentBlockDeltaEvent: + title: ContentBlockDeltaEvent + required: + - type + - index + - delta + type: object + properties: + type: + title: Type + enum: + - content_block_delta + type: string + default: content_block_delta + index: + title: Index + type: integer + delta: + title: Delta + oneOf: + - $ref: '#/components/schemas/BetaTextContentBlockDelta' + - $ref: '#/components/schemas/BetaInputJsonContentBlockDelta' + discriminator: + propertyName: type + mapping: + input_json_delta: '#/components/schemas/BetaInputJsonContentBlockDelta' + text_delta: '#/components/schemas/BetaTextContentBlockDelta' + BetaContentBlockStartEvent: + title: ContentBlockStartEvent + required: + - type + - index + - content_block + type: object + properties: + type: + title: Type + enum: + - content_block_start + type: string + default: content_block_start + index: + title: Index + type: integer + content_block: + title: Content Block + oneOf: + - $ref: '#/components/schemas/BetaResponseTextBlock' + - $ref: '#/components/schemas/BetaResponseToolUseBlock' + discriminator: + propertyName: type + mapping: + text: '#/components/schemas/BetaResponseTextBlock' + tool_use: '#/components/schemas/BetaResponseToolUseBlock' + BetaContentBlockStopEvent: + title: ContentBlockStopEvent + required: + - type + - index + type: object + properties: + type: + title: Type + enum: + - content_block_stop + type: string + default: content_block_stop + index: + title: Index + type: integer + BetaCountMessageTokensParams: + title: CountMessageTokensParams + required: + - messages + - model + type: object + properties: + tool_choice: + $ref: '#/components/schemas/BetaToolChoice' + tools: + title: Tools + type: array + items: + oneOf: + - $ref: '#/components/schemas/BetaTool' + - $ref: '#/components/schemas/BetaComputerUseTool_20241022' + - $ref: '#/components/schemas/BetaBashTool_20241022' + - $ref: '#/components/schemas/BetaTextEditor_20241022' + description: "Definitions of tools that the model may use.\n\nIf you include `tools` in your API request, the model may return `tool_use` content blocks that represent the model's use of those tools. You can then run those tools using the tool input generated by the model and then optionally return results back to the model using `tool_result` content blocks.\n\nEach tool definition includes:\n\n* `name`: Name of the tool.\n* `description`: Optional, but strongly-recommended description of the tool.\n* `input_schema`: [JSON schema](https://json-schema.org/) for the tool `input` shape that the model will produce in `tool_use` output content blocks.\n\nFor example, if you defined `tools` as:\n\n```json\n[\n {\n \"name\": \"get_stock_price\",\n \"description\": \"Get the current stock price for a given ticker symbol.\",\n \"input_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"ticker\": {\n \"type\": \"string\",\n \"description\": \"The stock ticker symbol, e.g. AAPL for Apple Inc.\"\n }\n },\n \"required\": [\"ticker\"]\n }\n }\n]\n```\n\nAnd then asked the model \"What's the S&P 500 at today?\", the model might produce `tool_use` content blocks in the response like this:\n\n```json\n[\n {\n \"type\": \"tool_use\",\n \"id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"name\": \"get_stock_price\",\n \"input\": { \"ticker\": \"^GSPC\" }\n }\n]\n```\n\nYou might then run your `get_stock_price` tool with `{\"ticker\": \"^GSPC\"}` as an input, and return the following back to the model in a subsequent `user` message:\n\n```json\n[\n {\n \"type\": \"tool_result\",\n \"tool_use_id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"content\": \"259.75 USD\"\n }\n]\n```\n\nTools can be used for workflows that include running client-side tools and functions, or more generally whenever you want the model to produce a particular JSON structure of output.\n\nSee our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details." + example: + description: Get the current weather in a given location + input_schema: + properties: + location: + description: 'The city and state, e.g. San Francisco, CA' + type: string + unit: + description: 'Unit for the output - one of (celsius, fahrenheit)' + type: string + required: + - location + type: object + name: get_weather + messages: + title: Messages + type: array + items: + $ref: '#/components/schemas/BetaInputMessage' + description: "Input messages.\n\nOur models are trained to operate on alternating `user` and `assistant` conversational turns. When creating a new `Message`, you specify the prior conversational turns with the `messages` parameter, and the model then generates the next `Message` in the conversation. Consecutive `user` or `assistant` turns in your request will be combined into a single turn.\n\nEach input message must be an object with a `role` and `content`. You can specify a single `user`-role message, or you can include multiple `user` and `assistant` messages.\n\nIf the final message uses the `assistant` role, the response content will continue immediately from the content in that message. This can be used to constrain part of the model's response.\n\nExample with a single `user` message:\n\n```json\n[{\"role\": \"user\", \"content\": \"Hello, Claude\"}]\n```\n\nExample with multiple conversational turns:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"Hello there.\"},\n {\"role\": \"assistant\", \"content\": \"Hi, I'm Claude. How can I help you?\"},\n {\"role\": \"user\", \"content\": \"Can you explain LLMs in plain English?\"},\n]\n```\n\nExample with a partially-filled response from Claude:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun\"},\n {\"role\": \"assistant\", \"content\": \"The best answer is (\"},\n]\n```\n\nEach input message `content` may be either a single `string` or an array of content blocks, where each block has a specific `type`. Using a `string` for `content` is shorthand for an array of one content block of type `\"text\"`. The following input messages are equivalent:\n\n```json\n{\"role\": \"user\", \"content\": \"Hello, Claude\"}\n```\n\n```json\n{\"role\": \"user\", \"content\": [{\"type\": \"text\", \"text\": \"Hello, Claude\"}]}\n```\n\nStarting with Claude 3 models, you can also send image content blocks:\n\n```json\n{\"role\": \"user\", \"content\": [\n {\n \"type\": \"image\",\n \"source\": {\n \"type\": \"base64\",\n \"media_type\": \"image/jpeg\",\n \"data\": \"/9j/4AAQSkZJRg...\",\n }\n },\n {\"type\": \"text\", \"text\": \"What is in this image?\"}\n]}\n```\n\nWe currently support the `base64` source type for images, and the `image/jpeg`, `image/png`, `image/gif`, and `image/webp` media types.\n\nSee [examples](https://docs.anthropic.com/en/api/messages-examples#vision) for more input examples.\n\nNote that if you want to include a [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use the top-level `system` parameter — there is no `\"system\"` role for input messages in the Messages API." + system: + title: System + anyOf: + - type: string + - type: array + items: + $ref: '#/components/schemas/BetaRequestTextBlock' + description: "System prompt.\n\nA system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts)." + example: + - text: Today's date is 2024-06-01. + type: text + model: + $ref: '#/components/schemas/Model' + additionalProperties: false + example: + messages: + - content: 'Hello, world' + role: user + model: claude-3-5-sonnet-20241022 + BetaCountMessageTokensResponse: + title: CountMessageTokensResponse + required: + - input_tokens + type: object + properties: + input_tokens: + title: Input Tokens + type: integer + description: 'The total number of tokens across the provided list of messages, system prompt, and tools.' + example: 2095 + example: + input_tokens: 2095 + BetaCreateMessageBatchParams: + title: CreateMessageBatchParams + required: + - requests + type: object + properties: + requests: + title: Requests + type: array + items: + $ref: '#/components/schemas/BetaMessageBatchIndividualRequestParams' + description: List of requests for prompt completion. Each is an individual request to create a Message. + additionalProperties: false + BetaCreateMessageParams: + title: CreateMessageParams + required: + - model + - messages + - max_tokens + type: object + properties: + model: + $ref: '#/components/schemas/Model' + messages: + title: Messages + type: array + items: + $ref: '#/components/schemas/BetaInputMessage' + description: "Input messages.\n\nOur models are trained to operate on alternating `user` and `assistant` conversational turns. When creating a new `Message`, you specify the prior conversational turns with the `messages` parameter, and the model then generates the next `Message` in the conversation. Consecutive `user` or `assistant` turns in your request will be combined into a single turn.\n\nEach input message must be an object with a `role` and `content`. You can specify a single `user`-role message, or you can include multiple `user` and `assistant` messages.\n\nIf the final message uses the `assistant` role, the response content will continue immediately from the content in that message. This can be used to constrain part of the model's response.\n\nExample with a single `user` message:\n\n```json\n[{\"role\": \"user\", \"content\": \"Hello, Claude\"}]\n```\n\nExample with multiple conversational turns:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"Hello there.\"},\n {\"role\": \"assistant\", \"content\": \"Hi, I'm Claude. How can I help you?\"},\n {\"role\": \"user\", \"content\": \"Can you explain LLMs in plain English?\"},\n]\n```\n\nExample with a partially-filled response from Claude:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun\"},\n {\"role\": \"assistant\", \"content\": \"The best answer is (\"},\n]\n```\n\nEach input message `content` may be either a single `string` or an array of content blocks, where each block has a specific `type`. Using a `string` for `content` is shorthand for an array of one content block of type `\"text\"`. The following input messages are equivalent:\n\n```json\n{\"role\": \"user\", \"content\": \"Hello, Claude\"}\n```\n\n```json\n{\"role\": \"user\", \"content\": [{\"type\": \"text\", \"text\": \"Hello, Claude\"}]}\n```\n\nStarting with Claude 3 models, you can also send image content blocks:\n\n```json\n{\"role\": \"user\", \"content\": [\n {\n \"type\": \"image\",\n \"source\": {\n \"type\": \"base64\",\n \"media_type\": \"image/jpeg\",\n \"data\": \"/9j/4AAQSkZJRg...\",\n }\n },\n {\"type\": \"text\", \"text\": \"What is in this image?\"}\n]}\n```\n\nWe currently support the `base64` source type for images, and the `image/jpeg`, `image/png`, `image/gif`, and `image/webp` media types.\n\nSee [examples](https://docs.anthropic.com/en/api/messages-examples#vision) for more input examples.\n\nNote that if you want to include a [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use the top-level `system` parameter — there is no `\"system\"` role for input messages in the Messages API." + max_tokens: + title: Max Tokens + minimum: 1 + type: integer + description: "The maximum number of tokens to generate before stopping.\n\nNote that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate.\n\nDifferent models have different maximum values for this parameter. See [models](https://docs.anthropic.com/en/docs/models-overview) for details." + example: 1024 + metadata: + allOf: + - $ref: '#/components/schemas/BetaMetadata' + description: An object describing metadata about the request. + stop_sequences: + title: Stop Sequences + type: array + items: + type: string + description: "Custom text sequences that will cause the model to stop generating.\n\nOur models will normally stop when they have naturally completed their turn, which will result in a response `stop_reason` of `\"end_turn\"`.\n\nIf you want the model to stop generating when it encounters custom strings of text, you can use the `stop_sequences` parameter. If the model encounters one of the custom sequences, the response `stop_reason` value will be `\"stop_sequence\"` and the response `stop_sequence` value will contain the matched stop sequence." + stream: + title: Stream + type: boolean + description: "Whether to incrementally stream the response using server-sent events.\n\nSee [streaming](https://docs.anthropic.com/en/api/messages-streaming) for details." + system: + title: System + anyOf: + - type: string + x-stainless-skip: + - go + - type: array + items: + $ref: '#/components/schemas/BetaRequestTextBlock' + description: "System prompt.\n\nA system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts)." + example: + - text: Today's date is 2024-06-01. + type: text + temperature: + title: Temperature + maximum: 1 + minimum: 0 + type: number + description: "Amount of randomness injected into the response.\n\nDefaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0` for analytical / multiple choice, and closer to `1.0` for creative and generative tasks.\n\nNote that even with `temperature` of `0.0`, the results will not be fully deterministic." + example: 1 + tool_choice: + $ref: '#/components/schemas/BetaToolChoice' + tools: + title: Tools + type: array + items: + oneOf: + - $ref: '#/components/schemas/BetaTool' + - $ref: '#/components/schemas/BetaComputerUseTool_20241022' + - $ref: '#/components/schemas/BetaBashTool_20241022' + - $ref: '#/components/schemas/BetaTextEditor_20241022' + description: "Definitions of tools that the model may use.\n\nIf you include `tools` in your API request, the model may return `tool_use` content blocks that represent the model's use of those tools. You can then run those tools using the tool input generated by the model and then optionally return results back to the model using `tool_result` content blocks.\n\nEach tool definition includes:\n\n* `name`: Name of the tool.\n* `description`: Optional, but strongly-recommended description of the tool.\n* `input_schema`: [JSON schema](https://json-schema.org/) for the tool `input` shape that the model will produce in `tool_use` output content blocks.\n\nFor example, if you defined `tools` as:\n\n```json\n[\n {\n \"name\": \"get_stock_price\",\n \"description\": \"Get the current stock price for a given ticker symbol.\",\n \"input_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"ticker\": {\n \"type\": \"string\",\n \"description\": \"The stock ticker symbol, e.g. AAPL for Apple Inc.\"\n }\n },\n \"required\": [\"ticker\"]\n }\n }\n]\n```\n\nAnd then asked the model \"What's the S&P 500 at today?\", the model might produce `tool_use` content blocks in the response like this:\n\n```json\n[\n {\n \"type\": \"tool_use\",\n \"id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"name\": \"get_stock_price\",\n \"input\": { \"ticker\": \"^GSPC\" }\n }\n]\n```\n\nYou might then run your `get_stock_price` tool with `{\"ticker\": \"^GSPC\"}` as an input, and return the following back to the model in a subsequent `user` message:\n\n```json\n[\n {\n \"type\": \"tool_result\",\n \"tool_use_id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"content\": \"259.75 USD\"\n }\n]\n```\n\nTools can be used for workflows that include running client-side tools and functions, or more generally whenever you want the model to produce a particular JSON structure of output.\n\nSee our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details." + example: + description: Get the current weather in a given location + input_schema: + properties: + location: + description: 'The city and state, e.g. San Francisco, CA' + type: string + unit: + description: 'Unit for the output - one of (celsius, fahrenheit)' + type: string + required: + - location + type: object + name: get_weather + top_k: + title: Top K + minimum: 0 + type: integer + description: "Only sample from the top K options for each subsequent token.\n\nUsed to remove \"long tail\" low probability responses. [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277).\n\nRecommended for advanced use cases only. You usually only need to use `temperature`." + example: 5 + top_p: + title: Top P + maximum: 1 + minimum: 0 + type: number + description: "Use nucleus sampling.\n\nIn nucleus sampling, we compute the cumulative distribution over all the options for each subsequent token in decreasing probability order and cut it off once it reaches a particular probability specified by `top_p`. You should either alter `temperature` or `top_p`, but not both.\n\nRecommended for advanced use cases only. You usually only need to use `temperature`." + example: 0.7 + additionalProperties: false + example: + max_tokens: 1024 + messages: + - content: 'Hello, world' + role: user + model: claude-3-5-sonnet-20241022 + BetaErrorResponse: + title: ErrorResponse + required: + - type + - error + type: object + properties: + type: + title: Type + enum: + - error + type: string + default: error + error: + title: Error + oneOf: + - $ref: '#/components/schemas/BetaInvalidRequestError' + - $ref: '#/components/schemas/BetaAuthenticationError' + - $ref: '#/components/schemas/BetaPermissionError' + - $ref: '#/components/schemas/BetaNotFoundError' + - $ref: '#/components/schemas/BetaRateLimitError' + - $ref: '#/components/schemas/BetaAPIError' + - $ref: '#/components/schemas/BetaOverloadedError' + discriminator: + propertyName: type + mapping: + api_error: '#/components/schemas/BetaAPIError' + authentication_error: '#/components/schemas/BetaAuthenticationError' + invalid_request_error: '#/components/schemas/BetaInvalidRequestError' + not_found_error: '#/components/schemas/BetaNotFoundError' + overloaded_error: '#/components/schemas/BetaOverloadedError' + permission_error: '#/components/schemas/BetaPermissionError' + rate_limit_error: '#/components/schemas/BetaRateLimitError' + BetaErroredResult: + title: ErroredResult + required: + - type + - error + type: object + properties: + type: + title: Type + enum: + - errored + type: string + default: errored + error: + $ref: '#/components/schemas/BetaErrorResponse' + BetaExpiredResult: + title: ExpiredResult + required: + - type + type: object + properties: + type: + title: Type + enum: + - expired + type: string + default: expired + BetaInputJsonContentBlockDelta: + title: InputJsonContentBlockDelta + required: + - type + - partial_json + type: object + properties: + type: + title: Type + enum: + - input_json_delta + type: string + default: input_json_delta + partial_json: + title: Partial Json + type: string + BetaInputMessage: + title: InputMessage + required: + - role + - content + type: object + properties: + role: + title: Role + enum: + - user + - assistant + type: string + content: + title: Content + anyOf: + - type: string + x-stainless-skip: + - go + - type: array + items: + $ref: '#/components/schemas/BetaInputContentBlock' + example: + - type: text + text: What is a quaternion? + additionalProperties: false + BetaInputSchema: + title: InputSchema + required: + - type + type: object + properties: + type: + title: Type + enum: + - object + type: string + properties: + title: Properties + type: object + nullable: true + BetaInvalidRequestError: + title: InvalidRequestError + required: + - type + - message + type: object + properties: + type: + title: Type + enum: + - invalid_request_error + type: string + default: invalid_request_error + message: + title: Message + type: string + default: Invalid request + BetaListResponse_MessageBatch_: + title: 'ListResponse[MessageBatch]' + required: + - data + - has_more + - first_id + - last_id + type: object + properties: + data: + title: Data + type: array + items: + $ref: '#/components/schemas/BetaMessageBatch' + has_more: + title: Has More + type: boolean + description: Indicates if there are more results in the requested page direction. + first_id: + title: First Id + type: string + description: First ID in the `data` list. Can be used as the `before_id` for the previous page. + nullable: true + example: msgbatch_013Zva2CMHLNnXjNJJKqJ2EF + last_id: + title: Last Id + type: string + description: Last ID in the `data` list. Can be used as the `after_id` for the next page. + nullable: true + example: msgbatch_01HkcTjaV5uDC8jWR4ZsDV8d + BetaMessage: + title: Message + required: + - id + - type + - role + - content + - model + - stop_reason + - stop_sequence + - usage + type: object + properties: + id: + title: Id + type: string + description: "Unique object identifier.\n\nThe format and length of IDs may change over time." + example: msg_013Zva2CMHLNnXjNJJKqJ2EF + type: + title: Type + enum: + - message + type: string + description: "Object type.\n\nFor Messages, this is always `\"message\"`." + default: message + role: + title: Role + enum: + - assistant + type: string + description: "Conversational role of the generated message.\n\nThis will always be `\"assistant\"`." + default: assistant + content: + title: Content + type: array + items: + $ref: '#/components/schemas/BetaContentBlock' + description: "Content generated by the model.\n\nThis is an array of content blocks, each of which has a `type` that determines its shape.\n\nExample:\n\n```json\n[{\"type\": \"text\", \"text\": \"Hi, I'm Claude.\"}]\n```\n\nIf the request input `messages` ended with an `assistant` turn, then the response `content` will continue directly from that last turn. You can use this to constrain the model's output.\n\nFor example, if the input `messages` were:\n```json\n[\n {\"role\": \"user\", \"content\": \"What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun\"},\n {\"role\": \"assistant\", \"content\": \"The best answer is (\"}\n]\n```\n\nThen the response `content` might be:\n\n```json\n[{\"type\": \"text\", \"text\": \"B)\"}]\n```" + example: + - text: Hi! My name is Claude. + type: text + model: + $ref: '#/components/schemas/Model' + stop_reason: + title: Stop Reason + enum: + - end_turn + - max_tokens + - stop_sequence + - tool_use + type: string + description: "The reason that we stopped.\n\nThis may be one the following values:\n* `\"end_turn\"`: the model reached a natural stopping point\n* `\"max_tokens\"`: we exceeded the requested `max_tokens` or the model's maximum\n* `\"stop_sequence\"`: one of your provided custom `stop_sequences` was generated\n* `\"tool_use\"`: the model invoked one or more tools\n\nIn non-streaming mode this value is always non-null. In streaming mode, it is null in the `message_start` event and non-null otherwise." + nullable: true + stop_sequence: + title: Stop Sequence + type: string + description: "Which custom stop sequence was generated, if any.\n\nThis value will be a non-null string if one of your custom stop sequences was generated." + default: + nullable: true + usage: + allOf: + - $ref: '#/components/schemas/BetaUsage' + description: "Billing and rate-limit usage.\n\nAnthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems.\n\nUnder the hood, the API transforms requests into a format suitable for the model. The model's output then goes through a parsing stage before becoming an API response. As a result, the token counts in `usage` will not match one-to-one with the exact visible content of an API request or response.\n\nFor example, `output_tokens` will be non-zero, even for an empty string response from Claude." + example: + input_tokens: 2095 + output_tokens: 503 + example: + content: + - text: Hi! My name is Claude. + type: text + id: msg_013Zva2CMHLNnXjNJJKqJ2EF + model: claude-3-5-sonnet-20241022 + role: assistant + stop_reason: end_turn + stop_sequence: + type: message + usage: + input_tokens: 2095 + output_tokens: 503 + x-stainless-python-custom-imports: + - from .beta_content_block import BetaContentBlock as BetaContentBlock + BetaMessageBatch: + title: MessageBatch + required: + - id + - type + - processing_status + - request_counts + - ended_at + - created_at + - expires_at + - archived_at + - cancel_initiated_at + - results_url + type: object + properties: + id: + title: Id + type: string + description: "Unique object identifier.\n\nThe format and length of IDs may change over time." + example: msgbatch_013Zva2CMHLNnXjNJJKqJ2EF + type: + title: Type + enum: + - message_batch + type: string + description: "Object type.\n\nFor Message Batches, this is always `\"message_batch\"`." + default: message_batch + processing_status: + title: Processing Status + enum: + - in_progress + - canceling + - ended + type: string + description: Processing status of the Message Batch. + request_counts: + allOf: + - $ref: '#/components/schemas/BetaRequestCounts' + description: "Tallies requests within the Message Batch, categorized by their status.\n\nRequests start as `processing` and move to one of the other statuses only once processing of the entire batch ends. The sum of all values always matches the total number of requests in the batch." + ended_at: + title: Ended At + type: string + description: "RFC 3339 datetime string representing the time at which processing for the Message Batch ended. Specified only once processing ends.\n\nProcessing ends when every request in a Message Batch has either succeeded, errored, canceled, or expired." + format: date-time + nullable: true + example: '2024-08-20T18:37:24.1004350+00:00' + created_at: + title: Created At + type: string + description: RFC 3339 datetime string representing the time at which the Message Batch was created. + format: date-time + example: '2024-08-20T18:37:24.1004350+00:00' + expires_at: + title: Expires At + type: string + description: 'RFC 3339 datetime string representing the time at which the Message Batch will expire and end processing, which is 24 hours after creation.' + format: date-time + example: '2024-08-20T18:37:24.1004350+00:00' + archived_at: + title: Archived At + type: string + description: RFC 3339 datetime string representing the time at which the Message Batch was archived and its results became unavailable. + format: date-time + nullable: true + example: '2024-08-20T18:37:24.1004350+00:00' + cancel_initiated_at: + title: Cancel Initiated At + type: string + description: RFC 3339 datetime string representing the time at which cancellation was initiated for the Message Batch. Specified only if cancellation was initiated. + format: date-time + nullable: true + example: '2024-08-20T18:37:24.1004350+00:00' + results_url: + title: Results Url + type: string + description: "URL to a `.jsonl` file containing the results of the Message Batch requests. Specified only once processing ends.\n\nResults in the file are not guaranteed to be in the same order as requests. Use the `custom_id` field to match results to requests." + nullable: true + example: https://api.anthropic.com/v1/messages/batches/msgbatch_013Zva2CMHLNnXjNJJKqJ2EF/results + BetaMessageBatchIndividualRequestParams: + title: MessageBatchIndividualRequestParams + required: + - custom_id + - params + type: object + properties: + custom_id: + title: Custom Id + maxLength: 64 + minLength: 1 + pattern: '^[a-zA-Z0-9_-]{1,64}$' + type: string + description: "Developer-provided ID created for each request in a Message Batch. Useful for matching results to requests, as results may be given out of request order.\n\nMust be unique for each request within the Message Batch." + example: my-custom-id-1 + params: + allOf: + - $ref: '#/components/schemas/BetaCreateMessageParams' + description: "Messages API creation parameters for the individual request. \n\nSee the [Messages API reference](/en/api/messages) for full documentation on available parameters." + additionalProperties: false + BetaMessageBatchIndividualResponse: + title: MessageBatchIndividualResponse + required: + - custom_id + - result + type: object + properties: + custom_id: + title: Custom Id + type: string + description: "Developer-provided ID created for each request in a Message Batch. Useful for matching results to requests, as results may be given out of request order.\n\nMust be unique for each request within the Message Batch." + example: my-custom-id-1 + result: + $ref: '#/components/schemas/BetaMessageBatchResult' + BetaMessageDelta: + title: MessageDelta + required: + - stop_reason + - stop_sequence + type: object + properties: + stop_reason: + title: Stop Reason + enum: + - end_turn + - max_tokens + - stop_sequence + - tool_use + type: string + default: + nullable: true + stop_sequence: + title: Stop Sequence + type: string + default: + nullable: true + BetaMessageDeltaEvent: + title: MessageDeltaEvent + required: + - type + - delta + - usage + type: object + properties: + type: + title: Type + enum: + - message_delta + type: string + default: message_delta + delta: + $ref: '#/components/schemas/BetaMessageDelta' + usage: + allOf: + - $ref: '#/components/schemas/BetaMessageDeltaUsage' + description: "Billing and rate-limit usage.\n\nAnthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems.\n\nUnder the hood, the API transforms requests into a format suitable for the model. The model's output then goes through a parsing stage before becoming an API response. As a result, the token counts in `usage` will not match one-to-one with the exact visible content of an API request or response.\n\nFor example, `output_tokens` will be non-zero, even for an empty string response from Claude." + example: + output_tokens: 503 + BetaMessageDeltaUsage: + title: MessageDeltaUsage + required: + - output_tokens + type: object + properties: + output_tokens: + title: Output Tokens + type: integer + description: The cumulative number of output tokens which were used. + example: 503 + BetaMessageStartEvent: + title: MessageStartEvent + required: + - type + - message + type: object + properties: + type: + title: Type + enum: + - message_start + type: string + default: message_start + message: + $ref: '#/components/schemas/BetaMessage' + BetaMessageStopEvent: + title: MessageStopEvent + required: + - type + type: object + properties: + type: + title: Type + enum: + - message_stop + type: string + default: message_stop + BetaMessageStreamEvent: + title: MessageStreamEvent + oneOf: + - $ref: '#/components/schemas/BetaMessageStartEvent' + - $ref: '#/components/schemas/BetaMessageDeltaEvent' + - $ref: '#/components/schemas/BetaMessageStopEvent' + - $ref: '#/components/schemas/BetaContentBlockStartEvent' + - $ref: '#/components/schemas/BetaContentBlockDeltaEvent' + - $ref: '#/components/schemas/BetaContentBlockStopEvent' + discriminator: + propertyName: type + mapping: + content_block_delta: '#/components/schemas/BetaContentBlockDeltaEvent' + content_block_start: '#/components/schemas/BetaContentBlockStartEvent' + content_block_stop: '#/components/schemas/BetaContentBlockStopEvent' + message_delta: '#/components/schemas/BetaMessageDeltaEvent' + message_start: '#/components/schemas/BetaMessageStartEvent' + message_stop: '#/components/schemas/BetaMessageStopEvent' + BetaMetadata: + title: Metadata + type: object + properties: + user_id: + title: User Id + maxLength: 256 + type: string + description: "An external identifier for the user who is associated with the request.\n\nThis should be a uuid, hash value, or other opaque identifier. Anthropic may use this id to help detect abuse. Do not include any identifying information such as name, email address, or phone number." + nullable: true + example: 13803d75-b4b5-4c3e-b2a2-6f21399b021b + additionalProperties: false + BetaNotFoundError: + title: NotFoundError + required: + - type + - message + type: object + properties: + type: + title: Type + enum: + - not_found_error + type: string + default: not_found_error + message: + title: Message + type: string + default: Not found + BetaOverloadedError: + title: OverloadedError + required: + - type + - message + type: object + properties: + type: + title: Type + enum: + - overloaded_error + type: string + default: overloaded_error + message: + title: Message + type: string + default: Overloaded + BetaPermissionError: + title: PermissionError + required: + - type + - message + type: object + properties: + type: + title: Type + enum: + - permission_error + type: string + default: permission_error + message: + title: Message + type: string + default: Permission denied + BetaRateLimitError: + title: RateLimitError + required: + - type + - message + type: object + properties: + type: + title: Type + enum: + - rate_limit_error + type: string + default: rate_limit_error + message: + title: Message + type: string + default: Rate limited + BetaRequestCounts: + title: RequestCounts + required: + - processing + - succeeded + - errored + - canceled + - expired + type: object + properties: + processing: + title: Processing + type: integer + description: Number of requests in the Message Batch that are processing. + default: 0 + example: 100 + succeeded: + title: Succeeded + type: integer + description: "Number of requests in the Message Batch that have completed successfully.\n\nThis is zero until processing of the entire Message Batch has ended." + default: 0 + example: 50 + errored: + title: Errored + type: integer + description: "Number of requests in the Message Batch that encountered an error.\n\nThis is zero until processing of the entire Message Batch has ended." + default: 0 + example: 30 + canceled: + title: Canceled + type: integer + description: "Number of requests in the Message Batch that have been canceled.\n\nThis is zero until processing of the entire Message Batch has ended." + default: 0 + example: 10 + expired: + title: Expired + type: integer + description: "Number of requests in the Message Batch that have expired.\n\nThis is zero until processing of the entire Message Batch has ended." + default: 0 + example: 10 + BetaRequestImageBlock: + title: RequestImageBlock + required: + - type + - source + type: object + properties: + cache_control: + title: Cache Control + type: 'null' + oneOf: + - $ref: '#/components/schemas/BetaCacheControlEphemeral' + nullable: true + discriminator: + propertyName: type + mapping: + ephemeral: '#/components/schemas/BetaCacheControlEphemeral' + type: + title: Type + enum: + - image + type: string + source: + title: Source + oneOf: + - $ref: '#/components/schemas/BetaBase64ImageSource' + discriminator: + propertyName: type + mapping: + base64: '#/components/schemas/BetaBase64ImageSource' + additionalProperties: false + BetaRequestPDFBlock: + title: RequestPDFBlock + required: + - type + - source + type: object + properties: + cache_control: + title: Cache Control + type: 'null' + oneOf: + - $ref: '#/components/schemas/BetaCacheControlEphemeral' + nullable: true + discriminator: + propertyName: type + mapping: + ephemeral: '#/components/schemas/BetaCacheControlEphemeral' + type: + title: Type + enum: + - document + type: string + source: + $ref: '#/components/schemas/BetaBase64PDFSource' + additionalProperties: false + BetaRequestTextBlock: + title: RequestTextBlock + required: + - type + - text + type: object + properties: + cache_control: + title: Cache Control + type: 'null' + oneOf: + - $ref: '#/components/schemas/BetaCacheControlEphemeral' + nullable: true + discriminator: + propertyName: type + mapping: + ephemeral: '#/components/schemas/BetaCacheControlEphemeral' + type: + title: Type + enum: + - text + type: string + text: + title: Text + minLength: 1 + type: string + additionalProperties: false + BetaRequestToolResultBlock: + title: RequestToolResultBlock + required: + - type + - tool_use_id + type: object + properties: + cache_control: + title: Cache Control + type: 'null' + oneOf: + - $ref: '#/components/schemas/BetaCacheControlEphemeral' + nullable: true + discriminator: + propertyName: type + mapping: + ephemeral: '#/components/schemas/BetaCacheControlEphemeral' + type: + title: Type + enum: + - tool_result + type: string + tool_use_id: + title: Tool Use Id + pattern: '^[a-zA-Z0-9_-]+$' + type: string + is_error: + title: Is Error + type: boolean + content: + title: Content + anyOf: + - type: string + x-stainless-skip: + - go + - type: array + items: + title: Block + oneOf: + - $ref: '#/components/schemas/BetaRequestTextBlock' + - $ref: '#/components/schemas/BetaRequestImageBlock' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/BetaRequestImageBlock' + text: '#/components/schemas/BetaRequestTextBlock' + x-stainless-naming: + python: + type_name: Content + additionalProperties: false + BetaRequestToolUseBlock: + title: RequestToolUseBlock + required: + - type + - id + - name + - input + type: object + properties: + cache_control: + title: Cache Control + type: 'null' + oneOf: + - $ref: '#/components/schemas/BetaCacheControlEphemeral' + nullable: true + discriminator: + propertyName: type + mapping: + ephemeral: '#/components/schemas/BetaCacheControlEphemeral' + type: + title: Type + enum: + - tool_use + type: string + id: + title: Id + pattern: '^[a-zA-Z0-9_-]+$' + type: string + name: + title: Name + maxLength: 64 + minLength: 1 + pattern: '^[a-zA-Z0-9_-]{1,64}$' + type: string + input: + title: Input + type: object + additionalProperties: false + BetaResponseTextBlock: + title: ResponseTextBlock + required: + - type + - text + type: object + properties: + type: + title: Type + enum: + - text + type: string + default: text + text: + title: Text + maxLength: 5000000 + minLength: 0 + type: string + BetaResponseToolUseBlock: + title: ResponseToolUseBlock + required: + - type + - id + - name + - input + type: object + properties: + type: + title: Type + enum: + - tool_use + type: string + default: tool_use + id: + title: Id + pattern: '^[a-zA-Z0-9_-]+$' + type: string + name: + title: Name + minLength: 1 + type: string + input: + title: Input + type: object + BetaSucceededResult: + title: SucceededResult + required: + - type + - message + type: object + properties: + type: + title: Type + enum: + - succeeded + type: string + default: succeeded + message: + $ref: '#/components/schemas/BetaMessage' + BetaTextContentBlockDelta: + title: TextContentBlockDelta + required: + - type + - text + type: object + properties: + type: + title: Type + enum: + - text_delta + type: string + default: text_delta + text: + title: Text + type: string + BetaTextEditor_20241022: + title: TextEditor_20241022 + required: + - type + - name + type: object + properties: + cache_control: + title: Cache Control + type: 'null' + oneOf: + - $ref: '#/components/schemas/BetaCacheControlEphemeral' + nullable: true + discriminator: + propertyName: type + mapping: + ephemeral: '#/components/schemas/BetaCacheControlEphemeral' + type: + title: Type + enum: + - text_editor_20241022 + type: string + name: + title: Name + enum: + - str_replace_editor + type: string + description: "Name of the tool.\n\nThis is how the tool will be called by the model and in tool_use blocks." + additionalProperties: false + BetaTool: + title: Tool + required: + - name + - input_schema + type: object + properties: + type: + title: Type + enum: + - custom + type: string + nullable: true + description: + title: Description + type: string + description: "Description of what this tool does.\n\nTool descriptions should be as detailed as possible. The more information that the model has about what the tool is and how to use it, the better it will perform. You can use natural language descriptions to reinforce important aspects of the tool input JSON schema." + example: Get the current weather in a given location + name: + title: Name + maxLength: 64 + minLength: 1 + pattern: '^[a-zA-Z0-9_-]{1,64}$' + type: string + description: "Name of the tool.\n\nThis is how the tool will be called by the model and in tool_use blocks." + input_schema: + allOf: + - $ref: '#/components/schemas/BetaInputSchema' + description: "[JSON schema](https://json-schema.org/) for this tool's input.\n\nThis defines the shape of the `input` that your tool accepts and that the model will produce." + example: + properties: + location: + description: 'The city and state, e.g. San Francisco, CA' + type: string + unit: + description: 'Unit for the output - one of (celsius, fahrenheit)' + type: string + required: + - location + type: object + cache_control: + title: Cache Control + type: 'null' + oneOf: + - $ref: '#/components/schemas/BetaCacheControlEphemeral' + nullable: true + discriminator: + propertyName: type + mapping: + ephemeral: '#/components/schemas/BetaCacheControlEphemeral' + additionalProperties: false + BetaToolChoiceAny: + title: ToolChoiceAny + required: + - type + type: object + properties: + type: + title: Type + enum: + - any + type: string + disable_parallel_tool_use: + title: Disable Parallel Tool Use + type: boolean + description: "Whether to disable parallel tool use.\n\nDefaults to `false`. If set to `true`, the model will output exactly one tool use." + additionalProperties: false + description: The model will use any available tools. + BetaToolChoiceAuto: + title: ToolChoiceAuto + required: + - type + type: object + properties: + type: + title: Type + enum: + - auto + type: string + disable_parallel_tool_use: + title: Disable Parallel Tool Use + type: boolean + description: "Whether to disable parallel tool use.\n\nDefaults to `false`. If set to `true`, the model will output at most one tool use." + additionalProperties: false + description: The model will automatically decide whether to use tools. + BetaToolChoiceTool: + title: ToolChoiceTool + required: + - type + - name + type: object + properties: + type: + title: Type + enum: + - tool + type: string + name: + title: Name + type: string + description: The name of the tool to use. + disable_parallel_tool_use: + title: Disable Parallel Tool Use + type: boolean + description: "Whether to disable parallel tool use.\n\nDefaults to `false`. If set to `true`, the model will output exactly one tool use." + additionalProperties: false + description: The model will use the specified tool with `tool_choice.name`. + BetaUsage: + title: Usage + required: + - input_tokens + - cache_creation_input_tokens + - cache_read_input_tokens + - output_tokens + type: object + properties: + input_tokens: + title: Input Tokens + type: integer + description: The number of input tokens which were used. + example: 2095 + cache_creation_input_tokens: + title: Cache Creation Input Tokens + type: integer + description: The number of input tokens used to create the cache entry. + default: + nullable: true + example: 2051 + cache_read_input_tokens: + title: Cache Read Input Tokens + type: integer + description: The number of input tokens read from the cache. + default: + nullable: true + example: 2051 + output_tokens: + title: Output Tokens + type: integer + description: The number of output tokens which were used. + example: 503 + CacheControlEphemeral: + title: CacheControlEphemeral + required: + - type + type: object + properties: + type: + title: Type + enum: + - ephemeral + type: string + additionalProperties: false + CompletionRequest: + title: CompletionRequest + required: + - prompt + - max_tokens_to_sample + - model + type: object + properties: + model: + $ref: '#/components/schemas/Model' + prompt: + title: Prompt + minLength: 1 + type: string + description: "The prompt that you want Claude to complete.\n\nFor proper response generation you will need to format your prompt using alternating `\\n\\nHuman:` and `\\n\\nAssistant:` conversational turns. For example:\n\n```\n\"\\n\\nHuman: {userQuestion}\\n\\nAssistant:\"\n```\n\nSee [prompt validation](https://docs.anthropic.com/en/api/prompt-validation) and our guide to [prompt design](https://docs.anthropic.com/en/docs/intro-to-prompting) for more details." + example: "\n\nHuman: Hello, world!\n\nAssistant:" + max_tokens_to_sample: + title: Max Tokens To Sample + minimum: 1 + type: integer + description: "The maximum number of tokens to generate before stopping.\n\nNote that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate." + example: 256 + stop_sequences: + title: Stop Sequences + type: array + items: + type: string + description: "Sequences that will cause the model to stop generating.\n\nOur models stop on `\"\\n\\nHuman:\"`, and may include additional built-in stop sequences in the future. By providing the stop_sequences parameter, you may include additional strings that will cause the model to stop generating." + temperature: + title: Temperature + maximum: 1 + minimum: 0 + type: number + description: "Amount of randomness injected into the response.\n\nDefaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0` for analytical / multiple choice, and closer to `1.0` for creative and generative tasks.\n\nNote that even with `temperature` of `0.0`, the results will not be fully deterministic." + example: 1 + top_p: + title: Top P + maximum: 1 + minimum: 0 + type: number + description: "Use nucleus sampling.\n\nIn nucleus sampling, we compute the cumulative distribution over all the options for each subsequent token in decreasing probability order and cut it off once it reaches a particular probability specified by `top_p`. You should either alter `temperature` or `top_p`, but not both.\n\nRecommended for advanced use cases only. You usually only need to use `temperature`." + example: 0.7 + top_k: + title: Top K + minimum: 0 + type: integer + description: "Only sample from the top K options for each subsequent token.\n\nUsed to remove \"long tail\" low probability responses. [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277).\n\nRecommended for advanced use cases only. You usually only need to use `temperature`." + example: 5 + metadata: + allOf: + - $ref: '#/components/schemas/Metadata' + description: An object describing metadata about the request. + stream: + title: Stream + type: boolean + description: "Whether to incrementally stream the response using server-sent events.\n\nSee [streaming](https://docs.anthropic.com/en/api/streaming) for details." + additionalProperties: false + example: + model: claude-2.1 + prompt: "\n\nHuman: Hello, world!\n\nAssistant:" + max_tokens_to_sample: 256 + CompletionResponse: + title: CompletionResponse + required: + - type + - id + - completion + - stop_reason + - model + type: object + properties: + type: + title: Type + enum: + - completion + type: string + description: "Object type.\n\nFor Text Completions, this is always `\"completion\"`." + default: completion + id: + title: Id + type: string + description: "Unique object identifier.\n\nThe format and length of IDs may change over time." + completion: + title: Completion + type: string + description: The resulting completion up to and excluding the stop sequences. + example: ' Hello! My name is Claude.' + stop_reason: + title: Stop Reason + type: string + description: "The reason that we stopped.\n\nThis may be one the following values:\n* `\"stop_sequence\"`: we reached a stop sequence — either provided by you via the `stop_sequences` parameter, or a stop sequence built into the model\n* `\"max_tokens\"`: we exceeded `max_tokens_to_sample` or the model's maximum" + nullable: true + example: stop_sequence + model: + $ref: '#/components/schemas/Model' + example: + completion: ' Hello! My name is Claude.' + id: compl_018CKm6gsux7P8yMcwZbeCPw + model: claude-2.1 + stop_reason: stop_sequence + type: completion + ContentBlockDeltaEvent: + title: ContentBlockDeltaEvent + required: + - type + - index + - delta + type: object + properties: + type: + title: Type + enum: + - content_block_delta + type: string + default: content_block_delta + index: + title: Index + type: integer + delta: + title: Delta + oneOf: + - $ref: '#/components/schemas/TextContentBlockDelta' + - $ref: '#/components/schemas/InputJsonContentBlockDelta' + discriminator: + propertyName: type + mapping: + input_json_delta: '#/components/schemas/InputJsonContentBlockDelta' + text_delta: '#/components/schemas/TextContentBlockDelta' + x-stainless-naming: + go: + model_name: ContentBlockDeltaEvent + ContentBlockStartEvent: + title: ContentBlockStartEvent + required: + - type + - index + - content_block + type: object + properties: + type: + title: Type + enum: + - content_block_start + type: string + default: content_block_start + index: + title: Index + type: integer + content_block: + title: Content Block + oneOf: + - $ref: '#/components/schemas/ResponseTextBlock' + - $ref: '#/components/schemas/ResponseToolUseBlock' + discriminator: + propertyName: type + mapping: + text: '#/components/schemas/ResponseTextBlock' + tool_use: '#/components/schemas/ResponseToolUseBlock' + x-stainless-naming: + go: + model_name: ContentBlockStartEvent + ContentBlockStopEvent: + title: ContentBlockStopEvent + required: + - type + - index + type: object + properties: + type: + title: Type + enum: + - content_block_stop + type: string + default: content_block_stop + index: + title: Index + type: integer + x-stainless-naming: + go: + model_name: ContentBlockStopEvent + CreateMessageParams: + title: CreateMessageParams required: - model - messages @@ -77,675 +2561,1454 @@ components: type: object properties: model: - title: Model - anyOf: - - type: string - description: The ID of the model to use for this request. - - title: Models - enum: - - claude-3-5-sonnet-latest - - claude-3-5-sonnet-20241022 - - claude-3-5-sonnet-20240620 - - claude-3-opus-latest - - claude-3-opus-20240229 - - claude-3-sonnet-20240229 - - claude-3-haiku-20240307 - - claude-2.1 - - claude-2.0 - - claude-instant-1.2 - type: string - description: "Available models. Mind that the list may not be exhaustive nor up-to-date.\n" - description: "The model that will complete your prompt.\n\nSee [models](https://docs.anthropic.com/en/docs/models-overview) for additional\ndetails and options.\n" - example: claude-3-5-sonnet-20241022 + $ref: '#/components/schemas/Model' messages: - minItems: 1 + title: Messages type: array items: - $ref: '#/components/schemas/Message' - description: "Input messages.\n\nOur models are trained to operate on alternating `user` and `assistant`\nconversational turns. When creating a new `Message`, you specify the prior\nconversational turns with the `messages` parameter, and the model then generates\nthe next `Message` in the conversation.\n\nEach input message must be an object with a `role` and `content`. You can\nspecify a single `user`-role message, or you can include multiple `user` and\n`assistant` messages. The first message must always use the `user` role.\n\nIf the final message uses the `assistant` role, the response content will\ncontinue immediately from the content in that message. This can be used to\nconstrain part of the model's response.\n\nSee [message content](https://docs.anthropic.com/en/api/messages-content) for\ndetails on how to construct valid message objects.\n\nExample with a single `user` message:\n\n```json\n[{ \"role\": \"user\", \"content\": \"Hello, Claude\" }]\n```\n\nExample with multiple conversational turns:\n\n```json\n[\n { \"role\": \"user\", \"content\": \"Hello there.\" },\n { \"role\": \"assistant\", \"content\": \"Hi, I'm Claude. How can I help you?\" },\n { \"role\": \"user\", \"content\": \"Can you explain LLMs in plain English?\" }\n]\n```\n\nExample with a partially-filled response from Claude:\n\n```json\n[\n {\n \"role\": \"user\",\n \"content\": \"What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun\"\n },\n { \"role\": \"assistant\", \"content\": \"The best answer is (\" }\n]\n```\n\nEach input message `content` may be either a single `string` or an array of\ncontent blocks, where each block has a specific `type`. Using a `string` for\n`content` is shorthand for an array of one content block of type `\"text\"`. The\nfollowing input messages are equivalent:\n\n```json\n{ \"role\": \"user\", \"content\": \"Hello, Claude\" }\n```\n\n```json\n{ \"role\": \"user\", \"content\": [{ \"type\": \"text\", \"text\": \"Hello, Claude\" }] }\n```\n\nStarting with Claude 3 models, you can also send image content blocks:\n\n```json\n{\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"image\",\n \"source\": {\n \"type\": \"base64\",\n \"media_type\": \"image/jpeg\",\n \"data\": \"/9j/4AAQSkZJRg...\"\n }\n },\n { \"type\": \"text\", \"text\": \"What is in this image?\" }\n ]\n}\n```\n\nWe currently support the `base64` source type for images, and the `image/jpeg`,\n`image/png`, `image/gif`, and `image/webp` media types.\n\nSee [examples](https://docs.anthropic.com/en/api/messages-examples) for more\ninput examples.\n\nNote that if you want to include a\n[system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use\nthe top-level `system` parameter — there is no `\"system\"` role for input\nmessages in the Messages API.\n" + $ref: '#/components/schemas/InputMessage' + description: "Input messages.\n\nOur models are trained to operate on alternating `user` and `assistant` conversational turns. When creating a new `Message`, you specify the prior conversational turns with the `messages` parameter, and the model then generates the next `Message` in the conversation. Consecutive `user` or `assistant` turns in your request will be combined into a single turn.\n\nEach input message must be an object with a `role` and `content`. You can specify a single `user`-role message, or you can include multiple `user` and `assistant` messages.\n\nIf the final message uses the `assistant` role, the response content will continue immediately from the content in that message. This can be used to constrain part of the model's response.\n\nExample with a single `user` message:\n\n```json\n[{\"role\": \"user\", \"content\": \"Hello, Claude\"}]\n```\n\nExample with multiple conversational turns:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"Hello there.\"},\n {\"role\": \"assistant\", \"content\": \"Hi, I'm Claude. How can I help you?\"},\n {\"role\": \"user\", \"content\": \"Can you explain LLMs in plain English?\"},\n]\n```\n\nExample with a partially-filled response from Claude:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun\"},\n {\"role\": \"assistant\", \"content\": \"The best answer is (\"},\n]\n```\n\nEach input message `content` may be either a single `string` or an array of content blocks, where each block has a specific `type`. Using a `string` for `content` is shorthand for an array of one content block of type `\"text\"`. The following input messages are equivalent:\n\n```json\n{\"role\": \"user\", \"content\": \"Hello, Claude\"}\n```\n\n```json\n{\"role\": \"user\", \"content\": [{\"type\": \"text\", \"text\": \"Hello, Claude\"}]}\n```\n\nStarting with Claude 3 models, you can also send image content blocks:\n\n```json\n{\"role\": \"user\", \"content\": [\n {\n \"type\": \"image\",\n \"source\": {\n \"type\": \"base64\",\n \"media_type\": \"image/jpeg\",\n \"data\": \"/9j/4AAQSkZJRg...\",\n }\n },\n {\"type\": \"text\", \"text\": \"What is in this image?\"}\n]}\n```\n\nWe currently support the `base64` source type for images, and the `image/jpeg`, `image/png`, `image/gif`, and `image/webp` media types.\n\nSee [examples](https://docs.anthropic.com/en/api/messages-examples#vision) for more input examples.\n\nNote that if you want to include a [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use the top-level `system` parameter — there is no `\"system\"` role for input messages in the Messages API." max_tokens: + title: Max Tokens + minimum: 1 type: integer - description: "The maximum number of tokens to generate before stopping.\n\nNote that our models may stop _before_ reaching this maximum. This parameter\nonly specifies the absolute maximum number of tokens to generate.\n\nDifferent models have different maximum values for this parameter. See\n[models](https://docs.anthropic.com/en/docs/models-overview) for details.\n" + description: "The maximum number of tokens to generate before stopping.\n\nNote that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate.\n\nDifferent models have different maximum values for this parameter. See [models](https://docs.anthropic.com/en/docs/models-overview) for details." + example: 1024 metadata: - $ref: '#/components/schemas/CreateMessageRequestMetadata' + allOf: + - $ref: '#/components/schemas/Metadata' + description: An object describing metadata about the request. stop_sequences: + title: Stop Sequences type: array items: type: string - description: "Custom text sequences that will cause the model to stop generating.\n\nOur models will normally stop when they have naturally completed their turn,\nwhich will result in a response `stop_reason` of `\"end_turn\"`.\n\nIf you want the model to stop generating when it encounters custom strings of\ntext, you can use the `stop_sequences` parameter. If the model encounters one of\nthe custom sequences, the response `stop_reason` value will be `\"stop_sequence\"`\nand the response `stop_sequence` value will contain the matched stop sequence.\n" + description: "Custom text sequences that will cause the model to stop generating.\n\nOur models will normally stop when they have naturally completed their turn, which will result in a response `stop_reason` of `\"end_turn\"`.\n\nIf you want the model to stop generating when it encounters custom strings of text, you can use the `stop_sequences` parameter. If the model encounters one of the custom sequences, the response `stop_reason` value will be `\"stop_sequence\"` and the response `stop_sequence` value will contain the matched stop sequence." + stream: + title: Stream + type: boolean + description: "Whether to incrementally stream the response using server-sent events.\n\nSee [streaming](https://docs.anthropic.com/en/api/messages-streaming) for details." system: - type: string - oneOf: + title: System + anyOf: - type: string - description: A single text block. + x-stainless-skip: + - go - type: array items: - $ref: '#/components/schemas/Block' - description: An array of content blocks. - description: "System prompt.\n\nA system prompt is a way of providing context and instructions to Claude, such\nas specifying a particular goal or role. See our\n[guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).\n" + $ref: '#/components/schemas/RequestTextBlock' + description: "System prompt.\n\nA system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts)." + example: + - text: Today's date is 2024-06-01. + type: text temperature: + title: Temperature + maximum: 1 + minimum: 0 type: number - description: "Amount of randomness injected into the response.\n\nDefaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0`\nfor analytical / multiple choice, and closer to `1.0` for creative and\ngenerative tasks.\n\nNote that even with `temperature` of `0.0`, the results will not be fully\ndeterministic.\n" + description: "Amount of randomness injected into the response.\n\nDefaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0` for analytical / multiple choice, and closer to `1.0` for creative and generative tasks.\n\nNote that even with `temperature` of `0.0`, the results will not be fully deterministic." + example: 1 tool_choice: $ref: '#/components/schemas/ToolChoice' tools: + title: Tools type: array items: $ref: '#/components/schemas/Tool' - description: "Definitions of tools that the model may use.\n\nIf you include `tools` in your API request, the model may return `tool_use`\ncontent blocks that represent the model's use of those tools. You can then run\nthose tools using the tool input generated by the model and then optionally\nreturn results back to the model using `tool_result` content blocks.\n\nEach tool definition includes:\n\n- `name`: Name of the tool.\n- `description`: Optional, but strongly-recommended description of the tool.\n- `input_schema`: [JSON schema](https://json-schema.org/) for the tool `input`\n shape that the model will produce in `tool_use` output content blocks.\n\nFor example, if you defined `tools` as:\n\n```json\n[\n {\n \"name\": \"get_stock_price\",\n \"description\": \"Get the current stock price for a given ticker symbol.\",\n \"input_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"ticker\": {\n \"type\": \"string\",\n \"description\": \"The stock ticker symbol, e.g. AAPL for Apple Inc.\"\n }\n },\n \"required\": [\"ticker\"]\n }\n }\n]\n```\n\nAnd then asked the model \"What's the S&P 500 at today?\", the model might produce\n`tool_use` content blocks in the response like this:\n\n```json\n[\n {\n \"type\": \"tool_use\",\n \"id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"name\": \"get_stock_price\",\n \"input\": { \"ticker\": \"^GSPC\" }\n }\n]\n```\n\nYou might then run your `get_stock_price` tool with `{\"ticker\": \"^GSPC\"}` as an\ninput, and return the following back to the model in a subsequent `user`\nmessage:\n\n```json\n[\n {\n \"type\": \"tool_result\",\n \"tool_use_id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"content\": \"259.75 USD\"\n }\n]\n```\n\nTools can be used for workflows that include running client-side tools and\nfunctions, or more generally whenever you want the model to produce a particular\nJSON structure of output.\n\nSee our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.\n" + description: "Definitions of tools that the model may use.\n\nIf you include `tools` in your API request, the model may return `tool_use` content blocks that represent the model's use of those tools. You can then run those tools using the tool input generated by the model and then optionally return results back to the model using `tool_result` content blocks.\n\nEach tool definition includes:\n\n* `name`: Name of the tool.\n* `description`: Optional, but strongly-recommended description of the tool.\n* `input_schema`: [JSON schema](https://json-schema.org/) for the tool `input` shape that the model will produce in `tool_use` output content blocks.\n\nFor example, if you defined `tools` as:\n\n```json\n[\n {\n \"name\": \"get_stock_price\",\n \"description\": \"Get the current stock price for a given ticker symbol.\",\n \"input_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"ticker\": {\n \"type\": \"string\",\n \"description\": \"The stock ticker symbol, e.g. AAPL for Apple Inc.\"\n }\n },\n \"required\": [\"ticker\"]\n }\n }\n]\n```\n\nAnd then asked the model \"What's the S&P 500 at today?\", the model might produce `tool_use` content blocks in the response like this:\n\n```json\n[\n {\n \"type\": \"tool_use\",\n \"id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"name\": \"get_stock_price\",\n \"input\": { \"ticker\": \"^GSPC\" }\n }\n]\n```\n\nYou might then run your `get_stock_price` tool with `{\"ticker\": \"^GSPC\"}` as an input, and return the following back to the model in a subsequent `user` message:\n\n```json\n[\n {\n \"type\": \"tool_result\",\n \"tool_use_id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"content\": \"259.75 USD\"\n }\n]\n```\n\nTools can be used for workflows that include running client-side tools and functions, or more generally whenever you want the model to produce a particular JSON structure of output.\n\nSee our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details." + example: + description: Get the current weather in a given location + input_schema: + properties: + location: + description: 'The city and state, e.g. San Francisco, CA' + type: string + unit: + description: 'Unit for the output - one of (celsius, fahrenheit)' + type: string + required: + - location + type: object + name: get_weather top_k: + title: Top K + minimum: 0 type: integer - description: "Only sample from the top K options for each subsequent token.\n\nUsed to remove \"long tail\" low probability responses.\n[Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277).\n\nRecommended for advanced use cases only. You usually only need to use\n`temperature`.\n" + description: "Only sample from the top K options for each subsequent token.\n\nUsed to remove \"long tail\" low probability responses. [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277).\n\nRecommended for advanced use cases only. You usually only need to use `temperature`." + example: 5 top_p: + title: Top P + maximum: 1 + minimum: 0 type: number - description: "Use nucleus sampling.\n\nIn nucleus sampling, we compute the cumulative distribution over all the options\nfor each subsequent token in decreasing probability order and cut it off once it\nreaches a particular probability specified by `top_p`. You should either alter\n`temperature` or `top_p`, but not both.\n\nRecommended for advanced use cases only. You usually only need to use\n`temperature`.\n" - stream: - type: boolean - description: "Whether to incrementally stream the response using server-sent events.\n\nSee [streaming](https://docs.anthropic.com/en/api/messages-streaming) for\ndetails.\n" - default: false - description: The request parameters for creating a message. - CreateMessageRequestMetadata: + description: "Use nucleus sampling.\n\nIn nucleus sampling, we compute the cumulative distribution over all the options for each subsequent token in decreasing probability order and cut it off once it reaches a particular probability specified by `top_p`. You should either alter `temperature` or `top_p`, but not both.\n\nRecommended for advanced use cases only. You usually only need to use `temperature`." + example: 0.7 + additionalProperties: false + example: + max_tokens: 1024 + messages: + - content: 'Hello, world' + role: user + model: claude-3-5-sonnet-20241022 + ErrorResponse: + title: ErrorResponse + required: + - type + - error + type: object + properties: + type: + title: Type + enum: + - error + type: string + default: error + error: + title: Error + oneOf: + - $ref: '#/components/schemas/InvalidRequestError' + - $ref: '#/components/schemas/AuthenticationError' + - $ref: '#/components/schemas/PermissionError' + - $ref: '#/components/schemas/NotFoundError' + - $ref: '#/components/schemas/RateLimitError' + - $ref: '#/components/schemas/APIError' + - $ref: '#/components/schemas/OverloadedError' + discriminator: + propertyName: type + mapping: + api_error: '#/components/schemas/APIError' + authentication_error: '#/components/schemas/AuthenticationError' + invalid_request_error: '#/components/schemas/InvalidRequestError' + not_found_error: '#/components/schemas/NotFoundError' + overloaded_error: '#/components/schemas/OverloadedError' + permission_error: '#/components/schemas/PermissionError' + rate_limit_error: '#/components/schemas/RateLimitError' + InputJsonContentBlockDelta: + title: InputJsonContentBlockDelta + required: + - type + - partial_json + type: object + properties: + type: + title: Type + enum: + - input_json_delta + type: string + default: input_json_delta + partial_json: + title: Partial Json + type: string + InputMessage: + title: InputMessage + required: + - role + - content + type: object + properties: + role: + title: Role + enum: + - user + - assistant + type: string + content: + title: Content + anyOf: + - type: string + x-stainless-skip: + - go + - type: array + items: + title: Block + oneOf: + - $ref: '#/components/schemas/RequestTextBlock' + - $ref: '#/components/schemas/RequestImageBlock' + - $ref: '#/components/schemas/RequestToolUseBlock' + - $ref: '#/components/schemas/RequestToolResultBlock' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/RequestImageBlock' + text: '#/components/schemas/RequestTextBlock' + tool_result: '#/components/schemas/RequestToolResultBlock' + tool_use: '#/components/schemas/RequestToolUseBlock' + x-stainless-python-extend-union: + - ContentBlock + x-stainless-python-extend-union-imports: + - from .content_block import ContentBlock + example: + - type: text + text: What is a quaternion? + additionalProperties: false + InputSchema: + title: InputSchema + required: + - type + type: object + properties: + type: + title: Type + enum: + - object + type: string + properties: + title: Properties + type: object + nullable: true + InvalidRequestError: + title: InvalidRequestError + required: + - type + - message + type: object + properties: + type: + title: Type + enum: + - invalid_request_error + type: string + default: invalid_request_error + message: + title: Message + type: string + default: Invalid request + Message: + title: Message + required: + - id + - type + - role + - content + - model + - stop_reason + - stop_sequence + - usage + type: object + properties: + id: + title: Id + type: string + description: "Unique object identifier.\n\nThe format and length of IDs may change over time." + example: msg_013Zva2CMHLNnXjNJJKqJ2EF + type: + title: Type + enum: + - message + type: string + description: "Object type.\n\nFor Messages, this is always `\"message\"`." + default: message + role: + title: Role + enum: + - assistant + type: string + description: "Conversational role of the generated message.\n\nThis will always be `\"assistant\"`." + default: assistant + content: + title: Content + type: array + items: + $ref: '#/components/schemas/ContentBlock' + description: "Content generated by the model.\n\nThis is an array of content blocks, each of which has a `type` that determines its shape.\n\nExample:\n\n```json\n[{\"type\": \"text\", \"text\": \"Hi, I'm Claude.\"}]\n```\n\nIf the request input `messages` ended with an `assistant` turn, then the response `content` will continue directly from that last turn. You can use this to constrain the model's output.\n\nFor example, if the input `messages` were:\n```json\n[\n {\"role\": \"user\", \"content\": \"What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun\"},\n {\"role\": \"assistant\", \"content\": \"The best answer is (\"}\n]\n```\n\nThen the response `content` might be:\n\n```json\n[{\"type\": \"text\", \"text\": \"B)\"}]\n```" + example: + - text: Hi! My name is Claude. + type: text + model: + $ref: '#/components/schemas/Model' + stop_reason: + title: Stop Reason + enum: + - end_turn + - max_tokens + - stop_sequence + - tool_use + type: string + description: "The reason that we stopped.\n\nThis may be one the following values:\n* `\"end_turn\"`: the model reached a natural stopping point\n* `\"max_tokens\"`: we exceeded the requested `max_tokens` or the model's maximum\n* `\"stop_sequence\"`: one of your provided custom `stop_sequences` was generated\n* `\"tool_use\"`: the model invoked one or more tools\n\nIn non-streaming mode this value is always non-null. In streaming mode, it is null in the `message_start` event and non-null otherwise." + nullable: true + stop_sequence: + title: Stop Sequence + type: string + description: "Which custom stop sequence was generated, if any.\n\nThis value will be a non-null string if one of your custom stop sequences was generated." + default: + nullable: true + usage: + allOf: + - $ref: '#/components/schemas/Usage' + description: "Billing and rate-limit usage.\n\nAnthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems.\n\nUnder the hood, the API transforms requests into a format suitable for the model. The model's output then goes through a parsing stage before becoming an API response. As a result, the token counts in `usage` will not match one-to-one with the exact visible content of an API request or response.\n\nFor example, `output_tokens` will be non-zero, even for an empty string response from Claude." + example: + input_tokens: 2095 + output_tokens: 503 + example: + content: + - text: Hi! My name is Claude. + type: text + id: msg_013Zva2CMHLNnXjNJJKqJ2EF + model: claude-3-5-sonnet-20241022 + role: assistant + stop_reason: end_turn + stop_sequence: + type: message + usage: + input_tokens: 2095 + output_tokens: 503 + x-stainless-python-custom-imports: + - from .content_block import ContentBlock as ContentBlock + MessageDelta: + title: MessageDelta + required: + - stop_reason + - stop_sequence + type: object + properties: + stop_reason: + title: Stop Reason + enum: + - end_turn + - max_tokens + - stop_sequence + - tool_use + type: string + default: + nullable: true + stop_sequence: + title: Stop Sequence + type: string + default: + nullable: true + MessageDeltaEvent: + title: MessageDeltaEvent + required: + - type + - delta + - usage + type: object + properties: + type: + title: Type + enum: + - message_delta + type: string + default: message_delta + delta: + $ref: '#/components/schemas/MessageDelta' + usage: + allOf: + - $ref: '#/components/schemas/MessageDeltaUsage' + description: "Billing and rate-limit usage.\n\nAnthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems.\n\nUnder the hood, the API transforms requests into a format suitable for the model. The model's output then goes through a parsing stage before becoming an API response. As a result, the token counts in `usage` will not match one-to-one with the exact visible content of an API request or response.\n\nFor example, `output_tokens` will be non-zero, even for an empty string response from Claude." + example: + output_tokens: 503 + x-stainless-naming: + go: + model_name: MessageDeltaEvent + MessageDeltaUsage: + title: MessageDeltaUsage + required: + - output_tokens + type: object + properties: + output_tokens: + title: Output Tokens + type: integer + description: The cumulative number of output tokens which were used. + example: 503 + MessageStartEvent: + title: MessageStartEvent + required: + - type + - message + type: object + properties: + type: + title: Type + enum: + - message_start + type: string + default: message_start + message: + $ref: '#/components/schemas/Message' + x-stainless-naming: + go: + model_name: MessageStartEvent + MessageStopEvent: + title: MessageStopEvent + required: + - type + type: object + properties: + type: + title: Type + enum: + - message_stop + type: string + default: message_stop + x-stainless-naming: + go: + model_name: MessageStopEvent + MessageStreamEvent: + title: MessageStreamEvent + oneOf: + - $ref: '#/components/schemas/MessageStartEvent' + - $ref: '#/components/schemas/MessageDeltaEvent' + - $ref: '#/components/schemas/MessageStopEvent' + - $ref: '#/components/schemas/ContentBlockStartEvent' + - $ref: '#/components/schemas/ContentBlockDeltaEvent' + - $ref: '#/components/schemas/ContentBlockStopEvent' + discriminator: + propertyName: type + mapping: + content_block_delta: '#/components/schemas/ContentBlockDeltaEvent' + content_block_start: '#/components/schemas/ContentBlockStartEvent' + content_block_stop: '#/components/schemas/ContentBlockStopEvent' + message_delta: '#/components/schemas/MessageDeltaEvent' + message_start: '#/components/schemas/MessageStartEvent' + message_stop: '#/components/schemas/MessageStopEvent' + x-stainless-naming: + go: + model_name: MessageStreamEvent + Metadata: + title: Metadata type: object properties: user_id: + title: User Id + maxLength: 256 type: string - description: "An external identifier for the user who is associated with the request.\n\nThis should be a uuid, hash value, or other opaque identifier. Anthropic may use\nthis id to help detect abuse. Do not include any identifying information such as\nname, email address, or phone number.\n" - description: An object describing metadata about the request. - ToolChoice: + description: "An external identifier for the user who is associated with the request.\n\nThis should be a uuid, hash value, or other opaque identifier. Anthropic may use this id to help detect abuse. Do not include any identifying information such as name, email address, or phone number." + nullable: true + example: 13803d75-b4b5-4c3e-b2a2-6f21399b021b + additionalProperties: false + NotFoundError: + title: NotFoundError required: - type + - message type: object properties: type: - $ref: '#/components/schemas/ToolChoiceType' - name: + title: Type + enum: + - not_found_error type: string - description: The name of the tool to use. - disable_parallel_tool_use: + default: not_found_error + message: + title: Message + type: string + default: Not found + OverloadedError: + title: OverloadedError + required: + - type + - message + type: object + properties: + type: + title: Type + enum: + - overloaded_error + type: string + default: overloaded_error + message: + title: Message + type: string + default: Overloaded + PermissionError: + title: PermissionError + required: + - type + - message + type: object + properties: + type: + title: Type + enum: + - permission_error + type: string + default: permission_error + message: + title: Message + type: string + default: Permission denied + PromptCachingBetaCreateMessageParams: + title: CreateMessageParams + required: + - model + - messages + - max_tokens + type: object + properties: + model: + $ref: '#/components/schemas/Model' + messages: + title: Messages + type: array + items: + $ref: '#/components/schemas/PromptCachingBetaInputMessage' + description: "Input messages.\n\nOur models are trained to operate on alternating `user` and `assistant` conversational turns. When creating a new `Message`, you specify the prior conversational turns with the `messages` parameter, and the model then generates the next `Message` in the conversation. Consecutive `user` or `assistant` turns in your request will be combined into a single turn.\n\nEach input message must be an object with a `role` and `content`. You can specify a single `user`-role message, or you can include multiple `user` and `assistant` messages.\n\nIf the final message uses the `assistant` role, the response content will continue immediately from the content in that message. This can be used to constrain part of the model's response.\n\nExample with a single `user` message:\n\n```json\n[{\"role\": \"user\", \"content\": \"Hello, Claude\"}]\n```\n\nExample with multiple conversational turns:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"Hello there.\"},\n {\"role\": \"assistant\", \"content\": \"Hi, I'm Claude. How can I help you?\"},\n {\"role\": \"user\", \"content\": \"Can you explain LLMs in plain English?\"},\n]\n```\n\nExample with a partially-filled response from Claude:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun\"},\n {\"role\": \"assistant\", \"content\": \"The best answer is (\"},\n]\n```\n\nEach input message `content` may be either a single `string` or an array of content blocks, where each block has a specific `type`. Using a `string` for `content` is shorthand for an array of one content block of type `\"text\"`. The following input messages are equivalent:\n\n```json\n{\"role\": \"user\", \"content\": \"Hello, Claude\"}\n```\n\n```json\n{\"role\": \"user\", \"content\": [{\"type\": \"text\", \"text\": \"Hello, Claude\"}]}\n```\n\nStarting with Claude 3 models, you can also send image content blocks:\n\n```json\n{\"role\": \"user\", \"content\": [\n {\n \"type\": \"image\",\n \"source\": {\n \"type\": \"base64\",\n \"media_type\": \"image/jpeg\",\n \"data\": \"/9j/4AAQSkZJRg...\",\n }\n },\n {\"type\": \"text\", \"text\": \"What is in this image?\"}\n]}\n```\n\nWe currently support the `base64` source type for images, and the `image/jpeg`, `image/png`, `image/gif`, and `image/webp` media types.\n\nSee [examples](https://docs.anthropic.com/en/api/messages-examples#vision) for more input examples.\n\nNote that if you want to include a [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use the top-level `system` parameter — there is no `\"system\"` role for input messages in the Messages API." + max_tokens: + title: Max Tokens + minimum: 1 + type: integer + description: "The maximum number of tokens to generate before stopping.\n\nNote that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate.\n\nDifferent models have different maximum values for this parameter. See [models](https://docs.anthropic.com/en/docs/models-overview) for details." + example: 1024 + metadata: + allOf: + - $ref: '#/components/schemas/Metadata' + description: An object describing metadata about the request. + stop_sequences: + title: Stop Sequences + type: array + items: + type: string + description: "Custom text sequences that will cause the model to stop generating.\n\nOur models will normally stop when they have naturally completed their turn, which will result in a response `stop_reason` of `\"end_turn\"`.\n\nIf you want the model to stop generating when it encounters custom strings of text, you can use the `stop_sequences` parameter. If the model encounters one of the custom sequences, the response `stop_reason` value will be `\"stop_sequence\"` and the response `stop_sequence` value will contain the matched stop sequence." + stream: + title: Stream type: boolean - description: Whether to disable parallel tool use. - description: "How the model should use the provided tools. The model can use a specific tool, \nany available tool, or decide by itself.\n\n- `auto`: allows Claude to decide whether to call any provided tools or not. This is the default value.\n- `any`: tells Claude that it must use one of the provided tools, but doesn’t force a particular tool.\n- `tool`: allows us to force Claude to always use a particular tool specified in the `name` field.\n" - ToolChoiceType: - enum: - - auto - - any - - tool - type: string - description: "How the model should use the provided tools. The model can use a specific tool, \nany available tool, or decide by itself.\n\n- `auto`: allows Claude to decide whether to call any provided tools or not. This is the default value.\n- `any`: tells Claude that it must use one of the provided tools, but doesn't force a particular tool.\n- `tool`: allows us to force Claude to always use a particular tool specified in the `name` field.\n" - Message: + description: "Whether to incrementally stream the response using server-sent events.\n\nSee [streaming](https://docs.anthropic.com/en/api/messages-streaming) for details." + system: + title: System + anyOf: + - type: string + - type: array + items: + $ref: '#/components/schemas/PromptCachingBetaRequestTextBlock' + description: "System prompt.\n\nA system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts)." + example: + - text: Today's date is 2024-06-01. + type: text + temperature: + title: Temperature + maximum: 1 + minimum: 0 + type: number + description: "Amount of randomness injected into the response.\n\nDefaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0` for analytical / multiple choice, and closer to `1.0` for creative and generative tasks.\n\nNote that even with `temperature` of `0.0`, the results will not be fully deterministic." + example: 1 + tool_choice: + $ref: '#/components/schemas/ToolChoice' + tools: + title: Tools + type: array + items: + $ref: '#/components/schemas/PromptCachingBetaTool' + description: "Definitions of tools that the model may use.\n\nIf you include `tools` in your API request, the model may return `tool_use` content blocks that represent the model's use of those tools. You can then run those tools using the tool input generated by the model and then optionally return results back to the model using `tool_result` content blocks.\n\nEach tool definition includes:\n\n* `name`: Name of the tool.\n* `description`: Optional, but strongly-recommended description of the tool.\n* `input_schema`: [JSON schema](https://json-schema.org/) for the tool `input` shape that the model will produce in `tool_use` output content blocks.\n\nFor example, if you defined `tools` as:\n\n```json\n[\n {\n \"name\": \"get_stock_price\",\n \"description\": \"Get the current stock price for a given ticker symbol.\",\n \"input_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"ticker\": {\n \"type\": \"string\",\n \"description\": \"The stock ticker symbol, e.g. AAPL for Apple Inc.\"\n }\n },\n \"required\": [\"ticker\"]\n }\n }\n]\n```\n\nAnd then asked the model \"What's the S&P 500 at today?\", the model might produce `tool_use` content blocks in the response like this:\n\n```json\n[\n {\n \"type\": \"tool_use\",\n \"id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"name\": \"get_stock_price\",\n \"input\": { \"ticker\": \"^GSPC\" }\n }\n]\n```\n\nYou might then run your `get_stock_price` tool with `{\"ticker\": \"^GSPC\"}` as an input, and return the following back to the model in a subsequent `user` message:\n\n```json\n[\n {\n \"type\": \"tool_result\",\n \"tool_use_id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"content\": \"259.75 USD\"\n }\n]\n```\n\nTools can be used for workflows that include running client-side tools and functions, or more generally whenever you want the model to produce a particular JSON structure of output.\n\nSee our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details." + example: + description: Get the current weather in a given location + input_schema: + properties: + location: + description: 'The city and state, e.g. San Francisco, CA' + type: string + unit: + description: 'Unit for the output - one of (celsius, fahrenheit)' + type: string + required: + - location + type: object + name: get_weather + top_k: + title: Top K + minimum: 0 + type: integer + description: "Only sample from the top K options for each subsequent token.\n\nUsed to remove \"long tail\" low probability responses. [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277).\n\nRecommended for advanced use cases only. You usually only need to use `temperature`." + example: 5 + top_p: + title: Top P + maximum: 1 + minimum: 0 + type: number + description: "Use nucleus sampling.\n\nIn nucleus sampling, we compute the cumulative distribution over all the options for each subsequent token in decreasing probability order and cut it off once it reaches a particular probability specified by `top_p`. You should either alter `temperature` or `top_p`, but not both.\n\nRecommended for advanced use cases only. You usually only need to use `temperature`." + example: 0.7 + additionalProperties: false + example: + max_tokens: 1024 + messages: + - content: 'Hello, world' + role: user + model: claude-3-5-sonnet-20241022 + PromptCachingBetaInputMessage: + title: InputMessage required: - - content - role + - content type: object properties: - id: + role: + title: Role + enum: + - user + - assistant type: string - description: "Unique object identifier.\n\nThe format and length of IDs may change over time.\n" content: - oneOf: + title: Content + anyOf: - type: string - description: A single text block. + x-stainless-skip: + - go - type: array items: - $ref: '#/components/schemas/Block' - description: An array of content blocks. - description: The content of the message. - role: - $ref: '#/components/schemas/MessageRole' - model: - type: string - description: The model that handled the request. - stop_reason: - $ref: '#/components/schemas/StopReason' - stop_sequence: - type: string - description: "Which custom stop sequence was generated, if any.\n\nThis value will be a non-null string if one of your custom stop sequences was\ngenerated.\n" - type: - type: string - description: "Object type.\n\nFor Messages, this is always `\"message\"`.\n" - usage: - $ref: '#/components/schemas/Usage' - description: A message in a chat conversation. - MessageRole: - enum: - - user - - assistant - type: string - description: The role of the messages author. - Tool: - oneOf: - - $ref: '#/components/schemas/ToolCustom' - - $ref: '#/components/schemas/ToolComputerUse' - - $ref: '#/components/schemas/ToolTextEditor' - - $ref: '#/components/schemas/ToolBash' - description: A tool the model may use. - discriminator: - propertyName: type - ToolCustom: + title: Block + oneOf: + - $ref: '#/components/schemas/PromptCachingBetaRequestTextBlock' + - $ref: '#/components/schemas/PromptCachingBetaRequestImageBlock' + - $ref: '#/components/schemas/PromptCachingBetaRequestToolUseBlock' + - $ref: '#/components/schemas/PromptCachingBetaRequestToolResultBlock' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/PromptCachingBetaRequestImageBlock' + text: '#/components/schemas/PromptCachingBetaRequestTextBlock' + tool_result: '#/components/schemas/PromptCachingBetaRequestToolResultBlock' + tool_use: '#/components/schemas/PromptCachingBetaRequestToolUseBlock' + x-stainless-python-extend-union: + - ContentBlock + x-stainless-python-extend-union-imports: + - from ...content_block import ContentBlock + example: + - type: text + text: What is a quaternion? + additionalProperties: false + PromptCachingBetaMessage: + title: Message required: - - name - - input_schema + - id + - type + - role + - content + - model + - stop_reason + - stop_sequence + - usage type: object properties: - type: - type: string - description: The type of tool. - default: - name: - type: string - description: 'The name of the tool. Must match the regex `^[a-zA-Z0-9_-]{1,64}$`.' - description: + id: + title: Id type: string - description: "Description of what this tool does.\n\nTool descriptions should be as detailed as possible. The more information that\nthe model has about what the tool is and how to use it, the better it will\nperform. You can use natural language descriptions to reinforce important\naspects of the tool input JSON schema.\n" - input_schema: - type: object - description: "[JSON schema](https://json-schema.org/) for this tool's input.\n\nThis defines the shape of the `input` that your tool accepts and that the model\nwill produce.\n" - description: A custom tool the model may use. - ToolComputerUse: - required: - - display_width_px - - display_height_px - type: object - properties: + description: "Unique object identifier.\n\nThe format and length of IDs may change over time." + example: msg_013Zva2CMHLNnXjNJJKqJ2EF type: + title: Type + enum: + - message type: string - description: The type of tool. - default: computer_20241022 - name: + description: "Object type.\n\nFor Messages, this is always `\"message\"`." + default: message + role: + title: Role + enum: + - assistant type: string - description: The name of the tool. - default: computer - cache_control: - $ref: '#/components/schemas/CacheControlEphemeral' - display_width_px: - type: integer - description: The width of the display in pixels. - display_height_px: - type: integer - description: The height of the display in pixels. - display_number: - type: integer - description: The number of the display to use. - nullable: true - description: 'A tool that uses a mouse and keyboard to interact with a computer, and take screenshots.' - ToolTextEditor: - type: object - properties: - type: + description: "Conversational role of the generated message.\n\nThis will always be `\"assistant\"`." + default: assistant + content: + title: Content + type: array + items: + $ref: '#/components/schemas/ContentBlock' + description: "Content generated by the model.\n\nThis is an array of content blocks, each of which has a `type` that determines its shape.\n\nExample:\n\n```json\n[{\"type\": \"text\", \"text\": \"Hi, I'm Claude.\"}]\n```\n\nIf the request input `messages` ended with an `assistant` turn, then the response `content` will continue directly from that last turn. You can use this to constrain the model's output.\n\nFor example, if the input `messages` were:\n```json\n[\n {\"role\": \"user\", \"content\": \"What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun\"},\n {\"role\": \"assistant\", \"content\": \"The best answer is (\"}\n]\n```\n\nThen the response `content` might be:\n\n```json\n[{\"type\": \"text\", \"text\": \"B)\"}]\n```" + example: + - text: Hi! My name is Claude. + type: text + model: + $ref: '#/components/schemas/Model' + stop_reason: + title: Stop Reason + enum: + - end_turn + - max_tokens + - stop_sequence + - tool_use type: string - description: The type of tool. - default: text_editor_20241022 - name: + description: "The reason that we stopped.\n\nThis may be one the following values:\n* `\"end_turn\"`: the model reached a natural stopping point\n* `\"max_tokens\"`: we exceeded the requested `max_tokens` or the model's maximum\n* `\"stop_sequence\"`: one of your provided custom `stop_sequences` was generated\n* `\"tool_use\"`: the model invoked one or more tools\n\nIn non-streaming mode this value is always non-null. In streaming mode, it is null in the `message_start` event and non-null otherwise." + nullable: true + stop_sequence: + title: Stop Sequence type: string - description: The name of the tool. - default: str_replace_editor - cache_control: - $ref: '#/components/schemas/CacheControlEphemeral' - description: 'A tool for viewing, creating and editing files.' - ToolBash: + description: "Which custom stop sequence was generated, if any.\n\nThis value will be a non-null string if one of your custom stop sequences was generated." + default: + nullable: true + usage: + allOf: + - $ref: '#/components/schemas/PromptCachingBetaUsage' + description: "Billing and rate-limit usage.\n\nAnthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems.\n\nUnder the hood, the API transforms requests into a format suitable for the model. The model's output then goes through a parsing stage before becoming an API response. As a result, the token counts in `usage` will not match one-to-one with the exact visible content of an API request or response.\n\nFor example, `output_tokens` will be non-zero, even for an empty string response from Claude." + example: + input_tokens: 2095 + output_tokens: 503 + example: + content: + - text: Hi! My name is Claude. + type: text + id: msg_013Zva2CMHLNnXjNJJKqJ2EF + model: claude-3-5-sonnet-20241022 + role: assistant + stop_reason: end_turn + stop_sequence: + type: message + usage: + input_tokens: 2095 + output_tokens: 503 + PromptCachingBetaMessageStartEvent: + title: MessageStartEvent + required: + - type + - message type: object properties: type: + title: Type + enum: + - message_start type: string - description: The type of tool. - default: bash_20241022 - name: - type: string - description: The name of the tool. - default: bash - cache_control: - $ref: '#/components/schemas/CacheControlEphemeral' - description: A tool for running commands in a bash shell. - Block: + default: message_start + message: + $ref: '#/components/schemas/PromptCachingBetaMessage' + PromptCachingBetaMessageStreamEvent: + title: MessageStreamEvent oneOf: - - $ref: '#/components/schemas/TextBlock' - - $ref: '#/components/schemas/ImageBlock' - - $ref: '#/components/schemas/ToolUseBlock' - - $ref: '#/components/schemas/ToolResultBlock' - description: A block of content in a message. + - $ref: '#/components/schemas/PromptCachingBetaMessageStartEvent' + - $ref: '#/components/schemas/MessageDeltaEvent' + - $ref: '#/components/schemas/MessageStopEvent' + - $ref: '#/components/schemas/ContentBlockStartEvent' + - $ref: '#/components/schemas/ContentBlockDeltaEvent' + - $ref: '#/components/schemas/ContentBlockStopEvent' discriminator: propertyName: type mapping: - text: '#/components/schemas/TextBlock' - image: '#/components/schemas/ImageBlock' - tool_use: '#/components/schemas/ToolUseBlock' - tool_result: '#/components/schemas/ToolResultBlock' - TextBlock: - required: - - text - type: object - properties: - text: - type: string - description: The text content. - type: - type: string - description: The type of content block. - default: text - cache_control: - $ref: '#/components/schemas/CacheControlEphemeral' - description: A block of text content. - ImageBlock: + content_block_delta: '#/components/schemas/ContentBlockDeltaEvent' + content_block_start: '#/components/schemas/ContentBlockStartEvent' + content_block_stop: '#/components/schemas/ContentBlockStopEvent' + message_delta: '#/components/schemas/MessageDeltaEvent' + message_start: '#/components/schemas/PromptCachingBetaMessageStartEvent' + message_stop: '#/components/schemas/MessageStopEvent' + PromptCachingBetaRequestImageBlock: + title: RequestImageBlock required: + - type - source type: object properties: - source: - $ref: '#/components/schemas/ImageBlockSource' + cache_control: + title: Cache Control + type: 'null' + oneOf: + - $ref: '#/components/schemas/CacheControlEphemeral' + nullable: true + discriminator: + propertyName: type + mapping: + ephemeral: '#/components/schemas/CacheControlEphemeral' type: + title: Type + enum: + - image type: string - description: The type of content block. - default: image - cache_control: - $ref: '#/components/schemas/CacheControlEphemeral' - description: A block of image content. - ImageBlockSource: + source: + title: Source + oneOf: + - $ref: '#/components/schemas/Base64ImageSource' + discriminator: + propertyName: type + mapping: + base64: '#/components/schemas/Base64ImageSource' + additionalProperties: false + PromptCachingBetaRequestTextBlock: + title: RequestTextBlock required: - - data - - media_type - type + - text type: object properties: - data: - type: string - description: The base64-encoded image data. - media_type: - enum: - - image/jpeg - - image/png - - image/gif - - image/webp - type: string - description: The media type of the image. + cache_control: + title: Cache Control + type: 'null' + oneOf: + - $ref: '#/components/schemas/CacheControlEphemeral' + nullable: true + discriminator: + propertyName: type + mapping: + ephemeral: '#/components/schemas/CacheControlEphemeral' type: + title: Type enum: - - base64 - type: string - description: The type of image source. - description: The source of an image block. - ToolUseBlock: - required: - - id - - name - - input - type: object - properties: - id: - type: string - description: "A unique identifier for this particular tool use block. \nThis will be used to match up the tool results later.\n" - example: toolu_01A09q90qw90lq917835lq9 - name: + - text type: string - description: The name of the tool being used. - example: get_weather - input: - type: object - description: 'An object containing the input being passed to the tool, conforming to the tool''s `input_schema`.' - type: + text: + title: Text + minLength: 1 type: string - description: The type of content block. - default: tool_use - cache_control: - $ref: '#/components/schemas/CacheControlEphemeral' - description: The tool the model wants to use. - ToolResultBlock: + additionalProperties: false + PromptCachingBetaRequestToolResultBlock: + title: RequestToolResultBlock required: + - type - tool_use_id - - content type: object properties: + cache_control: + title: Cache Control + type: 'null' + oneOf: + - $ref: '#/components/schemas/CacheControlEphemeral' + nullable: true + discriminator: + propertyName: type + mapping: + ephemeral: '#/components/schemas/CacheControlEphemeral' + type: + title: Type + enum: + - tool_result + type: string tool_use_id: + title: Tool Use Id + pattern: '^[a-zA-Z0-9_-]+$' type: string - description: The `id` of the tool use request this is a result for. + is_error: + title: Is Error + type: boolean content: - oneOf: + title: Content + anyOf: - type: string - description: A single text block. - type: array items: - $ref: '#/components/schemas/Block' - description: An array of content blocks. - description: "The result of the tool, as a string (e.g. `\"content\": \"15 degrees\"`) \nor list of nested content blocks (e.g. `\"content\": [{\"type\": \"text\", \"text\": \"15 degrees\"}]`). \nThese content blocks can use the text or image types.\n" - is_error: - type: boolean - description: Set to `true` if the tool execution resulted in an error. - type: - type: string - description: The type of content block. - default: tool_result - cache_control: - $ref: '#/components/schemas/CacheControlEphemeral' - description: The result of using a tool. - CacheControlEphemeral: + title: Block + oneOf: + - $ref: '#/components/schemas/PromptCachingBetaRequestTextBlock' + - $ref: '#/components/schemas/PromptCachingBetaRequestImageBlock' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/PromptCachingBetaRequestImageBlock' + text: '#/components/schemas/PromptCachingBetaRequestTextBlock' + x-stainless-naming: + python: + type_name: Content + additionalProperties: false + PromptCachingBetaRequestToolUseBlock: + title: RequestToolUseBlock + required: + - type + - id + - name + - input type: object properties: + cache_control: + title: Cache Control + type: 'null' + oneOf: + - $ref: '#/components/schemas/CacheControlEphemeral' + nullable: true + discriminator: + propertyName: type + mapping: + ephemeral: '#/components/schemas/CacheControlEphemeral' type: + title: Type enum: - - ephemeral + - tool_use type: string - default: ephemeral - description: The cache control settings. - StopReason: - enum: - - end_turn - - max_tokens - - stop_sequence - - tool_use - type: string - description: "The reason that we stopped.\n\nThis may be one the following values:\n\n- `\"end_turn\"`: the model reached a natural stopping point\n- `\"max_tokens\"`: we exceeded the requested `max_tokens` or the model's maximum\n- `\"stop_sequence\"`: one of your provided custom `stop_sequences` was generated\n- `\"tool_use\"`: the model invoked one or more tools\n\nIn non-streaming mode this value is always non-null. In streaming mode, it is\nnull in the `message_start` event and non-null otherwise.\n" - nullable: true - Usage: - required: - - input_tokens - - output_tokens - type: object - properties: - input_tokens: - type: integer - description: The number of input tokens which were used. - output_tokens: - type: integer - description: The number of output tokens which were used. - cache_creation_input_tokens: - type: integer - description: The number of input tokens read from the cache. - cache_read_input_tokens: - type: integer - description: The number of input tokens used to create the cache entry. - description: "Billing and rate-limit usage.\n\nAnthropic's API bills and rate-limits by token counts, as tokens represent the\nunderlying cost to our systems.\n\nUnder the hood, the API transforms requests into a format suitable for the\nmodel. The model's output then goes through a parsing stage before becoming an\nAPI response. As a result, the token counts in `usage` will not match one-to-one\nwith the exact visible content of an API request or response.\n\nFor example, `output_tokens` will be non-zero, even for an empty string response\nfrom Claude.\n" - CreateMessageBatchRequest: - required: - - requests - type: object - properties: - requests: - type: array - items: - $ref: '#/components/schemas/BatchMessageRequest' - description: List of requests for prompt completion. Each is an individual request to create a Message. - description: The request parameters for creating a message batch. - BatchMessageRequest: - required: - - custom_id - - params - type: object - properties: - custom_id: + id: + title: Id + pattern: '^[a-zA-Z0-9_-]+$' type: string - description: "Developer-provided ID created for each request in a Message Batch. Useful for\nmatching results to requests, as results may be given out of request order.\n\nMust be unique for each request within the Message Batch.\n" - params: - $ref: '#/components/schemas/CreateMessageRequest' - description: An individual message request within a batch. - MessageBatch: + name: + title: Name + maxLength: 64 + minLength: 1 + pattern: '^[a-zA-Z0-9_-]{1,64}$' + type: string + input: + title: Input + type: object + additionalProperties: false + PromptCachingBetaTool: + title: Tool required: - - id - - created_at - - expires_at - - processing_status - - request_counts - - type + - name + - input_schema type: object properties: - id: - type: string - description: Unique object identifier for the message batch. - created_at: - type: string - description: RFC 3339 datetime string representing the time at which the Message Batch was created. - format: date-time - expires_at: - type: string - description: 'RFC 3339 datetime string representing the time at which the Message Batch will expire and end processing, which is 24 hours after creation.' - format: date-time - processing_status: - enum: - - in_progress - - canceling - - ended - type: string - description: Processing status of the Message Batch. - request_counts: - $ref: '#/components/schemas/MessageBatchRequestCounts' - results_url: + description: + title: Description type: string - description: URL to a `.jsonl` file containing the results of the Message Batch requests. Specified only once processing ends. - nullable: true - type: - enum: - - message_batch + description: "Description of what this tool does.\n\nTool descriptions should be as detailed as possible. The more information that the model has about what the tool is and how to use it, the better it will perform. You can use natural language descriptions to reinforce important aspects of the tool input JSON schema." + example: Get the current weather in a given location + name: + title: Name + maxLength: 64 + minLength: 1 + pattern: '^[a-zA-Z0-9_-]{1,64}$' type: string - description: 'Object type. For Message Batches, this is always `"message_batch"`.' - description: A batch of message requests. - MessageBatchRequestCounts: + description: "Name of the tool.\n\nThis is how the tool will be called by the model and in tool_use blocks." + input_schema: + allOf: + - $ref: '#/components/schemas/InputSchema' + description: "[JSON schema](https://json-schema.org/) for this tool's input.\n\nThis defines the shape of the `input` that your tool accepts and that the model will produce." + example: + properties: + location: + description: 'The city and state, e.g. San Francisco, CA' + type: string + unit: + description: 'Unit for the output - one of (celsius, fahrenheit)' + type: string + required: + - location + type: object + cache_control: + title: Cache Control + type: 'null' + oneOf: + - $ref: '#/components/schemas/CacheControlEphemeral' + nullable: true + discriminator: + propertyName: type + mapping: + ephemeral: '#/components/schemas/CacheControlEphemeral' + additionalProperties: false + PromptCachingBetaUsage: + title: Usage required: - - processing - - succeeded - - errored - - canceled - - expired + - input_tokens + - cache_creation_input_tokens + - cache_read_input_tokens + - output_tokens type: object properties: - processing: - type: integer - description: Number of requests in the Message Batch that are processing. - succeeded: + input_tokens: + title: Input Tokens type: integer - description: Number of requests in the Message Batch that have completed successfully. - errored: + description: The number of input tokens which were used. + example: 2095 + cache_creation_input_tokens: + title: Cache Creation Input Tokens type: integer - description: Number of requests in the Message Batch that encountered an error. - canceled: + description: The number of input tokens used to create the cache entry. + default: + nullable: true + example: 2051 + cache_read_input_tokens: + title: Cache Read Input Tokens type: integer - description: Number of requests in the Message Batch that have been canceled. - expired: + description: The number of input tokens read from the cache. + default: + nullable: true + example: 2051 + output_tokens: + title: Output Tokens type: integer - description: Number of requests in the Message Batch that have expired. - description: 'Tallies requests within the Message Batch, categorized by their status.' - MessageStreamEvent: - type: object - oneOf: - - $ref: '#/components/schemas/MessageStartEvent' - - $ref: '#/components/schemas/MessageDeltaEvent' - - $ref: '#/components/schemas/MessageStopEvent' - - $ref: '#/components/schemas/ContentBlockStartEvent' - - $ref: '#/components/schemas/ContentBlockDeltaEvent' - - $ref: '#/components/schemas/ContentBlockStopEvent' - - $ref: '#/components/schemas/PingEvent' - - $ref: '#/components/schemas/ErrorEvent' - description: A event in a streaming conversation. - discriminator: - propertyName: type - mapping: - message_start: '#/components/schemas/MessageStartEvent' - message_delta: '#/components/schemas/MessageDeltaEvent' - message_stop: '#/components/schemas/MessageStopEvent' - content_block_start: '#/components/schemas/ContentBlockStartEvent' - content_block_delta: '#/components/schemas/ContentBlockDeltaEvent' - content_block_stop: '#/components/schemas/ContentBlockStopEvent' - ping: '#/components/schemas/PingEvent' - error: '#/components/schemas/ErrorEvent' - MessageStreamEventType: - enum: - - message_start - - message_delta - - message_stop - - content_block_start - - content_block_delta - - content_block_stop - - ping - - error - type: string - description: The type of a streaming event. - MessageStartEvent: + description: The number of output tokens which were used. + example: 503 + RateLimitError: + title: RateLimitError required: - - message - type + - message type: object properties: - message: - $ref: '#/components/schemas/Message' type: - $ref: '#/components/schemas/MessageStreamEventType' - description: A start event in a streaming conversation. - MessageDeltaEvent: + title: Type + enum: + - rate_limit_error + type: string + default: rate_limit_error + message: + title: Message + type: string + default: Rate limited + RequestImageBlock: + title: RequestImageBlock required: - - delta - type - - usage + - source type: object properties: - delta: - $ref: '#/components/schemas/MessageDelta' type: - $ref: '#/components/schemas/MessageStreamEventType' - usage: - $ref: '#/components/schemas/MessageDeltaUsage' - description: A delta event in a streaming conversation. - MessageDelta: + title: Type + enum: + - image + type: string + source: + title: Source + oneOf: + - $ref: '#/components/schemas/Base64ImageSource' + discriminator: + propertyName: type + mapping: + base64: '#/components/schemas/Base64ImageSource' + additionalProperties: false + RequestTextBlock: + title: RequestTextBlock + required: + - type + - text type: object properties: - stop_reason: - $ref: '#/components/schemas/StopReason' - stop_sequence: + type: + title: Type + enum: + - text type: string - description: "Which custom stop sequence was generated, if any.\n\nThis value will be a non-null string if one of your custom stop sequences was\ngenerated.\n" - description: A delta in a streaming message. - MessageDeltaUsage: + text: + title: Text + minLength: 1 + type: string + additionalProperties: false + RequestToolResultBlock: + title: RequestToolResultBlock required: - - output_tokens + - type + - tool_use_id type: object properties: - output_tokens: - type: integer - description: The cumulative number of output tokens which were used. - description: "Billing and rate-limit usage.\n\nAnthropic's API bills and rate-limits by token counts, as tokens represent the\nunderlying cost to our systems.\n\nUnder the hood, the API transforms requests into a format suitable for the\nmodel. The model's output then goes through a parsing stage before becoming an\nAPI response. As a result, the token counts in `usage` will not match one-to-one\nwith the exact visible content of an API request or response.\n\nFor example, `output_tokens` will be non-zero, even for an empty string response\nfrom Claude.\n" - MessageStopEvent: + type: + title: Type + enum: + - tool_result + type: string + tool_use_id: + title: Tool Use Id + pattern: '^[a-zA-Z0-9_-]+$' + type: string + is_error: + title: Is Error + type: boolean + content: + title: Content + anyOf: + - type: string + x-stainless-skip: + - go + - type: array + items: + title: Block + oneOf: + - $ref: '#/components/schemas/RequestTextBlock' + - $ref: '#/components/schemas/RequestImageBlock' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/RequestImageBlock' + text: '#/components/schemas/RequestTextBlock' + x-stainless-naming: + python: + type_name: Content + additionalProperties: false + RequestToolUseBlock: + title: RequestToolUseBlock required: - type + - id + - name + - input type: object properties: type: - $ref: '#/components/schemas/MessageStreamEventType' - description: A stop event in a streaming conversation. - ContentBlockStartEvent: + title: Type + enum: + - tool_use + type: string + id: + title: Id + pattern: '^[a-zA-Z0-9_-]+$' + type: string + name: + title: Name + maxLength: 64 + minLength: 1 + pattern: '^[a-zA-Z0-9_-]{1,64}$' + type: string + input: + title: Input + type: object + additionalProperties: false + ResponseTextBlock: + title: ResponseTextBlock required: - - content_block - - index - type + - text type: object properties: - content_block: - $ref: '#/components/schemas/Block' - index: - type: integer - description: The index of the content block. type: - $ref: '#/components/schemas/MessageStreamEventType' - description: A start event in a streaming content block. - ContentBlockDeltaEvent: + title: Type + enum: + - text + type: string + default: text + text: + title: Text + maxLength: 5000000 + minLength: 0 + type: string + ResponseToolUseBlock: + title: ResponseToolUseBlock required: - - delta - - index - type + - id + - name + - input type: object properties: - delta: - $ref: '#/components/schemas/BlockDelta' - index: - type: integer - description: The index of the content block. type: - $ref: '#/components/schemas/MessageStreamEventType' - description: A delta event in a streaming content block. - BlockDelta: - oneOf: - - $ref: '#/components/schemas/TextBlockDelta' - - $ref: '#/components/schemas/InputJsonBlockDelta' - description: A delta in a streaming message. - discriminator: - propertyName: type - mapping: - text_delta: '#/components/schemas/TextBlockDelta' - input_json_delta: '#/components/schemas/InputJsonBlockDelta' - TextBlockDelta: + title: Type + enum: + - tool_use + type: string + default: tool_use + id: + title: Id + pattern: '^[a-zA-Z0-9_-]+$' + type: string + name: + title: Name + minLength: 1 + type: string + input: + title: Input + type: object + TextContentBlockDelta: + title: TextContentBlockDelta required: - - text - type + - text type: object properties: - text: - type: string - description: The text delta. type: + title: Type + enum: + - text_delta type: string - description: The type of content block. default: text_delta - description: A delta in a streaming text block. - InputJsonBlockDelta: + text: + title: Text + type: string + Tool: + title: Tool required: - - text - - type + - name + - input_schema type: object properties: - partial_json: + description: + title: Description type: string - description: The partial JSON delta. - type: + description: "Description of what this tool does.\n\nTool descriptions should be as detailed as possible. The more information that the model has about what the tool is and how to use it, the better it will perform. You can use natural language descriptions to reinforce important aspects of the tool input JSON schema." + example: Get the current weather in a given location + name: + title: Name + maxLength: 64 + minLength: 1 + pattern: '^[a-zA-Z0-9_-]{1,64}$' type: string - description: The type of content block. - default: input_json_delta - description: A delta in a streaming input JSON. - ContentBlockStopEvent: + description: "Name of the tool.\n\nThis is how the tool will be called by the model and in tool_use blocks." + input_schema: + allOf: + - $ref: '#/components/schemas/InputSchema' + description: "[JSON schema](https://json-schema.org/) for this tool's input.\n\nThis defines the shape of the `input` that your tool accepts and that the model will produce." + example: + properties: + location: + description: 'The city and state, e.g. San Francisco, CA' + type: string + unit: + description: 'Unit for the output - one of (celsius, fahrenheit)' + type: string + required: + - location + type: object + additionalProperties: false + ToolChoiceAny: + title: ToolChoiceAny required: - - index - type type: object properties: - index: - type: integer - description: The index of the content block. type: - $ref: '#/components/schemas/MessageStreamEventType' - description: A stop event in a streaming content block. - PingEvent: + title: Type + enum: + - any + type: string + disable_parallel_tool_use: + title: Disable Parallel Tool Use + type: boolean + description: "Whether to disable parallel tool use.\n\nDefaults to `false`. If set to `true`, the model will output exactly one tool use." + additionalProperties: false + description: The model will use any available tools. + ToolChoiceAuto: + title: ToolChoiceAuto required: - type type: object properties: type: - $ref: '#/components/schemas/MessageStreamEventType' - description: A ping event in a streaming conversation. - ErrorEvent: + title: Type + enum: + - auto + type: string + disable_parallel_tool_use: + title: Disable Parallel Tool Use + type: boolean + description: "Whether to disable parallel tool use.\n\nDefaults to `false`. If set to `true`, the model will output at most one tool use." + additionalProperties: false + description: The model will automatically decide whether to use tools. + ToolChoiceTool: + title: ToolChoiceTool required: - type - - error + - name type: object properties: type: - $ref: '#/components/schemas/MessageStreamEventType' - error: - $ref: '#/components/schemas/Error' - description: An error event in a streaming conversation. - Error: + title: Type + enum: + - tool + type: string + name: + title: Name + type: string + description: The name of the tool to use. + disable_parallel_tool_use: + title: Disable Parallel Tool Use + type: boolean + description: "Whether to disable parallel tool use.\n\nDefaults to `false`. If set to `true`, the model will output exactly one tool use." + additionalProperties: false + description: The model will use the specified tool with `tool_choice.name`. + Usage: + title: Usage required: - - type - - message + - input_tokens + - output_tokens type: object properties: - type: + input_tokens: + title: Input Tokens + type: integer + description: The number of input tokens which were used. + example: 2095 + output_tokens: + title: Output Tokens + type: integer + description: The number of output tokens which were used. + example: 503 + BetaMessageBatchResult: + title: Result + oneOf: + - $ref: '#/components/schemas/BetaSucceededResult' + - $ref: '#/components/schemas/BetaErroredResult' + - $ref: '#/components/schemas/BetaCanceledResult' + - $ref: '#/components/schemas/BetaExpiredResult' + description: "Processing result for this request.\n\nContains a Message output if processing was successful, an error response if processing failed, or the reason why processing was not attempted, such as cancellation or expiration." + discriminator: + propertyName: type + mapping: + canceled: '#/components/schemas/BetaCanceledResult' + errored: '#/components/schemas/BetaErroredResult' + expired: '#/components/schemas/BetaExpiredResult' + succeeded: '#/components/schemas/BetaSucceededResult' + CreateMessageParamsWithoutStream: + title: CreateMessageParams + required: + - model + - messages + - max_tokens + type: object + properties: + model: + $ref: '#/components/schemas/Model' + messages: + title: Messages + type: array + items: + $ref: '#/components/schemas/InputMessage' + description: "Input messages.\n\nOur models are trained to operate on alternating `user` and `assistant` conversational turns. When creating a new `Message`, you specify the prior conversational turns with the `messages` parameter, and the model then generates the next `Message` in the conversation. Consecutive `user` or `assistant` turns in your request will be combined into a single turn.\n\nEach input message must be an object with a `role` and `content`. You can specify a single `user`-role message, or you can include multiple `user` and `assistant` messages.\n\nIf the final message uses the `assistant` role, the response content will continue immediately from the content in that message. This can be used to constrain part of the model's response.\n\nExample with a single `user` message:\n\n```json\n[{\"role\": \"user\", \"content\": \"Hello, Claude\"}]\n```\n\nExample with multiple conversational turns:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"Hello there.\"},\n {\"role\": \"assistant\", \"content\": \"Hi, I'm Claude. How can I help you?\"},\n {\"role\": \"user\", \"content\": \"Can you explain LLMs in plain English?\"},\n]\n```\n\nExample with a partially-filled response from Claude:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun\"},\n {\"role\": \"assistant\", \"content\": \"The best answer is (\"},\n]\n```\n\nEach input message `content` may be either a single `string` or an array of content blocks, where each block has a specific `type`. Using a `string` for `content` is shorthand for an array of one content block of type `\"text\"`. The following input messages are equivalent:\n\n```json\n{\"role\": \"user\", \"content\": \"Hello, Claude\"}\n```\n\n```json\n{\"role\": \"user\", \"content\": [{\"type\": \"text\", \"text\": \"Hello, Claude\"}]}\n```\n\nStarting with Claude 3 models, you can also send image content blocks:\n\n```json\n{\"role\": \"user\", \"content\": [\n {\n \"type\": \"image\",\n \"source\": {\n \"type\": \"base64\",\n \"media_type\": \"image/jpeg\",\n \"data\": \"/9j/4AAQSkZJRg...\",\n }\n },\n {\"type\": \"text\", \"text\": \"What is in this image?\"}\n]}\n```\n\nWe currently support the `base64` source type for images, and the `image/jpeg`, `image/png`, `image/gif`, and `image/webp` media types.\n\nSee [examples](https://docs.anthropic.com/en/api/messages-examples#vision) for more input examples.\n\nNote that if you want to include a [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use the top-level `system` parameter — there is no `\"system\"` role for input messages in the Messages API." + max_tokens: + title: Max Tokens + minimum: 1 + type: integer + description: "The maximum number of tokens to generate before stopping.\n\nNote that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate.\n\nDifferent models have different maximum values for this parameter. See [models](https://docs.anthropic.com/en/docs/models-overview) for details." + example: 1024 + metadata: + allOf: + - $ref: '#/components/schemas/Metadata' + description: An object describing metadata about the request. + stop_sequences: + title: Stop Sequences + type: array + items: + type: string + description: "Custom text sequences that will cause the model to stop generating.\n\nOur models will normally stop when they have naturally completed their turn, which will result in a response `stop_reason` of `\"end_turn\"`.\n\nIf you want the model to stop generating when it encounters custom strings of text, you can use the `stop_sequences` parameter. If the model encounters one of the custom sequences, the response `stop_reason` value will be `\"stop_sequence\"` and the response `stop_sequence` value will contain the matched stop sequence." + system: + title: System + anyOf: + - type: string + - type: array + items: + $ref: '#/components/schemas/RequestTextBlock' + description: "System prompt.\n\nA system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts)." + example: + - text: Today's date is 2024-06-01. + type: text + temperature: + title: Temperature + maximum: 1 + minimum: 0 + type: number + description: "Amount of randomness injected into the response.\n\nDefaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0` for analytical / multiple choice, and closer to `1.0` for creative and generative tasks.\n\nNote that even with `temperature` of `0.0`, the results will not be fully deterministic." + example: 1 + tool_choice: + $ref: '#/components/schemas/ToolChoice' + tools: + title: Tools + type: array + items: + $ref: '#/components/schemas/Tool' + description: "Definitions of tools that the model may use.\n\nIf you include `tools` in your API request, the model may return `tool_use` content blocks that represent the model's use of those tools. You can then run those tools using the tool input generated by the model and then optionally return results back to the model using `tool_result` content blocks.\n\nEach tool definition includes:\n\n* `name`: Name of the tool.\n* `description`: Optional, but strongly-recommended description of the tool.\n* `input_schema`: [JSON schema](https://json-schema.org/) for the tool `input` shape that the model will produce in `tool_use` output content blocks.\n\nFor example, if you defined `tools` as:\n\n```json\n[\n {\n \"name\": \"get_stock_price\",\n \"description\": \"Get the current stock price for a given ticker symbol.\",\n \"input_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"ticker\": {\n \"type\": \"string\",\n \"description\": \"The stock ticker symbol, e.g. AAPL for Apple Inc.\"\n }\n },\n \"required\": [\"ticker\"]\n }\n }\n]\n```\n\nAnd then asked the model \"What's the S&P 500 at today?\", the model might produce `tool_use` content blocks in the response like this:\n\n```json\n[\n {\n \"type\": \"tool_use\",\n \"id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"name\": \"get_stock_price\",\n \"input\": { \"ticker\": \"^GSPC\" }\n }\n]\n```\n\nYou might then run your `get_stock_price` tool with `{\"ticker\": \"^GSPC\"}` as an input, and return the following back to the model in a subsequent `user` message:\n\n```json\n[\n {\n \"type\": \"tool_result\",\n \"tool_use_id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"content\": \"259.75 USD\"\n }\n]\n```\n\nTools can be used for workflows that include running client-side tools and functions, or more generally whenever you want the model to produce a particular JSON structure of output.\n\nSee our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details." + example: + description: Get the current weather in a given location + input_schema: + properties: + location: + description: 'The city and state, e.g. San Francisco, CA' + type: string + unit: + description: 'Unit for the output - one of (celsius, fahrenheit)' + type: string + required: + - location + type: object + name: get_weather + top_k: + title: Top K + minimum: 0 + type: integer + description: "Only sample from the top K options for each subsequent token.\n\nUsed to remove \"long tail\" low probability responses. [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277).\n\nRecommended for advanced use cases only. You usually only need to use `temperature`." + example: 5 + top_p: + title: Top P + maximum: 1 + minimum: 0 + type: number + description: "Use nucleus sampling.\n\nIn nucleus sampling, we compute the cumulative distribution over all the options for each subsequent token in decreasing probability order and cut it off once it reaches a particular probability specified by `top_p`. You should either alter `temperature` or `top_p`, but not both.\n\nRecommended for advanced use cases only. You usually only need to use `temperature`." + example: 0.7 + additionalProperties: false + example: + max_tokens: 1024 + messages: + - content: 'Hello, world' + role: user + model: claude-3-5-sonnet-20241022 + AnthropicBeta: + anyOf: + - type: string + - title: Preset + enum: + - message-batches-2024-09-24 + - prompt-caching-2024-07-31 + - computer-use-2024-10-22 + - pdfs-2024-09-25 + - token-counting-2024-11-01 type: string - description: The type of error. - message: + x-stainless-nominal: false + ToolChoice: + title: Tool Choice + oneOf: + - $ref: '#/components/schemas/ToolChoiceAuto' + - $ref: '#/components/schemas/ToolChoiceAny' + - $ref: '#/components/schemas/ToolChoiceTool' + description: 'How the model should use the provided tools. The model can use a specific tool, any available tool, or decide by itself.' + discriminator: + propertyName: type + mapping: + any: '#/components/schemas/ToolChoiceAny' + auto: '#/components/schemas/ToolChoiceAuto' + tool: '#/components/schemas/ToolChoiceTool' + BetaToolChoice: + title: Tool Choice + oneOf: + - $ref: '#/components/schemas/BetaToolChoiceAuto' + - $ref: '#/components/schemas/BetaToolChoiceAny' + - $ref: '#/components/schemas/BetaToolChoiceTool' + description: 'How the model should use the provided tools. The model can use a specific tool, any available tool, or decide by itself.' + discriminator: + propertyName: type + mapping: + any: '#/components/schemas/BetaToolChoiceAny' + auto: '#/components/schemas/BetaToolChoiceAuto' + tool: '#/components/schemas/BetaToolChoiceTool' + ContentBlock: + oneOf: + - $ref: '#/components/schemas/ResponseTextBlock' + - $ref: '#/components/schemas/ResponseToolUseBlock' + discriminator: + propertyName: type + mapping: + text: '#/components/schemas/ResponseTextBlock' + tool_use: '#/components/schemas/ResponseToolUseBlock' + BetaContentBlock: + oneOf: + - $ref: '#/components/schemas/BetaResponseTextBlock' + - $ref: '#/components/schemas/BetaResponseToolUseBlock' + discriminator: + propertyName: type + mapping: + text: '#/components/schemas/BetaResponseTextBlock' + tool_use: '#/components/schemas/BetaResponseToolUseBlock' + BetaInputContentBlock: + oneOf: + - $ref: '#/components/schemas/BetaRequestTextBlock' + - $ref: '#/components/schemas/BetaRequestImageBlock' + - $ref: '#/components/schemas/BetaRequestToolUseBlock' + - $ref: '#/components/schemas/BetaRequestToolResultBlock' + - $ref: '#/components/schemas/BetaRequestPDFBlock' + discriminator: + propertyName: type + mapping: + document: '#/components/schemas/BetaRequestPDFBlock' + image: '#/components/schemas/BetaRequestImageBlock' + text: '#/components/schemas/BetaRequestTextBlock' + tool_result: '#/components/schemas/BetaRequestToolResultBlock' + tool_use: '#/components/schemas/BetaRequestToolUseBlock' + Model: + title: Model + type: 'null' + anyOf: + - type: string + - title: Preset + enum: + - claude-3-5-haiku-latest + - claude-3-haiku-20241022 + - claude-3-5-sonnet-latest + - claude-3-5-sonnet-20241022 + - claude-3-5-sonnet-20240620 + - claude-3-opus-latest + - claude-3-opus-20240229 + - claude-3-sonnet-20240229 + - claude-3-haiku-20240307 + - claude-2.1 + - claude-2.0 + - claude-instant-1.2 type: string - description: A human-readable error message. - description: An error object. + x-enum-descriptions: + - Fast and cost-effective model + - Fast and cost-effective model + - Our most intelligent model + - Our most intelligent model + - Our previous most intelligent model + - Excels at writing and complex tasks + - Excels at writing and complex tasks + - Balance of speed and intelligence + - Our previous fast and cost-effective + - + - + - + x-stainless-nominal: false + description: 'The model that will complete your prompt.\n\nSee [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.' securitySchemes: ApiKeyAuth: type: apiKey name: x-api-key in: header security: - - ApiKeyAuth: [ ] -tags: - - name: Messages - description: 'Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversation.' \ No newline at end of file + - ApiKeyAuth: [ ] \ No newline at end of file diff --git a/src/tests/AutoSDK.UnitTests/Snapshots/anthropic/ResolvedSchemas/_.verified.txt b/src/tests/AutoSDK.UnitTests/Snapshots/anthropic/ResolvedSchemas/_.verified.txt index fd612bf7a7..1741628965 100644 --- a/src/tests/AutoSDK.UnitTests/Snapshots/anthropic/ResolvedSchemas/_.verified.txt +++ b/src/tests/AutoSDK.UnitTests/Snapshots/anthropic/ResolvedSchemas/_.verified.txt @@ -1,194 +1,792 @@ [ - CreateMessageRequest(class)[Messages], - Model(anyOf)[Messages], - ModelVariant1(string)[Messages], - CreateMessageRequestModel(enum)[Messages], + APIError(class)[Messages, Text Completions], + APIErrorType(enum)[Messages, Text Completions], + Message(string)[Messages, Text Completions], + AuthenticationError(class)[Messages, Text Completions], + AuthenticationErrorType(enum)[Messages, Text Completions], + Message(string)[Messages, Text Completions], + Base64ImageSource(class)[Messages], + Base64ImageSourceType(enum)[Messages], + Base64ImageSourceMediaType(enum)[Messages], + Data(byte)[Messages], + BetaAPIError(class)[Messages, Message Batches], + BetaAPIErrorType(enum)[Messages, Message Batches], + Message(string)[Messages, Message Batches], + BetaAuthenticationError(class)[Messages, Message Batches], + BetaAuthenticationErrorType(enum)[Messages, Message Batches], + Message(string)[Messages, Message Batches], + BetaBase64ImageSource(class)[Messages, Message Batches], + BetaBase64ImageSourceType(enum)[Messages, Message Batches], + BetaBase64ImageSourceMediaType(enum)[Messages, Message Batches], + Data(byte)[Messages, Message Batches], + BetaBase64PDFSource(class)[Messages, Message Batches], + BetaBase64PDFSourceType(enum)[Messages, Message Batches], + BetaBase64PDFSourceMediaType(enum)[Messages, Message Batches], + Data(byte)[Messages, Message Batches], + BetaBashTool20241022(class)[Messages, Message Batches], + CacheControl_AllOf1Wrapped(oneOf)[Messages, Message Batches], + BetaCacheControlEphemeral(ref)[Messages, Message Batches], + BetaBashTool20241022CacheControlDiscriminator(class)[Messages, Message Batches], + BetaBashTool20241022CacheControlDiscriminatorType(enum)[Messages, Message Batches], + BetaBashTool20241022Type(enum)[Messages, Message Batches], + BetaBashTool20241022Name(enum)[Messages, Message Batches], + BetaCacheControlEphemeral(class)[Messages, Message Batches], + BetaCacheControlEphemeralType(enum)[Messages, Message Batches], + BetaCanceledResult(class)[], + BetaCanceledResultType(enum)[], + BetaComputerUseTool20241022(class)[Messages, Message Batches], + CacheControl_AllOf1Wrapped2(oneOf)[Messages, Message Batches], + BetaCacheControlEphemeral(ref)[Messages, Message Batches], + BetaComputerUseTool20241022CacheControlDiscriminator(class)[Messages, Message Batches], + BetaComputerUseTool20241022CacheControlDiscriminatorType(enum)[Messages, Message Batches], + BetaComputerUseTool20241022Type(enum)[Messages, Message Batches], + BetaComputerUseTool20241022Name(enum)[Messages, Message Batches], + DisplayHeightPx(int)[Messages, Message Batches], + DisplayWidthPx(int)[Messages, Message Batches], + DisplayNumber(int)[Messages, Message Batches], + BetaContentBlockDeltaEvent(class)[], + BetaContentBlockDeltaEventType(enum)[], + Index(int)[], + Delta(oneOf)[], + BetaTextContentBlockDelta(ref)[], + BetaInputJsonContentBlockDelta(ref)[], + BetaContentBlockDeltaEventDeltaDiscriminator(class)[], + BetaContentBlockDeltaEventDeltaDiscriminatorType(enum)[], + BetaTextContentBlockDelta(class)[], + BetaTextContentBlockDeltaType(enum)[], + Text(string)[], + BetaInputJsonContentBlockDelta(class)[], + BetaInputJsonContentBlockDeltaType(enum)[], + PartialJson(string)[], + BetaContentBlockStartEvent(class)[], + BetaContentBlockStartEventType(enum)[], + Index(int)[], + ContentBlock(oneOf)[], + BetaResponseTextBlock(ref)[], + BetaResponseToolUseBlock(ref)[], + BetaContentBlockStartEventContentBlockDiscriminator(class)[], + BetaContentBlockStartEventContentBlockDiscriminatorType(enum)[], + BetaResponseTextBlock(class)[Messages], + BetaResponseTextBlockType(enum)[Messages], + Text(string)[Messages], + BetaResponseToolUseBlock(class)[Messages], + BetaResponseToolUseBlockType(enum)[Messages], + Id(string)[Messages], + Name(string)[Messages], + BetaResponseToolUseBlockInput(class)[Messages], + BetaContentBlockStopEvent(class)[], + BetaContentBlockStopEventType(enum)[], + Index(int)[], + BetaCountMessageTokensParams(class)[Messages], + BetaToolChoice(ref)[Messages], + Tools(array)[Messages], + ToolsItem(oneOf)[Messages], + BetaTool(ref)[Messages], + BetaComputerUseTool20241022(ref)[Messages], + BetaBashTool20241022(ref)[Messages], + BetaTextEditor20241022(ref)[Messages], + BetaCountMessageTokensParamsToolDiscriminator(class)[Messages], + BetaCountMessageTokensParamsToolDiscriminatorType(enum)[Messages], Messages(array)[Messages], - Message(ref)[Messages], + BetaInputMessage(ref)[Messages], + System(anyOf)[Messages], + SystemVariant1(string)[Messages], + SystemVariant2(array)[Messages], + BetaRequestTextBlock(ref)[Messages], + Model(ref)[Messages], + BetaToolChoice(oneOf)[Messages, Message Batches], + BetaToolChoiceAuto(ref)[Messages, Message Batches], + BetaToolChoiceAny(ref)[Messages, Message Batches], + BetaToolChoiceTool(ref)[Messages, Message Batches], + BetaToolChoiceDiscriminator(class)[Messages, Message Batches], + BetaToolChoiceDiscriminatorType(enum)[Messages, Message Batches], + BetaToolChoiceAuto(class)[Messages, Message Batches], + BetaToolChoiceAutoType(enum)[Messages, Message Batches], + DisableParallelToolUse(bool)[Messages, Message Batches], + BetaToolChoiceAny(class)[Messages, Message Batches], + BetaToolChoiceAnyType(enum)[Messages, Message Batches], + DisableParallelToolUse(bool)[Messages, Message Batches], + BetaToolChoiceTool(class)[Messages, Message Batches], + BetaToolChoiceToolType(enum)[Messages, Message Batches], + Name(string)[Messages, Message Batches], + DisableParallelToolUse(bool)[Messages, Message Batches], + BetaTool(class)[Messages, Message Batches], + BetaToolType(enum)[Messages, Message Batches], + Description(string)[Messages, Message Batches], + Name(string)[Messages, Message Batches], + InputSchema_AllOf1Wrapped(allOf)[Messages, Message Batches], + BetaInputSchema(ref)[Messages, Message Batches], + CacheControl_AllOf1Wrapped9(oneOf)[Messages, Message Batches], + BetaCacheControlEphemeral(ref)[Messages, Message Batches], + BetaToolCacheControlDiscriminator(class)[Messages, Message Batches], + BetaToolCacheControlDiscriminatorType(enum)[Messages, Message Batches], + BetaInputSchema(class)[Messages, Message Batches], + BetaInputSchemaType(enum)[Messages, Message Batches], + BetaInputSchemaProperties(class)[Messages, Message Batches], + BetaTextEditor20241022(class)[Messages, Message Batches], + CacheControl_AllOf1Wrapped8(oneOf)[Messages, Message Batches], + BetaCacheControlEphemeral(ref)[Messages, Message Batches], + BetaTextEditor20241022CacheControlDiscriminator(class)[Messages, Message Batches], + BetaTextEditor20241022CacheControlDiscriminatorType(enum)[Messages, Message Batches], + BetaTextEditor20241022Type(enum)[Messages, Message Batches], + BetaTextEditor20241022Name(enum)[Messages, Message Batches], + BetaInputMessage(class)[Messages, Message Batches], + BetaInputMessageRole(enum)[Messages, Message Batches], + Content(anyOf)[Messages, Message Batches], + ContentVariant1(string)[Messages, Message Batches], + ContentVariant2(array)[Messages, Message Batches], + BetaInputContentBlock(ref)[Messages, Message Batches], + BetaInputContentBlock(oneOf)[Messages, Message Batches], + BetaRequestTextBlock(ref)[Messages, Message Batches], + BetaRequestImageBlock(ref)[Messages, Message Batches], + BetaRequestToolUseBlock(ref)[Messages, Message Batches], + BetaRequestToolResultBlock(ref)[Messages, Message Batches], + BetaRequestPDFBlock(ref)[Messages, Message Batches], + BetaInputContentBlockDiscriminator(class)[Messages, Message Batches], + BetaInputContentBlockDiscriminatorType(enum)[Messages, Message Batches], + BetaRequestTextBlock(class)[Messages, Message Batches], + CacheControl_AllOf1Wrapped5(oneOf)[Messages, Message Batches], + BetaCacheControlEphemeral(ref)[Messages, Message Batches], + BetaRequestTextBlockCacheControlDiscriminator(class)[Messages, Message Batches], + BetaRequestTextBlockCacheControlDiscriminatorType(enum)[Messages, Message Batches], + BetaRequestTextBlockType(enum)[Messages, Message Batches], + Text(string)[Messages, Message Batches], + BetaRequestImageBlock(class)[Messages, Message Batches], + CacheControl_AllOf1Wrapped3(oneOf)[Messages, Message Batches], + BetaCacheControlEphemeral(ref)[Messages, Message Batches], + BetaRequestImageBlockCacheControlDiscriminator(class)[Messages, Message Batches], + BetaRequestImageBlockCacheControlDiscriminatorType(enum)[Messages, Message Batches], + BetaRequestImageBlockType(enum)[Messages, Message Batches], + Source_AllOf1Wrapped(oneOf)[Messages, Message Batches], + BetaBase64ImageSource(ref)[Messages, Message Batches], + BetaRequestImageBlockSourceDiscriminator(class)[Messages, Message Batches], + BetaRequestImageBlockSourceDiscriminatorType(enum)[Messages, Message Batches], + BetaRequestToolUseBlock(class)[Messages, Message Batches], + CacheControl_AllOf1Wrapped7(oneOf)[Messages, Message Batches], + BetaCacheControlEphemeral(ref)[Messages, Message Batches], + BetaRequestToolUseBlockCacheControlDiscriminator(class)[Messages, Message Batches], + BetaRequestToolUseBlockCacheControlDiscriminatorType(enum)[Messages, Message Batches], + BetaRequestToolUseBlockType(enum)[Messages, Message Batches], + Id(string)[Messages, Message Batches], + Name(string)[Messages, Message Batches], + BetaRequestToolUseBlockInput(class)[Messages, Message Batches], + BetaRequestToolResultBlock(class)[Messages, Message Batches], + CacheControl_AllOf1Wrapped6(oneOf)[Messages, Message Batches], + BetaCacheControlEphemeral(ref)[Messages, Message Batches], + BetaRequestToolResultBlockCacheControlDiscriminator(class)[Messages, Message Batches], + BetaRequestToolResultBlockCacheControlDiscriminatorType(enum)[Messages, Message Batches], + BetaRequestToolResultBlockType(enum)[Messages, Message Batches], + ToolUseId(string)[Messages, Message Batches], + IsError(bool)[Messages, Message Batches], + Content2(anyOf)[Messages, Message Batches], + ContentVariant1(string)[Messages, Message Batches], + ContentVariant2(array)[Messages, Message Batches], + ContentVariant2Item(oneOf)[Messages, Message Batches], + BetaRequestTextBlock(ref)[Messages, Message Batches], + BetaRequestImageBlock(ref)[Messages, Message Batches], + BetaRequestToolResultBlockContentVariant2ItemDiscriminator(class)[Messages, Message Batches], + BetaRequestToolResultBlockContentVariant2ItemDiscriminatorType(enum)[Messages, Message Batches], + BetaRequestPDFBlock(class)[Messages, Message Batches], + CacheControl_AllOf1Wrapped4(oneOf)[Messages, Message Batches], + BetaCacheControlEphemeral(ref)[Messages, Message Batches], + BetaRequestPDFBlockCacheControlDiscriminator(class)[Messages, Message Batches], + BetaRequestPDFBlockCacheControlDiscriminatorType(enum)[Messages, Message Batches], + BetaRequestPDFBlockType(enum)[Messages, Message Batches], + BetaBase64PDFSource(ref)[Messages, Message Batches], + Model(anyOf)[Messages, Text Completions, Message Batches], + ModelVariant1(string)[Messages, Text Completions, Message Batches], + ModelEnum(enum)[Messages, Text Completions, Message Batches], + BetaCountMessageTokensResponse(class)[Messages], + InputTokens(int)[Messages], + BetaCreateMessageBatchParams(class)[Message Batches], + Requests(array)[Message Batches], + BetaMessageBatchIndividualRequestParams(ref)[Message Batches], + BetaMessageBatchIndividualRequestParams(class)[Message Batches], + CustomId(string)[Message Batches], + Params_AllOf1Wrapped(allOf)[Message Batches], + BetaCreateMessageParams(ref)[Message Batches], + BetaCreateMessageParams(class)[Messages, Message Batches], + Model(ref)[Messages, Message Batches], + Messages(array)[Messages, Message Batches], + BetaInputMessage(ref)[Messages, Message Batches], + MaxTokens(int)[Messages, Message Batches], + Metadata_AllOf1Wrapped(allOf)[Messages, Message Batches], + BetaMetadata(ref)[Messages, Message Batches], + StopSequences(array)[Messages, Message Batches], + StopSequencesItem(string)[Messages, Message Batches], + Stream(bool)[Messages, Message Batches], + System2(anyOf)[Messages, Message Batches], + SystemVariant1(string)[Messages, Message Batches], + SystemVariant2(array)[Messages, Message Batches], + BetaRequestTextBlock(ref)[Messages, Message Batches], + Temperature(double)[Messages, Message Batches], + BetaToolChoice(ref)[Messages, Message Batches], + Tools(array)[Messages, Message Batches], + ToolsItem2(oneOf)[Messages, Message Batches], + BetaTool(ref)[Messages, Message Batches], + BetaComputerUseTool20241022(ref)[Messages, Message Batches], + BetaBashTool20241022(ref)[Messages, Message Batches], + BetaTextEditor20241022(ref)[Messages, Message Batches], + BetaCreateMessageParamsToolDiscriminator(class)[Messages, Message Batches], + BetaCreateMessageParamsToolDiscriminatorType(enum)[Messages, Message Batches], + TopK(int)[Messages, Message Batches], + TopP(double)[Messages, Message Batches], + BetaMetadata(class)[Messages, Message Batches], + UserId(string)[Messages, Message Batches], + BetaErrorResponse(class)[Messages, Message Batches], + BetaErrorResponseType(enum)[Messages, Message Batches], + Error(oneOf)[Messages, Message Batches], + BetaInvalidRequestError(ref)[Messages, Message Batches], + BetaAuthenticationError(ref)[Messages, Message Batches], + BetaPermissionError(ref)[Messages, Message Batches], + BetaNotFoundError(ref)[Messages, Message Batches], + BetaRateLimitError(ref)[Messages, Message Batches], + BetaAPIError(ref)[Messages, Message Batches], + BetaOverloadedError(ref)[Messages, Message Batches], + BetaErrorResponseErrorDiscriminator(class)[Messages, Message Batches], + BetaErrorResponseErrorDiscriminatorType(enum)[Messages, Message Batches], + BetaInvalidRequestError(class)[Messages, Message Batches], + BetaInvalidRequestErrorType(enum)[Messages, Message Batches], + Message(string)[Messages, Message Batches], + BetaPermissionError(class)[Messages, Message Batches], + BetaPermissionErrorType(enum)[Messages, Message Batches], + Message(string)[Messages, Message Batches], + BetaNotFoundError(class)[Messages, Message Batches], + BetaNotFoundErrorType(enum)[Messages, Message Batches], + Message(string)[Messages, Message Batches], + BetaRateLimitError(class)[Messages, Message Batches], + BetaRateLimitErrorType(enum)[Messages, Message Batches], + Message(string)[Messages, Message Batches], + BetaOverloadedError(class)[Messages, Message Batches], + BetaOverloadedErrorType(enum)[Messages, Message Batches], + Message(string)[Messages, Message Batches], + BetaErroredResult(class)[], + BetaErroredResultType(enum)[], + BetaErrorResponse(ref)[], + BetaExpiredResult(class)[], + BetaExpiredResultType(enum)[], + BetaListResponseMessageBatch(class)[Message Batches], + Data(array)[Message Batches], + BetaMessageBatch(ref)[Message Batches], + HasMore(bool)[Message Batches], + FirstId(string)[Message Batches], + LastId(string)[Message Batches], + BetaMessageBatch(class)[Message Batches], + Id(string)[Message Batches], + BetaMessageBatchType(enum)[Message Batches], + BetaMessageBatchProcessingStatus(enum)[Message Batches], + RequestCounts_AllOf1Wrapped(allOf)[Message Batches], + BetaRequestCounts(ref)[Message Batches], + EndedAt(DateTime)[Message Batches], + CreatedAt(DateTime)[Message Batches], + ExpiresAt(DateTime)[Message Batches], + ArchivedAt(DateTime)[Message Batches], + CancelInitiatedAt(DateTime)[Message Batches], + ResultsUrl(string)[Message Batches], + BetaRequestCounts(class)[Message Batches], + Processing(int)[Message Batches], + Succeeded(int)[Message Batches], + Errored(int)[Message Batches], + Canceled(int)[Message Batches], + Expired(int)[Message Batches], + BetaMessage(class)[Messages], + Id(string)[Messages], + BetaMessageType(enum)[Messages], + BetaMessageRole(enum)[Messages], + Content(array)[Messages], + BetaContentBlock(ref)[Messages], + Model(ref)[Messages], + BetaMessageStopReason(enum)[Messages], + StopSequence(string)[Messages], + Usage_AllOf1Wrapped(allOf)[Messages], + BetaUsage(ref)[Messages], + BetaContentBlock(oneOf)[Messages], + BetaResponseTextBlock(ref)[Messages], + BetaResponseToolUseBlock(ref)[Messages], + BetaContentBlockDiscriminator(class)[Messages], + BetaContentBlockDiscriminatorType(enum)[Messages], + BetaUsage(class)[Messages], + InputTokens(int)[Messages], + CacheCreationInputTokens(int)[Messages], + CacheReadInputTokens(int)[Messages], + OutputTokens(int)[Messages], + BetaMessageBatchIndividualResponse(class)[], + CustomId(string)[], + BetaMessageBatchResult(ref)[], + BetaMessageBatchResult(oneOf)[], + BetaSucceededResult(ref)[], + BetaErroredResult(ref)[], + BetaCanceledResult(ref)[], + BetaExpiredResult(ref)[], + BetaMessageBatchResultDiscriminator(class)[], + BetaMessageBatchResultDiscriminatorType(enum)[], + BetaSucceededResult(class)[], + BetaSucceededResultType(enum)[], + BetaMessage(ref)[], + BetaMessageDelta(class)[], + BetaMessageDeltaStopReason(enum)[], + StopSequence(string)[], + BetaMessageDeltaEvent(class)[], + BetaMessageDeltaEventType(enum)[], + BetaMessageDelta(ref)[], + Usage_AllOf1Wrapped2(allOf)[], + BetaMessageDeltaUsage(ref)[], + BetaMessageDeltaUsage(class)[], + OutputTokens(int)[], + BetaMessageStartEvent(class)[], + BetaMessageStartEventType(enum)[], + BetaMessage(ref)[], + BetaMessageStopEvent(class)[], + BetaMessageStopEventType(enum)[], + BetaMessageStreamEvent(oneOf)[], + BetaMessageStartEvent(ref)[], + BetaMessageDeltaEvent(ref)[], + BetaMessageStopEvent(ref)[], + BetaContentBlockStartEvent(ref)[], + BetaContentBlockDeltaEvent(ref)[], + BetaContentBlockStopEvent(ref)[], + BetaMessageStreamEventDiscriminator(class)[], + BetaMessageStreamEventDiscriminatorType(enum)[], + CacheControlEphemeral(class)[Messages], + CacheControlEphemeralType(enum)[Messages], + CompletionRequest(class)[Text Completions], + Model(ref)[Text Completions], + Prompt(string)[Text Completions], + MaxTokensToSample(int)[Text Completions], + StopSequences(array)[Text Completions], + StopSequencesItem(string)[Text Completions], + Temperature(double)[Text Completions], + TopP(double)[Text Completions], + TopK(int)[Text Completions], + Metadata_AllOf1Wrapped2(allOf)[Text Completions], + Metadata(ref)[Text Completions], + Stream(bool)[Text Completions], + Metadata(class)[Messages, Text Completions], + UserId(string)[Messages, Text Completions], + CompletionResponse(class)[Text Completions], + CompletionResponseType(enum)[Text Completions], + Id(string)[Text Completions], + Completion(string)[Text Completions], + StopReason(string)[Text Completions], + Model(ref)[Text Completions], + ContentBlockDeltaEvent(class)[], + ContentBlockDeltaEventType(enum)[], + Index(int)[], + Delta2(oneOf)[], + TextContentBlockDelta(ref)[], + InputJsonContentBlockDelta(ref)[], + ContentBlockDeltaEventDeltaDiscriminator(class)[], + ContentBlockDeltaEventDeltaDiscriminatorType(enum)[], + TextContentBlockDelta(class)[], + TextContentBlockDeltaType(enum)[], + Text(string)[], + InputJsonContentBlockDelta(class)[], + InputJsonContentBlockDeltaType(enum)[], + PartialJson(string)[], + ContentBlockStartEvent(class)[], + ContentBlockStartEventType(enum)[], + Index(int)[], + ContentBlock2(oneOf)[], + ResponseTextBlock(ref)[], + ResponseToolUseBlock(ref)[], + ContentBlockStartEventContentBlockDiscriminator(class)[], + ContentBlockStartEventContentBlockDiscriminatorType(enum)[], + ResponseTextBlock(class)[Messages], + ResponseTextBlockType(enum)[Messages], + Text(string)[Messages], + ResponseToolUseBlock(class)[Messages], + ResponseToolUseBlockType(enum)[Messages], + Id(string)[Messages], + Name(string)[Messages], + ResponseToolUseBlockInput(class)[Messages], + ContentBlockStopEvent(class)[], + ContentBlockStopEventType(enum)[], + Index(int)[], + CreateMessageParams(class)[Messages], + Model(ref)[Messages], + Messages(array)[Messages], + InputMessage(ref)[Messages], MaxTokens(int)[Messages], - CreateMessageRequestMetadata(ref)[Messages], + Metadata_AllOf1Wrapped3(allOf)[Messages], + Metadata(ref)[Messages], StopSequences(array)[Messages], StopSequencesItem(string)[Messages], - System(string)[Messages], + Stream(bool)[Messages], + System3(anyOf)[Messages], SystemVariant1(string)[Messages], SystemVariant2(array)[Messages], - Block(ref)[Messages], + RequestTextBlock(ref)[Messages], Temperature(double)[Messages], ToolChoice(ref)[Messages], Tools(array)[Messages], Tool(ref)[Messages], TopK(int)[Messages], TopP(double)[Messages], - Stream(bool)[Messages], - Message(class)[Messages], - Id(string)[Messages], - Content(oneOf)[Messages], + InputMessage(class)[Messages], + InputMessageRole(enum)[Messages], + Content3(anyOf)[Messages], ContentVariant1(string)[Messages], ContentVariant2(array)[Messages], - Block(ref)[Messages], - MessageRole(ref)[Messages], - Model(string)[Messages], - StopReason(ref)[Messages], - StopSequence(string)[Messages], - Type(string)[Messages], - Usage(ref)[Messages], - Block(oneOf)[Messages], - TextBlock(ref)[Messages], - ImageBlock(ref)[Messages], - ToolUseBlock(ref)[Messages], - ToolResultBlock(ref)[Messages], - BlockDiscriminator(class)[Messages], - BlockDiscriminatorType(enum)[Messages], - TextBlock(class)[Messages], + ContentVariant2Item2(oneOf)[Messages], + RequestTextBlock(ref)[Messages], + RequestImageBlock(ref)[Messages], + RequestToolUseBlock(ref)[Messages], + RequestToolResultBlock(ref)[Messages], + InputMessageContentVariant2ItemDiscriminator(class)[Messages], + InputMessageContentVariant2ItemDiscriminatorType(enum)[Messages], + RequestTextBlock(class)[Messages], + RequestTextBlockType(enum)[Messages], Text(string)[Messages], - Type(string)[Messages], - CacheControlEphemeral(ref)[Messages], - CacheControlEphemeral(class)[Messages], - CacheControlEphemeralType(enum)[Messages], - ImageBlock(class)[Messages], - ImageBlockSource(ref)[Messages], - Type(string)[Messages], - CacheControlEphemeral(ref)[Messages], - ImageBlockSource(class)[Messages], - Data(string)[Messages], - ImageBlockSourceMediaType(enum)[Messages], - ImageBlockSourceType(enum)[Messages], - ToolUseBlock(class)[Messages], + RequestImageBlock(class)[Messages], + RequestImageBlockType(enum)[Messages], + Source_AllOf1Wrapped3(oneOf)[Messages], + Base64ImageSource(ref)[Messages], + RequestImageBlockSourceDiscriminator(class)[Messages], + RequestImageBlockSourceDiscriminatorType(enum)[Messages], + RequestToolUseBlock(class)[Messages], + RequestToolUseBlockType(enum)[Messages], Id(string)[Messages], Name(string)[Messages], - ToolUseBlockInput(class)[Messages], - Type(string)[Messages], - CacheControlEphemeral(ref)[Messages], - ToolResultBlock(class)[Messages], + RequestToolUseBlockInput(class)[Messages], + RequestToolResultBlock(class)[Messages], + RequestToolResultBlockType(enum)[Messages], ToolUseId(string)[Messages], - Content2(oneOf)[Messages], + IsError(bool)[Messages], + Content6(anyOf)[Messages], ContentVariant1(string)[Messages], ContentVariant2(array)[Messages], - Block(ref)[Messages], - IsError(bool)[Messages], - Type(string)[Messages], - CacheControlEphemeral(ref)[Messages], - MessageRole(enum)[Messages], - StopReason(enum)[Messages], - Usage(class)[Messages], - InputTokens(int)[Messages], - OutputTokens(int)[Messages], - CacheCreationInputTokens(int)[Messages], - CacheReadInputTokens(int)[Messages], - CreateMessageRequestMetadata(class)[Messages], - UserId(string)[Messages], - ToolChoice(class)[Messages], - ToolChoiceType(ref)[Messages], - Name(string)[Messages], + ContentVariant2Item5(oneOf)[Messages], + RequestTextBlock(ref)[Messages], + RequestImageBlock(ref)[Messages], + RequestToolResultBlockContentVariant2ItemDiscriminator(class)[Messages], + RequestToolResultBlockContentVariant2ItemDiscriminatorType(enum)[Messages], + ToolChoice(oneOf)[Messages], + ToolChoiceAuto(ref)[Messages], + ToolChoiceAny(ref)[Messages], + ToolChoiceTool(ref)[Messages], + ToolChoiceDiscriminator(class)[Messages], + ToolChoiceDiscriminatorType(enum)[Messages], + ToolChoiceAuto(class)[Messages], + ToolChoiceAutoType(enum)[Messages], DisableParallelToolUse(bool)[Messages], - ToolChoiceType(enum)[Messages], - Tool(oneOf)[Messages], - ToolCustom(ref)[Messages], - ToolComputerUse(ref)[Messages], - ToolTextEditor(ref)[Messages], - ToolBash(ref)[Messages], - ToolDiscriminator(class)[Messages], - Type(string)[Messages], - ToolCustom(class)[Messages], - Type(string)[Messages], + ToolChoiceAny(class)[Messages], + ToolChoiceAnyType(enum)[Messages], + DisableParallelToolUse(bool)[Messages], + ToolChoiceTool(class)[Messages], + ToolChoiceToolType(enum)[Messages], Name(string)[Messages], + DisableParallelToolUse(bool)[Messages], + Tool(class)[Messages], Description(string)[Messages], - ToolCustomInputSchema(class)[Messages], - ToolComputerUse(class)[Messages], - Type(string)[Messages], - Name(string)[Messages], - CacheControlEphemeral(ref)[Messages], - DisplayWidthPx(int)[Messages], - DisplayHeightPx(int)[Messages], - DisplayNumber(int)[Messages], - ToolTextEditor(class)[Messages], - Type(string)[Messages], Name(string)[Messages], - CacheControlEphemeral(ref)[Messages], - ToolBash(class)[Messages], - Type(string)[Messages], - Name(string)[Messages], - CacheControlEphemeral(ref)[Messages], - CreateMessageBatchRequest(class)[Messages], - Requests(array)[Messages], - BatchMessageRequest(ref)[Messages], - BatchMessageRequest(class)[Messages], - CustomId(string)[Messages], - CreateMessageRequest(ref)[Messages], - MessageBatch(class)[Messages], + InputSchema_AllOf1Wrapped3(allOf)[Messages], + InputSchema(ref)[Messages], + InputSchema(class)[Messages], + InputSchemaType(enum)[Messages], + InputSchemaProperties(class)[Messages], + ErrorResponse(class)[Messages, Text Completions], + ErrorResponseType(enum)[Messages, Text Completions], + Error2(oneOf)[Messages, Text Completions], + InvalidRequestError(ref)[Messages, Text Completions], + AuthenticationError(ref)[Messages, Text Completions], + PermissionError(ref)[Messages, Text Completions], + NotFoundError(ref)[Messages, Text Completions], + RateLimitError(ref)[Messages, Text Completions], + APIError(ref)[Messages, Text Completions], + OverloadedError(ref)[Messages, Text Completions], + ErrorResponseErrorDiscriminator(class)[Messages, Text Completions], + ErrorResponseErrorDiscriminatorType(enum)[Messages, Text Completions], + InvalidRequestError(class)[Messages, Text Completions], + InvalidRequestErrorType(enum)[Messages, Text Completions], + Message(string)[Messages, Text Completions], + PermissionError(class)[Messages, Text Completions], + PermissionErrorType(enum)[Messages, Text Completions], + Message(string)[Messages, Text Completions], + NotFoundError(class)[Messages, Text Completions], + NotFoundErrorType(enum)[Messages, Text Completions], + Message(string)[Messages, Text Completions], + RateLimitError(class)[Messages, Text Completions], + RateLimitErrorType(enum)[Messages, Text Completions], + Message(string)[Messages, Text Completions], + OverloadedError(class)[Messages, Text Completions], + OverloadedErrorType(enum)[Messages, Text Completions], + Message(string)[Messages, Text Completions], + Message(class)[Messages], Id(string)[Messages], - CreatedAt(DateTime)[Messages], - ExpiresAt(DateTime)[Messages], - MessageBatchProcessingStatus(enum)[Messages], - MessageBatchRequestCounts(ref)[Messages], - ResultsUrl(string)[Messages], - MessageBatchType(enum)[Messages], - MessageBatchRequestCounts(class)[Messages], - Processing(int)[Messages], - Succeeded(int)[Messages], - Errored(int)[Messages], - Canceled(int)[Messages], - Expired(int)[Messages], - MessageStreamEvent(class)[], + MessageType(enum)[Messages], + MessageRole(enum)[Messages], + Content(array)[Messages], + ContentBlock3(ref)[Messages], + Model(ref)[Messages], + MessageStopReason(enum)[Messages], + StopSequence(string)[Messages], + Usage_AllOf1Wrapped3(allOf)[Messages], + Usage(ref)[Messages], + ContentBlock3(oneOf)[Messages], + ResponseTextBlock(ref)[Messages], + ResponseToolUseBlock(ref)[Messages], + ContentBlockDiscriminator(class)[Messages], + ContentBlockDiscriminatorType(enum)[Messages], + Usage(class)[Messages], + InputTokens(int)[Messages], + OutputTokens(int)[Messages], + MessageDelta(class)[], + MessageDeltaStopReason(enum)[], + StopSequence(string)[], + MessageDeltaEvent(class)[], + MessageDeltaEventType(enum)[], + MessageDelta(ref)[], + Usage_AllOf1Wrapped4(allOf)[], + MessageDeltaUsage(ref)[], + MessageDeltaUsage(class)[], + OutputTokens(int)[], + MessageStartEvent(class)[], + MessageStartEventType(enum)[], + Message(ref)[], + MessageStopEvent(class)[], + MessageStopEventType(enum)[], + MessageStreamEvent(oneOf)[], MessageStartEvent(ref)[], MessageDeltaEvent(ref)[], MessageStopEvent(ref)[], ContentBlockStartEvent(ref)[], ContentBlockDeltaEvent(ref)[], ContentBlockStopEvent(ref)[], - PingEvent(ref)[], - ErrorEvent(ref)[], MessageStreamEventDiscriminator(class)[], MessageStreamEventDiscriminatorType(enum)[], - MessageStartEvent(class)[], - Message(ref)[], - MessageStreamEventType(ref)[], - MessageStreamEventType(enum)[], - MessageDeltaEvent(class)[], - MessageDelta(ref)[], - MessageStreamEventType(ref)[], - MessageDeltaUsage(ref)[], - MessageDelta(class)[], - StopReason(ref)[], - StopSequence(string)[], - MessageDeltaUsage(class)[], - OutputTokens(int)[], - MessageStopEvent(class)[], - MessageStreamEventType(ref)[], - ContentBlockStartEvent(class)[], - Block(ref)[], - Index(int)[], - MessageStreamEventType(ref)[], - ContentBlockDeltaEvent(class)[], - BlockDelta(ref)[], - Index(int)[], - MessageStreamEventType(ref)[], - BlockDelta(oneOf)[], - TextBlockDelta(ref)[], - InputJsonBlockDelta(ref)[], - BlockDeltaDiscriminator(class)[], - BlockDeltaDiscriminatorType(enum)[], - TextBlockDelta(class)[], - Text(string)[], - Type(string)[], - InputJsonBlockDelta(class)[], - PartialJson(string)[], - Type(string)[], - ContentBlockStopEvent(class)[], - Index(int)[], - MessageStreamEventType(ref)[], - PingEvent(class)[], - MessageStreamEventType(ref)[], - ErrorEvent(class)[], - MessageStreamEventType(ref)[], - Error(ref)[], - Error(class)[], - Type(string)[], - Message(string)[], - CreateMessageRequest(ref)[Messages], - CreateMessageBatchRequest(ref)[Messages], - RetrieveMessageBatchId(string)[Messages], + PromptCachingBetaCreateMessageParams(class)[Messages], + Model(ref)[Messages], + Messages(array)[Messages], + PromptCachingBetaInputMessage(ref)[Messages], + MaxTokens(int)[Messages], + Metadata_AllOf1Wrapped4(allOf)[Messages], + Metadata(ref)[Messages], + StopSequences(array)[Messages], + StopSequencesItem(string)[Messages], + Stream(bool)[Messages], + System4(anyOf)[Messages], + SystemVariant1(string)[Messages], + SystemVariant2(array)[Messages], + PromptCachingBetaRequestTextBlock(ref)[Messages], + Temperature(double)[Messages], + ToolChoice(ref)[Messages], + Tools(array)[Messages], + PromptCachingBetaTool(ref)[Messages], + TopK(int)[Messages], + TopP(double)[Messages], + PromptCachingBetaInputMessage(class)[Messages], + PromptCachingBetaInputMessageRole(enum)[Messages], + Content4(anyOf)[Messages], + ContentVariant1(string)[Messages], + ContentVariant2(array)[Messages], + ContentVariant2Item3(oneOf)[Messages], + PromptCachingBetaRequestTextBlock(ref)[Messages], + PromptCachingBetaRequestImageBlock(ref)[Messages], + PromptCachingBetaRequestToolUseBlock(ref)[Messages], + PromptCachingBetaRequestToolResultBlock(ref)[Messages], + PromptCachingBetaInputMessageContentVariant2ItemDiscriminator(class)[Messages], + PromptCachingBetaInputMessageContentVariant2ItemDiscriminatorType(enum)[Messages], + PromptCachingBetaRequestTextBlock(class)[Messages], + CacheControl_AllOf1Wrapped11(oneOf)[Messages], + CacheControlEphemeral(ref)[Messages], + PromptCachingBetaRequestTextBlockCacheControlDiscriminator(class)[Messages], + PromptCachingBetaRequestTextBlockCacheControlDiscriminatorType(enum)[Messages], + PromptCachingBetaRequestTextBlockType(enum)[Messages], + Text(string)[Messages], + PromptCachingBetaRequestImageBlock(class)[Messages], + CacheControl_AllOf1Wrapped10(oneOf)[Messages], + CacheControlEphemeral(ref)[Messages], + PromptCachingBetaRequestImageBlockCacheControlDiscriminator(class)[Messages], + PromptCachingBetaRequestImageBlockCacheControlDiscriminatorType(enum)[Messages], + PromptCachingBetaRequestImageBlockType(enum)[Messages], + Source_AllOf1Wrapped2(oneOf)[Messages], + Base64ImageSource(ref)[Messages], + PromptCachingBetaRequestImageBlockSourceDiscriminator(class)[Messages], + PromptCachingBetaRequestImageBlockSourceDiscriminatorType(enum)[Messages], + PromptCachingBetaRequestToolUseBlock(class)[Messages], + CacheControl_AllOf1Wrapped13(oneOf)[Messages], + CacheControlEphemeral(ref)[Messages], + PromptCachingBetaRequestToolUseBlockCacheControlDiscriminator(class)[Messages], + PromptCachingBetaRequestToolUseBlockCacheControlDiscriminatorType(enum)[Messages], + PromptCachingBetaRequestToolUseBlockType(enum)[Messages], + Id(string)[Messages], + Name(string)[Messages], + PromptCachingBetaRequestToolUseBlockInput(class)[Messages], + PromptCachingBetaRequestToolResultBlock(class)[Messages], + CacheControl_AllOf1Wrapped12(oneOf)[Messages], + CacheControlEphemeral(ref)[Messages], + PromptCachingBetaRequestToolResultBlockCacheControlDiscriminator(class)[Messages], + PromptCachingBetaRequestToolResultBlockCacheControlDiscriminatorType(enum)[Messages], + PromptCachingBetaRequestToolResultBlockType(enum)[Messages], + ToolUseId(string)[Messages], + IsError(bool)[Messages], + Content5(anyOf)[Messages], + ContentVariant1(string)[Messages], + ContentVariant2(array)[Messages], + ContentVariant2Item4(oneOf)[Messages], + PromptCachingBetaRequestTextBlock(ref)[Messages], + PromptCachingBetaRequestImageBlock(ref)[Messages], + PromptCachingBetaRequestToolResultBlockContentVariant2ItemDiscriminator(class)[Messages], + PromptCachingBetaRequestToolResultBlockContentVariant2ItemDiscriminatorType(enum)[Messages], + PromptCachingBetaTool(class)[Messages], + Description(string)[Messages], + Name(string)[Messages], + InputSchema_AllOf1Wrapped2(allOf)[Messages], + InputSchema(ref)[Messages], + CacheControl_AllOf1Wrapped14(oneOf)[Messages], + CacheControlEphemeral(ref)[Messages], + PromptCachingBetaToolCacheControlDiscriminator(class)[Messages], + PromptCachingBetaToolCacheControlDiscriminatorType(enum)[Messages], + PromptCachingBetaMessage(class)[Messages], + Id(string)[Messages], + PromptCachingBetaMessageType(enum)[Messages], + PromptCachingBetaMessageRole(enum)[Messages], + Content(array)[Messages], + ContentBlock3(ref)[Messages], + Model(ref)[Messages], + PromptCachingBetaMessageStopReason(enum)[Messages], + StopSequence(string)[Messages], + Usage_AllOf1Wrapped5(allOf)[Messages], + PromptCachingBetaUsage(ref)[Messages], + PromptCachingBetaUsage(class)[Messages], + InputTokens(int)[Messages], + CacheCreationInputTokens(int)[Messages], + CacheReadInputTokens(int)[Messages], + OutputTokens(int)[Messages], + PromptCachingBetaMessageStartEvent(class)[], + PromptCachingBetaMessageStartEventType(enum)[], + PromptCachingBetaMessage(ref)[], + PromptCachingBetaMessageStreamEvent(oneOf)[], + PromptCachingBetaMessageStartEvent(ref)[], + MessageDeltaEvent(ref)[], + MessageStopEvent(ref)[], + ContentBlockStartEvent(ref)[], + ContentBlockDeltaEvent(ref)[], + ContentBlockStopEvent(ref)[], + PromptCachingBetaMessageStreamEventDiscriminator(class)[], + PromptCachingBetaMessageStreamEventDiscriminatorType(enum)[], + CreateMessageParamsWithoutStream(class)[], + Model(ref)[], + Messages(array)[], + InputMessage(ref)[], + MaxTokens(int)[], + Metadata_AllOf1Wrapped5(allOf)[], + Metadata(ref)[], + StopSequences(array)[], + StopSequencesItem(string)[], + System5(anyOf)[], + SystemVariant1(string)[], + SystemVariant2(array)[], + RequestTextBlock(ref)[], + Temperature(double)[], + ToolChoice(ref)[], + Tools(array)[], + Tool(ref)[], + TopK(int)[], + TopP(double)[], + AnthropicBeta(anyOf)[], + AnthropicBetaVariant1(string)[], + AnthropicBetaEnum(enum)[], + CreateMessageParams(ref)[Messages], + CompletionRequest(ref)[Text Completions], + BetaCreateMessageParams(ref)[Messages], + BetaCreateMessageBatchParams(ref)[Message Batches], + BetaCountMessageTokensParams(ref)[Messages], + PromptCachingBetaCreateMessageParams(ref)[Messages], + BetaCreateMessageBatchParams(ref)[Message Batches], + BetaCountMessageTokensParams(ref)[Messages], + MessagesPostAnthropicVersion(string)[Messages], + CompletePostAnthropicVersion(string)[Text Completions], + BetaMessagesPostAnthropicBeta(string)[Messages], + BetaMessagesPostAnthropicBetaItem(string)[Messages], + BetaMessagesPostAnthropicVersion(string)[Messages], + BetaMessageBatchesPostAnthropicBeta(string)[Message Batches], + BetaMessageBatchesPostAnthropicBetaItem(string)[Message Batches], + BetaMessageBatchesPostAnthropicVersion(string)[Message Batches], + BetaMessageBatchesListBeforeId(string)[Message Batches], + BetaMessageBatchesListAfterId(string)[Message Batches], + BetaMessageBatchesListLimit(int)[Message Batches], + BetaMessageBatchesListAnthropicBeta(string)[Message Batches], + BetaMessageBatchesListAnthropicBetaItem(string)[Message Batches], + BetaMessageBatchesListAnthropicVersion(string)[Message Batches], + BetaMessageBatchesListXApiKey(string)[Message Batches], + BetaMessageBatchesRetrieveMessageBatchId(string)[Message Batches], + BetaMessageBatchesRetrieveAnthropicBeta(string)[Message Batches], + BetaMessageBatchesRetrieveAnthropicBetaItem(string)[Message Batches], + BetaMessageBatchesRetrieveAnthropicVersion(string)[Message Batches], + BetaMessageBatchesRetrieveXApiKey(string)[Message Batches], + BetaMessageBatchesCancelMessageBatchId(string)[Message Batches], + BetaMessageBatchesCancelAnthropicBeta(string)[Message Batches], + BetaMessageBatchesCancelAnthropicBetaItem(string)[Message Batches], + BetaMessageBatchesCancelAnthropicVersion(string)[Message Batches], + BetaMessageBatchesResultsMessageBatchId(string)[Message Batches], + BetaMessageBatchesResultsAnthropicBeta(string)[Message Batches], + BetaMessageBatchesResultsAnthropicBetaItem(string)[Message Batches], + BetaMessageBatchesResultsAnthropicVersion(string)[Message Batches], + BetaMessageBatchesResultsXApiKey(string)[Message Batches], + BetaMessagesCountTokensPostAnthropicBeta(string)[Messages], + BetaMessagesCountTokensPostAnthropicBetaItem(string)[Messages], + BetaMessagesCountTokensPostAnthropicVersion(string)[Messages], + PromptCachingBetaMessagesPostAnthropicBeta(string)[Messages], + PromptCachingBetaMessagesPostAnthropicBetaItem(string)[Messages], + PromptCachingBetaMessagesPostAnthropicVersion(string)[Messages], + BetaMessageBatchesPostAnthropicBeta(string)[Message Batches], + BetaMessageBatchesPostAnthropicBetaItem(string)[Message Batches], + BetaMessageBatchesPostAnthropicVersion(string)[Message Batches], + BetaMessageBatchesListBeforeId(string)[Message Batches], + BetaMessageBatchesListAfterId(string)[Message Batches], + BetaMessageBatchesListLimit(int)[Message Batches], + BetaMessageBatchesListAnthropicBeta(string)[Message Batches], + BetaMessageBatchesListAnthropicBetaItem(string)[Message Batches], + BetaMessageBatchesListAnthropicVersion(string)[Message Batches], + BetaMessageBatchesListXApiKey(string)[Message Batches], + BetaMessageBatchesRetrieveMessageBatchId(string)[Message Batches], + BetaMessageBatchesRetrieveAnthropicBeta(string)[Message Batches], + BetaMessageBatchesRetrieveAnthropicBetaItem(string)[Message Batches], + BetaMessageBatchesRetrieveAnthropicVersion(string)[Message Batches], + BetaMessageBatchesRetrieveXApiKey(string)[Message Batches], + BetaMessageBatchesCancelMessageBatchId(string)[Message Batches], + BetaMessageBatchesCancelAnthropicBeta(string)[Message Batches], + BetaMessageBatchesCancelAnthropicBetaItem(string)[Message Batches], + BetaMessageBatchesCancelAnthropicVersion(string)[Message Batches], + BetaMessageBatchesResultsMessageBatchId(string)[Message Batches], + BetaMessageBatchesResultsAnthropicBeta(string)[Message Batches], + BetaMessageBatchesResultsAnthropicBetaItem(string)[Message Batches], + BetaMessageBatchesResultsAnthropicVersion(string)[Message Batches], + BetaMessageBatchesResultsXApiKey(string)[Message Batches], + BetaMessagesCountTokensPostAnthropicBeta(string)[Messages], + BetaMessagesCountTokensPostAnthropicBetaItem(string)[Messages], + BetaMessagesCountTokensPostAnthropicVersion(string)[Messages], Message(ref)[Messages], - MessageBatch(ref)[Messages], - MessageBatch(ref)[Messages] + ErrorResponse(ref)[Messages], + CompletionResponse(ref)[Text Completions], + ErrorResponse(ref)[Text Completions], + BetaMessage(ref)[Messages], + BetaErrorResponse(ref)[Messages], + BetaMessageBatch(ref)[Message Batches], + BetaErrorResponse(ref)[Message Batches], + BetaListResponseMessageBatch(ref)[Message Batches], + BetaErrorResponse(ref)[Message Batches], + BetaMessageBatch(ref)[Message Batches], + BetaErrorResponse(ref)[Message Batches], + BetaMessageBatch(ref)[Message Batches], + BetaErrorResponse(ref)[Message Batches], + BetaMessageBatchesResultsResponse(byte[])[Message Batches], + BetaErrorResponse(ref)[Message Batches], + BetaCountMessageTokensResponse(ref)[Messages], + BetaErrorResponse(ref)[Messages], + PromptCachingBetaMessage(ref)[Messages], + ErrorResponse(ref)[Messages], + BetaMessageBatch(ref)[Message Batches], + BetaErrorResponse(ref)[Message Batches], + BetaListResponseMessageBatch(ref)[Message Batches], + BetaErrorResponse(ref)[Message Batches], + BetaMessageBatch(ref)[Message Batches], + BetaErrorResponse(ref)[Message Batches], + BetaMessageBatch(ref)[Message Batches], + BetaErrorResponse(ref)[Message Batches], + BetaMessageBatchesResultsResponse(byte[])[Message Batches], + BetaErrorResponse(ref)[Message Batches], + BetaCountMessageTokensResponse(ref)[Messages], + BetaErrorResponse(ref)[Messages] ] \ No newline at end of file diff --git a/src/tests/AutoSDK.UnitTests/Snapshots/anthropic/Schemas/_.verified.txt b/src/tests/AutoSDK.UnitTests/Snapshots/anthropic/Schemas/_.verified.txt index f8509e776e..003bda5d46 100644 --- a/src/tests/AutoSDK.UnitTests/Snapshots/anthropic/Schemas/_.verified.txt +++ b/src/tests/AutoSDK.UnitTests/Snapshots/anthropic/Schemas/_.verified.txt @@ -1,194 +1,792 @@ [ - CreateMessageRequest(class), - Model(anyOf), - ModelVariant1(string), - CreateMessageRequestModel(enum), + APIError(class), + APIErrorType(enum), + Message(string), + AuthenticationError(class), + AuthenticationErrorType(enum), + Message(string), + Base64ImageSource(class), + Base64ImageSourceType(enum), + Base64ImageSourceMediaType(enum), + Data(byte), + BetaAPIError(class), + BetaAPIErrorType(enum), + Message(string), + BetaAuthenticationError(class), + BetaAuthenticationErrorType(enum), + Message(string), + BetaBase64ImageSource(class), + BetaBase64ImageSourceType(enum), + BetaBase64ImageSourceMediaType(enum), + Data(byte), + BetaBase64PDFSource(class), + BetaBase64PDFSourceType(enum), + BetaBase64PDFSourceMediaType(enum), + Data(byte), + BetaBashTool20241022(class), + CacheControl_AllOf1Wrapped(oneOf), + BetaCacheControlEphemeral(ref), + BetaBashTool20241022CacheControlDiscriminator(class), + BetaBashTool20241022CacheControlDiscriminatorType(enum), + BetaBashTool20241022Type(enum), + BetaBashTool20241022Name(enum), + BetaCacheControlEphemeral(class), + BetaCacheControlEphemeralType(enum), + BetaCanceledResult(class), + BetaCanceledResultType(enum), + BetaComputerUseTool20241022(class), + CacheControl_AllOf1Wrapped2(oneOf), + BetaCacheControlEphemeral(ref), + BetaComputerUseTool20241022CacheControlDiscriminator(class), + BetaComputerUseTool20241022CacheControlDiscriminatorType(enum), + BetaComputerUseTool20241022Type(enum), + BetaComputerUseTool20241022Name(enum), + DisplayHeightPx(int), + DisplayWidthPx(int), + DisplayNumber(int), + BetaContentBlockDeltaEvent(class), + BetaContentBlockDeltaEventType(enum), + Index(int), + Delta(oneOf), + BetaTextContentBlockDelta(ref), + BetaInputJsonContentBlockDelta(ref), + BetaContentBlockDeltaEventDeltaDiscriminator(class), + BetaContentBlockDeltaEventDeltaDiscriminatorType(enum), + BetaContentBlockStartEvent(class), + BetaContentBlockStartEventType(enum), + Index(int), + ContentBlock(oneOf), + BetaResponseTextBlock(ref), + BetaResponseToolUseBlock(ref), + BetaContentBlockStartEventContentBlockDiscriminator(class), + BetaContentBlockStartEventContentBlockDiscriminatorType(enum), + BetaContentBlockStopEvent(class), + BetaContentBlockStopEventType(enum), + Index(int), + BetaCountMessageTokensParams(class), + BetaToolChoice(ref), + Tools(array), + ToolsItem(oneOf), + BetaTool(ref), + BetaComputerUseTool20241022(ref), + BetaBashTool20241022(ref), + BetaTextEditor20241022(ref), + BetaCountMessageTokensParamsToolDiscriminator(class), + BetaCountMessageTokensParamsToolDiscriminatorType(enum), Messages(array), - Message(ref), + BetaInputMessage(ref), + System(anyOf), + SystemVariant1(string), + SystemVariant2(array), + BetaRequestTextBlock(ref), + Model(ref), + BetaCountMessageTokensResponse(class), + InputTokens(int), + BetaCreateMessageBatchParams(class), + Requests(array), + BetaMessageBatchIndividualRequestParams(ref), + BetaCreateMessageParams(class), + Model(ref), + Messages(array), + BetaInputMessage(ref), MaxTokens(int), - CreateMessageRequestMetadata(ref), + Metadata_AllOf1Wrapped(allOf), + BetaMetadata(ref), StopSequences(array), StopSequencesItem(string), - System(string), + Stream(bool), + System2(anyOf), SystemVariant1(string), SystemVariant2(array), - Block(ref), + BetaRequestTextBlock(ref), Temperature(double), - ToolChoice(ref), + BetaToolChoice(ref), Tools(array), - Tool(ref), + ToolsItem2(oneOf), + BetaTool(ref), + BetaComputerUseTool20241022(ref), + BetaBashTool20241022(ref), + BetaTextEditor20241022(ref), + BetaCreateMessageParamsToolDiscriminator(class), + BetaCreateMessageParamsToolDiscriminatorType(enum), TopK(int), TopP(double), - Stream(bool), - CreateMessageRequestMetadata(class), - UserId(string), - ToolChoice(class), - ToolChoiceType(ref), - Name(string), - DisableParallelToolUse(bool), - ToolChoiceType(enum), - Message(class), - Id(string), - Content(oneOf), + BetaErrorResponse(class), + BetaErrorResponseType(enum), + Error(oneOf), + BetaInvalidRequestError(ref), + BetaAuthenticationError(ref), + BetaPermissionError(ref), + BetaNotFoundError(ref), + BetaRateLimitError(ref), + BetaAPIError(ref), + BetaOverloadedError(ref), + BetaErrorResponseErrorDiscriminator(class), + BetaErrorResponseErrorDiscriminatorType(enum), + BetaErroredResult(class), + BetaErroredResultType(enum), + BetaErrorResponse(ref), + BetaExpiredResult(class), + BetaExpiredResultType(enum), + BetaInputJsonContentBlockDelta(class), + BetaInputJsonContentBlockDeltaType(enum), + PartialJson(string), + BetaInputMessage(class), + BetaInputMessageRole(enum), + Content(anyOf), ContentVariant1(string), ContentVariant2(array), - Block(ref), - MessageRole(ref), - Model(string), - StopReason(ref), - StopSequence(string), - Type(string), - Usage(ref), - MessageRole(enum), - Tool(oneOf), - ToolCustom(ref), - ToolComputerUse(ref), - ToolTextEditor(ref), - ToolBash(ref), - ToolDiscriminator(class), - Type(string), - ToolCustom(class), - Type(string), - Name(string), - Description(string), - ToolCustomInputSchema(class), - ToolComputerUse(class), - Type(string), - Name(string), - CacheControlEphemeral(ref), - DisplayWidthPx(int), - DisplayHeightPx(int), - DisplayNumber(int), - ToolTextEditor(class), - Type(string), - Name(string), - CacheControlEphemeral(ref), - ToolBash(class), - Type(string), - Name(string), - CacheControlEphemeral(ref), - Block(oneOf), - TextBlock(ref), - ImageBlock(ref), - ToolUseBlock(ref), - ToolResultBlock(ref), - BlockDiscriminator(class), - BlockDiscriminatorType(enum), - TextBlock(class), - Text(string), - Type(string), - CacheControlEphemeral(ref), - ImageBlock(class), - ImageBlockSource(ref), - Type(string), - CacheControlEphemeral(ref), - ImageBlockSource(class), - Data(string), - ImageBlockSourceMediaType(enum), - ImageBlockSourceType(enum), - ToolUseBlock(class), + BetaInputContentBlock(ref), + BetaInputSchema(class), + BetaInputSchemaType(enum), + BetaInputSchemaProperties(class), + BetaInvalidRequestError(class), + BetaInvalidRequestErrorType(enum), + Message(string), + BetaListResponseMessageBatch(class), + Data(array), + BetaMessageBatch(ref), + HasMore(bool), + FirstId(string), + LastId(string), + BetaMessage(class), Id(string), - Name(string), - ToolUseBlockInput(class), - Type(string), - CacheControlEphemeral(ref), - ToolResultBlock(class), - ToolUseId(string), - Content2(oneOf), - ContentVariant1(string), - ContentVariant2(array), - Block(ref), - IsError(bool), - Type(string), - CacheControlEphemeral(ref), - CacheControlEphemeral(class), - CacheControlEphemeralType(enum), - StopReason(enum), - Usage(class), - InputTokens(int), - OutputTokens(int), - CacheCreationInputTokens(int), - CacheReadInputTokens(int), - CreateMessageBatchRequest(class), - Requests(array), - BatchMessageRequest(ref), - BatchMessageRequest(class), - CustomId(string), - CreateMessageRequest(ref), - MessageBatch(class), + BetaMessageType(enum), + BetaMessageRole(enum), + Content(array), + BetaContentBlock(ref), + Model(ref), + BetaMessageStopReason(enum), + StopSequence(string), + Usage_AllOf1Wrapped(allOf), + BetaUsage(ref), + BetaMessageBatch(class), Id(string), + BetaMessageBatchType(enum), + BetaMessageBatchProcessingStatus(enum), + RequestCounts_AllOf1Wrapped(allOf), + BetaRequestCounts(ref), + EndedAt(DateTime), CreatedAt(DateTime), ExpiresAt(DateTime), - MessageBatchProcessingStatus(enum), - MessageBatchRequestCounts(ref), + ArchivedAt(DateTime), + CancelInitiatedAt(DateTime), ResultsUrl(string), - MessageBatchType(enum), - MessageBatchRequestCounts(class), + BetaMessageBatchIndividualRequestParams(class), + CustomId(string), + Params_AllOf1Wrapped(allOf), + BetaCreateMessageParams(ref), + BetaMessageBatchIndividualResponse(class), + CustomId(string), + BetaMessageBatchResult(ref), + BetaMessageDelta(class), + BetaMessageDeltaStopReason(enum), + StopSequence(string), + BetaMessageDeltaEvent(class), + BetaMessageDeltaEventType(enum), + BetaMessageDelta(ref), + Usage_AllOf1Wrapped2(allOf), + BetaMessageDeltaUsage(ref), + BetaMessageDeltaUsage(class), + OutputTokens(int), + BetaMessageStartEvent(class), + BetaMessageStartEventType(enum), + BetaMessage(ref), + BetaMessageStopEvent(class), + BetaMessageStopEventType(enum), + BetaMessageStreamEvent(oneOf), + BetaMessageStartEvent(ref), + BetaMessageDeltaEvent(ref), + BetaMessageStopEvent(ref), + BetaContentBlockStartEvent(ref), + BetaContentBlockDeltaEvent(ref), + BetaContentBlockStopEvent(ref), + BetaMessageStreamEventDiscriminator(class), + BetaMessageStreamEventDiscriminatorType(enum), + BetaMetadata(class), + UserId(string), + BetaNotFoundError(class), + BetaNotFoundErrorType(enum), + Message(string), + BetaOverloadedError(class), + BetaOverloadedErrorType(enum), + Message(string), + BetaPermissionError(class), + BetaPermissionErrorType(enum), + Message(string), + BetaRateLimitError(class), + BetaRateLimitErrorType(enum), + Message(string), + BetaRequestCounts(class), Processing(int), Succeeded(int), Errored(int), Canceled(int), Expired(int), - MessageStreamEvent(class), + BetaRequestImageBlock(class), + CacheControl_AllOf1Wrapped3(oneOf), + BetaCacheControlEphemeral(ref), + BetaRequestImageBlockCacheControlDiscriminator(class), + BetaRequestImageBlockCacheControlDiscriminatorType(enum), + BetaRequestImageBlockType(enum), + Source_AllOf1Wrapped(oneOf), + BetaBase64ImageSource(ref), + BetaRequestImageBlockSourceDiscriminator(class), + BetaRequestImageBlockSourceDiscriminatorType(enum), + BetaRequestPDFBlock(class), + CacheControl_AllOf1Wrapped4(oneOf), + BetaCacheControlEphemeral(ref), + BetaRequestPDFBlockCacheControlDiscriminator(class), + BetaRequestPDFBlockCacheControlDiscriminatorType(enum), + BetaRequestPDFBlockType(enum), + BetaBase64PDFSource(ref), + BetaRequestTextBlock(class), + CacheControl_AllOf1Wrapped5(oneOf), + BetaCacheControlEphemeral(ref), + BetaRequestTextBlockCacheControlDiscriminator(class), + BetaRequestTextBlockCacheControlDiscriminatorType(enum), + BetaRequestTextBlockType(enum), + Text(string), + BetaRequestToolResultBlock(class), + CacheControl_AllOf1Wrapped6(oneOf), + BetaCacheControlEphemeral(ref), + BetaRequestToolResultBlockCacheControlDiscriminator(class), + BetaRequestToolResultBlockCacheControlDiscriminatorType(enum), + BetaRequestToolResultBlockType(enum), + ToolUseId(string), + IsError(bool), + Content2(anyOf), + ContentVariant1(string), + ContentVariant2(array), + ContentVariant2Item(oneOf), + BetaRequestTextBlock(ref), + BetaRequestImageBlock(ref), + BetaRequestToolResultBlockContentVariant2ItemDiscriminator(class), + BetaRequestToolResultBlockContentVariant2ItemDiscriminatorType(enum), + BetaRequestToolUseBlock(class), + CacheControl_AllOf1Wrapped7(oneOf), + BetaCacheControlEphemeral(ref), + BetaRequestToolUseBlockCacheControlDiscriminator(class), + BetaRequestToolUseBlockCacheControlDiscriminatorType(enum), + BetaRequestToolUseBlockType(enum), + Id(string), + Name(string), + BetaRequestToolUseBlockInput(class), + BetaResponseTextBlock(class), + BetaResponseTextBlockType(enum), + Text(string), + BetaResponseToolUseBlock(class), + BetaResponseToolUseBlockType(enum), + Id(string), + Name(string), + BetaResponseToolUseBlockInput(class), + BetaSucceededResult(class), + BetaSucceededResultType(enum), + BetaMessage(ref), + BetaTextContentBlockDelta(class), + BetaTextContentBlockDeltaType(enum), + Text(string), + BetaTextEditor20241022(class), + CacheControl_AllOf1Wrapped8(oneOf), + BetaCacheControlEphemeral(ref), + BetaTextEditor20241022CacheControlDiscriminator(class), + BetaTextEditor20241022CacheControlDiscriminatorType(enum), + BetaTextEditor20241022Type(enum), + BetaTextEditor20241022Name(enum), + BetaTool(class), + BetaToolType(enum), + Description(string), + Name(string), + InputSchema_AllOf1Wrapped(allOf), + BetaInputSchema(ref), + CacheControl_AllOf1Wrapped9(oneOf), + BetaCacheControlEphemeral(ref), + BetaToolCacheControlDiscriminator(class), + BetaToolCacheControlDiscriminatorType(enum), + BetaToolChoiceAny(class), + BetaToolChoiceAnyType(enum), + DisableParallelToolUse(bool), + BetaToolChoiceAuto(class), + BetaToolChoiceAutoType(enum), + DisableParallelToolUse(bool), + BetaToolChoiceTool(class), + BetaToolChoiceToolType(enum), + Name(string), + DisableParallelToolUse(bool), + BetaUsage(class), + InputTokens(int), + CacheCreationInputTokens(int), + CacheReadInputTokens(int), + OutputTokens(int), + CacheControlEphemeral(class), + CacheControlEphemeralType(enum), + CompletionRequest(class), + Model(ref), + Prompt(string), + MaxTokensToSample(int), + StopSequences(array), + StopSequencesItem(string), + Temperature(double), + TopP(double), + TopK(int), + Metadata_AllOf1Wrapped2(allOf), + Metadata(ref), + Stream(bool), + CompletionResponse(class), + CompletionResponseType(enum), + Id(string), + Completion(string), + StopReason(string), + Model(ref), + ContentBlockDeltaEvent(class), + ContentBlockDeltaEventType(enum), + Index(int), + Delta2(oneOf), + TextContentBlockDelta(ref), + InputJsonContentBlockDelta(ref), + ContentBlockDeltaEventDeltaDiscriminator(class), + ContentBlockDeltaEventDeltaDiscriminatorType(enum), + ContentBlockStartEvent(class), + ContentBlockStartEventType(enum), + Index(int), + ContentBlock2(oneOf), + ResponseTextBlock(ref), + ResponseToolUseBlock(ref), + ContentBlockStartEventContentBlockDiscriminator(class), + ContentBlockStartEventContentBlockDiscriminatorType(enum), + ContentBlockStopEvent(class), + ContentBlockStopEventType(enum), + Index(int), + CreateMessageParams(class), + Model(ref), + Messages(array), + InputMessage(ref), + MaxTokens(int), + Metadata_AllOf1Wrapped3(allOf), + Metadata(ref), + StopSequences(array), + StopSequencesItem(string), + Stream(bool), + System3(anyOf), + SystemVariant1(string), + SystemVariant2(array), + RequestTextBlock(ref), + Temperature(double), + ToolChoice(ref), + Tools(array), + Tool(ref), + TopK(int), + TopP(double), + ErrorResponse(class), + ErrorResponseType(enum), + Error2(oneOf), + InvalidRequestError(ref), + AuthenticationError(ref), + PermissionError(ref), + NotFoundError(ref), + RateLimitError(ref), + APIError(ref), + OverloadedError(ref), + ErrorResponseErrorDiscriminator(class), + ErrorResponseErrorDiscriminatorType(enum), + InputJsonContentBlockDelta(class), + InputJsonContentBlockDeltaType(enum), + PartialJson(string), + InputMessage(class), + InputMessageRole(enum), + Content3(anyOf), + ContentVariant1(string), + ContentVariant2(array), + ContentVariant2Item2(oneOf), + RequestTextBlock(ref), + RequestImageBlock(ref), + RequestToolUseBlock(ref), + RequestToolResultBlock(ref), + InputMessageContentVariant2ItemDiscriminator(class), + InputMessageContentVariant2ItemDiscriminatorType(enum), + InputSchema(class), + InputSchemaType(enum), + InputSchemaProperties(class), + InvalidRequestError(class), + InvalidRequestErrorType(enum), + Message(string), + Message(class), + Id(string), + MessageType(enum), + MessageRole(enum), + Content(array), + ContentBlock3(ref), + Model(ref), + MessageStopReason(enum), + StopSequence(string), + Usage_AllOf1Wrapped3(allOf), + Usage(ref), + MessageDelta(class), + MessageDeltaStopReason(enum), + StopSequence(string), + MessageDeltaEvent(class), + MessageDeltaEventType(enum), + MessageDelta(ref), + Usage_AllOf1Wrapped4(allOf), + MessageDeltaUsage(ref), + MessageDeltaUsage(class), + OutputTokens(int), + MessageStartEvent(class), + MessageStartEventType(enum), + Message(ref), + MessageStopEvent(class), + MessageStopEventType(enum), + MessageStreamEvent(oneOf), MessageStartEvent(ref), MessageDeltaEvent(ref), MessageStopEvent(ref), ContentBlockStartEvent(ref), ContentBlockDeltaEvent(ref), ContentBlockStopEvent(ref), - PingEvent(ref), - ErrorEvent(ref), MessageStreamEventDiscriminator(class), MessageStreamEventDiscriminatorType(enum), - MessageStreamEventType(enum), - MessageStartEvent(class), - Message(ref), - MessageStreamEventType(ref), - MessageDeltaEvent(class), - MessageDelta(ref), - MessageStreamEventType(ref), - MessageDeltaUsage(ref), - MessageDelta(class), - StopReason(ref), + Metadata(class), + UserId(string), + NotFoundError(class), + NotFoundErrorType(enum), + Message(string), + OverloadedError(class), + OverloadedErrorType(enum), + Message(string), + PermissionError(class), + PermissionErrorType(enum), + Message(string), + PromptCachingBetaCreateMessageParams(class), + Model(ref), + Messages(array), + PromptCachingBetaInputMessage(ref), + MaxTokens(int), + Metadata_AllOf1Wrapped4(allOf), + Metadata(ref), + StopSequences(array), + StopSequencesItem(string), + Stream(bool), + System4(anyOf), + SystemVariant1(string), + SystemVariant2(array), + PromptCachingBetaRequestTextBlock(ref), + Temperature(double), + ToolChoice(ref), + Tools(array), + PromptCachingBetaTool(ref), + TopK(int), + TopP(double), + PromptCachingBetaInputMessage(class), + PromptCachingBetaInputMessageRole(enum), + Content4(anyOf), + ContentVariant1(string), + ContentVariant2(array), + ContentVariant2Item3(oneOf), + PromptCachingBetaRequestTextBlock(ref), + PromptCachingBetaRequestImageBlock(ref), + PromptCachingBetaRequestToolUseBlock(ref), + PromptCachingBetaRequestToolResultBlock(ref), + PromptCachingBetaInputMessageContentVariant2ItemDiscriminator(class), + PromptCachingBetaInputMessageContentVariant2ItemDiscriminatorType(enum), + PromptCachingBetaMessage(class), + Id(string), + PromptCachingBetaMessageType(enum), + PromptCachingBetaMessageRole(enum), + Content(array), + ContentBlock3(ref), + Model(ref), + PromptCachingBetaMessageStopReason(enum), StopSequence(string), - MessageDeltaUsage(class), - OutputTokens(int), - MessageStopEvent(class), - MessageStreamEventType(ref), - ContentBlockStartEvent(class), - Block(ref), - Index(int), - MessageStreamEventType(ref), - ContentBlockDeltaEvent(class), - BlockDelta(ref), - Index(int), - MessageStreamEventType(ref), - BlockDelta(oneOf), - TextBlockDelta(ref), - InputJsonBlockDelta(ref), - BlockDeltaDiscriminator(class), - BlockDeltaDiscriminatorType(enum), - TextBlockDelta(class), + Usage_AllOf1Wrapped5(allOf), + PromptCachingBetaUsage(ref), + PromptCachingBetaMessageStartEvent(class), + PromptCachingBetaMessageStartEventType(enum), + PromptCachingBetaMessage(ref), + PromptCachingBetaMessageStreamEvent(oneOf), + PromptCachingBetaMessageStartEvent(ref), + MessageDeltaEvent(ref), + MessageStopEvent(ref), + ContentBlockStartEvent(ref), + ContentBlockDeltaEvent(ref), + ContentBlockStopEvent(ref), + PromptCachingBetaMessageStreamEventDiscriminator(class), + PromptCachingBetaMessageStreamEventDiscriminatorType(enum), + PromptCachingBetaRequestImageBlock(class), + CacheControl_AllOf1Wrapped10(oneOf), + CacheControlEphemeral(ref), + PromptCachingBetaRequestImageBlockCacheControlDiscriminator(class), + PromptCachingBetaRequestImageBlockCacheControlDiscriminatorType(enum), + PromptCachingBetaRequestImageBlockType(enum), + Source_AllOf1Wrapped2(oneOf), + Base64ImageSource(ref), + PromptCachingBetaRequestImageBlockSourceDiscriminator(class), + PromptCachingBetaRequestImageBlockSourceDiscriminatorType(enum), + PromptCachingBetaRequestTextBlock(class), + CacheControl_AllOf1Wrapped11(oneOf), + CacheControlEphemeral(ref), + PromptCachingBetaRequestTextBlockCacheControlDiscriminator(class), + PromptCachingBetaRequestTextBlockCacheControlDiscriminatorType(enum), + PromptCachingBetaRequestTextBlockType(enum), Text(string), - Type(string), - InputJsonBlockDelta(class), - PartialJson(string), - Type(string), - ContentBlockStopEvent(class), - Index(int), - MessageStreamEventType(ref), - PingEvent(class), - MessageStreamEventType(ref), - ErrorEvent(class), - MessageStreamEventType(ref), - Error(ref), - Error(class), - Type(string), + PromptCachingBetaRequestToolResultBlock(class), + CacheControl_AllOf1Wrapped12(oneOf), + CacheControlEphemeral(ref), + PromptCachingBetaRequestToolResultBlockCacheControlDiscriminator(class), + PromptCachingBetaRequestToolResultBlockCacheControlDiscriminatorType(enum), + PromptCachingBetaRequestToolResultBlockType(enum), + ToolUseId(string), + IsError(bool), + Content5(anyOf), + ContentVariant1(string), + ContentVariant2(array), + ContentVariant2Item4(oneOf), + PromptCachingBetaRequestTextBlock(ref), + PromptCachingBetaRequestImageBlock(ref), + PromptCachingBetaRequestToolResultBlockContentVariant2ItemDiscriminator(class), + PromptCachingBetaRequestToolResultBlockContentVariant2ItemDiscriminatorType(enum), + PromptCachingBetaRequestToolUseBlock(class), + CacheControl_AllOf1Wrapped13(oneOf), + CacheControlEphemeral(ref), + PromptCachingBetaRequestToolUseBlockCacheControlDiscriminator(class), + PromptCachingBetaRequestToolUseBlockCacheControlDiscriminatorType(enum), + PromptCachingBetaRequestToolUseBlockType(enum), + Id(string), + Name(string), + PromptCachingBetaRequestToolUseBlockInput(class), + PromptCachingBetaTool(class), + Description(string), + Name(string), + InputSchema_AllOf1Wrapped2(allOf), + InputSchema(ref), + CacheControl_AllOf1Wrapped14(oneOf), + CacheControlEphemeral(ref), + PromptCachingBetaToolCacheControlDiscriminator(class), + PromptCachingBetaToolCacheControlDiscriminatorType(enum), + PromptCachingBetaUsage(class), + InputTokens(int), + CacheCreationInputTokens(int), + CacheReadInputTokens(int), + OutputTokens(int), + RateLimitError(class), + RateLimitErrorType(enum), Message(string), - CreateMessageRequest(ref), - CreateMessageBatchRequest(ref), - RetrieveMessageBatchId(string), + RequestImageBlock(class), + RequestImageBlockType(enum), + Source_AllOf1Wrapped3(oneOf), + Base64ImageSource(ref), + RequestImageBlockSourceDiscriminator(class), + RequestImageBlockSourceDiscriminatorType(enum), + RequestTextBlock(class), + RequestTextBlockType(enum), + Text(string), + RequestToolResultBlock(class), + RequestToolResultBlockType(enum), + ToolUseId(string), + IsError(bool), + Content6(anyOf), + ContentVariant1(string), + ContentVariant2(array), + ContentVariant2Item5(oneOf), + RequestTextBlock(ref), + RequestImageBlock(ref), + RequestToolResultBlockContentVariant2ItemDiscriminator(class), + RequestToolResultBlockContentVariant2ItemDiscriminatorType(enum), + RequestToolUseBlock(class), + RequestToolUseBlockType(enum), + Id(string), + Name(string), + RequestToolUseBlockInput(class), + ResponseTextBlock(class), + ResponseTextBlockType(enum), + Text(string), + ResponseToolUseBlock(class), + ResponseToolUseBlockType(enum), + Id(string), + Name(string), + ResponseToolUseBlockInput(class), + TextContentBlockDelta(class), + TextContentBlockDeltaType(enum), + Text(string), + Tool(class), + Description(string), + Name(string), + InputSchema_AllOf1Wrapped3(allOf), + InputSchema(ref), + ToolChoiceAny(class), + ToolChoiceAnyType(enum), + DisableParallelToolUse(bool), + ToolChoiceAuto(class), + ToolChoiceAutoType(enum), + DisableParallelToolUse(bool), + ToolChoiceTool(class), + ToolChoiceToolType(enum), + Name(string), + DisableParallelToolUse(bool), + Usage(class), + InputTokens(int), + OutputTokens(int), + BetaMessageBatchResult(oneOf), + BetaSucceededResult(ref), + BetaErroredResult(ref), + BetaCanceledResult(ref), + BetaExpiredResult(ref), + BetaMessageBatchResultDiscriminator(class), + BetaMessageBatchResultDiscriminatorType(enum), + CreateMessageParamsWithoutStream(class), + Model(ref), + Messages(array), + InputMessage(ref), + MaxTokens(int), + Metadata_AllOf1Wrapped5(allOf), + Metadata(ref), + StopSequences(array), + StopSequencesItem(string), + System5(anyOf), + SystemVariant1(string), + SystemVariant2(array), + RequestTextBlock(ref), + Temperature(double), + ToolChoice(ref), + Tools(array), + Tool(ref), + TopK(int), + TopP(double), + AnthropicBeta(anyOf), + AnthropicBetaVariant1(string), + AnthropicBetaEnum(enum), + ToolChoice(oneOf), + ToolChoiceAuto(ref), + ToolChoiceAny(ref), + ToolChoiceTool(ref), + ToolChoiceDiscriminator(class), + ToolChoiceDiscriminatorType(enum), + BetaToolChoice(oneOf), + BetaToolChoiceAuto(ref), + BetaToolChoiceAny(ref), + BetaToolChoiceTool(ref), + BetaToolChoiceDiscriminator(class), + BetaToolChoiceDiscriminatorType(enum), + ContentBlock3(oneOf), + ResponseTextBlock(ref), + ResponseToolUseBlock(ref), + ContentBlockDiscriminator(class), + ContentBlockDiscriminatorType(enum), + BetaContentBlock(oneOf), + BetaResponseTextBlock(ref), + BetaResponseToolUseBlock(ref), + BetaContentBlockDiscriminator(class), + BetaContentBlockDiscriminatorType(enum), + BetaInputContentBlock(oneOf), + BetaRequestTextBlock(ref), + BetaRequestImageBlock(ref), + BetaRequestToolUseBlock(ref), + BetaRequestToolResultBlock(ref), + BetaRequestPDFBlock(ref), + BetaInputContentBlockDiscriminator(class), + BetaInputContentBlockDiscriminatorType(enum), + Model(anyOf), + ModelVariant1(string), + ModelEnum(enum), + CreateMessageParams(ref), + CompletionRequest(ref), + BetaCreateMessageParams(ref), + BetaCreateMessageBatchParams(ref), + BetaCountMessageTokensParams(ref), + PromptCachingBetaCreateMessageParams(ref), + BetaCreateMessageBatchParams(ref), + BetaCountMessageTokensParams(ref), + MessagesPostAnthropicVersion(string), + CompletePostAnthropicVersion(string), + BetaMessagesPostAnthropicBeta(string), + BetaMessagesPostAnthropicBetaItem(string), + BetaMessagesPostAnthropicVersion(string), + BetaMessageBatchesPostAnthropicBeta(string), + BetaMessageBatchesPostAnthropicBetaItem(string), + BetaMessageBatchesPostAnthropicVersion(string), + BetaMessageBatchesListBeforeId(string), + BetaMessageBatchesListAfterId(string), + BetaMessageBatchesListLimit(int), + BetaMessageBatchesListAnthropicBeta(string), + BetaMessageBatchesListAnthropicBetaItem(string), + BetaMessageBatchesListAnthropicVersion(string), + BetaMessageBatchesListXApiKey(string), + BetaMessageBatchesRetrieveMessageBatchId(string), + BetaMessageBatchesRetrieveAnthropicBeta(string), + BetaMessageBatchesRetrieveAnthropicBetaItem(string), + BetaMessageBatchesRetrieveAnthropicVersion(string), + BetaMessageBatchesRetrieveXApiKey(string), + BetaMessageBatchesCancelMessageBatchId(string), + BetaMessageBatchesCancelAnthropicBeta(string), + BetaMessageBatchesCancelAnthropicBetaItem(string), + BetaMessageBatchesCancelAnthropicVersion(string), + BetaMessageBatchesResultsMessageBatchId(string), + BetaMessageBatchesResultsAnthropicBeta(string), + BetaMessageBatchesResultsAnthropicBetaItem(string), + BetaMessageBatchesResultsAnthropicVersion(string), + BetaMessageBatchesResultsXApiKey(string), + BetaMessagesCountTokensPostAnthropicBeta(string), + BetaMessagesCountTokensPostAnthropicBetaItem(string), + BetaMessagesCountTokensPostAnthropicVersion(string), + PromptCachingBetaMessagesPostAnthropicBeta(string), + PromptCachingBetaMessagesPostAnthropicBetaItem(string), + PromptCachingBetaMessagesPostAnthropicVersion(string), + BetaMessageBatchesPostAnthropicBeta(string), + BetaMessageBatchesPostAnthropicBetaItem(string), + BetaMessageBatchesPostAnthropicVersion(string), + BetaMessageBatchesListBeforeId(string), + BetaMessageBatchesListAfterId(string), + BetaMessageBatchesListLimit(int), + BetaMessageBatchesListAnthropicBeta(string), + BetaMessageBatchesListAnthropicBetaItem(string), + BetaMessageBatchesListAnthropicVersion(string), + BetaMessageBatchesListXApiKey(string), + BetaMessageBatchesRetrieveMessageBatchId(string), + BetaMessageBatchesRetrieveAnthropicBeta(string), + BetaMessageBatchesRetrieveAnthropicBetaItem(string), + BetaMessageBatchesRetrieveAnthropicVersion(string), + BetaMessageBatchesRetrieveXApiKey(string), + BetaMessageBatchesCancelMessageBatchId(string), + BetaMessageBatchesCancelAnthropicBeta(string), + BetaMessageBatchesCancelAnthropicBetaItem(string), + BetaMessageBatchesCancelAnthropicVersion(string), + BetaMessageBatchesResultsMessageBatchId(string), + BetaMessageBatchesResultsAnthropicBeta(string), + BetaMessageBatchesResultsAnthropicBetaItem(string), + BetaMessageBatchesResultsAnthropicVersion(string), + BetaMessageBatchesResultsXApiKey(string), + BetaMessagesCountTokensPostAnthropicBeta(string), + BetaMessagesCountTokensPostAnthropicBetaItem(string), + BetaMessagesCountTokensPostAnthropicVersion(string), Message(ref), - MessageBatch(ref), - MessageBatch(ref) + ErrorResponse(ref), + CompletionResponse(ref), + ErrorResponse(ref), + BetaMessage(ref), + BetaErrorResponse(ref), + BetaMessageBatch(ref), + BetaErrorResponse(ref), + BetaListResponseMessageBatch(ref), + BetaErrorResponse(ref), + BetaMessageBatch(ref), + BetaErrorResponse(ref), + BetaMessageBatch(ref), + BetaErrorResponse(ref), + BetaMessageBatchesResultsResponse(byte[]), + BetaErrorResponse(ref), + BetaCountMessageTokensResponse(ref), + BetaErrorResponse(ref), + PromptCachingBetaMessage(ref), + ErrorResponse(ref), + BetaMessageBatch(ref), + BetaErrorResponse(ref), + BetaListResponseMessageBatch(ref), + BetaErrorResponse(ref), + BetaMessageBatch(ref), + BetaErrorResponse(ref), + BetaMessageBatch(ref), + BetaErrorResponse(ref), + BetaMessageBatchesResultsResponse(byte[]), + BetaErrorResponse(ref), + BetaCountMessageTokensResponse(ref), + BetaErrorResponse(ref) ] \ No newline at end of file