Create embeddings (LangChain - Cohere format)
/langchain/cohere/v2/embedCreates embeddings using Cohere-compatible format via LangChain.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "http://localhost:8080/langchain/cohere/v2/embed" \ -H "Content-Type: application/json" \ -d '{ "model": "embed-english-v3.0", "input_type": "string" }'{
"id": "string",
"embeddings": {
"float": [
[
0
]
],
"int8": [
[
0
]
],
"uint8": [
[
0
]
],
"binary": [
[
0
]
],
"ubinary": [
[
0
]
],
"base64": [
"string"
]
},
"response_type": "string",
"texts": [
"string"
],
"images": [
{
"width": 0,
"height": 0,
"format": "string",
"bit_depth": 0
}
],
"meta": {
"api_version": {
"version": "string",
"is_deprecated": true,
"is_experimental": true
},
"billed_units": {
"input_tokens": 0,
"output_tokens": 0,
"search_units": 0,
"classifications": 0
},
"tokens": {
"input_tokens": 0,
"output_tokens": 0
},
"warnings": [
"string"
]
}
}{
"type": "string",
"message": "string",
"code": "string"
}{
"type": "string",
"message": "string",
"code": "string"
}