Request
Endpoint
Request Body
Model name to use for embedding generation (e.g.,
nomic-embed-text, mxbai-embed-large)Text input to generate embeddings for. Can be a single string or array of strings.
Duration to keep model loaded in memory (e.g.,
"5m", "1h", -1 for indefinite)Truncate input to fit the model’s maximum sequence length
Truncate output embeddings to specified dimensions (must be less than model’s default)
Model-specific options for embedding generation
Response
Response Fields
The model used for embedding generation
Array of embedding vectors. Each embedding is an array of floating-point numbers.
Total time in nanoseconds
Time spent loading the model in nanoseconds
Total number of tokens processed across all inputs
Examples
Single String Embedding
Example Response
Batch Embedding
Dimensionality Reduction
Truncation Control
Error Responses
Description of the error
Common Errors
- 400 Bad Request: Invalid input type or empty input
- 404 Not Found: Model not found
- 500 Internal Server Error: Embedding generation error
Embeddings are automatically normalized to unit length. If you specify
dimensions, the output is truncated and then re-normalized.To preload a model without generating embeddings, send an empty array or empty string as input.