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

genmagic

v0.1.1

Published

Official GenMagic client and CLI: one API key and one pay-as-you-go balance for 460+ AI models. Generate images, video with sound, speech, music and text with Veo, Kling, Seedance, Wan, Nano Banana, GPT Image, FLUX and more.

Readme

GenMagic for JavaScript and the command line

One API key and one pay-as-you-go balance for 460+ AI models: images, video with sound, speech, music and text. Veo, Kling, Seedance, Wan, Hailuo, Runway, Nano Banana, GPT Image, FLUX, Seedream and more, each with its price shown before you run it.

npm install genmagic
export GENMAGIC_API_KEY=...   # free key, one minute: https://genmagic.co/get-api-key?utm_source=npm&utm_medium=readme

No dependencies. Node 18 or newer.

Images

import GenMagic from "genmagic";

const gm = new GenMagic();
const { url, costCents } = await gm.image("A red fox in snow, 35mm photo", {
  model: "google/gemini-nano-banana-2.1", // leave out for GenMagic's default
  size: "1792x1024",
});

Video

video starts the job and waits for the clip. Use startVideo and getVideo to poll yourself.

const clip = await gm.video("Waves at sunset, slow drone shot", {
  model: "alibaba/wan-3.0",
  aspectRatio: "9:16",
  duration: 5,
  sound: true,
  image: "https://example.com/opening-frame.png", // optional
});
console.log(clip.url);

Moving off OpenAI's Sora 2 API

OpenAI shut down the Sora 2 Videos API on September 24, 2026. GenMagic answers the same calls, so code built on the OpenAI SDK keeps working with a new base URL and key, and even model: "sora-2" runs (on Veo 3.1 Fast):

import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://genmagic.co/api/v1", apiKey: process.env.GENMAGIC_API_KEY });
const video = await client.videos.createAndPoll({ model: "sora-2", prompt: "A paper boat at dusk", seconds: "8", size: "1280x720" });

Details and prices: https://genmagic.co/sora-2-api-alternative?utm_source=npm&utm_medium=readme

Speech, music, text

import { writeFile } from "node:fs/promises";

const voice = await gm.speech("Welcome to the show");
await writeFile("welcome.mp3", voice.bytes);

const track = await gm.music("Calm lo-fi beat, 80 bpm");

const answer = await gm.chat("Write a hook for a video about foxes", { model: "anthropic/claude-haiku-5.5" });

Models and prices

const videoModels = await gm.models("video"); // needs no key
const balance = await gm.usage();

A refusal throws a GenMagicError with status, code and GenMagic's own message (for example how to top up when the balance is too low).

Command line

npx genmagic image "A red fox in snow" --out fox.png
npx genmagic video "Waves at sunset" --aspect 9:16 --duration 5 --out waves.mp4
npx genmagic speech "Welcome to the show" --out welcome.mp3
npx genmagic models video
npx genmagic balance

Also from GenMagic

The same key works in n8n, Zapier, Make, ComfyUI and through MCP in Claude, ChatGPT and Cursor. The REST API is OpenAI-compatible: reference.