You can proxy requests to Cohere AI models through AI Gateway by creating AI Model Provider and AI Model entities. This reference documents all supported AI capabilities, configuration requirements, and provider-specific details needed for proper integration.
Cohere provider
Upstream paths
AI Gateway automatically routes requests to the appropriate Cohere API endpoints. The following table shows the upstream paths used for each capability.
|
Capability |
Path template |
Description |
Upstream path or API |
|---|---|---|---|
| Generate |
/chat/completions, /completions, or /responses
|
Text generation for chat completions and responses |
/v1/chat
|
| Embeddings |
/embeddings
|
Vector embeddings from text input |
/v2/embed
|
| Rerank |
/rerank
|
Semantic reranking of documents |
/v1/rerank or /v2/rerank
|
Supported capabilities
The following tables show the AI capabilities supported by the Cohere provider when configuring AI Models.
By default, AI Gateway uses the path templates shown in the tables below (e.g.,
/chat/completions,/embeddings, etc.). To customize these paths, configure theconfig.pathsfield in your AI Model entity. Custom paths take the form{configured_path}/{template_path}— for example, if you set a custom path of/v2, requests to/embeddingswould be routed to/v2/embeddings.
Text generation
Support for Cohere text generation capabilities:
|
Capability |
Streaming |
Model example |
Path template |
Min version |
|---|---|---|---|---|
| generate | Supported | command-a-03-2025 |
/chat/completions, /completions, or /responses
|
2.0 |
Embeddings
Support for Cohere embeddings generation:
|
Capability |
Model example |
Path template |
Min version |
|---|---|---|---|
| embeddings | embed-english-v3.0 |
/embeddings
|
2.0 |
Rerank
Support for Cohere reranking capabilities:
|
Capability |
Model example |
Path template |
Min version |
|---|---|---|---|
| rerank | n/a |
/rerank
|
2.0 |
Cohere base URL
The base URL is https://api.cohere.com:443/{capability_path}. The {capability_path} is determined by the AI capability.
AI Gateway uses this URL automatically. You only need to configure a URL if you’re using a self-hosted or Cohere-compatible endpoint, in which case set the upstream_url option in your AI Model configuration.
Supported native LLM formats for Cohere
By default, AI Gateway uses OpenAI-compatible request formats. Configure a native format in your AI Model to use Cohere-specific APIs and features.
The following native Cohere formats are supported:
|
LLM format |
Supported APIs |
|---|---|
cohere
|
|
Configure Cohere
To use Cohere with AI Gateway, configure a new AI Model Provider. You can then access supported AI Models from Cohere.
Here’s a minimal configuration for chat completions:
FAQs
How do I use Cohere’s Rerank API to improve RAG retrieval quality?
Configure an AI Model with a Cohere AI Model Provider and send queries with candidate documents. The model filters for relevance and returns answers with citations.