Skip to main content

Discover Cohere Models: API for AI Applications

Cohere
info

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


Model List in the Cohere Series

Model List updates dynamically please see the Models Route for the up to date list of models

info

For detailed performance metrics and benchmarks, see the Cohere Model Performance documentation and Command Model Cards.

Language Models (LLMs)

Model NameMax TokensResponse TokensProvidersSubtype
command4,0964,000OpenRouter, EdenAIChat
command-text-v144,0004,000BedrockChat
command-light-text-v144,0004,000BedrockChat
command-r-v1128,0004,000BedrockChat
command-r-plus-v1128,0004,000BedrockChat
command-r128,0004,000OpenRouter, EdenAIChat
command-r-plus128,0004,000OpenRouter, EdenAIChat
command-r-08-2024128,0004,000OpenRouterChat
command-r-plus-08-2024128,0004,000OpenRouterChat
command-r-plus-04-2024128,0004,000OpenRouterChat
command-r-03-2024128,0004,000OpenRouterChat
command-r7b-12-2024128,0004,000OpenRouterChat
command-light4,0964,000EdenAIChat
command-light-nightly4,0964,000EdenAIChat
command-nightly4,0964,000EdenAIChat

Embedding Models

Model NameDimensionsProviderLanguageType
embed-english-v3512BedrockEnglishEmbedding
embed-multilingual-v3512BedrockMultilingualEmbedding
embed-english-v3.0-EdenAIEnglishEmbedding
embed-english-light-v3.0-EdenAIEnglishEmbedding
embed-multilingual-v3.0-EdenAIMultilingualEmbedding
embed-english-v2.0-EdenAIEnglishEmbedding
embed-english-light-v2.0-EdenAIEnglishEmbedding
embed-multilingual-v2.0-EdenAIMultilingualEmbedding
4096embed-english-v2.04,096EdenAIEnglishEmbedding
1024embed-english-light-v2.01,024EdenAIEnglishEmbedding
768__embed-multilingual-v2.0768EdenAIMultilingualEmbedding
4096__embed-english-v2.04,096EdenAIEnglishEmbedding
1024__embed-english-light-v2.01,024EdenAIEnglishEmbedding

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.

tip

Try out the Cohere models in APIpie's various supported integrations.