Module Awso_bedrock_runtime.ValuesSource

Sourceval service : Awso.Service.t
Sourceval apiVersion : string
Sourceval endpointPrefix : string
Sourceval serviceFullName : string
Sourceval signatureVersion : string
Sourceval protocol : string
Sourceval globalEndpoint : string
Sourceval simple_to_json : ('a -> Awso__Botodata.value) -> 'a -> Yojson.Safe.t
Sourceval composed_to_json : ('a -> Awso__Botodata.value) -> 'a -> Yojson.Safe.t
Sourceval to_query : ('a -> Awso.Client.Query.value) -> 'a -> Awso.Client.Query.t
Sourceval structure_to_value_aux : ('a * 'b option) list -> f:(('a * 'b) list -> 'c) -> [> `Structure of 'c ]
Sourceval structure_to_value : ('a * 'b option) list -> [> `Structure of ('a * 'b) list ]
Sourceval structure_to_wrapped_value : wrapper:'a -> response:'a -> ('b * 'c option) list -> [> `Structure of ('a * [> `Structure of ('b * 'c) list ]) list ]

References a portion of the original input text that corresponds to logical elements.

A logical statement that includes both formal logic representation and natural language explanation.

Contains the logical translation of natural language input into formal logical statements, including premises, claims, and confidence scores.

Sourcemodule String_ : sig ... end
Sourcemodule DocumentContentBlock : sig ... end

Contains the actual content of a document that can be processed by the model and potentially cited in the response.

Sourcemodule AccountId : sig ... end
Sourcemodule S3Uri : sig ... end

References a specific automated reasoning policy rule that was applied during evaluation.

Represents a logical scenario where claims can be evaluated as true or false, containing specific logical assignments.

Represents one possible logical interpretation of ambiguous input content.

Sourcemodule Boolean : sig ... end
Sourcemodule DocumentContentBlocks : sig ... end
Sourcemodule DocumentSourceBytesBlob : sig ... end
Sourcemodule S3Location : sig ... end

A storage location in an Amazon S3 bucket.

Sourcemodule ImageSourceBytesBlob : sig ... end
Sourcemodule SearchResultContentBlock : sig ... end

A block within a search result that contains the content.

Sourcemodule VideoSourceBytesBlob : sig ... end

Identifies logical issues in the translated statements that exist independent of any policy rules, such as statements that are always true or always false.

Sourcemodule DocumentCharLocation : sig ... end

Specifies a character-level location within a document, providing precise positioning information for cited content using start and end character indices.

Sourcemodule DocumentChunkLocation : sig ... end

Specifies a chunk-level location within a document, providing positioning information for cited content using logical document segments or chunks.

Sourcemodule DocumentPageLocation : sig ... end

Specifies a page-level location within a document, providing positioning information for cited content using page numbers.

Sourcemodule SearchResultLocation : sig ... end

Specifies a search result location within the content array, providing positioning information for cited content using search result index and block positions.

Sourcemodule WebLocation : sig ... end

Provides the URL and domain information for the website that was cited when performing a web search.

Sourcemodule CitationSourceContent : sig ... end

Contains the actual text content from a source document that is being cited or referenced in the model's response.

Sourcemodule CitationsConfig : sig ... end

Configuration settings for enabling and controlling document citations in Converse API responses. When enabled, the model can include citation information that links generated content back to specific source documents.

Sourcemodule DocumentBlockNameString : sig ... end
Sourcemodule DocumentFormat : sig ... end
Sourcemodule DocumentSource : sig ... end

Contains the content of a document.

Sourcemodule ErrorBlock : sig ... end

A block containing error information when content processing fails.

Sourcemodule ImageFormat : sig ... end
Sourcemodule ImageSource : sig ... end

The source for an image.

Sourcemodule SearchResultContentBlocks : sig ... end
Sourcemodule VideoFormat : sig ... end
Sourcemodule VideoSource : sig ... end

A video source. You can upload a smaller video as a base64-encoded string as long as the encoded file is less than 25MB. You can also transfer videos up to 1GB in size from an S3 bucket.

Indicates that no valid claims can be made due to logical contradictions in the premises or rules.

Indicates that the claims are logically false and contradictory to the established rules or premises.

Indicates that no relevant logical information could be extracted from the input for validation.

Indicates that the claims could be either true or false depending on additional assumptions not provided in the input.

Indicates that the input exceeds the processing capacity due to the volume or complexity of the logical information.

Indicates that the input has multiple valid logical interpretations, requiring additional context or clarification.

Indicates that the claims are definitively true and logically implied by the premises, with no possible alternative interpretations.

Sourcemodule ImagesGuarded : sig ... end
Sourcemodule ImagesTotal : sig ... end
Sourcemodule TextCharactersGuarded : sig ... end
Sourcemodule TextCharactersTotal : sig ... end
Sourcemodule GuardrailPiiEntityType : sig ... end
Sourcemodule GuardrailTopicType : sig ... end
Sourcemodule GuardrailWordPolicyAction : sig ... end
Sourcemodule GuardrailManagedWordType : sig ... end
Sourcemodule CitationLocation : sig ... end

Specifies the precise location within a source document where cited content can be found. This can include character-level positions, page numbers, or document chunks depending on the document type and indexing method.

Sourcemodule CitationSourceContentList : sig ... end
Sourcemodule Document : sig ... end
Sourcemodule DocumentBlock : sig ... end

A document to include in a message.

Sourcemodule ImageBlock : sig ... end

Image content for a message.

Sourcemodule SearchResultBlock : sig ... end

A search result block that enables natural citations with proper source attribution for retrieved content. This field is only supported by Anthropic Claude Opus 4.1, Opus 4, Sonnet 4.5, Sonnet 4, Sonnet 3.7, and 3.5 Haiku models.

Sourcemodule VideoBlock : sig ... end

A video block.

Sourcemodule GuardrailOrigin : sig ... end

Represents a logical validation result from automated reasoning policy evaluation. The finding indicates whether claims in the input are logically valid, invalid, satisfiable, impossible, or have other logical issues.

Sourcemodule GuardrailContentFilter : sig ... end

The content filter for a guardrail.

The details for the guardrails contextual grounding filter.

Sourcemodule GuardrailImageCoverage : sig ... end

The details of the guardrail image coverage.

The guardrail coverage for the text characters.

Sourcemodule GuardrailPiiEntityFilter : sig ... end

A Personally Identifiable Information (PII) entity configured in a guardrail.

Sourcemodule GuardrailRegexFilter : sig ... end

A Regex filter configured in a guardrail.

Sourcemodule GuardrailTopic : sig ... end

Information about a topic guardrail.

Sourcemodule GuardrailCustomWord : sig ... end

A custom word configured in a guardrail.

Sourcemodule GuardrailManagedWord : sig ... end

A managed word configured in a guardrail.

Sourcemodule AudioSourceBytesBlob : sig ... end
Sourcemodule CitationGeneratedContent : sig ... end

Contains the generated text content that corresponds to or is supported by a citation from a source document.

Sourcemodule Citation : sig ... end

Contains information about a citation that references a specific source document. Citations provide traceability between the model's generated response and the source documents that informed that response.

The image source (image bytes) of the guardrail converse image source.

Sourcemodule ToolResultContentBlock : sig ... end

The tool result content block. For more information, see Call a tool with the Converse API in the Amazon Bedrock User Guide.

Sourcemodule GuardrailArn : sig ... end
Sourcemodule GuardrailId : sig ... end
Sourcemodule GuardrailOriginList : sig ... end
Sourcemodule GuardrailOwnership : sig ... end
Sourcemodule GuardrailVersion : sig ... end
Sourcemodule GuardrailCoverage : sig ... end

The action of the guardrail coverage details.

Sourcemodule GuardrailUsage : sig ... end

The details on the use of the guardrail.

Sourcemodule GuardrailRegexFilterList : sig ... end
Sourcemodule GuardrailTopicList : sig ... end
Sourcemodule GuardrailCustomWordList : sig ... end
Sourcemodule GuardrailManagedWordList : sig ... end
Sourcemodule AudioFormat : sig ... end
Sourcemodule AudioSource : sig ... end

The source of audio data, which can be provided either as raw bytes or a reference to an S3 location.

Sourcemodule CachePointType : sig ... end
Sourcemodule CacheTTL : sig ... end
Sourcemodule Citations : sig ... end

An image block that contains images that you want to assess with a guardrail.

A text block that contains text that you want to assess with a guardrail. For more information, see GuardrailConverseContentBlock.

Sourcemodule Blob : sig ... end
Sourcemodule ReasoningTextBlock : sig ... end

Contains the reasoning that the model used to return the output.

Sourcemodule ToolResultContentBlocks : sig ... end
Sourcemodule ToolResultStatus : sig ... end
Sourcemodule ToolUseId : sig ... end
Sourcemodule ToolName : sig ... end
Sourcemodule ToolUseType : sig ... end
Sourcemodule AppliedGuardrailDetails : sig ... end

Details about the specific guardrail that was applied during this assessment, including its identifier, version, ARN, origin, and ownership information.

Contains the results of automated reasoning policy evaluation, including logical findings about the validity of claims made in the input content.

An assessment of a content policy for a guardrail.

The policy assessment details for the guardrails contextual grounding filter.

The invocation metrics for the guardrail.

The assessment for a Personally Identifiable Information (PII) policy.

A behavior assessment of a topic policy.

The word policy assessment.

Sourcemodule AudioBlock : sig ... end

An audio content block that contains audio data in various supported formats.

Sourcemodule CachePointBlock : sig ... end

Defines a section of content to be cached for reuse in subsequent API calls.

Sourcemodule CitationsContentBlock : sig ... end

A content block that contains both generated text and associated citation information. This block type is returned when document citations are enabled, providing traceability between the generated content and the source documents that informed the response.

A content block for selective guarding with the Converse or ConverseStream API operations.

Sourcemodule ReasoningContentBlock : sig ... end

Contains content regarding the reasoning that is carried out by the model with respect to the content in the content block. Reasoning refers to a Chain of Thought (CoT) that the model generates to enhance the accuracy of its final response.

Sourcemodule ToolResultBlock : sig ... end

A tool result block that contains the results for a tool request that the model previously made. For more information, see Call a tool with the Converse API in the Amazon Bedrock User Guide.

Sourcemodule ToolUseBlock : sig ... end

A tool use content block. Contains information about a tool that the model is requesting be run., The model uses the result from the tool to generate a response. For more information, see Call a tool with the Converse API in the Amazon Bedrock User Guide.

Sourcemodule NonEmptyString : sig ... end
Sourcemodule ToolInputSchema : sig ... end

The schema for the tool. The top level schema type must be object. For more information, see Call a tool with the Converse API in the Amazon Bedrock User Guide.

Sourcemodule GuardrailAssessment : sig ... end

A behavior assessment of the guardrail policies used in a call to the Converse API.

Sourcemodule ContentBlock : sig ... end

A block of content for a message that you pass to, or receive from, a model with the Converse or ConverseStream API operations.

Sourcemodule SystemTool : sig ... end

Specifies a system-defined tool for the model to use. System-defined tools are tools that are created and provided by the model provider.

Sourcemodule ToolSpecification : sig ... end

The specification for the tool. For more information, see Call a tool with the Converse API in the Amazon Bedrock User Guide.

Contains incremental updates to the source content text during streaming responses, allowing clients to build up the cited content progressively.

Sourcemodule GuardrailAssessmentList : sig ... end
Sourcemodule GuardrailOutputText : sig ... end
Sourcemodule KmsKeyId : sig ... end
Sourcemodule ContentBlocks : sig ... end
Sourcemodule ConversationRole : sig ... end
Sourcemodule AnyToolChoice : sig ... end

The model must request at least one tool (no text is generated). For example, {"any" : {}}. For more information, see Call a tool with the Converse API in the Amazon Bedrock User Guide.

Sourcemodule AutoToolChoice : sig ... end

The Model automatically decides if a tool should be called or whether to generate text instead. For example, {"auto" : {}}. For more information, see Call a tool with the Converse API in the Amazon Bedrock User Guide

Sourcemodule SpecificToolChoice : sig ... end

The model must request a specific tool. For example, {"tool" : {"name" : "Your tool name"}}. For more information, see Call a tool with the Converse API in the Amazon Bedrock User Guide This field is only supported by Anthropic Claude 3 models.

Sourcemodule Tool : sig ... end

Information about a tool that you can use with the Converse API. For more information, see Call a tool with the Converse API in the Amazon Bedrock User Guide.

Sourcemodule ToolResultBlockDelta : sig ... end

Contains incremental updates to tool results information during streaming responses. This allows clients to build up tool results data progressively as the response is generated.

Sourcemodule GuardrailAssessmentMap : sig ... end
Sourcemodule ModelOutputs : sig ... end
Sourcemodule InvokedModelId : sig ... end
Sourcemodule CacheDetail : sig ... end

Cache creation metrics for a specific TTL duration

Sourcemodule GuardrailContentQualifier : sig ... end

Asynchronous invocation output data settings.

Sourcemodule Message : sig ... end

A message input, or returned from, a call to Converse or ConverseStream.

Sourcemodule SystemContentBlock : sig ... end

Contains configurations for instructions to provide the model for how to handle input. To learn more, see Using the Converse API.

Sourcemodule ToolChoice : sig ... end

Determines which tools the model should request in a call to Converse or ConverseStream. For more information, see Call a tool with the Converse API in the Amazon Bedrock User Guide.

Sourcemodule CitationsDelta : sig ... end

Contains incremental updates to citation information during streaming responses. This allows clients to build up citation data progressively as the response is generated.

Sourcemodule ImageBlockDelta : sig ... end

A streaming delta event that contains incremental image data during streaming responses.

Contains content regarding the reasoning that is carried out by the model with respect to the content in the content block. Reasoning refers to a Chain of Thought (CoT) that the model generates to enhance the accuracy of its final response.

Sourcemodule ToolResultBlocksDelta : sig ... end
Sourcemodule ToolUseBlockDelta : sig ... end

The delta for a tool use block.

Sourcemodule ImageBlockStart : sig ... end

The initial event in a streaming image block that indicates the start of image content.

Sourcemodule ToolResultBlockStart : sig ... end

The start of a tool result block. For more information, see Call a tool with the Converse API in the Amazon Bedrock User Guide.

Sourcemodule ToolUseBlockStart : sig ... end

The start of a tool use block. For more information, see Call a tool with the Converse API in the Amazon Bedrock User Guide.

Sourcemodule Long : sig ... end
Sourcemodule GuardrailTraceAssessment : sig ... end

A Top level guardrail trace object. For more information, see ConverseTrace.

Sourcemodule PromptRouterTrace : sig ... end

A prompt router trace.

Sourcemodule PerformanceConfigLatency : sig ... end
Sourcemodule ServiceTierType : sig ... end
Sourcemodule CacheDetailsList : sig ... end
Sourcemodule JsonSchemaDefinition : sig ... end

JSON schema structured output format options.

Sourcemodule GuardrailImageFormat : sig ... end
Sourcemodule GuardrailImageSource : sig ... end

The image source (image bytes) of the guardrail image source. Object used in independent api.

Sourcemodule TagKey : sig ... end
Sourcemodule TagValue : sig ... end
Sourcemodule AsyncInvokeArn : sig ... end
Sourcemodule AsyncInvokeMessage : sig ... end

Asynchronous invocation output data settings.

Sourcemodule AsyncInvokeStatus : sig ... end
Sourcemodule InvocationArn : sig ... end
Sourcemodule Timestamp : sig ... end
Sourcemodule NonBlankString : sig ... end
Sourcemodule StatusCode : sig ... end
Sourcemodule PartBody : sig ... end
Sourcemodule Messages : sig ... end
Sourcemodule SystemContentBlocks : sig ... end
Sourcemodule ToolConfiguration : sig ... end

Configuration information for the tools that you pass to a model. For more information, see Tool use (function calling) in the Amazon Bedrock User Guide.

Sourcemodule Body : sig ... end
Sourcemodule ContentBlockDelta : sig ... end

A block of content in a streaming response.

Sourcemodule NonNegativeInteger : sig ... end
Sourcemodule ContentBlockStart : sig ... end

Content block start information.

Sourcemodule ConverseStreamMetrics : sig ... end

Metrics for the stream.

Sourcemodule ConverseStreamTrace : sig ... end

The trace object in a response from ConverseStream.

Sourcemodule PerformanceConfiguration : sig ... end

Performance settings for a model.

Sourcemodule ServiceTier : sig ... end

Specifies the processing tier configuration used for serving the request.

Sourcemodule TokenUsage : sig ... end

The tokens used in a message API inference call.

Sourcemodule StopReason : sig ... end
Sourcemodule OutputFormatStructure : sig ... end

The structure that the model's output must adhere to.

Sourcemodule OutputFormatType : sig ... end
Sourcemodule GuardrailImageBlock : sig ... end

Contain an image which user wants guarded. This block is accepted by the guardrails independent API.

Sourcemodule GuardrailTextBlock : sig ... end

The text block to be evaluated by the guardrail.

Sourcemodule Tag : sig ... end

A tag.

Sourcemodule AsyncInvokeSummary : sig ... end

A summary of an asynchronous invocation.

Sourcemodule InternalServerException : sig ... end

An internal server error occurred. For troubleshooting this error, see InternalFailure in the Amazon Bedrock User Guide

Sourcemodule ModelStreamErrorException : sig ... end

An error occurred while streaming the response. Retry your request.

Sourcemodule ModelTimeoutException : sig ... end

The request took too long to process. Processing time exceeded the model timeout length.

Sourcemodule PayloadPart : sig ... end

Payload content included in the response.

The service isn't currently available. For troubleshooting this error, see ServiceUnavailable in the Amazon Bedrock User Guide

Sourcemodule ThrottlingException : sig ... end

Your request was denied due to exceeding the account quotas for Amazon Bedrock. For troubleshooting this error, see ThrottlingException in the Amazon Bedrock User Guide

Sourcemodule ValidationException : sig ... end

The input fails to satisfy the constraints specified by Amazon Bedrock. For troubleshooting this error, see ValidationError in the Amazon Bedrock User Guide

Output from the bidirectional stream. The output is speech and a text transcription.

Payload content for the bidirectional input. The input is an audio stream.

Sourcemodule ConverseTokensRequest : sig ... end

The inputs from a Converse API request for token counting. This structure mirrors the input format for the Converse operation, allowing you to count tokens for conversation-based inference requests.

Sourcemodule InvokeModelTokensRequest : sig ... end

The body of an InvokeModel API request for token counting. This structure mirrors the input format for the InvokeModel operation, allowing you to count tokens for raw text inference requests.

Sourcemodule ContentBlockDeltaEvent : sig ... end

The content block delta event.

Sourcemodule ContentBlockStartEvent : sig ... end

Content block start event.

Sourcemodule ContentBlockStopEvent : sig ... end

A content block stop event.

A conversation stream metadata event.

Sourcemodule MessageStartEvent : sig ... end

The start of a message.

Sourcemodule MessageStopEvent : sig ... end

The stop event for a message.

Sourcemodule GuardrailIdentifier : sig ... end
Sourcemodule GuardrailTrace : sig ... end
Sourcemodule OutputFormat : sig ... end

Structured output parameters to control the model's response.

Sourcemodule PromptVariableValues : sig ... end

Contains a map of variables in a prompt from Prompt management to an object containing the values to fill in for them when running model invocation. For more information, see How Prompt management works.

Sourcemodule RequestMetadataKeyString : sig ... end
Sourcemodule GuardrailOutputContent : sig ... end

The output content produced by the guardrail.

Sourcemodule GuardrailContentBlock : sig ... end

The content block to be evaluated by the guardrail.

Sourcemodule AccessDeniedException : sig ... end

The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error, see AccessDeniedException in the Amazon Bedrock User Guide

Sourcemodule ConflictException : sig ... end

Error occurred because of a conflict while performing an operation.

Sourcemodule ResourceNotFoundException : sig ... end

The specified resource ARN was not found. For troubleshooting this error, see ResourceNotFound in the Amazon Bedrock User Guide

Your request exceeds the service quota for your account. You can view your quotas at Viewing service quotas. You can resubmit your request later.

Sourcemodule AsyncInvokeIdentifier : sig ... end
Sourcemodule ModelInputPayload : sig ... end
Sourcemodule TagList : sig ... end
Sourcemodule AsyncInvokeSummaries : sig ... end
Sourcemodule PaginationToken : sig ... end
Sourcemodule MaxResults : sig ... end
Sourcemodule SortAsyncInvocationBy : sig ... end
Sourcemodule SortOrder : sig ... end
Sourcemodule MimeType : sig ... end
Sourcemodule ModelErrorException : sig ... end

The request failed due to an error while processing the model.

Sourcemodule ModelNotReadyException : sig ... end

The model specified in the request is not ready to serve inference requests. The AWS SDK will automatically retry the operation up to 5 times. For information about configuring automatic retries, see Retry behavior in the AWS SDKs and Tools reference guide.

Sourcemodule ResponseStream : sig ... end

Definition of content in the response stream.

Sourcemodule InvokeModelIdentifier : sig ... end
Sourcemodule Trace : sig ... end

Output from the bidirectional stream that was used for model invocation.

Payload content, the speech chunk, for the bidirectional input of the invocation step.

Sourcemodule Integer : sig ... end
Sourcemodule CountTokensInput : sig ... end

The input value for token counting. The value should be either an InvokeModel or Converse request body.

ARN or ID of a Bedrock model

Sourcemodule ConverseStreamOutput : sig ... end

The messages output stream

Sourcemodule ConversationalModelId : sig ... end

Configuration information for a guardrail that you use with the ConverseStream action.

Sourcemodule InferenceConfiguration : sig ... end

Base inference parameters to pass to a model in a call to Converse or ConverseStream. For more information, see Inference parameters for foundation models. If you need to pass additional parameters that the model supports, use the additionalModelRequestFields request field in the call to Converse or ConverseStream. For more information, see Model parameters.

Sourcemodule OutputConfig : sig ... end

Output configuration for a model response in a call to Converse or ConverseStream.

Sourcemodule PromptVariableMap : sig ... end
Sourcemodule RequestMetadata : sig ... end
Sourcemodule ConverseMetrics : sig ... end

Metrics for a call to Converse.

Sourcemodule ConverseOutput : sig ... end

The output from a call to Converse.

Sourcemodule ConverseTrace : sig ... end

The trace object in a response from Converse.

Sourcemodule GuardrailConfiguration : sig ... end

Configuration information for a guardrail that you use with the Converse operation.

Sourcemodule GuardrailAction : sig ... end
Sourcemodule GuardrailContentBlockList : sig ... end
Sourcemodule GuardrailContentSource : sig ... end
Sourcemodule GuardrailOutputScope : sig ... end
Sourcemodule StartAsyncInvokeResponse : sig ... end

Starts an asynchronous invocation. This operation requires permission for the bedrock:InvokeModel action. To deny all inference access to resources that you specify in the modelId field, you need to deny access to the bedrock:InvokeModel and bedrock:InvokeModelWithResponseStream actions. Doing this also denies access to the resource through the Converse API actions (Converse and ConverseStream). For more information see Deny access for inference on specific models.

Sourcemodule StartAsyncInvokeRequest : sig ... end

Starts an asynchronous invocation. This operation requires permission for the bedrock:InvokeModel action. To deny all inference access to resources that you specify in the modelId field, you need to deny access to the bedrock:InvokeModel and bedrock:InvokeModelWithResponseStream actions. Doing this also denies access to the resource through the Converse API actions (Converse and ConverseStream). For more information see Deny access for inference on specific models.

Sourcemodule ListAsyncInvokesResponse : sig ... end

Lists asynchronous invocations.

Sourcemodule ListAsyncInvokesRequest : sig ... end

Lists asynchronous invocations.

Invoke the specified Amazon Bedrock model to run inference using the prompt and inference parameters provided in the request body. The response is returned in a stream. To see if a model supports streaming, call GetFoundationModel and check the responseStreamingSupported field in the response. The CLI doesn't support streaming operations in Amazon Bedrock, including InvokeModelWithResponseStream. For example code, see Invoke model with streaming code example in the Amazon Bedrock User Guide. This operation requires permissions to perform the bedrock:InvokeModelWithResponseStream action. To deny all inference access to resources that you specify in the modelId field, you need to deny access to the bedrock:InvokeModel and bedrock:InvokeModelWithResponseStream actions. Doing this also denies access to the resource through the Converse API actions (Converse and ConverseStream). For more information see Deny access for inference on specific models. For troubleshooting some of the common errors you might encounter when using the InvokeModelWithResponseStream API, see Troubleshooting Amazon Bedrock API Error Codes in the Amazon Bedrock User Guide

Invoke the specified Amazon Bedrock model to run inference using the prompt and inference parameters provided in the request body. The response is returned in a stream. To see if a model supports streaming, call GetFoundationModel and check the responseStreamingSupported field in the response. The CLI doesn't support streaming operations in Amazon Bedrock, including InvokeModelWithResponseStream. For example code, see Invoke model with streaming code example in the Amazon Bedrock User Guide. This operation requires permissions to perform the bedrock:InvokeModelWithResponseStream action. To deny all inference access to resources that you specify in the modelId field, you need to deny access to the bedrock:InvokeModel and bedrock:InvokeModelWithResponseStream actions. Doing this also denies access to the resource through the Converse API actions (Converse and ConverseStream). For more information see Deny access for inference on specific models. For troubleshooting some of the common errors you might encounter when using the InvokeModelWithResponseStream API, see Troubleshooting Amazon Bedrock API Error Codes in the Amazon Bedrock User Guide

Invoke the specified Amazon Bedrock model to run inference using the bidirectional stream. The response is returned in a stream that remains open for 8 minutes. A single session can contain multiple prompts and responses from the model. The prompts to the model are provided as audio files and the model's responses are spoken back to the user and transcribed. It is possible for users to interrupt the model's response with a new prompt, which will halt the response speech. The model will retain contextual awareness of the conversation while pivoting to respond to the new prompt.

Invoke the specified Amazon Bedrock model to run inference using the bidirectional stream. The response is returned in a stream that remains open for 8 minutes. A single session can contain multiple prompts and responses from the model. The prompts to the model are provided as audio files and the model's responses are spoken back to the user and transcribed. It is possible for users to interrupt the model's response with a new prompt, which will halt the response speech. The model will retain contextual awareness of the conversation while pivoting to respond to the new prompt.

Sourcemodule InvokeModelResponse : sig ... end

Invokes the specified Amazon Bedrock model to run inference using the prompt and inference parameters provided in the request body. You use model inference to generate text, images, and embeddings. For example code, see Invoke model code examples in the Amazon Bedrock User Guide. This operation requires permission for the bedrock:InvokeModel action. To deny all inference access to resources that you specify in the modelId field, you need to deny access to the bedrock:InvokeModel and bedrock:InvokeModelWithResponseStream actions. Doing this also denies access to the resource through the Converse API actions (Converse and ConverseStream). For more information see Deny access for inference on specific models. For troubleshooting some of the common errors you might encounter when using the InvokeModel API, see Troubleshooting Amazon Bedrock API Error Codes in the Amazon Bedrock User Guide

Sourcemodule InvokeModelRequest : sig ... end

Invokes the specified Amazon Bedrock model to run inference using the prompt and inference parameters provided in the request body. You use model inference to generate text, images, and embeddings. For example code, see Invoke model code examples in the Amazon Bedrock User Guide. This operation requires permission for the bedrock:InvokeModel action. To deny all inference access to resources that you specify in the modelId field, you need to deny access to the bedrock:InvokeModel and bedrock:InvokeModelWithResponseStream actions. Doing this also denies access to the resource through the Converse API actions (Converse and ConverseStream). For more information see Deny access for inference on specific models. For troubleshooting some of the common errors you might encounter when using the InvokeModel API, see Troubleshooting Amazon Bedrock API Error Codes in the Amazon Bedrock User Guide

Sourcemodule GetAsyncInvokeResponse : sig ... end

Retrieve information about an asynchronous invocation.

Sourcemodule GetAsyncInvokeRequest : sig ... end

Retrieve information about an asynchronous invocation.

Sourcemodule CountTokensResponse : sig ... end

Returns the token count for a given inference request. This operation helps you estimate token usage before sending requests to foundation models by returning the token count that would be used if the same input were sent to the model in an inference request. Token counting is model-specific because different models use different tokenization strategies. The token count returned by this operation will match the token count that would be charged if the same input were sent to the model in an InvokeModel or Converse request. You can use this operation to: Estimate costs before sending inference requests. Optimize prompts to fit within token limits. Plan for token usage in your applications. This operation accepts the same input formats as InvokeModel and Converse, allowing you to count tokens for both raw text inputs and structured conversation formats. The following operations are related to CountTokens: InvokeModel - Sends inference requests to foundation models Converse - Sends conversation-based inference requests to foundation models

Sourcemodule CountTokensRequest : sig ... end

Returns the token count for a given inference request. This operation helps you estimate token usage before sending requests to foundation models by returning the token count that would be used if the same input were sent to the model in an inference request. Token counting is model-specific because different models use different tokenization strategies. The token count returned by this operation will match the token count that would be charged if the same input were sent to the model in an InvokeModel or Converse request. You can use this operation to: Estimate costs before sending inference requests. Optimize prompts to fit within token limits. Plan for token usage in your applications. This operation accepts the same input formats as InvokeModel and Converse, allowing you to count tokens for both raw text inputs and structured conversation formats. The following operations are related to CountTokens: InvokeModel - Sends inference requests to foundation models Converse - Sends conversation-based inference requests to foundation models

Sourcemodule ConverseStreamResponse : sig ... end

Sends messages to the specified Amazon Bedrock model and returns the response in a stream. ConverseStream provides a consistent API that works with all Amazon Bedrock models that support messages. This allows you to write code once and use it with different models. Should a model have unique inference parameters, you can also pass those unique parameters to the model. To find out if a model supports streaming, call GetFoundationModel and check the responseStreamingSupported field in the response. The CLI doesn't support streaming operations in Amazon Bedrock, including ConverseStream. Amazon Bedrock doesn't store any text, images, or documents that you provide as content. The data is only used to generate the response. You can submit a prompt by including it in the messages field, specifying the modelId of a foundation model or inference profile to run inference on it, and including any other fields that are relevant to your use case. You can also submit a prompt from Prompt management by specifying the ARN of the prompt version and including a map of variables to values in the promptVariables field. You can append more messages to the prompt by using the messages field. If you use a prompt from Prompt management, you can't include the following fields in the request: additionalModelRequestFields, inferenceConfig, system, or toolConfig. Instead, these fields must be defined through Prompt management. For more information, see Use a prompt from Prompt management. For information about the Converse API, see Use the Converse API in the Amazon Bedrock User Guide. To use a guardrail, see Use a guardrail with the Converse API in the Amazon Bedrock User Guide. To use a tool with a model, see Tool use (Function calling) in the Amazon Bedrock User Guide For example code, see Conversation streaming example in the Amazon Bedrock User Guide. This operation requires permission for the bedrock:InvokeModelWithResponseStream action. To deny all inference access to resources that you specify in the modelId field, you need to deny access to the bedrock:InvokeModel and bedrock:InvokeModelWithResponseStream actions. Doing this also denies access to the resource through the base inference actions (InvokeModel and InvokeModelWithResponseStream). For more information see Deny access for inference on specific models. For troubleshooting some of the common errors you might encounter when using the ConverseStream API, see Troubleshooting Amazon Bedrock API Error Codes in the Amazon Bedrock User Guide

Sourcemodule ConverseStreamRequest : sig ... end

Sends messages to the specified Amazon Bedrock model and returns the response in a stream. ConverseStream provides a consistent API that works with all Amazon Bedrock models that support messages. This allows you to write code once and use it with different models. Should a model have unique inference parameters, you can also pass those unique parameters to the model. To find out if a model supports streaming, call GetFoundationModel and check the responseStreamingSupported field in the response. The CLI doesn't support streaming operations in Amazon Bedrock, including ConverseStream. Amazon Bedrock doesn't store any text, images, or documents that you provide as content. The data is only used to generate the response. You can submit a prompt by including it in the messages field, specifying the modelId of a foundation model or inference profile to run inference on it, and including any other fields that are relevant to your use case. You can also submit a prompt from Prompt management by specifying the ARN of the prompt version and including a map of variables to values in the promptVariables field. You can append more messages to the prompt by using the messages field. If you use a prompt from Prompt management, you can't include the following fields in the request: additionalModelRequestFields, inferenceConfig, system, or toolConfig. Instead, these fields must be defined through Prompt management. For more information, see Use a prompt from Prompt management. For information about the Converse API, see Use the Converse API in the Amazon Bedrock User Guide. To use a guardrail, see Use a guardrail with the Converse API in the Amazon Bedrock User Guide. To use a tool with a model, see Tool use (Function calling) in the Amazon Bedrock User Guide For example code, see Conversation streaming example in the Amazon Bedrock User Guide. This operation requires permission for the bedrock:InvokeModelWithResponseStream action. To deny all inference access to resources that you specify in the modelId field, you need to deny access to the bedrock:InvokeModel and bedrock:InvokeModelWithResponseStream actions. Doing this also denies access to the resource through the base inference actions (InvokeModel and InvokeModelWithResponseStream). For more information see Deny access for inference on specific models. For troubleshooting some of the common errors you might encounter when using the ConverseStream API, see Troubleshooting Amazon Bedrock API Error Codes in the Amazon Bedrock User Guide

Sourcemodule ConverseResponse : sig ... end

Sends messages to the specified Amazon Bedrock model. Converse provides a consistent interface that works with all models that support messages. This allows you to write code once and use it with different models. If a model has unique inference parameters, you can also pass those unique parameters to the model. Amazon Bedrock doesn't store any text, images, or documents that you provide as content. The data is only used to generate the response. You can submit a prompt by including it in the messages field, specifying the modelId of a foundation model or inference profile to run inference on it, and including any other fields that are relevant to your use case. You can also submit a prompt from Prompt management by specifying the ARN of the prompt version and including a map of variables to values in the promptVariables field. You can append more messages to the prompt by using the messages field. If you use a prompt from Prompt management, you can't include the following fields in the request: additionalModelRequestFields, inferenceConfig, system, or toolConfig. Instead, these fields must be defined through Prompt management. For more information, see Use a prompt from Prompt management. For information about the Converse API, see Use the Converse API in the Amazon Bedrock User Guide. To use a guardrail, see Use a guardrail with the Converse API in the Amazon Bedrock User Guide. To use a tool with a model, see Tool use (Function calling) in the Amazon Bedrock User Guide For example code, see Converse API examples in the Amazon Bedrock User Guide. This operation requires permission for the bedrock:InvokeModel action. To deny all inference access to resources that you specify in the modelId field, you need to deny access to the bedrock:InvokeModel and bedrock:InvokeModelWithResponseStream actions. Doing this also denies access to the resource through the base inference actions (InvokeModel and InvokeModelWithResponseStream). For more information see Deny access for inference on specific models. For troubleshooting some of the common errors you might encounter when using the Converse API, see Troubleshooting Amazon Bedrock API Error Codes in the Amazon Bedrock User Guide

Sourcemodule ConverseRequest : sig ... end

Sends messages to the specified Amazon Bedrock model. Converse provides a consistent interface that works with all models that support messages. This allows you to write code once and use it with different models. If a model has unique inference parameters, you can also pass those unique parameters to the model. Amazon Bedrock doesn't store any text, images, or documents that you provide as content. The data is only used to generate the response. You can submit a prompt by including it in the messages field, specifying the modelId of a foundation model or inference profile to run inference on it, and including any other fields that are relevant to your use case. You can also submit a prompt from Prompt management by specifying the ARN of the prompt version and including a map of variables to values in the promptVariables field. You can append more messages to the prompt by using the messages field. If you use a prompt from Prompt management, you can't include the following fields in the request: additionalModelRequestFields, inferenceConfig, system, or toolConfig. Instead, these fields must be defined through Prompt management. For more information, see Use a prompt from Prompt management. For information about the Converse API, see Use the Converse API in the Amazon Bedrock User Guide. To use a guardrail, see Use a guardrail with the Converse API in the Amazon Bedrock User Guide. To use a tool with a model, see Tool use (Function calling) in the Amazon Bedrock User Guide For example code, see Converse API examples in the Amazon Bedrock User Guide. This operation requires permission for the bedrock:InvokeModel action. To deny all inference access to resources that you specify in the modelId field, you need to deny access to the bedrock:InvokeModel and bedrock:InvokeModelWithResponseStream actions. Doing this also denies access to the resource through the base inference actions (InvokeModel and InvokeModelWithResponseStream). For more information see Deny access for inference on specific models. For troubleshooting some of the common errors you might encounter when using the Converse API, see Troubleshooting Amazon Bedrock API Error Codes in the Amazon Bedrock User Guide

Sourcemodule ApplyGuardrailResponse : sig ... end

The action to apply a guardrail. For troubleshooting some of the common errors you might encounter when using the ApplyGuardrail API, see Troubleshooting Amazon Bedrock API Error Codes in the Amazon Bedrock User Guide

Sourcemodule ApplyGuardrailRequest : sig ... end

The action to apply a guardrail. For troubleshooting some of the common errors you might encounter when using the ApplyGuardrail API, see Troubleshooting Amazon Bedrock API Error Codes in the Amazon Bedrock User Guide