Skip to main content
Cohere

Search documentation

Type to search this documentation.

On this pageOverview

Private Deployment Usage

You can use Cohere's SDK to access privately deployed Cohere models.

To install the Cohere SDK, choose from the following 4 languages:

Bash
pip install -U cohere

Source

Bash
npm i -s cohere-ai

Source

gradle
implementation 'com.cohere:cohere-java:1.x.x'

Source

Bash
go get github.com/cohere-ai/cohere-go/v2

Source

The only difference between using Cohere's models on private deployments and the Cohere platform is how you set up the client. With private deployments, you need to pass the following parameters:

  • api_key - Pass a blank value
  • base_url - Pass the URL of your private deployment
PYTHON
import cohere

co = cohere.ClientV2(
    api_key="",  # Leave this blank
    base_url="<YOUR_DEPLOYMENT_URL>",
)

To get started with example use cases, refer to the following quickstart examples:

You can use the LangChain library with privately deployed Cohere models. Refer to the LangChain section for more information on setting up LangChain for private deployments.

Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu