mistralM

Docs

sideBar

Embeddings

Embeddings API.

POST /v1/embeddings

Embeddings

Embeddings

Request Example

{
  "input": "ipsum eiusmod",
  "model": "mistral-embed"
}

Request Body

encoding_format
"float" | "base64"
input
string | ImageURLChunk | AudioChunk | array<string> | array<string | ImageURLChunk | AudioChunk>* required

Text to embed.

ImageURLChunk

{"type":"image_url","image_url":"data:image/png;base64,iVBORw0"}

image_url
ImageURL | string* required
ImageURL
detail
"low" | "auto" | "high"
url
string* required
type
string

Default Value: "image_url"

AudioChunk
input_audio
string* required
type
string

Default Value: "input_audio"

metadata
map<any> | null
model
string* required

ID of the model to use.

Example:

mistral-embed
output_dimension
integer | null

The dimension of the output embeddings when feature available. If not provided, a default output dimension will be used.

output_dtype
"float" | "int8" | "uint8" | "binary" | "ubinary"

Responses

Successful Response

data
array<EmbeddingResponseData>* required
EmbeddingResponseData
embedding
array<number>
index
integer

Example:

0
object
string

Example:

embedding
id
string* required

Example:

cmpl-e5cc70bb28c444948073e77776eb30ef
model
string* required

Example:

mistral-small-latest
object
string* required

Example:

chat.completion
usage
UsageInfo* required
UsageInfo
completion_tokens
integer

Default Value: 0

prompt_audio_seconds
integer | null
prompt_tokens
integer

Default Value: 0

prompt_tokens_details
PromptTokensDetails | null

Token usage details for the prompt.

PromptTokensDetails

Token usage details for the prompt.

audio_tokens
integer

Default Value: 0

cached_tokens
integer

Default Value: 0

service_tier
string | null

The service tier at which the request was processed: standard or priority.

total_tokens
integer

Default Value: 0