- API Reference
- endpoint
Embeddings
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>* requiredText to embed.
ImageURLChunk
{"type":"image_url","image_url":"data:image/png;base64,iVBORw0"}
ImageURL
detail
"low" | "auto" | "high"url
string* requiredtype
stringDefault Value: "image_url"
AudioChunk
input_audio
string* requiredtype
stringDefault Value: "input_audio"
metadata
map<any> | nullmodel
string* requiredID of the model to use.
Example:
mistral-embed
output_dimension
integer | nullThe 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
EmbeddingResponseData
embedding
array<number>index
integerExample:
0
object
stringExample:
embedding
id
string* requiredExample:
cmpl-e5cc70bb28c444948073e77776eb30ef
model
string* requiredExample:
mistral-small-latest
object
string* requiredExample:
chat.completion
UsageInfo
completion_tokens
integerDefault Value: 0
prompt_audio_seconds
integer | nullprompt_tokens
integerDefault Value: 0
prompt_tokens_details
PromptTokensDetails | nullToken usage details for the prompt.
PromptTokensDetails
Token usage details for the prompt.
audio_tokens
integerDefault Value: 0
cached_tokens
integerDefault Value: 0
service_tier
string | nullThe service tier at which the request was processed: standard or priority.
total_tokens
integerDefault Value: 0