Skip to content

Add ResizeMode to GenerateVideosConfig for Veo video generation #679

@zhoukuncheng

Description

@zhoukuncheng

Is your feature request related to a problem? Please describe.
Yes. The Vertex AI Veo video generation API supports a resizeMode parameter (accepting "pad" or "crop") for image-to-video generation. However, the current GenerateVideosConfig struct in the Go SDK (v1.43.0) does not expose this field. As a result, I cannot control whether the input image is cropped or padded to fit the target aspect ratio; it defaults to "pad" with no way to change it via the SDK.

Describe the solution you'd like
I would like the ResizeMode field added to the GenerateVideosConfig struct to support this API parameter.

type GenerateVideosConfig struct {
    // ... existing fields
    
    // Optional. The resize mode for the input image. Supported values are: pad, crop.
    ResizeMode string `json:"resizeMode,omitempty"`
}

Describe alternatives you've considered
The only current alternative is to bypass the SDK entirely and make direct HTTP requests to the Vertex AI REST API, which adds significant boilerplate and maintenance overhead compared to using the client library.

Additional context

Metadata

Metadata

Labels

api:gemini-apiIssues related to Gemini APIpriority: p3Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions