Skip to main content

Embeddings

The Context API supports generating vector embeddings for both text documents (textEmbeddings) and images (imageEmbeddings). Embeddings convert content into dense vector representations suitable for semantic search, similarity comparisons, and Retrieval-Augmented Generation (RAG) systems.


Result Format​

Embeddings are returned as a flat List<float> array.

{
"textEmbeddings": {
"isSuccess": true,
"result": [-0.021741372, 0.005967313, -0.02682978, -0.030900504, 0.01471012]
}
}

Dimensions​

Vector dimensions depend on the embedding model configured in the environment. Contact your Hyland administrator for the model used in your environment and its vector dimensions.

The textEmbeddings and imageEmbeddings actions do not accept a model property.


Usage​

Text embeddings request example:

{
"version": "context.api/v2",
"objectKeys": [{ "path": "testing/.../document.pdf" }],
"actions": {
"textEmbeddings": {}
}
}

Image embeddings request example:

{
"version": "context.api/v2",
"objectKeys": [{ "path": "testing/.../photo.jpg" }],
"actions": {
"imageEmbeddings": {}
}
}