Generate text embeddings for semantic search and RAG applications
POST /api/v3/organizations/{organisation}/ai/embeddings
Generates vector embeddings for text content using embedding models. Used for semantic search, document similarity, and RAG applications. * * Features: * - Single text or batch processing (up to 100 texts) * - Configurable dimensions (256, 512, 1024, 8192 for Titan v2) * - Optional normalization to unit length * - Usage tracking for billing * * Use Cases: * - Semantic search across documents * - Similarity matching for content recommendations * - RAG (Retrieval-Augmented Generation) pipelines * - Clustering and classification * * Available Embedding Models: * - amazon.titan-embed-text-v2:0 (default, supports 256-8192 dimensions) * - amazon.titan-embed-text-v1:0 (1536 dimensions fixed)
Authorizations
Parameters
Path Parameters
The organisation ID
Request Body required
Embedding request with single or multiple texts
object
The Australian government announced new climate policy[ "Climate change policy", "Healthcare reform", "Education funding"]Embedding model to use
amazon.titan-embed-text-v2:0Output embedding dimensions. Titan v2 supports: 256, 512, 1024, 8192
1024Normalize embeddings to unit length (magnitude = 1.0)
trueExample
{ "input": "The Australian government announced new climate policy", "modelId": "amazon.titan-embed-text-v2:0", "dimensions": 1024, "normalize": true}Responses
200
Embeddings generated successfully
object
Single embedding vector if input was a string
Array of embedding vectors if input was an array
Model used to generate embeddings
amazon.titan-embed-text-v2:0Dimensionality of each embedding vector
1024object
Number of tokens in input text(s)
Total tokens (same as inputTokens for embeddings)
Example
{ "embeddings": [ 0.0215, 0.0008, 0.0312, -0.0087, 0.0273 ], "model": "amazon.titan-embed-text-v2:0", "dimension": 1024, "usage": { "inputTokens": 8, "totalTokens": 8 }}400
Invalid request parameters
403
Access denied
500
Failed to generate embeddings