π Step 1: Create your API key
Youβll use a project API key from LambdaDB Cloud starting in Step 3.LambdaDB Cloud is in public preview.
- Sign in to LambdaDB Cloud β Open app.lambdadb.ai, sign up if needed, and sign in.
- Create a project β Accounts without a payment method are on the Free plan. Choose an AWS region that fits your latency or data-residency needs.
- Create a project API key β Project creation does not automatically create an API key. Once the project is ready, open its API Keys tab, select Create key (or Create your first key), enter a name, and create the key.
- Save the key and connection details β The full key value is shown only once, immediately after key creation. Store it securely, then use it with the projectβs base URL and project name from the console starting in Step 3.
Manage API keys
Organization Owners and Admins can create and revoke project API keys in the API Keys tab. If you cannot create a key, ask an Owner or Admin. The key list does not reveal saved key values; if you lose a value, create a replacement key. To replace a key, create a new one, update your applicationβs credentials, and verify that it works before revoking the old key. Revocation cannot be undone and applications still using the revoked key will lose access. Key management is available through LambdaDB Cloud, not the public data API or SDKs documented here.LambdaDB Cloud uses region-specific API base URLs. Use your projectβs base URL and project name, together with a project API key created in its API Keys tab. Project creation does not automatically issue a key; save the full value when you create it, because it is shown only once. See API key management. Do not assume a global default URL or a fixed project name.
The Free plan includes monthly read, write, storage, and inference usage at no cost. Add a payment method when you need Standard plan usage beyond the Free plan limits. See Understanding costs.
Keep your API key out of source control and prefer environment variables instead of hardcoding it in scripts.
π Step 2: Install the SDK
Install one of the stable SDK versions used by these examples. See SDK support for the language-specific guides.π Step 3: Create a collection
A collection is where you store the documents, embeddings, and metadata that make up an AI knowledge or memory dataset, and define how each field is indexed for retrieval. LambdaDB supports 9 different index types: text, keyword, long, double, boolean, object, datetime, dense vector, and sparse vector. Letβs create a collection that combines text search with vector similarity: Run the steps in order using one language. Python steps open a new client context for each operation and reusecollection_name. TypeScript steps reuse the initialized client. For Go, append the later snippets inside main, before its closing brace, using the imports shown in Step 3. Replace all connection placeholders before running.
201 Created and includes the default branch:
- Text field: Supports multilingual search with English and Korean analyzers.
- Vector field: 10-dimensional vectors using cosine similarity.
- Keyword field: Added to support exact match filtering.
201 Created confirms collection creation, not query-serving readiness. If a subsequent operation encounters a loading or transient error, follow Errors and retries; do not recreate the collection to wait for readiness.
π Step 4: Add documents
Now letβs add some sample documents. Each document contains text for full-text search, keywords for filtering, and vectors for similarity search:- Upsert behavior: Documents with the same ID will be replaced; new IDs create new documents.
- Auto-generated IDs: If you donβt provide an ID, one will be generated automatically.
- Bulk operations: For large-scale document ingestion (5MB+), use the bulk-upsert functionality.
- Configurable consistency: LambdaDB is eventually consistent by default, so there can be a slight delay before new or changed documents are visible to queries.
If your application requires strong (read-after-write) consistency, set
consistentRead(orconsistent_readin Python) totruewhen querying or fetching a branch directly. This overlays eligible pending writes, excluding pending bulk imports, and can return429if the pending payload exceeds its limit. Tag and alias reads reject this option.
numDocs and dataUpdatedAt describe the default main branchβs committed head; dataUpdatedAt may be absent before its first commit. To verify particular writes on any branch, query or fetch the expected records from that branch with consistentRead: false.
π Step 5: Full-text search
Letβs search for documents that match βI hate managing serversβ while filtering for documents tagged exactly with βserverlessβ. This demonstrates LambdaDBβs powerful query capabilities:π Step 6: Hybrid search
Now letβs combine full-text search with vector similarity for more comprehensive results. This is where LambdaDB really shines:rrf(Reciprocal Rank Fusion): Great for combining rankings from different search methodsl2(L2 Normalization): Normalizes scores using L2 normmm(Min-Max Normalization): Simple linear scaling to 0-1 range
π§Ή Step 7: Clean up
When youβre finished experimenting, clean up your resources:π Next steps
- Advanced Queries: Explore complex patterns in our Query Guide
- Bulk Operations: Learn about large-scale data ingestion in our Bulk Operations Guide
- API Reference: Comprehensive documentation at our API Reference