Getting Started
LatentBase is the infrastructure for your AI's inner representation. It helps you explore, manage, and optimize vector embeddings at scale. Whether you're building RAG systems, debugging retrieval, or analyzing latent space, LatentBase provides the tools you need.
To get started, you'll need an API key from the dashboard, then install the SDK and create your first vector set. The entire process takes about 5 minutes.
Installation
Install the LatentBase SDK via pip (Python) or NuGet (C#). Choose your preferred language below.
pip install latentbase
from latentbase import LatentBase # Initialize with your API key client = LatentBase("your-api-key") # Create a vector set vs = client.create_vector_set( name="my-embeddings", model="text-embedding-3-large", dimensions=3072 ) # Upsert vectors vs.upsert([{"id": "doc_1", "text": "Hello world"}])
Authentication
All API requests require authentication via an API key. You can obtain an API key from the API Keys page in your dashboard. Never expose your API key in client-side code or public repositories.
Include the API key in the Authorization header with the Bearer scheme:
Authorization: Bearer sk_your_api_key_here
Or when using the SDK, pass the key to the client constructor as shown in the Installation examples above.
Core Concepts
Vector Sets
A Vector Set is a named collection of embeddings from the same model. Each set has a fixed dimensionality and model identifier. You can create multiple sets to organize data by use case (e.g., product embeddings, document chunks, user embeddings).
Embeddings
Embeddings are high-dimensional vector representations of your data (text, images, etc.). LatentBase stores these vectors and their metadata, enabling similarity search, clustering, and visualization in the Explorer.
Projections
Projections reduce high-dimensional vectors to 2D or 3D for visualization. LatentBase supports UMAP, t-SNE, and PCA. Use projections in the Explorer to visualize clusters, detect outliers, and debug retrieval behavior.
API Reference
Base URL: https://api.latentbase.co
/v1/vectors/upsert
Insert or update vectors in a vector set. Supports batch upserts with metadata.
/v1/vectors/query
Query vectors by similarity. Returns top-k nearest neighbors for a given vector or text.
/v1/sets
List all vector sets in your account.
/v1/sets/:id
Get details and stats for a specific vector set.
/v1/projections
Create a 2D or 3D projection (UMAP, t-SNE, PCA) for a vector set.
Explorer API
The Explorer API provides programmatic access to the same visualization and exploration features available in the web UI. Use it to generate projections, fetch cluster metadata, and integrate exploration into your workflows.
See the API Reference above for endpoint details.
Versioning
LatentBase supports embedding versioning to track changes across model updates. Create snapshots of your vector sets, compare distributions between versions, and rollback when needed. Versioning is available on Pro and Enterprise plans.
Pipeline
The Feature Engineering Pipeline automates data quality tasks: noise detection, deduplication, and dimensionality reduction. Configure pipelines per vector set to keep your latent space clean and efficient without manual intervention.
SDKs
LatentBase provides first-class SDKs for Python and C#. Both offer full API coverage, async support, and automatic retries. Install via pip install latentbase or dotnet add package LatentBase. See the Installation section for code examples.