Cohere has recently announced the launch of its next-generation application programming interface (API) for AI models, dubbed API V2. This update covers models such as Chat, Embed, Rerank, and Classify.
Cohere has clearly stated that this update aims to better align with industry standards, making it easier for developers to switch their applications to Cohere's models, especially when competing with rivals like OpenAI, Anthropic, Google, Mistral, and Meta.
Reports indicate that Martin Casado, a partner at Andreessen Horowitz, shared a survey chart on social media, showing that among 800 business leaders, OpenAI's ChatGPT holds a 27% market share, while Cohere ranks second to last with only a 5% share. This suggests that Cohere still needs to make more efforts to attract corporate clients.
One of the most significant changes in API V2 is that developers must now specify the model version in the API call. Previously, this field was optional, which could lead to unexpected behaviors when new models were released. By mandating the specification of the model version, Cohere ensures that developers can maintain consistent application performance, especially when dealing with the Embed model, where the use of different versions can affect the results.
Additionally, the updated Chat API has improved usability. Developers can now combine input parameters into a single message array, rather than needing to input messages, chat history, and preamble parameters separately. This change simplifies the input process, making more complex use cases feasible, such as assigning roles like system or assistant to the latest message in a chat sequence.
Cohere's new API also enhances tool integration capabilities. In the V2 version, tools are defined using JSON schema instead of Python types, making the process more flexible and compatible. Furthermore, each tool call now has a unique ID, ensuring that the API can correctly match tool results with their corresponding calls, which was missing in the V1 API.
Regarding support for the existing API, Cohere has confirmed that the V1 suite will continue to be supported, ensuring that developers who are not yet ready to migrate can continue to rely on the existing implementation. The V1 API and its related SDK will not undergo significant changes, but the company advises developers to upgrade to V2 for more stable performance and the latest features.
To help developers transition smoothly to API V2, Cohere has released new SDKs and updated API endpoint OpenAPI specifications. Additionally, developers can refer to the detailed chat migration guide on the Cohere platform. Cohere encourages developers to provide feedback and suggestions in its Discord community.
Key Points:
🌟 Cohere API V2 is officially launched, enhancing alignment with industry standards and facilitating developer migration.
🔧 Mandatory specification of model versions ensures consistent application performance, especially when using the Embed model.
📚 Provides new SDKs and detailed migration guides to help developers transition smoothly.