VertexAIVeoToolkit
init
- project_id (Optional[str]): Google Cloud project ID. If not provided, will use the default project from environment. (default: :obj:
None
) - location (str): Google Cloud location for the API calls. (default: :obj:
"us-central1"
) - model_id (str): The Veo model ID to use. Options include “veo-2.0-generate-001” or “veo-3.0-generate-preview”. (default: :obj:
"veo-2.0-generate-001"
) - output_storage_uri (Optional[str]): Cloud Storage URI to save output videos. If not provided, returns video bytes. (default: :obj:
None
) - timeout (Optional[float]): Request timeout in seconds. (default: :obj:
None
)
generate_video_from_text
- text_prompt (str): The text prompt to guide video generation.
- response_count (int): Number of videos to generate (1-4). (default: :obj:
1
) - duration (int): Video duration in seconds (5-8). (default: :obj:
5
) - aspect_ratio (str): Video aspect ratio. Options: “16:9”, “9:16”. (default: :obj:
"16:9"
) - negative_prompt (Optional[str]): What to avoid in the video. (default: :obj:
None
) - person_generation (str): Person safety setting. Options: “allow_adult”, “dont_allow”. (default: :obj:
"allow_adult"
)
- ‘success’ (bool): Whether the operation was successful
- ‘videos’ (List[Dict]): List of generated video data
- ‘metadata’ (Dict): Additional metadata from the response
- ‘error’ (str): Error message if operation failed
generate_video_from_image
- image_path (str): Path to the input image file (local or GCS URI).
- text_prompt (str): The text prompt to guide video generation.
- response_count (int): Number of videos to generate (1-4). (default: :obj:
1
) - duration (int): Video duration in seconds (5-8). (default: :obj:
5
) - aspect_ratio (str): Video aspect ratio. Options: “16:9”, “9:16”. (default: :obj:
"16:9"
) - negative_prompt (Optional[str]): What to avoid in the video. (default: :obj:
None
) - person_generation (str): Person safety setting. (default: :obj:
"allow_adult"
)
- ‘success’ (bool): Whether the operation was successful
- ‘videos’ (List[Dict]): List of generated video data
- ‘metadata’ (Dict): Additional metadata from the response
- ‘error’ (str): Error message if operation failed
extend_video
- video_uri (str): Cloud Storage URI of the video to extend.
- text_prompt (str): The text prompt to guide video extension.
- duration (int): Duration to extend in seconds (5-8). (default: :obj:
5
) - aspect_ratio (str): Video aspect ratio. (default: :obj:
"16:9"
) - negative_prompt (Optional[str]): What to avoid in the extension. (default: :obj:
None
)
- ‘success’ (bool): Whether the operation was successful
- ‘videos’ (List[Dict]): List of extended video data
- ‘metadata’ (Dict): Additional metadata from the response
- ‘error’ (str): Error message if operation failed