Anil-matcha/Seedance-2-API

Python wrapper for ByteDance's Seedance 2.0 , Seedance 2.5 and Seedance 2 Mini API — Text-to-Video, Image-to-Video, realistic human faces, 1080p, consistent character generation.

Overview

Seedance‑2‑API is a Python wrapper around ByteDance’s Seedance video‑generation models (2.0, 2.5 and the newer 2 Mini). The wrapper talks to the public MuAPI endpoints, handling authentication, request formatting and polling for results. It lets developers generate cinematic AI videos from text prompts, animate static images, edit existing clips, and keep character identity consistent across multiple generations.


What the library does

Feature Description
Text‑to‑Video (T2V) Send a natural‑language prompt and receive a high‑quality video (1080p, 4K for 2.5).
Image‑to‑Video (I2V) Provide one or more reference images; the model animates them according to the prompt.
Omni‑Reference Combine image, video and audio references in a single request for richer conditioning.
Character Sheets Generate a multi‑view character reference from 1‑3 photos; reuse it with @character:<id> in later prompts for consistent faces.
Video‑Edit Modify an existing video using a textual description and optional reference media.
Mini model Low‑cost, fast variant (Seedance 2 Mini) with a separate SDK call (text_to_video_mini, image_to_video_mini).
MCP server Optional Model Context Protocol server so other AI assistants (Claude, Cursor, etc.) can call Seedance directly.
Utility helpers File upload, environment‑based API‑key handling, and a wait_for_completion helper that polls the MuAPI status endpoint.

How to get started

# Install from PyPI (recommended)
pip install seedance-2-api

Create a .env file with your MuAPI key:

MUAPI_API_KEY=your_muapi_api_key_here

Basic usage example (text‑to‑video):

from seedance_api import SeedanceAPI
api = SeedanceAPI()
submission = api.text_to_video(
    prompt="A cinematic slow‑motion shot of a cyberpunk city in the rain, neon lights reflecting on puddles",
    aspect_ratio="16:9",
    duration=5,
    quality="high",
)
result = api.wait_for_completion(submission["request_id"])
print("Video URL:", result["url"])

The same pattern works for the Mini model (text_to_video_mini) or image‑to‑video (image_to_video, image_to_video_mini).


Key concepts

  • Request IDs – Every MuAPI call returns a request_id. Use api.wait_for_completion(request_id) to poll until the video is ready.
  • Character workflow – First call api.create_character (or api.character) with reference photos, wait for the sheet, then reference it in later prompts via @character:<request_id>.
  • MCP server – Run python3 mcp_server.py to expose the wrapper over the Model Context Protocol, enabling other AI tools to invoke Seedance without writing HTTP code.

When to use this library

  • You need high‑fidelity AI video (1080p‑4K) without building your own inference stack.
  • Your application benefits from consistent characters across multiple clips.
  • You prefer a simple Python interface over raw curl calls.
  • You want to experiment with the low‑cost Mini model for rapid prototyping or large‑scale pipelines.

Limitations & considerations

  • The library is only a thin client; all heavy lifting (model inference, rendering) happens on MuAPI’s servers.
  • Costs are incurred per request (e.g., $0.18 for a character sheet, ~$0.073 / sec for Mini). Monitor usage via your MuAPI account.
  • Content policy is more permissive than some competitors, but you still need to respect MuAPI’s terms of service.

Related projects (from the README)

  • Seedance‑2‑Spicy‑API, Seedance‑2.5‑Spicy‑API – wrappers for the “relaxed‑moderation” tiers.
  • MiniMax‑H3‑API, Wan‑3.0‑API – wrappers for other ByteDance video models.
  • seedance‑2‑mcp, seedance‑2.5‑mcp – focused MCP servers.
  • awesome‑seedance‑*‑prompts – curated prompt collections.

TL;DR

seedance-2-api is a genuine, production‑ready Python SDK for ByteDance’s Seedance video‑generation models, exposing text‑to‑video, image‑to‑video, character consistency, video editing, and a low‑cost Mini variant via MuAPI. Install with pip, set your MuAPI key, and call the high‑level methods to generate cinematic AI videos in just a few lines of code.

Related

  • Project
  • Project
  • Dispatch
  • Project