Cohere is updating APIs to make it easier for developers to switch from other models

Cohere is updating APIs to make it easier for developers to switch from other models


Cohere has announced the release updated versions of application programming interfaces (APIs) for AI Chat, Embed, Rerank and Classify models.

Collectively, the recent API updates are often known as API V2, and Cohere clearly states that the updates are intended to align more closely with AI industry standards to make it easier for developers to pivot applications to Cohere’s models somewhat than the competition’s: namely OpenAI, Anthropic, Google, Mistral, and Meta.

- Advertisement -

Earlier this month, general partner Andreessen Horowitz (A16z). Martin Casado posted on X an image of a chart showing survey results from the AI ​​API platform Congo 800 enterprise leaders revealed what major language models (LLM) they used.

ChatGPT OpenAI dominated the chart with 27% market share compared to 18% for Microsoft’s Azure AI cloud service and 17% for Google Gemini. Cohere got here in second-to-last with a distant 5%, showing how the Toronto startup – which was co-founded by some of the former Google researchers behind the original 2017 Transformer paper that ushered in the era of generative AI – has ample opportunity to catch up. , to acquire the corporate clients it seeks.

Greater reliability thanks to more precise settings

One of the most vital changes in API V2 is the requirement for developers to specify the model version in their API calls.

Previously, this field was optional, which sometimes led to unexpected behavior when recent models were released and the default model modified.

By making model version a mandatory field, Cohere ensures developers maintain consistent application performance, especially in scenarios involving embedded models where using different versions can impact results.

The updated Chat API introduces several usability improvements, including consolidating input parameters into one messages array, replacing the previous structure which required a separate message, chat_historyAND preamble parameters.

This change simplifies the data entry process by enabling more complex use cases where roles equivalent to system Or assistant might be assigned to the last message in a chat sequence.

Cohere’s recent APIs also expand tool integration capabilities. In version 2, tools are defined using JSON schema as a substitute of Python types, making the process more flexible and compatible with a wider range of applications.

Additionally, each tool call now includes a unique identifier so that the API can appropriately match tool results to corresponding calls – an improvement over API v1, which lacked this feature.

For streaming interactions, Chat API v2 has moved from JSON streaming events to server sent events (SSE), providing users with a more reliable and responsive experience.

Support for existing APIs

Cohere has confirmed that the V1 API suite will proceed to be supported, so developers who are not yet ready to migrate can proceed to rely on existing implementations.

There will likely be no significant changes to the v1 API or its associated SDKs.

However, the company recommends updating to version 2 for improved stability and access to the latest features equivalent to model version enforcement and advanced chat capabilities.

Resources for developers

To ease the transition to API V2, Cohere has released a recent SDK and OpenAPI specification for its updated endpoint.

These resources, along with a detailed chat migration guide, are available on the Cohere platform. We encourage developers to provide feedback and suggestions via the company’s Discord community.

Version 2 of the Cohere API represents a significant step forward in making the platform more accessible and efficient for developers. With these updates, the company goals to offer a more streamlined and predictable development experience and ultimately convert users to OpenAI and other popular APIs.

Latest Posts

Advertisement

More from this stream

Recomended