Skip to content

Kuonirad/open-sora-api

Repository files navigation

<style> .section-title { font-family: 'Roboto', sans-serif; color: #3498db; } .highlight { background-color: #f1c40f; padding: 2px 5px; border-radius: 3px; } .feature-section { background-color: #f9f9f9; padding: 10px; border-radius: 5px; } .code-box { background-color: #f4f4f4; padding: 10px; border-radius: 5px; } </style>

✨ Open-Sora API Wrapper ✨

Open-Sora Logo

CI Status License PRs Welcome Python Version GitHub stars Version


📑 Table of Contents


This repository contains a Python wrapper for the Open-Sora API, which allows you to generate videos using AI. The Open-Sora API provides a powerful interface for creating AI-generated videos with customizable parameters.

Project Status: This project is in active development, functional but continuously improving. Contributions and feedback are welcome!

🌟 Features

  • 🎨 Easy-to-use Python interface for the Open-Sora API
  • 🎥 Customizable video generation parameters
  • 🛡️ Error handling and logging
  • 🔄 Rate limiting and retries

📥 Installation

  1. Clone the repository:
    git clone https://github.com/Kuonirad/open-sora-api.git
    cd open-sora-api
  2. Create a virtual environment and activate it:
    python3 -m venv venv
    source venv/bin/activate
  3. Install the required dependencies:
    pip install -r requirements.txt
  4. Set up your API key by creating a .env file in the project root:
    MODELSLAB_API_KEY=your_api_key_here

Visit the GitHub repository for the latest version and to contribute.

🚀 Usage

  1. Use the OpenSoraAPI class in your Python code:
    from open_sora import OpenSoraAPI
    

    api = OpenSoraAPI() result = api.generate_video("A beautiful sunset over the ocean") print(result)

  2. Handle errors and log information as needed to ensure smooth operation.

📚 API Reference

  • OpenSoraAPI(api_key=None): Initializes the API wrapper. If api_key is not provided, it will be loaded from the MODELSLAB_API_KEY environment variable.
  • generate_video(prompt, negative_prompt="", width=512, height=512, num_inference_steps=50, guidance_scale=7.5): Generates a video based on the provided parameters.

For more detailed API documentation, please refer to the Open-Sora API Documentation.

🤝 Contributing

We welcome contributions! Please see the CONTRIBUTING.md file for guidelines.

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.

🆘 Getting Help

If you encounter any issues or have questions, please open an issue on GitHub Issues or contact the maintainers.


Made with ❤️ by the Open-Sora Team

About

A Python wrapper for the Open-Sora API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages