Image / video / 3D generation
Image-to-video with Runway Gen-4 + OSS
Runway Gen-4 requires reference image — upload to OSS first, then submit with reference_image_url.
python
from nexevo_ai import Nexevo
client = Nexevo()
# 1) 参考图上传到 OSS,拿签名 URL
with open("character.png", "rb") as f:
up = client.generation.uploads.upload(
f.read(), filename="character.png", content_type="image/png",
)
# 2) 用 OSS URL 作 reference_image_url 提交 video-to-video
job = client.videos.generate_and_wait(
model="runway-gen4", # 必需 ref image
prompt="zoom in slowly while waves crash behind",
duration_sec=5,
reference_image_url=up["url"],
)
print(job["results"][0]["url"])
# 3)(可选)删除已用完的参考图,释放配额
client.generation.uploads.delete(up["id"])