SuperAPI AI Directory

byted-ind-ecom-prompt-to-video

Marketing & growth

View repository

Updated 10-15 17:30

About this skill

Seedance 2.0 text-to-video/reference-based video generation (byted-ind-ecom-prompt-to-video)

This skill is used to call the Seedance 2.0 video generation capability on Volcano Ark, supporting:

  • Text-to-video (prompt only)
  • Image-to-video (first frame/first and last frames)
  • Multi-reference generation (up to 9 reference images, up to 3 reference videos)

Usage

Run in the skill directory scripts/generate.py。

Parameters

  • --prompt: video text prompt
  • --first_frame: first frame image (URL or local path)
  • --last_frame: last frame image (URL or local path)
  • --reference_images: reference images (URL or local path, up to 9 images)
  • --reference_videos: reference videos (URL or local path, up to 3 videos)
  • --resolution: resolution (e.g. 720p、1080p)
  • --ratio: aspect ratio (e.g. 16:9、9:16、1:1、adaptive)
  • --duration: duration (seconds)

Examples

Text-to-video:

python3 scripts/generate.py --prompt "A cute cat playing with a ball of yarn in a sunny room" --ratio 16:9 --duration 5

Image-to-video (first frame):

python3 scripts/generate.py --prompt "The cat jumps" --first_frame "/path/to/cat.jpg" --ratio 16:9 --duration 5

Multiple reference images:

python3 scripts/generate.py --prompt "A scenic landscape" --reference_images "/path/to/img1.jpg" "/path/to/img2.jpg" --ratio 16:9

Local material processing logic (important)

  • Local images:
    • When "TOS is available", they will first be uploaded to TOS, then a public URL will be used for generation.
    • If no TOS is available, it will automatically be converted to data:<mime>;base64,... format for submission.
  • Local reference videos: It is recommended to provide a public URL directly; if a local video is provided, available TOS is required to upload it first and convert it to a public URL.
  • Video output:
    • If TOS is available, it will attempt to transfer the generated video to TOS and output the TOS URL.
    • Otherwise, it will directly return the model's original video URL (usually time-limited; it is recommended to download or transfer it as soon as possible).

Environment variables

Minimum required:

  • ARK_API_KEY
  • SEEDANCE_EP_ID
  • ARK_BASE_URL(optional, default https://ark.cn-beijing.volces.com/api/v3)

To enable TOS upload/transfer:

  • VOLC_ACCESS_KEY
  • VOLC_SECRET_KEY
  • TOS_ENDPOINT
  • TOS_REGION
  • TOS_BUCKET
  • TOS_UPLOAD_ENABLED(optional, default true)

Output

The script will poll the task until it ends, and output in the terminal:

  • Final Video URL: <url>