Discover Cohere Models: API for AI Applications
For detailed information about using models with APIpie, check out our Models Overview and Completions Guide.
Description
Cohere is a leading provider of enterprise-grade language AI models. Their Command series represents state-of-the-art models optimized for production environments, offering exceptional performance in natural language understanding, generation, and task completion. These models are available through various providers integrated with APIpie's routing system.
Key Features
- Extended Token Capacity: Models support context lengths from 4K to 128K tokens, with Command-R models optimized for processing long documents.
- Multi-Provider Availability: Accessible through Amazon Bedrock, OpenRouter, EdenAI.
- Diverse Applications: Optimized for chat, instruction-following, and text generation tasks.
- Enterprise Focus: Models designed for production-ready deployment with consistent performance and enterprise-grade security.
- Advanced Capabilities: Features include semantic search, text classification, and content moderation.
Model List in the Cohere Series
Model List updates dynamically please see the Models Route for the up to date list of models
For detailed performance metrics and benchmarks, see the Cohere Model Performance documentation and Command Model Cards.
Language Models (LLMs)
Model Name | Max Tokens | Response Tokens | Providers | Subtype |
command | 4,096 | 4,000 | OpenRouter, EdenAI | Chat |
command-text-v14 | 4,000 | 4,000 | Bedrock | Chat |
command-light-text-v14 | 4,000 | 4,000 | Bedrock | Chat |
command-r-v1 | 128,000 | 4,000 | Bedrock | Chat |
command-r-plus-v1 | 128,000 | 4,000 | Bedrock | Chat |
command-r | 128,000 | 4,000 | OpenRouter, EdenAI | Chat |
command-r-plus | 128,000 | 4,000 | OpenRouter, EdenAI | Chat |
command-r-08-2024 | 128,000 | 4,000 | OpenRouter | Chat |
command-r-plus-08-2024 | 128,000 | 4,000 | OpenRouter | Chat |
command-r-plus-04-2024 | 128,000 | 4,000 | OpenRouter | Chat |
command-r-03-2024 | 128,000 | 4,000 | OpenRouter | Chat |
command-r7b-12-2024 | 128,000 | 4,000 | OpenRouter | Chat |
command-light | 4,096 | 4,000 | EdenAI | Chat |
command-light-nightly | 4,096 | 4,000 | EdenAI | Chat |
command-nightly | 4,096 | 4,000 | EdenAI | Chat |
Embedding Models
Model Name | Dimensions | Provider | Language | Type |
embed-english-v3 | 512 | Bedrock | English | Embedding |
embed-multilingual-v3 | 512 | Bedrock | Multilingual | Embedding |
embed-english-v3.0 | - | EdenAI | English | Embedding |
embed-english-light-v3.0 | - | EdenAI | English | Embedding |
embed-multilingual-v3.0 | - | EdenAI | Multilingual | Embedding |
embed-english-v2.0 | - | EdenAI | English | Embedding |
embed-english-light-v2.0 | - | EdenAI | English | Embedding |
embed-multilingual-v2.0 | - | EdenAI | Multilingual | Embedding |
4096embed-english-v2.0 | 4,096 | EdenAI | English | Embedding |
1024embed-english-light-v2.0 | 1,024 | EdenAI | English | Embedding |
768__embed-multilingual-v2.0 | 768 | EdenAI | Multilingual | Embedding |
4096__embed-english-v2.0 | 4,096 | EdenAI | English | Embedding |
1024__embed-english-light-v2.0 | 1,024 | EdenAI | English | Embedding |
Example API Call
Below is an example of how to use the Chat Completions API to interact with a model from the Cohere Series, such as command
.
curl -L -X POST 'https://apipie.ai/v1/chat/completions' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <YOUR_API_KEY>' \
--data-raw '{
"provider": "cohere",
"model": "command",
"max_tokens": 150,
"messages": [
{
"role": "user",
"content": "Can you explain how photosynthesis works?"
}
]
}'
Response Example
The expected response structure for the Cohere model might look like this:
{
"id": "chatcmpl-12345example12345",
"object": "chat.completion",
"created": 1729535643,
"provider": "cohere",
"model": "command",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Photosynthesis is the process by which green plants, algae, and some bacteria convert light energy into chemical energy. Here's how it works:\n\n1. **Light Absorption**: Plants capture light energy using a pigment called chlorophyll, which is found in chloroplasts.\n\n2. **Water and Carbon Dioxide**: They absorb water through their roots and carbon dioxide from the air.\n\n3. **Glucose Production**: The light energy is used to convert water and carbon dioxide into glucose (a sugar) and oxygen. The equation is:\n \n 6CO2 + 6H2O + light energy → C6H12O6 + 6O2\n\nThis process provides energy for the plant and releases oxygen into the atmosphere."
},
"logprobs": null,
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 15,
"completion_tokens": 125,
"total_tokens": 140,
"prompt_characters": 45,
"response_characters": 520,
"cost": 0.002250,
"latency_ms": 3100
},
"system_fingerprint": "fp_123abc456def"
}
API Highlights
- Provider: Specify the provider or leave blank for automatic selection.
- Model: Use any model from the Cohere Series, such as
command
or others suited to your task. See Models Guide. - Max Tokens: Set the maximum response token count (e.g., 150 in this example).
- Messages: Format your request with a sequence of messages, including user input and system instructions. See message formatting.
This example demonstrates how to seamlessly query models from the Cohere Series for conversational or instructional tasks.
Applications and Integrations
- Conversational AI: Powering chatbots, virtual assistants, and other dialogue-based systems. Try it with LibreChat or OpenWebUI.
- Enterprise Solutions: Leveraging Cohere's models for business applications and customer service automation.
- Content Generation: Creating high-quality text content using Cohere's generation capabilities.
- Extended Context Tasks: Processing long documents with models supporting up to 128K tokens. Learn more in our Models Guide.
- Multilingual Support: Handling text processing tasks across multiple languages effectively.
- RAG Applications: Building powerful retrieval-augmented generation systems with Cohere's models.
Ethical Considerations
Cohere models are designed with responsible AI practices in mind. Users should implement appropriate safeguards and consider potential biases in model outputs. For guidance on responsible AI usage, see Cohere's Responsible AI Guidelines.
Licensing
Cohere models are available through their commercial licensing terms. For detailed licensing information and usage terms, consult the official Cohere documentation and respective hosting providers.
Try out the Cohere models in APIpie's various supported integrations.