For the complete documentation index, see llms.txt. This page is also available as Markdown.

Ollama Embeddings

Authentication: Required (JWT token or Api Key)

Generate Embeddings

post

Generates embeddings for provided text using the specified model. Embeddings are vector representations of text that capture semantic meaning.

Authorizations
AuthorizationstringRequired

Enter your API key or JWT with the 'Bearer ' prefix

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
or
stringOptional
Responses
200

Successfully generated embeddings

application/json

Response containing the generated embeddings.

embeddingnumber ยท float[]Required

Vector representation of the input text.

post/ollama/api/embeddings
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