Video Generation APIs
Thin Python wrappers around current video generation HTTP APIs and official SDKs. Model names and paths follow vendor docs as of early 2026 (verify in each provider’s console if a call fails).
Note: the examples below import this repository's wrapper modules directly.
Files
| Module | Provider | Notes |
|---|---|---|
openai_video.py |
OpenAI | Videos / Sora-class API — videos.create / create_and_poll (no model argument in wrapper; account default applies). |
runway_video.py |
Runway | Developer API — text_to_video / image_to_video, X-Runway-Version: 2024-11-06. |
google_veo_video.py |
Gemini Veo 3.1 — google-genai, poll operations.get. |
|
luma_video.py |
Luma | Dream Machine API — POST .../generations/video, requires model (ray-2, ray-flash-2). |
bytedance_video.py |
BytePlus / Volcengine | ModelArk video tasks — POST .../contents/generations/tasks, Bearer ARK_API_KEY. |
meta_video.py |
Meta | No public Movie Gen API — raises NotImplementedError. |
Setup
Use the project virtualenv (recommended):
cd /path/to/openvideogen
python3 -m venv .venv
source .venv/bin/activate
pip install openai python-dotenv requests google-genai
Install from PyPI:
pip install openvideogen
Copy .env.example to .env and fill in keys.
Usage
OpenAI
from openai_video import generate_video_openai
job = generate_video_openai(
"A calico cat playing a piano on stage",
seconds="8",
size="1280x720",
wait=False, # True → create_and_poll until completed/failed
)
print(job.id, job.status)
Runway
from runway_video import generate_video_runway
result = generate_video_runway(
"A serene landscape with mountains and a river at sunset",
turbo=True, # gen4_turbo vs gen4.5
ratio="1280:720",
duration=5,
)
Google Veo
from google_veo_video import generate_video_veo
video = generate_video_veo(
"A bustling city street during a rainy night",
aspect_ratio="16:9",
duration_seconds=8,
resolution="1080p", # optional: 720p, 1080p, 4k
# reference_image_paths=["./ref1.png", "./ref2.png"], # optional, local files
)
print(getattr(video, "uri", video))
Luma
from luma_video import generate_video_luma
video = generate_video_luma(
"A futuristic cityscape with flying cars",
model="ray-2",
aspect_ratio="16:9",
resolution="720p",
duration="5s",
)
BytePlus / Volcengine (Seedance)
Set BYTEDANCE_ARK_MODEL (or model= argument) to the model id or endpoint id from the Ark console.
from bytedance_video import create_bytedance_video_task, generate_video_bytedance
task = create_bytedance_video_task("A cartoon character dancing in a park")
# or poll until a terminal status:
# result = generate_video_bytedance("...", character_reference="https://...")
Meta
generate_video_meta is intentionally not implemented — there is no public Movie Gen REST API for arbitrary keys.
PyPI Release Flow
This repository is configured to publish to PyPI from GitHub Releases via trusted publishing.
- Update version in pyproject.toml (for example
0.1.1). - Create a GitHub Release with a tag that matches the version exactly.
Tags like
v0.1.1are also accepted. - The workflow in .github/workflows/pypi-publish.yml builds and validates distributions, then publishes to PyPI.
One-Time Setup
- In PyPI, create project
openvideogen(or publish once manually to create it). - In PyPI project settings, add a trusted publisher for this GitHub repo:
owner/repo: this repository workflow:pypi-publish.ymlenvironment:pypi - In GitHub repo settings, create environment
pypi(optional protections recommended).
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file openvideogen-0.2.0.tar.gz.
File metadata
- Download URL: openvideogen-0.2.0.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b23fcd5479fce528a62f38c64cb5051bc8f3f30315ec5ad3abafaf73fa413492
|
|
| MD5 |
3a6517a6e90b68cb68f6f23a0d85acc2
|
|
| BLAKE2b-256 |
58848632e91143e8c267e7c9af9a7c085ce8e9646abb53329a5af1e535408782
|
Provenance
The following attestation bundles were made for openvideogen-0.2.0.tar.gz:
Publisher:
pypi-publish.yml on kavin0x/openvideogen
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openvideogen-0.2.0.tar.gz -
Subject digest:
b23fcd5479fce528a62f38c64cb5051bc8f3f30315ec5ad3abafaf73fa413492 - Sigstore transparency entry: 2274326239
- Sigstore integration time:
-
Permalink:
kavin0x/openvideogen@06e1781758b6500d9720b05551c927c7a98812e4 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/kavin0x
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@06e1781758b6500d9720b05551c927c7a98812e4 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file openvideogen-0.2.0-py3-none-any.whl.
File metadata
- Download URL: openvideogen-0.2.0-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4880e722f6da49077d07e1b8d9b17c42642fc81cfd5454ad81ec5e98ddb8d4e
|
|
| MD5 |
be4a01a38f775088bad89484a16e2285
|
|
| BLAKE2b-256 |
e020083fe32ff0ddf57dc181e89ab56af42de91758d87711dbc21cc94f608a0d
|
Provenance
The following attestation bundles were made for openvideogen-0.2.0-py3-none-any.whl:
Publisher:
pypi-publish.yml on kavin0x/openvideogen
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openvideogen-0.2.0-py3-none-any.whl -
Subject digest:
a4880e722f6da49077d07e1b8d9b17c42642fc81cfd5454ad81ec5e98ddb8d4e - Sigstore transparency entry: 2274326306
- Sigstore integration time:
-
Permalink:
kavin0x/openvideogen@06e1781758b6500d9720b05551c927c7a98812e4 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/kavin0x
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@06e1781758b6500d9720b05551c927c7a98812e4 -
Trigger Event:
workflow_dispatch
-
Statement type: