POST /v1/embed
This endpoint returns text and image embeddings. An embedding is a list of floating point numbers that captures semantic information about the content that it represents.
Embeddings can be used to create classifiers as well as empower semantic search. To learn more about embeddings, see the embedding page.
If you want to learn more how to use the embedding model, have a look at the Semantic Search Guide.
Servers
- https://api.cohere.com
Request headers
| Name | Type | Required | Description |
|---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
X-Client-Name |
String | No |
The name of the project that is making the request. |
Request body fields
| Name | Type | Required | Description |
|---|---|---|---|
input_type |
String | No |
Specifies the type of input passed to the model. Required for embedding models v3 and higher.
Valid values:
|
embedding_types[] |
Array | No |
Specifies the types of embeddings you want to get back. Not required and default is None, which returns the Embed Floats response type. Can be one or more of the following types.
|
images[] |
Array | No |
An array of image data URIs for the model to embed. The image must be a valid data URI. The image must be in either Image embeddings are supported with Embed v3.0 and newer models. For Embed v3.x models, the maximum number of images per call is For Embed v4.0 and newer models, there is no limit on the number of images per call. The combined size of all images in the request must be at most |
texts[] |
Array | No |
An array of strings for the model to embed. Maximum number of texts per call is |
truncate |
String | No |
One of Passing If Valid values:
Default value: "END" |
model |
String | No |
ID of one of the available Embedding models. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.