requests
library.
MODELS_LAB_API_KEY
environment variable.
Parameter | Type | Default | Description |
---|---|---|---|
api_key | str | None | The ModelsLab API key for authentication |
url | str | "https://modelslab.com/api/v6/video/text2video" | The API endpoint URL |
fetch_url | str | https://modelslab.com/api/v6/video/fetch | The URL to fetch the video status from |
wait_for_completion | bool | False | Whether to wait for the video to be ready |
add_to_eta | int | 15 | Time to add to the ETA to account for the time it takes to fetch the video |
max_wait_time | int | 60 | Maximum time to wait for the video to be ready |
file_type | str | "mp4" | The type of file to generate |
Function | Description |
---|---|
generate_media | Generates a video or gif based on a text prompt |