Turn text into vectors with an embedding model, in the request format of OpenAI's embeddings API. Set the OpenAI SDK base URL to https://api.munito.ai/inference/v1 and call embeddings.create.
- The embedding models are a preview. See Embeddings for the models and for access.
- Send one text or an array of at most 2,048 texts, with at most 1,200,000 characters in one request. The answer has one vector for each text, in the same order.
- Send text only. A token array gets
400, because each model has its own tokenizer. - Each vector is normalized to a length of 1, so a dot product gives the cosine similarity.
The answer bills the input tokens at the input price of the model. An embedding has no output tokens.
AuthorizationBearer <token>Your Munito API key.
munito-service-tier?stringpriority, standard or flex. The response names the tier that is billed; see x-ratelimit-over-limit. See Service tiers.
"standard""priority""standard""flex"application/json- body
model*stringAn embedding model from GET /models, such as google/embeddinggemma-2.
input*|array<string>The text to embed: one string, or an array of 1 to 2,048 strings, with at most 1,200,000 characters in one request. Each text must fit the context of the model.
encoding_format?stringfloat (the default) gives each vector as an array of numbers. base64 gives the 32-bit floats of the vector as a base64 string, which the OpenAI SDKs decode.
"float""base64"dimensions?integerA vector size of the model. For a shorter size, the model returns the first values of the vector, normalized again. Omit it for the full vector.
user?stringAn identifier of your end user. Munito AI does not use it.
One vector for each text, in the order of the request.
application/json- response
object*"list""list"data*array<>model*stringThe model that made the vectors.
usage*curl -X POST 'https://api.munito.ai/inference/v1/embeddings' \
-H 'Content-Type: application/json' \
-d '{
"model": "google/embeddinggemma-2",
"input": [
"task: search result | query: Which city is the capital of France?"
]
}'{
"object": "list",
"data": [
{
"object": "embedding",
"index": 0,
"embedding": [
0.0123,
-0.0456,
0.0789
]
}
],
"model": "google/embeddinggemma-2",
"usage": {
"prompt_tokens": 16,
"total_tokens": 16
}
}