File tree Expand file tree Collapse file tree 5 files changed +57
-6
lines changed Expand file tree Collapse file tree 5 files changed +57
-6
lines changed Original file line number Diff line number Diff line change @@ -3199,7 +3199,15 @@ export enum VideoCompressionQuality {
3199
3199
// @public
3200
3200
export interface VideoGenerationMask {
3201
3201
image? : Image_2 ;
3202
- maskMode? : string ;
3202
+ maskMode? : VideoGenerationMaskMode ;
3203
+ }
3204
+
3205
+ // @public
3206
+ export enum VideoGenerationMaskMode {
3207
+ INSERT = " INSERT" ,
3208
+ OUTPAINT = " OUTPAINT" ,
3209
+ REMOVE = " REMOVE" ,
3210
+ REMOVE_STATIC = " REMOVE_STATIC"
3203
3211
}
3204
3212
3205
3213
// @public
Original file line number Diff line number Diff line change @@ -3199,7 +3199,15 @@ export enum VideoCompressionQuality {
3199
3199
// @public
3200
3200
export interface VideoGenerationMask {
3201
3201
image? : Image_2 ;
3202
- maskMode? : string ;
3202
+ maskMode? : VideoGenerationMaskMode ;
3203
+ }
3204
+
3205
+ // @public
3206
+ export enum VideoGenerationMaskMode {
3207
+ INSERT = " INSERT" ,
3208
+ OUTPAINT = " OUTPAINT" ,
3209
+ REMOVE = " REMOVE" ,
3210
+ REMOVE_STATIC = " REMOVE_STATIC"
3203
3211
}
3204
3212
3205
3213
// @public
Original file line number Diff line number Diff line change @@ -3199,7 +3199,15 @@ export enum VideoCompressionQuality {
3199
3199
// @public
3200
3200
export interface VideoGenerationMask {
3201
3201
image? : Image_2 ;
3202
- maskMode? : string ;
3202
+ maskMode? : VideoGenerationMaskMode ;
3203
+ }
3204
+
3205
+ // @public
3206
+ export enum VideoGenerationMaskMode {
3207
+ INSERT = " INSERT" ,
3208
+ OUTPAINT = " OUTPAINT" ,
3209
+ REMOVE = " REMOVE" ,
3210
+ REMOVE_STATIC = " REMOVE_STATIC"
3203
3211
}
3204
3212
3205
3213
// @public
Original file line number Diff line number Diff line change 3
3
* Copyright 2025 Google LLC
4
4
* SPDX-License-Identifier: Apache-2.0
5
5
*/
6
- import { GoogleGenAI } from '@google/genai' ;
6
+ import { GoogleGenAI , VideoGenerationMaskMode } from '@google/genai' ;
7
7
8
8
const GOOGLE_CLOUD_PROJECT = process . env . GOOGLE_CLOUD_PROJECT ;
9
9
const GOOGLE_CLOUD_LOCATION = process . env . GOOGLE_CLOUD_LOCATION ;
@@ -35,7 +35,7 @@ async function generateVideosEditOutpaintFromVertexAI() {
35
35
gcsUri : 'gs://genai-sdk-tests/inputs/videos/video_outpaint_mask.png' ,
36
36
mimeType : 'image/png' ,
37
37
} ,
38
- maskMode : ' OUTPAINT' ,
38
+ maskMode : VideoGenerationMaskMode . OUTPAINT ,
39
39
} ,
40
40
} ,
41
41
} ) ;
Original file line number Diff line number Diff line change @@ -733,6 +733,33 @@ export enum VideoGenerationReferenceType {
733
733
STYLE = 'STYLE' ,
734
734
}
735
735
736
+ /** Enum for the mask mode of a video generation mask. */
737
+ export enum VideoGenerationMaskMode {
738
+ /**
739
+ * The image mask contains a masked rectangular region which is
740
+ applied on the first frame of the input video. The object described in
741
+ the prompt is inserted into this region and will appear in subsequent
742
+ frames.
743
+ */
744
+ INSERT = 'INSERT' ,
745
+ /**
746
+ * The image mask is used to determine an object in the
747
+ first video frame to track. This object is removed from the video.
748
+ */
749
+ REMOVE = 'REMOVE' ,
750
+ /**
751
+ * The image mask is used to determine a region in the
752
+ video. Objects in this region will be removed.
753
+ */
754
+ REMOVE_STATIC = 'REMOVE_STATIC' ,
755
+ /**
756
+ * The image mask contains a masked rectangular region where
757
+ the input video will go. The remaining area will be generated. Video
758
+ masks are not supported.
759
+ */
760
+ OUTPAINT = 'OUTPAINT' ,
761
+ }
762
+
736
763
/** Enum that controls the compression quality of the generated videos. */
737
764
export enum VideoCompressionQuality {
738
765
/**
@@ -3414,7 +3441,7 @@ export declare interface VideoGenerationMask {
3414
3441
/** Describes how the mask will be used. Inpainting masks must
3415
3442
match the aspect ratio of the input video. Outpainting masks can be
3416
3443
either 9:16 or 16:9. */
3417
- maskMode ?: string ;
3444
+ maskMode ?: VideoGenerationMaskMode ;
3418
3445
}
3419
3446
3420
3447
/** Configuration for generating videos. */
You can’t perform that action at this time.
0 commit comments