Ollama Embeddings
Authentication: Required (JWT token or Api Key)
Generates embeddings for provided text using the specified model. Embeddings are vector representations of text that capture semantic meaning.
Authorizations
Body
Request body for generating embeddings from text.
modelstringRequired
The ID of the model to use for generating embeddings.
promptstringRequired
The text to generate embeddings for.
keep_aliveone of | nullableOptional
Duration to keep the model loaded in memory.
integerOptional
stringOptional
Responses
200
Successfully generated embeddings
application/json
400
Model not found or invalid request
application/json
401
Not authenticated
application/json
post
curl -X POST "https://app.morphware.com/ollama/api/embeddings" \
-H "Authorization: Bearer <YOUR_TOKEN>" \
-d '{
"model": "nomic-embed-text:latest",
"prompt": "The quick brown fox jumps over the lazy dog"
}'
{
"embedding": [
0.0023,
-0.0118,
0.0087,
0.0524,
-0.0159,
0.0314
]
}
Last updated