- Newest
- Most votes
- Most comments
To generate an embedding for the text "Sense and Sensibility" using Amazon Titan Text Embeddings v2 via REST API in Postman, you would need to set up the following:
- HTTP Method: POST
- URL: https://bedrock-runtime.[region].amazonaws.com/model/amazon.titan-embed-text-v2:0/invoke
Headers:
- Content-Type: application/json
- Accept: application/json
- Authorization: [Your AWS authentication credentials]
Request Body:
{ "inputText": "Sense and Sensibility", "dimensions": 1024, "normalize": true }
The dimensions parameter is optional and accepts values of 256, 512, or 1024. If not specified, the default is 1024.
The normalize parameter is also optional and determines whether the output embeddings should be normalized.
You can also use the optional embeddingTypes parameter to specify the type of embeddings you want (e.g., ["binary"]). Note that if you only request binary embeddings, the response will include embeddingsByType.binary instead of the standard embedding field.
The response will contain:
- The embedding vector
- The input text token count
Make sure you have the proper AWS authentication set up in your Postman environment to authorize the request.
Sources
Invoke Amazon Titan Text Embeddings on Amazon Bedrock - Amazon Bedrock
Invoke Amazon Titan Text Embeddings on Amazon Bedrock - AWS SDK Code Examples
Amazon Titan Embeddings G1 - Text - Amazon Bedrock
Submit a single prompt with InvokeModel - Amazon Bedrock
Relevant content
asked 2 years ago
- AWS OFFICIALUpdated a month ago
