AWS bedrock documentation change
Summary
Added explicit S3 bucket owner field requirements and base64 encoding limitations
Security assessment
While the bucketOwner field helps ensure proper access control, this is standard AWS resource ownership documentation rather than addressing a specific security vulnerability. Base64 size limits are operational constraints, not security controls.
Diff
diff --git a/bedrock/latest/userguide/model-parameters-marengo.md b/bedrock/latest/userguide/model-parameters-marengo.md index d4a6ab9fb..90c17f862 100644 --- a//bedrock/latest/userguide/model-parameters-marengo.md +++ b//bedrock/latest/userguide/model-parameters-marengo.md @@ -5 +5 @@ -TwelveLabs Marengo Embed 2.7 request parametersTwelveLabs Marengo Embed 2.7 response fieldsTwelveLabs Marengo Embed 2.7 request and response +TwelveLabs Marengo Embed 2.7 request parametersTwelveLabs Marengo Embed 2.7 responseTwelveLabs Marengo Embed 2.7 code examples @@ -9 +9 @@ TwelveLabs Marengo Embed 2.7 request parametersTwelveLabs Marengo Embed 2.7 resp -The TwelveLabs Marengo Embed 2.7 model generates embeddings from video, text, audio, or image inputs. These embeddings can be used for similarity search, clustering, and other machine learning tasks. The model supports asynchronous inference through the `StartAsyncInvoke` API. +The TwelveLabs Marengo Embed 2.7 model generates embeddings from video, text, audio, or image inputs. These embeddings can be used for similarity search, clustering, and other machine learning tasks. @@ -13,2 +12,0 @@ The TwelveLabs Marengo Embed 2.7 model generates embeddings from video, text, au - * Categories — Embeddings, multimodal - @@ -17 +14,0 @@ The TwelveLabs Marengo Embed 2.7 model generates embeddings from video, text, au - * Input modality — Video, Text, Audio, Image @@ -19 +15,0 @@ The TwelveLabs Marengo Embed 2.7 model generates embeddings from video, text, au - * Output modality — Embeddings @@ -21 +16,0 @@ The TwelveLabs Marengo Embed 2.7 model generates embeddings from video, text, au - * Max video size — 2 hours long video (< 2GB file size) @@ -22,0 +18 @@ The TwelveLabs Marengo Embed 2.7 model generates embeddings from video, text, au +The TwelveLabs Marengo Embed 2.7 model supports the Amazon Bedrock Runtime operations in the following table. For more information about use cases for different API methods, see [Learn about use cases for different model inference methods](./inference-methods.html). @@ -23,0 +20,4 @@ The TwelveLabs Marengo Embed 2.7 model generates embeddings from video, text, au +API operation | Input modalities | Output modalities +---|---|--- +InvokeModel | Text Image | Embedding +StartAsyncInvoke | Video Audio Image Text | Embedding @@ -24,0 +25 @@ The TwelveLabs Marengo Embed 2.7 model generates embeddings from video, text, au +###### Note @@ -26 +27 @@ The TwelveLabs Marengo Embed 2.7 model generates embeddings from video, text, au -## TwelveLabs Marengo Embed 2.7 request parameters +Use `InvokeModel` to generate embeddings for search query. Use `StartAsyncInvoke` to generate embeddings for assets at a large scale. @@ -28 +29 @@ The TwelveLabs Marengo Embed 2.7 model generates embeddings from video, text, au -The following table describes the input parameters for the TwelveLabs Marengo Embed 2.7 model: +The following quotas apply to the input: @@ -30,14 +31,6 @@ The following table describes the input parameters for the TwelveLabs Marengo Em -TwelveLabs Marengo Embed 2.7 request parameters Field | Type | Required | Description ----|---|---|--- -`inputType` | string | Yes | Modality for the embedding. Valid values: `video`, `text`, `audio`, `image`. -`inputText` | string | No | Text to be embedded when `inputType` is `text`. Required if `inputType` is `text`. Text input is not available by S3 URI but only by the `inputText` field. -`startSec` | double | No | The start offset in seconds from the beginning of the video or audio where processing should begin. Specifying 0 means starting from the beginning of the media. Default: 0, Min: 0. -`lengthSec` | double | No | The length in seconds of the video or audio where the processing would take from `startSec`. Default: media duration, Max: media duration. -`useFixedLengthSec` | double | No | For `audio` or `video` inputs only. The desired fixed duration in seconds for each clip for which the platform generates an embedding. Min: 2, Max: 10. If missing, for video: segments are divided dynamically by shot boundary detection; for audio: segments are divided evenly to be closest to 10 seconds (so if it's a 50 second clip then it will be 5 segments with 10 seconds each, but if it's a 16 second clip it will be 2 segments 8 seconds each). -`textTruncate` | string | No | For `text` input only. Specifies how the platform truncates text that exceeds 77 tokens. Valid values: `end` (truncate the end of the text), `none` (return an error if text exceeds limit). Default: `end`. -`embeddingOption` | list | No | For `video` input only. Specifies which types of embeddings to retrieve. Valid values: `visual-text` (visual embeddings optimized for text search), `visual-image` (visual embeddings optimized for image search), `audio` (audio embeddings). If not provided, all available embeddings are returned. -`mediaSource` | object | No | Describes the media source. Required for input types: `image`, `video`, and `audio`. -`mediaSource.base64String` | string | No | Base64 encoded byte string for the media. Max: 36MB. Either `base64String` or `s3Location` must be provided if `mediaSource` is used. -`mediaSource.s3Location.uri` | string | No | S3 URI where the media could be downloaded from. For video, max: 2 hours long (< 2GB file size). Required if using `s3Location`. -`mediaSource.s3Location.bucketOwner` | string | No | AWS account ID of the bucket owner. -`minClipSec` | int | No | For `video` input only. Set a minimum clip second. Note: `useFixedLengthSec` should be larger than this value. Default: 4, Min: 1, Max: 5. +Input modality | Maximum +---|--- +Text | 77 tokens +Image | 5 MB +Video (S3) | 2 GB +Audio (S3) | 2 GB @@ -45 +38 @@ TwelveLabs Marengo Embed 2.7 request parameters Field | Type | Required | Descri -## TwelveLabs Marengo Embed 2.7 response fields +###### Note @@ -47 +40 @@ TwelveLabs Marengo Embed 2.7 request parameters Field | Type | Required | Descri -The following table describes the output fields for the TwelveLabs Marengo Embed 2.7 model: +If you define audio or video inline by using base64-encoding, make sure that the request body payload doesn't exceed the Amazon Bedrock 25 MB model invocation quota. @@ -49,6 +42,3 @@ The following table describes the output fields for the TwelveLabs Marengo Embed -TwelveLabs Marengo Embed 2.7 response fields Field | Type | Description ----|---|--- -`embedding` | List of doubles | Embedding values -`embeddingOption` | string | The type of embeddings for multi-vector output (only applicable for video). Valid values: `visual-text` (visual embeddings closely aligned with text embeddings), `visual-image` (visual embeddings closely aligned with image embeddings), `audio` (audio embeddings). -`startSec` | double | The start offset of the clip. Not applicable for text and image embeddings. -`endSec` | double | The end offset of the clip. Not applicable for text and image embeddings. +###### Topics + + * TwelveLabs Marengo Embed 2.7 request parameters @@ -56 +46 @@ TwelveLabs Marengo Embed 2.7 response fields Field | Type | Description -## TwelveLabs Marengo Embed 2.7 request and response + * TwelveLabs Marengo Embed 2.7 response @@ -58 +48,6 @@ TwelveLabs Marengo Embed 2.7 response fields Field | Type | Description -The following examples show how to use the TwelveLabs Marengo Embed 2.7 model with different input types. Note that TwelveLabs Marengo Embed 2.7 uses the StartAsyncInvoke API for processing. + * TwelveLabs Marengo Embed 2.7 code examples + + + + +## TwelveLabs Marengo Embed 2.7 request parameters @@ -60 +55 @@ The following examples show how to use the TwelveLabs Marengo Embed 2.7 model wi -Request +When you make a request, the field in which the model-specific input is specified depends on the API operation: @@ -61,0 +57 @@ Request + * [InvokeModel](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html) – In the request `body`. @@ -63 +59,8 @@ Request -The following examples show request formats for the TwelveLabs Marengo Embed 2.7 model using the StartAsyncInvoke API. + * [StartAsyncInvoke](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_StartAsyncInvoke.html) – In the `modelInput` field of the request body. + + + + +The format of the model input depends on the input modality: + +Text @@ -65 +67,0 @@ The following examples show request formats for the TwelveLabs Marengo Embed 2.7 -**Text input:** @@ -69,2 +70,0 @@ The following examples show request formats for the TwelveLabs Marengo Embed 2.7 - "modelId": "twelvelabs.marengo-embed-2-7-v1:0", - "modelInput": { @@ -72,5 +72,2 @@ The following examples show request formats for the TwelveLabs Marengo Embed 2.7 - "inputText": "Spiderman flies through a street and catches a car with his web" - }, - "outputDataConfig": { - "s3OutputDataConfig": { - "s3Uri": "s3://your-bucket-name" + "inputText": "string", + "textTruncate": "string @@ -77,0 +75,9 @@ The following examples show request formats for the TwelveLabs Marengo Embed 2.7 + +Inline image + + + + { + "inputType": "image", + "mediaSource": { + "base64String": "base64-encoded string" @@ -81 +87,2 @@ The following examples show request formats for the TwelveLabs Marengo Embed 2.7 -**Image input with S3 location:** +S3 image + @@ -85,2 +91,0 @@ The following examples show request formats for the TwelveLabs Marengo Embed 2.7 - "modelId": "twelvelabs.marengo-embed-2-7-v1:0", - "modelInput": { @@ -90,2 +95,2 @@ The following examples show request formats for the TwelveLabs Marengo Embed 2.7 - "uri": "s3://your-image-object-s3-path", - "bucketOwner": "your-image-object-s3-bucket-owner-account" + "uri": "string", + "bucketOwner": "string" @@ -94,4 +98,0 @@ The following examples show request formats for the TwelveLabs Marengo Embed 2.7 - }, - "outputDataConfig": { - "s3OutputDataConfig": { - "s3Uri": "s3://your-bucket-name" @@ -98,0 +100,10 @@ The following examples show request formats for the TwelveLabs Marengo Embed 2.7 + +Inline video + + + + { + "inputType": "video", + "mediaSource": { + "s3Location": { + "base64String": "base64-encoded string" @@ -99,0 +111,5 @@ The following examples show request formats for the TwelveLabs Marengo Embed 2.7 + }, + "startSec": double, + "lengthSec": double, + "useFixedLengthSec": double, + "embeddingOption": "visual-text" | "visual-image" | "audio" @@ -102 +118,2 @@ The following examples show request formats for the TwelveLabs Marengo Embed 2.7 -**Image input with base64 encoding:** +S3 video + @@ -106,2 +122,0 @@ The following examples show request formats for the TwelveLabs Marengo Embed 2.7 - "modelId": "twelvelabs.marengo-embed-2-7-v1:0", - "modelInput": { @@ -110 +125,3 @@ The following examples show request formats for the TwelveLabs Marengo Embed 2.7 - "base64String": "base_64_encoded_string_of_image" + "s3Location": { + "uri": "string", + "bucketOwner": "string" @@ -113,4 +130,5 @@ The following examples show request formats for the TwelveLabs Marengo Embed 2.7 - "outputDataConfig": { - "s3OutputDataConfig": { - "s3Uri": "s3://your-bucket-name" - } + "startSec": double, + "lengthSec": double, + "useFixedLengthSec": double, + "minClipSec": int, + "embeddingOption": ["string"] @@ -117,0 +136,13 @@ The following examples show request formats for the TwelveLabs Marengo Embed 2.7 + +Inline audio + + + + { + "inputType": "audio", + "mediaSource": { + "base64String": "base64-encoded string" + }, + "startSec": double, + "lengthSec": double, + "useFixedLengthSec": double @@ -120 +151,2 @@ The following examples show request formats for the TwelveLabs Marengo Embed 2.7 -**Video input with S3 location:** +S3 audio + @@ -124,3 +156 @@ The following examples show request formats for the TwelveLabs Marengo Embed 2.7 - "modelId": "twelvelabs.marengo-embed-2-7-v1:0", - "modelInput": { - "inputType": "video", + "inputType": "audio", @@ -129,3 +159,2 @@ The following examples show request formats for the TwelveLabs Marengo Embed 2.7