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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@zauto/canopus

v1.0.21

Published

An SDK for Canopus

Readme

Canopus SDK

The Canopus SDK provides a client for interacting with the Canopus AI platform, allowing developers to work with various AI models such as Text, Speech-to-Text (STT), Text-to-Speech (TTS), and Embedding models via a simple JavaScript API.

Installation

You can install the Canopus SDK using npm:

npm install @zauto/canopus

or using yarn:

yarn add @zauto/canopus

Getting Started

Import the SDK

import {Canopus} from '@zauto/canopus';

Create an Instance of CanopusSDK

To use the SDK, instantiate it with your API key:

const canopus = new Canopus({ apiKey: 'YOUR_API_KEY' });

API Methods

1. Verify API Key

Verify if the provided API key is valid.

try {
  await canopus.verifyApiKey();
  console.log('API key verified successfully.');
} catch (error) {
  console.error('Invalid API key:', error.message);
}

2. Get Models

Retrieve the list of available models. Optionally, filter models by type (TEXT, STT, TTS, EMBEDDING).

try {
  const models = await canopus.getModels(); // Get all models
  const textModels = await canopus.getModels('TEXT'); // Get models of type 'TEXT'
  console.log(models);
} catch (error) {
  console.error('Error fetching models:', error.message);
}

3. Call Text Models

Call a text model with a prompt and optional chat history or system prompt.

try {
  const response = await canopus.callTextModels('MODEL_ID', 'What is the capital of France?');
  console.log(response.data);
} catch (error) {
  console.error('Error calling text model:', error.message);
}

4. Call TTS Model

Convert text to speech using a TTS model.

try {
  const response = await canopus.callTtsModel('MODEL_ID', 'Hello, how are you?', 'en-IN', 'meera');
  console.log(response.data);
} catch (error) {
  console.error('Error calling TTS model:', error.message);
}

5. Call STT Model

Convert an audio file to text using an STT model.

try {
  const response = await canopus.callSttModel('MODEL_ID', '/path/to/audio.mp3', 'Optional prompt');
  console.log(response.data);
} catch (error) {
  console.error('Error calling STT model:', error.message);
}

6. Call Embedding Model

Generate embeddings for an array of strings using an Embedding model.

try {
  const response = await canopus.callEmbeddingModel('MODEL_ID', ['sentence 1', 'sentence 2']);
  console.log(response.data);
} catch (error) {
  console.error('Error calling embedding model:', error.message);
}

Model Types

The SDK supports the following model types:

  • TEXT: For text-based queries.
  • STT: Speech-to-Text models.
  • TTS: Text-to-Speech models.
  • EMBEDDING: For generating text embeddings.

License

This SDK is licensed under the MIT License. See the LICENSE file for more details.

Support

For questions, issues, or further help, please contact us at [email protected] or visit https://canopus.zauto.ai.

Disclaimer

Please use this SDK responsibly and ensure that you comply with the terms and conditions of the Canopus AI platform.