The code examples in this section use the Cohere v1 API. The v2 API is not yet supported for cloud deployments and will be coming soon.
In this guide, you’ll learn how to use Amazon Bedrock to deploy the Cohere Command, Embed, and Rerank models on the AWS cloud computing platform. The following models are available on Bedrock:
Note that the code snippets below are in Python, but you can find the equivalent code for other languages (if they’re supported) here
Here are the steps you’ll need to get set up in advance of running Cohere models on Amazon Bedrock.
You can use this code to invoke Cohere’s Embed English v3 model (cohere.embed-english-v3) or Embed Multilingual v3 model (cohere.embed-multilingual-v3) on Amazon Bedrock:
Note that we’ve released multimodal embeddings models that are able to handle images in addition to text. Find more information here.
You can use this code to invoke either Command R (cohere.command-r-v1:0), Command R+ (cohere.command-r-plus-v1:0) on Amazon Bedrock:
You can use this code to invoke our latest Rerank models on Bedrock