v1

latestOpenAPI 3.1.0Apache 2.02026-07-264001921002.3 KB
LiteLLM Integration

Create embeddings (LiteLLM - Cohere format)

Creates embeddings using Cohere-compatible format via LiteLLM.

post/litellm/cohere/v2/embed

Request body

modelstring required

ID of an available embedding model

input_typestring required

Specifies the type of input passed to the model. Required for embedding models v3 and higher.

textsstring[]

Array of strings to embed. Maximum 96 texts per call. At least one of texts, images, or inputs is required.

imagesstring[]

Array of image data URIs for multimodal embedding. Maximum 1 image per call. Supports JPEG, PNG, WebP, GIF up to 5MB.

embedding_typesstring[]

Specifies the return format types (float, int8, uint8, binary, ubinary, base64). Defaults to float if unspecified.

output_dimensioninteger

Number of dimensions for output embeddings (256, 512, 1024, 1536). Available only for embed-v4 and newer models.

max_tokensinteger

Maximum tokens to embed per input before truncation.

truncatestring

Handling for inputs exceeding token limits. Defaults to END.

Example request

{
  "model": "embed-english-v3.0"
}

Response

Successful response

idstring

Response ID

response_typestring

Response type (embeddings_floats, embeddings_by_type)

textsstring[]

Original text entries