Skip to Content
SDKsTypeScript SDKQuickstart

TypeScript SDK Quickstart

Get started with the Endee TypeScript SDK to build powerful vector search applications with full type safety and excellent IDE support.

Requirements

  • Node.js 18.0.0 or higher
  • TypeScript 5.0.0 or higher (for development)
  • An Endee account (sign up at Endee Dashboard )

Create a Project and Get Auth Token

Before using the SDK, you need to set up your project and generate an authentication token:

  1. Sign up or log in at Endee Dashboard 
  2. Create a new project from your dashboard
  3. Generate an auth token from the API Keys section in your project settings
  4. Save your token securely — you’ll need it to authenticate SDK requests

Keep your auth token private and never expose it in client-side code.

Installation

Install the Endee TypeScript SDK using npm:

npm install endee

Setup Endee and Create Index

Initialize the Client

The Endee client is the main interface for all vector operations. Initialize it with your API token:

import { Endee } from "endee"; // Initialize with your API token const endee = new Endee("user_id:api_token:region");

Create an Index

Create a new vector index with your desired configuration:

// Create an index with custom parameters await endee.createIndex({ name: "my_vectors", dimension: 1536, // Your vector dimension (must match your embedding model) spaceType: "cosine", // Distance metric: "cosine", "l2", or "ip" (inner product) M: 16, // Graph connectivity parameter (default = 16) efCon: 128, // Construction-time parameter (default = 128) useFp16: true // Use half-precision for storage optimization (default = true) });

Parameters:

ParameterDescription
nameUnique name for your index
dimensionVector dimensionality (must match your embedding model’s output)
spaceTypeDistance metric - "cosine", "l2", or "ip" (inner product)
MGraph connectivity - higher values increase recall but use more memory
efConConstruction-time parameter - higher values improve index quality but slow down indexing
useFp16Enable half-precision storage for 50% memory savings with minimal accuracy loss

List and Access Indexes

// List all indexes in your workspace const indexes = await endee.listIndexes(); // Get reference to an existing index const index = await endee.getIndex("my_vectors"); // Delete an index await endee.deleteIndex("my_vectors");

Next Steps

Now that you have your index set up, learn how to: