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

seedance-video-sdk

v1.0.1

Published

Seedance AI Video Generation SDK - Create professional videos from text and images using ByteDance's advanced AI technology

Readme

seedance-video-sdk

npm version TypeScript License: MIT Downloads

Official Seedance AI Video Generation SDK - Create professional videos from text and images using ByteDance's advanced AI technology.

🚀 Features

  • Text-to-Video Generation - Create videos from text prompts
  • Image-to-Video Generation - Transform images into dynamic videos
  • Multi-Shot Narrative - Generate coherent multi-scene videos
  • Professional Quality - Cinematic quality with natural motion
  • TypeScript Support - Full type safety and IntelliSense
  • React Components - Pre-built UI components for easy integration
  • Real-time Progress - Track generation progress with webhooks or polling
  • Flexible Configuration - Customize resolution, style, duration, and more

🎬 Live Demo

Try Seedance AI Video Generator: https://seedance.studio

📦 Installation

npm install seedance-video-sdk
yarn add seedance-video-sdk
pnpm add seedance-video-sdk

🔑 Getting Started

1. Get Your API Key

Sign up at Seedance Studio to get your API key.

2. Basic Usage

import { SeedanceClient } from 'seedance-video-sdk';

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

// Generate video from text
const task = await client.generateVideo({
  prompt: 'A beautiful sunset over the ocean with gentle waves',
  duration: 5,
  resolution: '1080p',
  style: 'cinematic'
});

// Wait for completion
const completedTask = await client.waitForCompletion(task.taskId, {
  onProgress: (task) => console.log(`Progress: ${task.progress}%`)
});

console.log('Video URL:', completedTask.videoUrl);

3. Image-to-Video Generation

// From file upload
const fileInput = document.querySelector('input[type="file"]');
const file = fileInput.files[0];

const task = await client.generateVideo({
  prompt: 'Make this image come alive with gentle movement',
  image: file,
  duration: 5,
  resolution: '1080p'
});

// From URL
const task2 = await client.generateVideo({
  prompt: 'Add dynamic motion to this scene',
  image: 'https://example.com/image.jpg',
  duration: 5
});

⚛️ React Components

VideoPlayer

import { VideoPlayer } from 'seedance-video-sdk/react';

function MyComponent() {
  return (
    <VideoPlayer 
      src="https://example.com/video.mp4"
      poster="https://example.com/thumbnail.jpg"
      controls
      autoplay
      onLoadedData={() => console.log('Video loaded')}
      onError={(error) => console.error('Video error:', error)}
    />
  );
}

ProgressIndicator

import { ProgressIndicator } from 'seedance-video-sdk/react';

function GenerationStatus({ task }) {
  return (
    <ProgressIndicator 
      progress={task.progress}
      status={task.status}
      estimatedTime={task.estimatedTime}
      showPercentage
      showStatus
    />
  );
}

🛠️ Advanced Usage

Custom Configuration

const client = new SeedanceClient({
  apiKey: 'your-api-key',
  baseURL: 'https://api.seedance.studio/v1', // Custom endpoint
  timeout: 60000, // 60 seconds
  debug: true // Enable debug logging
});

Webhook Integration

// Configure webhook for real-time notifications
await client.configureWebhook({
  url: 'https://your-app.com/webhooks/seedance',
  events: ['task.completed', 'task.failed'],
  secret: 'your-webhook-secret'
});

Batch Processing

// Generate multiple videos
const prompts = [
  'A cat playing in a garden',
  'City skyline at night',
  'Ocean waves crashing on rocks'
];

const tasks = await Promise.all(
  prompts.map(prompt => 
    client.generateVideo({
      prompt,
      duration: 5,
      resolution: '720p'
    })
  )
);

// Wait for all to complete
const results = await Promise.all(
  tasks.map(task => client.waitForCompletion(task.taskId))
);

Error Handling

try {
  const task = await client.generateVideo({
    prompt: 'A beautiful landscape',
    duration: 5
  });
} catch (error) {
  if (error.code === 'QUOTA_EXCEEDED') {
    console.log('Please upgrade your plan');
  } else if (error.code === 'INVALID_PROMPT') {
    console.log('Please provide a valid prompt');
  } else {
    console.error('Generation failed:', error.message);
  }
}

📚 API Reference

SeedanceClient

Methods

  • generateVideo(request) - Generate a video from text/image
  • getTask(taskId) - Get task status and details
  • listTasks(options) - List user's video tasks
  • cancelTask(taskId) - Cancel a pending task
  • deleteTask(taskId) - Delete a completed task
  • uploadImage(image) - Upload image for later use
  • getQuota() - Get user quota information
  • waitForCompletion(taskId, options) - Wait for task completion

Types

interface VideoGenerationRequest {
  prompt: string;
  image?: File | string | Buffer;
  duration?: number; // 1-30 seconds
  resolution?: '480p' | '720p' | '1080p' | '4K';
  style?: 'realistic' | 'anime' | 'cartoon' | 'cinematic' | 'artistic';
  aspectRatio?: '16:9' | '9:16' | '1:1' | '4:3' | '3:4';
  frameRate?: number; // 12-60 fps
  parameters?: GenerationParameters;
}

🎨 Examples

Check out our examples directory for complete implementation examples:

🔗 Links

📄 License

MIT License - see the LICENSE file for details.

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

💬 Support


Made with ❤️ by Seedance Studio