npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

semantic-embed

v0.1.4

Published

A TypeScript SDK for embedding generation

Downloads

13

Readme

Semantic Embed SDK

A fast and lightweight TypeScript/JavaScript sdk for generating text embeddings based on FastAPI and other python tools.

📦 Overview

The Semantic Embed SDK is a TypeScript library designed to interface with the Semantic Embed API for generating text embeddings. With this SDK, developers can easily create and manage embeddings for their applications and work with semantic models powered by FastAPI. Whether you're building a recommendation system, semantic search, or performing content similarity analysis, Semantic Embed is your go-to tool for text embeddings.


🚀 Features

  • TypeScript Ready: Fully written in TypeScript for type safety and developer-friendly experience.
  • FastAPI Integration: Seamless integration with the Semantic Embed API built on FastAPI for optimal performance.
  • Easy-to-use API: Simple and clean API design to get started with embedding generation effortlessly.
  • Environment Config: Supports .env configuration for API keys and other environment variables.
  • Support for Custom Models: Flexibility to work with different embedding models and configurations such as all-MiniLM-L6-v2 (384 dimensions), all-MiniLM-L12-v2 (384 dimensions), all-mpnet-base-v2 (768 dimensions) and finally e5-large-v2 (1024 dimensions).

⚡ Quick Start

Follow these steps to integrate the Semantic Embed SDK into your project:

1. Install the SDK

You can install the SDK via PNPM:

pnpm install semantic-embed

using Npm:

npm add semantic-embed

Or using Yarn:

yarn add semantic-embed

2. Setup API Key

Make sure you have an API key to access the Semantic Embed API, get one at semantic-embed.uanelacomo.com. You can set it up in a .env file at the root of your project:

SEMANTIC_EMBED_API_KEY=your-api-key-here

3. Using the SDK

After installation, you can easily use the SDK to generate embeddings for your content.

Example Usage:

import SemanticEmbed from "semantic-embed";

const semanticEmbed = new SemanticEmbed("your-api-key-if-not-in-env");

// Example text to generate embeddings
const text = "Semantic embedding is the future of search!";

async function generateEmbedding() {
  try {
    const embedding = await semanticEmbed.generateEmbedding(text);
    console.log("Generated Embedding: ", embedding);
  } catch (error) {
    console.error("Error generating embedding: ", error);
  }
}

generateEmbedding();

🔧 API

generateEmbedding(text: string): Promise<number[]>

Generates a semantic embedding for the provided text.

Arguments:

  • text (string): The text content for which you want to generate an embedding.

Returns:

  • Promise: A promise that resolves to the generated embedding data.

🛠️ Development

To contribute or build the SDK from source:

1. Clone the Repository

git clone https://github.com/uanela/semantic-embed-sdk.git
cd semantic-embed

2. Install Dependencies

pnpm install

3. Build the Project

pnpm run build

4. Run in Development Mode

pnpm run dev

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.


📫 Contact

For any issues or questions, please open an issue or contact Uanela Como.