How Embeddings Work
When you send text to the embeddings endpoint, the underlying AI model processes the text and outputs a list of floating-point numbers (a vector). Texts with similar meanings will have vectors that are numerically βcloserβ to each other in the high-dimensional space. The Neosantara AI API provides an/v1/embeddings endpoint to generate these vectors.
Usage
To generate embeddings, send a POST request to the/v1/embeddings endpoint with your text input.
Endpoint
POST https://api.neosantara.xyz/v1/embeddings
Request Body
Supported Embedding Models
The Neosantara AI API supports various embedding models, often utilizing intelligent fallbacks to ensure reliability. Some of the available models include:nusa-embedding-0001: The primary embedding model, offering good performance for general-purpose embeddings.
Example Response
Examples with OpenAI SDK
You can generate embeddings using the OpenAI SDK by configuring itsbase_url to point to the Neosantara AI API.