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

xeno-ai

v0.1.1

Published

Official JavaScript/TypeScript SDK for Xeno API - Access 100+ AI models for image, video, music, and text generation

Readme

Xeno AI JavaScript/TypeScript SDK

npm version TypeScript License: MIT

The official JavaScript/TypeScript SDK for Xeno API - access 100+ AI models for image, video, music, and text generation with a single API.

Installation

# Primary package
npm install xeno-ai

# Or using yarn/pnpm
yarn add xeno-ai
pnpm add xeno-ai

Quick Start

import Xeno from 'xeno-ai';

// Initialize client
const client = new Xeno({ apiKey: 'your-api-key' });

// Or use environment variable: XENO_API_KEY
const client = new Xeno();

Image Generation

// Generate an image
const image = await client.image.generate({
  model: 'flux-pro-1.1',
  prompt: 'A futuristic cityscape at sunset',
  width: 1024,
  height: 1024,
});
console.log(image.data[0].url);

// Edit an image
const edited = await client.image.edit({
  model: 'flux-kontext',
  image: 'https://example.com/image.jpg',
  prompt: 'Add a rainbow in the sky',
});

Available Image Models

| Model | Description | |-------|-------------| | flux-pro-1.1 | High quality, fast generation | | flux-kontext | Image editing and variations | | dall-e-3 | OpenAI's DALL-E 3 | | 4o-image | GPT-4o image generation | | stable-diffusion-xl | Stability AI SDXL |

Video Generation

// Generate a video
const video = await client.video.generate({
  model: 'veo-3.1',
  prompt: 'A drone shot flying over mountains at sunrise',
  duration: 5,
  resolution: '1080p',
});
console.log(video.data?.[0].url);

// Image to video
const video = await client.video.generate({
  model: 'runway-aleph',
  prompt: 'Make the water flow',
  image: 'https://example.com/landscape.jpg',
});

Available Video Models

| Model | Description | |-------|-------------| | veo-3.1 | Google's latest video model | | runway-aleph | Runway's multi-task video model | | runway-gen-3 | Runway Gen-3 | | minimax-video-01 | Minimax video generation | | kling-v2.1 | Kling video model |

Music Generation

// Generate a music track
const music = await client.music.generate({
  model: 'suno-v4',
  prompt: 'An upbeat electronic track with synths and drums',
  duration: 120,
  genre: 'electronic',
});
console.log(music.data?.[0].url);

// With custom lyrics
const music = await client.music.generate({
  model: 'suno-v4',
  prompt: 'A pop ballad about summer love',
  lyrics: 'Walking on the beach, sun shining bright...',
  duration: 180,
});

Available Music Models

| Model | Description | |-------|-------------| | suno-v4 | Latest Suno model | | suno-v3.5 | Suno v3.5 | | udio | Udio music generation |

Chat Completions (LLM)

// Chat completion
const response = await client.chat.completions.create({
  model: 'gpt-4o',
  messages: [
    { role: 'system', content: 'You are a helpful assistant.' },
    { role: 'user', content: 'Explain quantum computing in simple terms.' },
  ],
});
console.log(response.choices[0].message.content);

// Streaming
const stream = await client.chat.completions.create({
  model: 'claude-3.5-sonnet',
  messages: [{ role: 'user', content: 'Write a poem about AI' }],
  stream: true,
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0].delta.content || '');
}

Available LLM Models

| Model | Description | |-------|-------------| | gpt-4o | OpenAI GPT-4o | | gpt-4-turbo | OpenAI GPT-4 Turbo | | claude-3.5-sonnet | Anthropic Claude 3.5 Sonnet | | claude-3-opus | Anthropic Claude 3 Opus | | gemini-pro | Google Gemini Pro | | llama-3.1-405b | Meta Llama 3.1 405B |

Error Handling

import Xeno, {
  XenoError,
  AuthenticationError,
  RateLimitError,
  InsufficientCreditsError,
} from 'xeno-ai';

try {
  const image = await client.image.generate({
    model: 'flux-pro-1.1',
    prompt: '...',
  });
} catch (error) {
  if (error instanceof AuthenticationError) {
    console.log('Invalid API key');
  } else if (error instanceof RateLimitError) {
    console.log(`Rate limited. Retry after ${error.retryAfter} seconds`);
  } else if (error instanceof InsufficientCreditsError) {
    console.log('Not enough credits. Please top up.');
  } else if (error instanceof XenoError) {
    console.log(`API error: ${error.message}`);
  }
}

Configuration

const client = new Xeno({
  apiKey: 'your-api-key',
  baseURL: 'https://api.xenostudio.ai/v1', // Custom endpoint
  timeout: 60000, // Request timeout in milliseconds
  maxRetries: 2, // Number of retries on failure
});

Using with OpenAI SDK

The Xeno API is OpenAI-compatible, so you can also use the OpenAI SDK:

import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: 'your-xeno-api-key',
  baseURL: 'https://api.xenostudio.ai/v1',
});

const response = await client.chat.completions.create({
  model: 'gpt-4o',
  messages: [{ role: 'user', content: 'Hello!' }],
});

TypeScript Support

This SDK is written in TypeScript and provides full type definitions out of the box.

import Xeno, { ImageResponse, ChatCompletion, VideoResponse } from 'xeno-ai';

const client = new Xeno({ apiKey: 'your-api-key' });

// All responses are fully typed
const image: ImageResponse = await client.image.generate({
  prompt: 'A sunset',
});

Package Aliases

This SDK is available under multiple package names on npm:

  • xeno-ai - Primary package
  • @xeno-ai/sdk - Scoped package (coming soon)

Both packages are identical and maintained together. Choose whichever you prefer.

Links

Changelog

v0.1.0 (2026-01-31)

  • Initial release
  • Image generation (generate, edit, variations)
  • Video generation with async polling
  • Music generation with async polling
  • Chat completions with streaming
  • Full TypeScript support with type definitions
  • ESM and CommonJS builds

License

MIT