Video Generation
ShuYou supports calling video generation models via the Vertex AI protocol. This guide explains how to generate videos with ShuYou.API reference
- Doubao Seedance 2.0 —
POST /v1/predictions - Doubao Seedance 2.0 Fast —
POST /v1/predictions - HappyHorse 1.0 T2V —
POST /v1/predictions - HappyHorse 1.0 R2V —
POST /v1/predictions - HappyHorse 1.0 I2V —
POST /v1/predictions - HappyHorse 1.0 Video Edit —
POST /v1/predictions - Task status: Get a prediction
Supported Models
The currently supported video generation models in the API reference include (continuously updated):doubao-seedance-2.0— ByteDance Seedance 2.0doubao-seedance-2.0-fast— ByteDance Seedance 2.0 Fasthappyhorse-1.0-t2v— HappyHorse 1.0 T2Vhappyhorse-1.0-r2v— HappyHorse 1.0 R2Vhappyhorse-1.0-i2v— HappyHorse 1.0 I2Vhappyhorse-1.0-video-edit— HappyHorse 1.0 Video Edit
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 theimage parameter.
Google Veo 3.1
Seedance 1.5 Pro
Seedance 2
Configuration
Required Parameters
- api_key: Your ShuYou API key
- vertexai: Must be set to
trueto 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 theconfig parameter:
Configuration example:
Call Flow
Video generation is an asynchronous process with three steps:- Submit request (
generate_videos): Send a video generation request and receive anoperationobject - Poll status (
operations.get): Check generation status periodically; a 15-second interval is recommended - Retrieve results: When
operation.doneisTrue, get the videos fromoperation.response.generated_videos
Best Practices
- Prompt optimization: Use clear, specific scene descriptions, including subject, actions, environment, lighting, and other key elements
- Polling interval: Use a 15-second polling interval to avoid overly frequent requests
- Error handling: Add exception handling and a timeout mechanism to prevent infinite polling
- 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