Skip to main content
Embeddings are numerical representations of text that capture semantic meaning. They convert human-readable text into high-dimensional vectors that machine learning models can understand and process. These vectors enable tasks such as semantic search, recommendation systems, clustering, and anomaly detection.

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

See full reference

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 its base_url to point to the Neosantara AI API.
Last modified on December 11, 2025