This endpoint returns text embeddings. An embedding is a list of floating point numbers that captures semantic information about the text that it represents.

Embeddings can be used to create text classifiers as well as empower semantic search. To learn more about embeddings, see the embedding page.

The Embed endpoint takes a piece of text and turns it into a vector embedding. Embeddings represent text in the form of numbers that capture its meaning and context. This gives us the ability to turn unstructured text data into a structured form that can be processed and analyzed.

1. Install the SDK

$ pip install cohere

2. Set up the Cohere client.

import cohere
co = cohere.Client(api_key)

3. Get embeddings

response = co.embed(["hello", "goodbye"])
print('Embeddings: {}'.format(response.embeddings))
Language
Authentication
Bearer
Click Try It! to start a request and see the response here!