Endpoints
Generate embeddings
Creates vector embeddings representing the input text
POST
/
api
/
embed
curl http://localhost:11434/api/embed -d '{
"model": "embeddinggemma",
"input": "Why is the sky blue?"
}'{
"model": "embeddinggemma",
"embeddings": [
[
0.010071029,
-0.0017594862,
0.05007221,
0.04692972,
0.054916814,
0.008599704,
0.105441414,
-0.025878139,
0.12958129,
0.031952348
]
],
"total_duration": 14143917,
"load_duration": 1019500,
"prompt_eval_count": 8
}Body
application/json
Model name
Text or array of texts to generate embeddings for
If true, truncate inputs that exceed the context window. If false, returns an error.
Number of dimensions to generate embeddings for
Model keep-alive duration
Runtime options that control text generation
Show child attributes
Show child attributes
Response
200 - application/json
Vector embeddings for the input text
curl http://localhost:11434/api/embed -d '{
"model": "embeddinggemma",
"input": "Why is the sky blue?"
}'{
"model": "embeddinggemma",
"embeddings": [
[
0.010071029,
-0.0017594862,
0.05007221,
0.04692972,
0.054916814,
0.008599704,
0.105441414,
-0.025878139,
0.12958129,
0.031952348
]
],
"total_duration": 14143917,
"load_duration": 1019500,
"prompt_eval_count": 8
}