
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
A type-safe Python SDK for the MiniMax REST API, focusing on video generation capabilities. Built with modern Python features and focused on developer experience, this library provides a clean interface to MiniMax's video generation API.
Disclaimer: This SDK is an unofficial implementation and is not affiliated with, endorsed by, or associated with MiniMax Open Platform or NanoNoble PTE. LTD.
Requires Python 3.8 or later.
pip install minimax-python
from minimax import Minimax
# Initialize with environment variables (MINIMAX_API_KEY, MINIMAX_GROUP_ID)
client = Minimax()
# Generate a video from text
video_path = client.generate_video(
text="A majestic dragon soars through sunset-lit clouds",
download_path="dragon.mp4"
)
print(f"Video generated at: {video_path}")
Here are some examples generated using this SDK:
Text-to-Video | Image-to-Video |
---|---|
![]() | ![]() |
![]() | ![]() |
Note: The examples above are compressed GIFs for preview. For the actual high-quality video outputs (720p, 25fps) generated by this SDK, check the assets/videos directory. Source images for the image-to-video examples are available in assets/images.
MiniMax offers a comprehensive AI platform with multiple capabilities:
This SDK currently focuses on the Video Generation API, which supports:
Note: While MiniMax offers many AI capabilities, this SDK currently specializes in video generation. Future versions may include support for other MiniMax APIs. You'll need a MiniMax API key and Group ID to use this SDK. Visit the MiniMax Platform to obtain your credentials.
✨ Modern Python SDK
🚀 Production Ready
🔧 Developer Experience
from minimax import Minimax
# Initialize the client
client = Minimax(
api_key="your_api_key", # Optional if MINIMAX_API_KEY env var is set
group_id="your_group_id" # Optional if MINIMAX_GROUP_ID env var is set
)
# Example: Image-to-Video with prompt guidance
prompt = """The dragon in the image awakens, its eyes glowing with ancient power.
The camera circles slowly around as the dragon unfurls its wings, sending ripples
through the misty mountain air. Particles of golden light dance around its scales
as it raises its head majestically, creating an awe-inspiring atmosphere with
rich, vibrant colors and dramatic lighting."""
# Generate video from image
client.generate_video(
image="dragon.jpg",
text=prompt,
download_path="dragon.mp4"
)
from minimax import AsyncMinimax
import asyncio
async def main():
# Initialize the async client
client = AsyncMinimax(
api_key="your_api_key", # Optional if MINIMAX_API_KEY env var is set
group_id="your_group_id" # Optional if MINIMAX_GROUP_ID env var is set
)
# Example: Text-to-Video generation
prompt = """A martial artist performs a spinning kick in a traditional dojo.
The camera tracks smoothly around the movement as cherry blossom petals
drift through the air. Time slows dramatically during the apex of the spin,
capturing the precise form and power of the technique. The scene has a
cinematic quality with dynamic lighting that emphasizes the flow of movement."""
await client.generate_video(text=prompt, download_path="martial_arts.mp4")
asyncio.run(main())
Note: Both sync and async clients support all features (text-to-video and image-to-video generation). The examples above just showcase different use cases for variety.
FAQs
Unofficial Python library for the Minimax REST API
We found that minimax-python demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.