v1

latestOpenAPI 3.1.0MIT2026-07-26122844.1 KB

Generate embeddings

Creates vector embeddings representing the input text

post/api/embed

Request body

modelstring required

Model name

truncateboolean

If true, truncate inputs that exceed the context window. If false, returns an error.

dimensionsinteger

Number of dimensions to generate embeddings for

keep_alivestring

Model keep-alive duration

Response

Vector embeddings for the input text

modelstring

Model that produced the embeddings

total_durationinteger

Total time spent generating in nanoseconds

load_durationinteger

Load time in nanoseconds

prompt_eval_countinteger

Number of input tokens processed to generate embeddings