Nexevo.aiNexevo.ai
← All examples
Image / video / 3D generation

Image-to-video (auto-routed) + OSS upload

When reference_image_url is set, backend auto-picks an i2v-capable provider (Runway / Wan i2v / Seedance …). Upload reference image to OSS first, then submit.

python
from nexevo_ai import Nexevo

client = Nexevo()

# 1) Upload reference image to OSS, get signed URL
with open("character.png", "rb") as f:
    up = client.generation.uploads.upload(
        f.read(), filename="character.png", content_type="image/png",
    )

# 2) Submit image-to-video — backend detects reference_image_url and picks an i2v provider
job = client.videos.generate_and_wait(
    model="nexevo-auto",   # default — backend will route to runway-gen4 / wan2.7-i2v etc.
    prompt="zoom in slowly while waves crash behind",
    duration_sec=5,
    reference_image_url=up["url"],
)
print(job["results"][0]["url"])

# 3) (optional) Delete the used reference image to free quota
client.generation.uploads.delete(up["id"])

# ── Advanced: pin a specific provider ──
# model="runway-gen4" / "wan2.7-i2v-2026-04-25" / "seedance-2.0" etc.
Image-to-video (auto-routed) + OSS upload — Nexevo Cookbook | Nexevo.ai