Create Text Embedding
Generate vector embeddings for an array of text using the selected embedding model.
/embeddings/textScope embeddings.writeSDK: @owbase/node only
Generate vector embeddings for an array of text using the selected embedding model. Use the returned vectors to power semantic search and similarity queries against your vector collections.
Parameters
Section titled “Parameters”texts string[] required
Array of text to generate embeddings.
model EmbeddingModel
The embedding model to use for generating vector embeddings. Values: nomic-embed-text, all-minilm.
Access: API key with the embeddings.write scope or user session, or even no session (the resource’s permissions apply).
Responses
Section titled “Responses”200Success400Invalid or missing parameter401No session, no permission on the resource or key without the scope429Rate limitEvery error comes as JSON with code, type and message: see Errors.
import { Client, Embeddings, EmbeddingModel } from '@owbase/node';
const client = new Client() .setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key
const embeddings = new Embeddings(client);
const result = await embeddings.createTextEmbeddings({ texts: [ 'Owbase helps developers build applications.', 'Find documents with semantic search.', ], model: EmbeddingModel.NomicEmbedText, // optional});curl -X POST "https://cloud.owbase.dev/v1/embeddings/text" \ -H "X-Owbase-Project: <PROJECT_ID>" \ -H "X-Owbase-Key: $OWBASE_API_KEY" \ -H "Content-Type: application/json" \ -d '{"texts":[]}'{ "total": 5, "embeddings": [ { "model": "nomic-embed-text", "dimension": 768, "embedding": [ 0.01, 0.02, 0.03 ], "error": "Error message" } ]}The descriptions on this page come from the server API specification (BSD-3-Clause license), and the examples come from the SDK generator (MIT license). The full notices are in the NOTICE file of the @owbase/web and @owbase/node packages.