--- id: cohere version: "7.0.8" license: MIT license_treatment: permissive maintenance: active --- # cohere License: permissive · Maintenance: active · Popularity: top 1,000 on PyPI ## Install pip install cohere uv add cohere poetry add cohere ## Description # Cohere Python SDK ![](banner.png) [![version badge](https://img.shields.io/pypi/v/cohere)](https://pypi.org/project/cohere/) ![license badge](https://img.shields.io/github/license/cohere-ai/cohere-python) [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-SDK%20generated%20by%20Fern-brightgreen)](https://github.com/fern-api/fern) The Cohere Python SDK allows access to Cohere models across many different platforms: the cohere platform, AWS (Bedrock, Sagemaker), Azure, GCP and Oracle OCI. For a full list of support and snippets, please take a look at the [SDK support docs page](https://docs.cohere.com/docs/cohere-works-everywhere). ## Documentation Cohere documentation and API reference is available [here](https://docs.cohere.com/). ## Installation ``` pip install cohere ``` ## Usage ```Python import cohere co = cohere.ClientV2() response = co.chat( model="command-r-plus-08-2024", messages=[{"role": "user", "content": "hello world!"}], ) print(response) ``` > [!TIP] > You can set a system environment variable `CO_API_KEY` to avoid writing your api key within your code, e.g. add `export CO_API_KEY=theapikeyforyouraccount` > in your ~/.zshrc or... ## AI interpretation — verify before relying The Cohere Python SDK provides programmatic access to Cohere's large language models for chat, embedding, and text generation across multiple cloud platforms including AWS, Azure, GCP, and Oracle OCI. Verdict: A well-maintained, actively developed SDK for accessing Cohere's generative AI models with low installation friction and permissive MIT licensing. No known security vulnerabilities and broad Python version support (3.10–3.15) make it production-ready for multi-cloud AI integrations. [View on SkillFed](https://skillfed.io/packages/cohere) · [View on PyPI](https://pypi.org/project/cohere/)