Skip to main content

Video Generation

ShuYou supports calling video generation models via the Vertex AI protocol. This guide explains how to generate videos with ShuYou.
Video generation models can automatically produce high-quality video content from text descriptions. ShuYou aggregates leading video generation models such as Google Veo and ByteDance Seedance, allowing you to call them easily through a unified API interface.

API reference

Supported Models

The currently supported video generation models in the API reference include (continuously updated):
  • doubao-seedance-2.0 — ByteDance Seedance 2.0
  • doubao-seedance-2.0-fast — ByteDance Seedance 2.0 Fast
  • happyhorse-1.0-t2v — HappyHorse 1.0 T2V
  • happyhorse-1.0-r2v — HappyHorse 1.0 R2V
  • happyhorse-1.0-i2v — HappyHorse 1.0 I2V
  • happyhorse-1.0-video-edit — HappyHorse 1.0 Video Edit
Visit the ShuYou model list to search and view all available video generation models.

Text-to-Video

Generate videos directly from a text prompt using an asynchronous workflow: submit a generation request first, then poll until generation completes, and finally retrieve the result.
Google Veo 3.1
Seedance 1.5 Pro
Seedance 2

Image-to-Video

In addition to text-to-video, ShuYou also supports passing an image as the starting frame and generating a video using a text prompt. Provide the image data via the image parameter.
Google Veo 3.1
Seedance 1.5 Pro
Seedance 2
  • The image parameter is passed via types.Image, which supports image_bytes (binary data) and mime_type (e.g., image/png, image/jpeg).
  • The prompt parameter is optional and is used to describe how the content in the image should move or change.
  • The image will be used as the starting frame of the video, and the model will generate subsequent animation based on the image content and the prompt.

Configuration

Required Parameters

  • api_key: Your ShuYou API key
  • vertexai: Must be set to true to enable the Vertex AI protocol
  • base_url: ShuYou Vertex AI endpoint https://api.shuyou.ai
  • model: The video generation model name, such as google/veo-3.1-generate-001
  • prompt: A text prompt describing the video content to generate

Optional Parameters

You can customize video properties such as aspect ratio, duration, and audio via the config parameter: Configuration example:
Support for optional parameters may vary by model. If you pass a parameter value that the model does not support, the API will return an error. We recommend testing with default parameters first, then adjusting gradually.

Call Flow

Video generation is an asynchronous process with three steps:
  1. Submit request (generate_videos): Send a video generation request and receive an operation object
  2. Poll status (operations.get): Check generation status periodically; a 15-second interval is recommended
  3. Retrieve results: When operation.done is True, get the videos from operation.response.generated_videos
Video generation typically takes a while (from tens of seconds to several minutes). Please be patient while polling completes, and avoid setting the polling interval too short.

Best Practices

  1. Prompt optimization: Use clear, specific scene descriptions, including subject, actions, environment, lighting, and other key elements
  2. Polling interval: Use a 15-second polling interval to avoid overly frequent requests
  3. Error handling: Add exception handling and a timeout mechanism to prevent infinite polling
  4. Model selection: Choose the right model for your needs — Veo 3.1 excels at high-quality general video generation, while the Seedance family has unique strengths in specific scenarios