2.5 KiB
Executable File
2.5 KiB
Executable File
Video Generation Skill - Setup Guide
Quick Start
-
Install Dependencies
pip install requests python-dotenv -
Configure API Key
Create a
.envfile in the project root directory:RUNNINGHUB_API_KEY=your_api_key_hereOr set it as an environment variable:
# Windows PowerShell $env:RUNNINGHUB_API_KEY="your_api_key_here" # Linux/Mac export RUNNINGHUB_API_KEY="your_api_key_here" -
Generate a Video
python scripts/generate.py --prompt-file workspace/your-prompt.json --output-file outputs/video.mp4 --duration 5
Parameters
--prompt-file: Path to JSON prompt file (required)--output-file: Output video file path (required)--aspect-ratio: Video aspect ratio (optional, default: 16:9)--duration: Video duration in seconds (optional, default: 5, range: 1-16)
Getting API Key
To use this skill, you need a RunningHub API key:
- Visit RunningHub
- Sign up for an account
- Get your API key from the dashboard
- Add it to your
.envfile
Example Prompt
Create a JSON file with your video description:
{
"title": "Your Video Title",
"description": "Description of what you want to generate",
"visual": {
"scene": "Scene description",
"elements": ["element1", "element2"],
"colors": "Color palette",
"lighting": "Lighting description"
},
"camera": {
"movement": "Camera movement",
"focus": "Focus description"
},
"audio": {
"background": "Background music description",
"effects": "Sound effects description"
}
}
Notes
- The
.envfile is already in.gitignoreand won't be committed to version control - Never share your API key or commit it to public repositories
- The script automatically loads environment variables from
.envfile - Video generation may take several minutes depending on the complexity
Troubleshooting
Error: RUNNINGHUB_API_KEY is not set
- Make sure you've created the
.envfile with your API key - Or set the environment variable before running the script
Error: Failed to submit task
- Check that your API key is valid
- Ensure you have sufficient credits in your RunningHub account
- Verify your internet connection
Video generation takes too long
- This is normal for AI video generation
- The script will automatically poll for status until completion
- You can check the RunningHub dashboard for task progress