Skip to main content
POST

Body

application/json
model
string
required

Model name

input
required

Text or array of texts to generate embeddings for

truncate
boolean
default:true

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

dimensions
integer

Number of dimensions to generate embeddings for

keep_alive
string

Model keep-alive duration

options
object

Runtime options that control text generation

Response

200 - application/json

Vector embeddings for the input text

model
string

Model that produced the embeddings

embeddings
number[][]

Array of vector embeddings

total_duration
integer

Total time spent generating in nanoseconds

load_duration
integer

Load time in nanoseconds

prompt_eval_count
integer

Number of input tokens processed to generate embeddings