@google/genai 1.15.0 → 1.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -817,6 +817,27 @@ export declare interface CancelBatchJobParameters {
817
817
  config?: CancelBatchJobConfig;
818
818
  }
819
819
 
820
+ /** Optional parameters for tunings.cancel method. */
821
+ export declare interface CancelTuningJobConfig {
822
+ /** Used to override HTTP request options. */
823
+ httpOptions?: HttpOptions;
824
+ /** Abort signal which can be used to cancel the request.
825
+
826
+ NOTE: AbortSignal is a client-only operation. Using it to cancel an
827
+ operation will not cancel the request in the service. You will still
828
+ be charged usage for any applicable operations.
829
+ */
830
+ abortSignal?: AbortSignal;
831
+ }
832
+
833
+ /** Parameters for the cancel method. */
834
+ export declare interface CancelTuningJobParameters {
835
+ /** The resource name of the tuning job. */
836
+ name: string;
837
+ /** Optional parameters for the request. */
838
+ config?: CancelTuningJobConfig;
839
+ }
840
+
820
841
  /** A response candidate generated from the model. */
821
842
  export declare interface Candidate {
822
843
  /** Contains the multi-part content of the response.
@@ -1561,6 +1582,8 @@ export declare interface DeleteCachedContentParameters {
1561
1582
 
1562
1583
  /** Empty response for caches.delete method. */
1563
1584
  export declare class DeleteCachedContentResponse {
1585
+ /** Used to retain the full HTTP response. */
1586
+ sdkHttpResponse?: HttpResponse;
1564
1587
  }
1565
1588
 
1566
1589
  /** Used to override the default configuration. */
@@ -1586,6 +1609,8 @@ export declare interface DeleteFileParameters {
1586
1609
 
1587
1610
  /** Response for the delete file method. */
1588
1611
  export declare class DeleteFileResponse {
1612
+ /** Used to retain the full HTTP response. */
1613
+ sdkHttpResponse?: HttpResponse;
1589
1614
  }
1590
1615
 
1591
1616
  /** Configuration for deleting a tuned model. */
@@ -1609,6 +1634,8 @@ export declare interface DeleteModelParameters {
1609
1634
  }
1610
1635
 
1611
1636
  export declare class DeleteModelResponse {
1637
+ /** Used to retain the full HTTP response. */
1638
+ sdkHttpResponse?: HttpResponse;
1612
1639
  }
1613
1640
 
1614
1641
  /** The return value of delete operation. */
@@ -1693,54 +1720,40 @@ export declare interface EditImageConfig {
1693
1720
  be charged usage for any applicable operations.
1694
1721
  */
1695
1722
  abortSignal?: AbortSignal;
1696
- /** Cloud Storage URI used to store the generated images.
1697
- */
1723
+ /** Cloud Storage URI used to store the generated images. */
1698
1724
  outputGcsUri?: string;
1699
- /** Description of what to discourage in the generated images.
1700
- */
1725
+ /** Description of what to discourage in the generated images. */
1701
1726
  negativePrompt?: string;
1702
- /** Number of images to generate.
1703
- */
1727
+ /** Number of images to generate. */
1704
1728
  numberOfImages?: number;
1705
1729
  /** Aspect ratio of the generated images. Supported values are
1706
- "1:1", "3:4", "4:3", "9:16", and "16:9".
1707
- */
1730
+ "1:1", "3:4", "4:3", "9:16", and "16:9". */
1708
1731
  aspectRatio?: string;
1709
1732
  /** Controls how much the model adheres to the text prompt. Large
1710
1733
  values increase output and prompt alignment, but may compromise image
1711
- quality.
1712
- */
1734
+ quality. */
1713
1735
  guidanceScale?: number;
1714
1736
  /** Random seed for image generation. This is not available when
1715
- ``add_watermark`` is set to true.
1716
- */
1737
+ ``add_watermark`` is set to true. */
1717
1738
  seed?: number;
1718
- /** Filter level for safety filtering.
1719
- */
1739
+ /** Filter level for safety filtering. */
1720
1740
  safetyFilterLevel?: SafetyFilterLevel;
1721
- /** Allows generation of people by the model.
1722
- */
1741
+ /** Allows generation of people by the model. */
1723
1742
  personGeneration?: PersonGeneration;
1724
1743
  /** Whether to report the safety scores of each generated image and
1725
- the positive prompt in the response.
1726
- */
1744
+ the positive prompt in the response. */
1727
1745
  includeSafetyAttributes?: boolean;
1728
1746
  /** Whether to include the Responsible AI filter reason if the image
1729
- is filtered out of the response.
1730
- */
1747
+ is filtered out of the response. */
1731
1748
  includeRaiReason?: boolean;
1732
- /** Language of the text in the prompt.
1733
- */
1749
+ /** Language of the text in the prompt. */
1734
1750
  language?: ImagePromptLanguage;
1735
- /** MIME type of the generated image.
1736
- */
1751
+ /** MIME type of the generated image. */
1737
1752
  outputMimeType?: string;
1738
1753
  /** Compression quality of the generated image (for ``image/jpeg``
1739
- only).
1740
- */
1754
+ only). */
1741
1755
  outputCompressionQuality?: number;
1742
- /** Whether to add a watermark to the generated images.
1743
- */
1756
+ /** Whether to add a watermark to the generated images. */
1744
1757
  addWatermark?: boolean;
1745
1758
  /** Describes the editing mode for the request. */
1746
1759
  editMode?: EditMode;
@@ -1769,7 +1782,7 @@ export declare class EditImageResponse {
1769
1782
  generatedImages?: GeneratedImage[];
1770
1783
  }
1771
1784
 
1772
- /** Enum representing the Imagen 3 Edit mode. */
1785
+ /** Enum representing the editing mode. */
1773
1786
  export declare enum EditMode {
1774
1787
  EDIT_MODE_DEFAULT = "EDIT_MODE_DEFAULT",
1775
1788
  EDIT_MODE_INPAINT_REMOVAL = "EDIT_MODE_INPAINT_REMOVAL",
@@ -2268,7 +2281,11 @@ export declare enum FunctionCallingConfigMode {
2268
2281
  /**
2269
2282
  * Model will not predict any function calls. Model behavior is same as when not passing any function declarations.
2270
2283
  */
2271
- NONE = "NONE"
2284
+ NONE = "NONE",
2285
+ /**
2286
+ * Model decides to predict either a function call or a natural language response, but will validate function calls with constrained decoding. If "allowed_function_names" are set, the predicted function call will be limited to any one of "allowed_function_names", else the predicted function call will be any one of the provided "function_declarations".
2287
+ */
2288
+ VALIDATED = "VALIDATED"
2272
2289
  }
2273
2290
 
2274
2291
  /** Defines a function that the model can generate JSON inputs for.
@@ -2693,20 +2710,16 @@ export declare class GenerateContentResponseUsageMetadata {
2693
2710
 
2694
2711
  /** An output image. */
2695
2712
  export declare interface GeneratedImage {
2696
- /** The output image data.
2697
- */
2713
+ /** The output image data. */
2698
2714
  image?: Image_2;
2699
2715
  /** Responsible AI filter reason if the image is filtered out of the
2700
- response.
2701
- */
2716
+ response. */
2702
2717
  raiFilteredReason?: string;
2703
2718
  /** Safety attributes of the image. Lists of RAI categories and their
2704
- scores of each content.
2705
- */
2719
+ scores of each content. */
2706
2720
  safetyAttributes?: SafetyAttributes;
2707
2721
  /** The rewritten prompt used for the image generation if the prompt
2708
- enhancer is enabled.
2709
- */
2722
+ enhancer is enabled. */
2710
2723
  enhancedPrompt?: string;
2711
2724
  }
2712
2725
 
@@ -2735,61 +2748,45 @@ export declare interface GenerateImagesConfig {
2735
2748
  be charged usage for any applicable operations.
2736
2749
  */
2737
2750
  abortSignal?: AbortSignal;
2738
- /** Cloud Storage URI used to store the generated images.
2739
- */
2751
+ /** Cloud Storage URI used to store the generated images. */
2740
2752
  outputGcsUri?: string;
2741
- /** Description of what to discourage in the generated images.
2742
- */
2753
+ /** Description of what to discourage in the generated images. */
2743
2754
  negativePrompt?: string;
2744
- /** Number of images to generate.
2745
- */
2755
+ /** Number of images to generate. */
2746
2756
  numberOfImages?: number;
2747
2757
  /** Aspect ratio of the generated images. Supported values are
2748
- "1:1", "3:4", "4:3", "9:16", and "16:9".
2749
- */
2758
+ "1:1", "3:4", "4:3", "9:16", and "16:9". */
2750
2759
  aspectRatio?: string;
2751
2760
  /** Controls how much the model adheres to the text prompt. Large
2752
2761
  values increase output and prompt alignment, but may compromise image
2753
- quality.
2754
- */
2762
+ quality. */
2755
2763
  guidanceScale?: number;
2756
2764
  /** Random seed for image generation. This is not available when
2757
- ``add_watermark`` is set to true.
2758
- */
2765
+ ``add_watermark`` is set to true. */
2759
2766
  seed?: number;
2760
- /** Filter level for safety filtering.
2761
- */
2767
+ /** Filter level for safety filtering. */
2762
2768
  safetyFilterLevel?: SafetyFilterLevel;
2763
- /** Allows generation of people by the model.
2764
- */
2769
+ /** Allows generation of people by the model. */
2765
2770
  personGeneration?: PersonGeneration;
2766
2771
  /** Whether to report the safety scores of each generated image and
2767
- the positive prompt in the response.
2768
- */
2772
+ the positive prompt in the response. */
2769
2773
  includeSafetyAttributes?: boolean;
2770
2774
  /** Whether to include the Responsible AI filter reason if the image
2771
- is filtered out of the response.
2772
- */
2775
+ is filtered out of the response. */
2773
2776
  includeRaiReason?: boolean;
2774
- /** Language of the text in the prompt.
2775
- */
2777
+ /** Language of the text in the prompt. */
2776
2778
  language?: ImagePromptLanguage;
2777
- /** MIME type of the generated image.
2778
- */
2779
+ /** MIME type of the generated image. */
2779
2780
  outputMimeType?: string;
2780
2781
  /** Compression quality of the generated image (for ``image/jpeg``
2781
- only).
2782
- */
2782
+ only). */
2783
2783
  outputCompressionQuality?: number;
2784
- /** Whether to add a watermark to the generated images.
2785
- */
2784
+ /** Whether to add a watermark to the generated images. */
2786
2785
  addWatermark?: boolean;
2787
2786
  /** The size of the largest dimension of the generated image.
2788
- Supported sizes are 1K and 2K (not supported for Imagen 3 models).
2789
- */
2787
+ Supported sizes are 1K and 2K (not supported for Imagen 3 models). */
2790
2788
  imageSize?: string;
2791
- /** Whether to use the prompt rewriting logic.
2792
- */
2789
+ /** Whether to use the prompt rewriting logic. */
2793
2790
  enhancePrompt?: boolean;
2794
2791
  }
2795
2792
 
@@ -2810,12 +2807,10 @@ export declare interface GenerateImagesParameters {
2810
2807
  export declare class GenerateImagesResponse {
2811
2808
  /** Used to retain the full HTTP response. */
2812
2809
  sdkHttpResponse?: HttpResponse;
2813
- /** List of generated images.
2814
- */
2810
+ /** List of generated images. */
2815
2811
  generatedImages?: GeneratedImage[];
2816
2812
  /** Safety attributes of the positive prompt. Only populated if
2817
- ``include_safety_attributes`` is set to True.
2818
- */
2813
+ ``include_safety_attributes`` is set to True. */
2819
2814
  positivePromptSafetyAttributes?: SafetyAttributes;
2820
2815
  }
2821
2816
 
@@ -2838,23 +2833,32 @@ export declare interface GenerateVideosConfig {
2838
2833
  fps?: number;
2839
2834
  /** Duration of the clip for video generation in seconds. */
2840
2835
  durationSeconds?: number;
2841
- /** The RNG seed. If RNG seed is exactly same for each request with unchanged inputs, the prediction results will be consistent. Otherwise, a random RNG seed will be used each time to produce a different result. */
2836
+ /** The RNG seed. If RNG seed is exactly same for each request with
2837
+ unchanged inputs, the prediction results will be consistent. Otherwise,
2838
+ a random RNG seed will be used each time to produce a different
2839
+ result. */
2842
2840
  seed?: number;
2843
- /** The aspect ratio for the generated video. 16:9 (landscape) and 9:16 (portrait) are supported. */
2841
+ /** The aspect ratio for the generated video. 16:9 (landscape) and
2842
+ 9:16 (portrait) are supported. */
2844
2843
  aspectRatio?: string;
2845
- /** The resolution for the generated video. 720p and 1080p are supported. */
2844
+ /** The resolution for the generated video. 720p and 1080p are
2845
+ supported. */
2846
2846
  resolution?: string;
2847
- /** Whether allow to generate person videos, and restrict to specific ages. Supported values are: dont_allow, allow_adult. */
2847
+ /** Whether allow to generate person videos, and restrict to specific
2848
+ ages. Supported values are: dont_allow, allow_adult. */
2848
2849
  personGeneration?: string;
2849
- /** The pubsub topic where to publish the video generation progress. */
2850
+ /** The pubsub topic where to publish the video generation
2851
+ progress. */
2850
2852
  pubsubTopic?: string;
2851
- /** Optional field in addition to the text content. Negative prompts can be explicitly stated here to help generate the video. */
2853
+ /** Explicitly state what should not be included in the generated
2854
+ videos. */
2852
2855
  negativePrompt?: string;
2853
2856
  /** Whether to use the prompt rewriting logic. */
2854
2857
  enhancePrompt?: boolean;
2855
2858
  /** Whether to generate audio along with the video. */
2856
2859
  generateAudio?: boolean;
2857
- /** Image to use as the last frame of generated videos. Only supported for image to video use cases. */
2860
+ /** Image to use as the last frame of generated videos.
2861
+ Only supported for image to video use cases. */
2858
2862
  lastFrame?: Image_2;
2859
2863
  /** The images to use as the references to generate the videos.
2860
2864
  If this field is provided, the text prompt field must also be provided.
@@ -2866,7 +2870,7 @@ export declare interface GenerateVideosConfig {
2866
2870
  compressionQuality?: VideoCompressionQuality;
2867
2871
  }
2868
2872
 
2869
- /** A video generation long-running operation. */
2873
+ /** A video generation operation. */
2870
2874
  export declare class GenerateVideosOperation implements Operation<GenerateVideosResponse> {
2871
2875
  /** The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. */
2872
2876
  name?: string;
@@ -2876,7 +2880,7 @@ export declare class GenerateVideosOperation implements Operation<GenerateVideos
2876
2880
  done?: boolean;
2877
2881
  /** The error result of the operation in case of failure or cancellation. */
2878
2882
  error?: Record<string, unknown>;
2879
- /** The response if the operation is successful. */
2883
+ /** The generated videos. */
2880
2884
  response?: GenerateVideosResponse;
2881
2885
  /** The full HTTP response. */
2882
2886
  sdkHttpResponse?: HttpResponse;
@@ -2892,14 +2896,17 @@ export declare interface GenerateVideosParameters {
2892
2896
  /** ID of the model to use. For a list of models, see `Google models
2893
2897
  <https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models>`_. */
2894
2898
  model: string;
2895
- /** The text prompt for generating the videos. Optional for image to video use cases. */
2899
+ /** The text prompt for generating the videos.
2900
+ Optional if image or video is provided. */
2896
2901
  prompt?: string;
2897
2902
  /** The input image for generating the videos.
2898
- Optional if prompt or video is provided. */
2903
+ Optional if prompt is provided. Not allowed if video is provided. */
2899
2904
  image?: Image_2;
2900
2905
  /** The input video for video extension use cases.
2901
- Optional if prompt or image is provided. */
2906
+ Optional if prompt is provided. Not allowed if image is provided. */
2902
2907
  video?: Video;
2908
+ /** A set of source input(s) for video generation. */
2909
+ source?: GenerateVideosSource;
2903
2910
  /** Configuration for generating videos. */
2904
2911
  config?: GenerateVideosConfig;
2905
2912
  }
@@ -2914,6 +2921,19 @@ export declare class GenerateVideosResponse {
2914
2921
  raiMediaFilteredReasons?: string[];
2915
2922
  }
2916
2923
 
2924
+ /** A set of source input(s) for video generation. */
2925
+ export declare interface GenerateVideosSource {
2926
+ /** The text prompt for generating the videos.
2927
+ Optional if image or video is provided. */
2928
+ prompt?: string;
2929
+ /** The input image for generating the videos.
2930
+ Optional if prompt is provided. Not allowed if video is provided. */
2931
+ image?: Image_2;
2932
+ /** The input video for video extension use cases.
2933
+ Optional if prompt is provided. Not allowed if image is provided. */
2934
+ video?: Video;
2935
+ }
2936
+
2917
2937
  /** Generation config. */
2918
2938
  export declare interface GenerationConfig {
2919
2939
  /** Optional. Config for model selection. */
@@ -3097,7 +3117,6 @@ export declare interface GetOperationParameters {
3097
3117
  config?: GetOperationConfig;
3098
3118
  }
3099
3119
 
3100
- /** Optional parameters for tunings.get method. */
3101
3120
  export declare interface GetTuningJobConfig {
3102
3121
  /** Used to override HTTP request options. */
3103
3122
  httpOptions?: HttpOptions;
@@ -3608,12 +3627,10 @@ export declare class HttpResponse {
3608
3627
  /** An image. */
3609
3628
  declare interface Image_2 {
3610
3629
  /** The Cloud Storage URI of the image. ``Image`` can contain a value
3611
- for this field or the ``image_bytes`` field but not both.
3612
- */
3630
+ for this field or the ``image_bytes`` field but not both. */
3613
3631
  gcsUri?: string;
3614
3632
  /** The image bytes data. ``Image`` can contain a value for this field
3615
3633
  or the ``gcs_uri`` field but not both.
3616
-
3617
3634
  * @remarks Encoded as base64 string. */
3618
3635
  imageBytes?: string;
3619
3636
  /** The MIME type of the image. */
@@ -4664,6 +4681,7 @@ export declare interface LiveServerSessionResumptionUpdate {
4664
4681
  lastConsumedClientMessageIndex?: string;
4665
4682
  }
4666
4683
 
4684
+ /** Sent in response to a `LiveGenerateContentSetup` message from the client. */
4667
4685
  export declare interface LiveServerSetupComplete {
4668
4686
  /** The session id of the live session. */
4669
4687
  sessionId?: string;
@@ -5062,7 +5080,9 @@ export declare class Models extends BaseModule {
5062
5080
  * ```ts
5063
5081
  * const operation = await ai.models.generateVideos({
5064
5082
  * model: 'veo-2.0-generate-001',
5065
- * prompt: 'A neon hologram of a cat driving at top speed',
5083
+ * source: {
5084
+ * prompt: 'A neon hologram of a cat driving at top speed',
5085
+ * },
5066
5086
  * config: {
5067
5087
  * numberOfVideos: 1
5068
5088
  * });
@@ -5101,26 +5121,16 @@ export declare class Models extends BaseModule {
5101
5121
  */
5102
5122
  embedContent(params: types.EmbedContentParameters): Promise<types.EmbedContentResponse>;
5103
5123
  /**
5104
- * Generates an image based on a text description and configuration.
5105
- *
5106
- * @param params - The parameters for generating images.
5107
- * @return The response from the API.
5108
- *
5109
- * @example
5110
- * ```ts
5111
- * const response = await ai.models.generateImages({
5112
- * model: 'imagen-3.0-generate-002',
5113
- * prompt: 'Robot holding a red skateboard',
5114
- * config: {
5115
- * numberOfImages: 1,
5116
- * includeRaiReason: true,
5117
- * },
5118
- * });
5119
- * console.log(response?.generatedImages?.[0]?.image?.imageBytes);
5120
- * ```
5124
+ * Private method for generating images.
5121
5125
  */
5122
5126
  private generateImagesInternal;
5127
+ /**
5128
+ * Private method for editing an image.
5129
+ */
5123
5130
  private editImageInternal;
5131
+ /**
5132
+ * Private method for upscaling an image.
5133
+ */
5124
5134
  private upscaleImageInternal;
5125
5135
  /**
5126
5136
  * Recontextualizes an image.
@@ -5259,27 +5269,7 @@ export declare class Models extends BaseModule {
5259
5269
  */
5260
5270
  computeTokens(params: types.ComputeTokensParameters): Promise<types.ComputeTokensResponse>;
5261
5271
  /**
5262
- * Generates videos based on a text description and configuration.
5263
- *
5264
- * @param params - The parameters for generating videos.
5265
- * @return A Promise<GenerateVideosOperation> which allows you to track the progress and eventually retrieve the generated videos using the operations.get method.
5266
- *
5267
- * @example
5268
- * ```ts
5269
- * const operation = await ai.models.generateVideos({
5270
- * model: 'veo-2.0-generate-001',
5271
- * prompt: 'A neon hologram of a cat driving at top speed',
5272
- * config: {
5273
- * numberOfVideos: 1
5274
- * });
5275
- *
5276
- * while (!operation.done) {
5277
- * await new Promise(resolve => setTimeout(resolve, 10000));
5278
- * operation = await ai.operations.getVideosOperation({operation: operation});
5279
- * }
5280
- *
5281
- * console.log(operation.response?.generatedVideos?.[0]?.video?.uri);
5282
- * ```
5272
+ * Private method for generating videos.
5283
5273
  */
5284
5274
  private generateVideosInternal;
5285
5275
  }
@@ -5348,10 +5338,10 @@ export declare interface OperationFromAPIResponseParameters {
5348
5338
 
5349
5339
  /** Parameters for the get method of the operations module. */
5350
5340
  export declare interface OperationGetParameters<T, U extends Operation<T>> {
5351
- /** The operation to be retrieved. */
5352
- operation: U;
5353
5341
  /** Used to override the default configuration. */
5354
5342
  config?: GetOperationConfig;
5343
+ /** The operation to be retrieved. */
5344
+ operation: U;
5355
5345
  }
5356
5346
 
5357
5347
  export declare class Operations extends BaseModule {
@@ -5750,6 +5740,8 @@ export declare interface RecontextImageConfig {
5750
5740
  /** Whether allow to generate person images, and restrict to specific
5751
5741
  ages. */
5752
5742
  personGeneration?: PersonGeneration;
5743
+ /** Whether to add a SynthID watermark to the generated images. */
5744
+ addWatermark?: boolean;
5753
5745
  /** MIME type of the generated image. */
5754
5746
  outputMimeType?: string;
5755
5747
  /** Compression quality of the generated image (for ``image/jpeg``
@@ -5865,14 +5857,11 @@ export declare interface RetrievalMetadata {
5865
5857
 
5866
5858
  /** Safety attributes of a GeneratedImage or the user-provided prompt. */
5867
5859
  export declare interface SafetyAttributes {
5868
- /** List of RAI categories.
5869
- */
5860
+ /** List of RAI categories. */
5870
5861
  categories?: string[];
5871
- /** List of scores of each categories.
5872
- */
5862
+ /** List of scores of each categories. */
5873
5863
  scores?: number[];
5874
- /** Internal use only.
5875
- */
5864
+ /** Internal use only. */
5876
5865
  contentType?: string;
5877
5866
  }
5878
5867
 
@@ -6634,7 +6623,7 @@ export declare class Tokens extends BaseModule {
6634
6623
 
6635
6624
  /** Tokens info with a list of tokens and the corresponding list of token ids. */
6636
6625
  export declare interface TokensInfo {
6637
- /** Optional. Optional fields for the role from the corresponding Content. */
6626
+ /** Optional fields for the role from the corresponding Content. */
6638
6627
  role?: string;
6639
6628
  /** A list of token ids from the input. */
6640
6629
  tokenIds?: string[];
@@ -6901,6 +6890,18 @@ declare class Tunings extends BaseModule {
6901
6890
  tune: (params: types.CreateTuningJobParameters) => Promise<types.TuningJob>;
6902
6891
  private getInternal;
6903
6892
  private listInternal;
6893
+ /**
6894
+ * Cancels a tuning job.
6895
+ *
6896
+ * @param params - The parameters for the cancel request.
6897
+ * @return The empty response returned by the API.
6898
+ *
6899
+ * @example
6900
+ * ```ts
6901
+ * await ai.tunings.cancel({name: '...'}); // The server-generated resource name.
6902
+ * ```
6903
+ */
6904
+ cancel(params: types.CancelTuningJobParameters): Promise<void>;
6904
6905
  private tuneInternal;
6905
6906
  private tuneMldevInternal;
6906
6907
  }
@@ -7008,6 +7009,7 @@ declare namespace types {
7008
7009
  SubjectReferenceType,
7009
7010
  EditMode,
7010
7011
  SegmentMode,
7012
+ VideoGenerationReferenceType,
7011
7013
  VideoCompressionQuality,
7012
7014
  FileState,
7013
7015
  FileSource,
@@ -7169,11 +7171,14 @@ declare namespace types {
7169
7171
  TokensInfo,
7170
7172
  ComputeTokensResponse,
7171
7173
  Video,
7174
+ GenerateVideosSource,
7172
7175
  VideoGenerationReferenceImage,
7173
7176
  GenerateVideosConfig,
7174
7177
  GenerateVideosParameters,
7175
7178
  GeneratedVideo,
7176
7179
  GenerateVideosResponse,
7180
+ Operation,
7181
+ GenerateVideosOperation,
7177
7182
  GetTuningJobConfig,
7178
7183
  GetTuningJobParameters,
7179
7184
  TunedModelCheckpoint,
@@ -7199,6 +7204,8 @@ declare namespace types {
7199
7204
  ListTuningJobsConfig,
7200
7205
  ListTuningJobsParameters,
7201
7206
  ListTuningJobsResponse,
7207
+ CancelTuningJobConfig,
7208
+ CancelTuningJobParameters,
7202
7209
  TuningExample,
7203
7210
  TuningDataset,
7204
7211
  TuningValidationDataset,
@@ -7279,10 +7286,7 @@ declare namespace types {
7279
7286
  LiveServerGoAway,
7280
7287
  LiveServerSessionResumptionUpdate,
7281
7288
  LiveServerMessage,
7282
- OperationGetParameters,
7283
7289
  OperationFromAPIResponseParameters,
7284
- Operation,
7285
- GenerateVideosOperation,
7286
7290
  AutomaticActivityDetection,
7287
7291
  RealtimeInputConfig,
7288
7292
  SessionResumptionConfig,
@@ -7326,6 +7330,7 @@ declare namespace types {
7326
7330
  LiveConnectConstraints,
7327
7331
  CreateAuthTokenConfig,
7328
7332
  CreateAuthTokenParameters,
7333
+ OperationGetParameters,
7329
7334
  CreateTuningJobParameters,
7330
7335
  BlobImageUnion,
7331
7336
  PartUnion,
@@ -7456,13 +7461,15 @@ export declare interface UpscaleImageConfig {
7456
7461
  be charged usage for any applicable operations.
7457
7462
  */
7458
7463
  abortSignal?: AbortSignal;
7464
+ /** Cloud Storage URI used to store the generated images. */
7465
+ outputGcsUri?: string;
7459
7466
  /** Whether to include a reason for filtered-out images in the
7460
7467
  response. */
7461
7468
  includeRaiReason?: boolean;
7462
7469
  /** The image format that the output should be saved as. */
7463
7470
  outputMimeType?: string;
7464
- /** The level of compression if the ``output_mime_type`` is
7465
- ``image/jpeg``. */
7471
+ /** The level of compression. Only applicable if the
7472
+ ``output_mime_type`` is ``image/jpeg``. */
7466
7473
  outputCompressionQuality?: number;
7467
7474
  /** Whether to add an image enhancing step before upscaling.
7468
7475
  It is expected to suppress the noise and JPEG compression artifacts
@@ -7616,7 +7623,7 @@ export declare interface Video {
7616
7623
  /** Video bytes.
7617
7624
  * @remarks Encoded as base64 string. */
7618
7625
  videoBytes?: string;
7619
- /** Video encoding, for example "video/mp4". */
7626
+ /** Video encoding, for example ``video/mp4``. */
7620
7627
  mimeType?: string;
7621
7628
  }
7622
7629
 
@@ -7636,13 +7643,26 @@ export declare enum VideoCompressionQuality {
7636
7643
 
7637
7644
  /** A reference image for video generation. */
7638
7645
  export declare interface VideoGenerationReferenceImage {
7639
- /** The reference image.
7640
- */
7646
+ /** The reference image. */
7641
7647
  image?: Image_2;
7642
7648
  /** The type of the reference image, which defines how the reference
7643
- image will be used to generate the video. Supported values are 'asset'
7644
- or 'style'. */
7645
- referenceType?: string;
7649
+ image will be used to generate the video. */
7650
+ referenceType?: VideoGenerationReferenceType;
7651
+ }
7652
+
7653
+ /** Enum for the reference type of a video generation reference image. */
7654
+ export declare enum VideoGenerationReferenceType {
7655
+ /**
7656
+ * A reference image that provides assets to the generated video,
7657
+ such as the scene, an object, a character, etc.
7658
+ */
7659
+ ASSET = "ASSET",
7660
+ /**
7661
+ * A reference image that provides aesthetics including colors,
7662
+ lighting, texture, etc., to be used as the style of the generated video,
7663
+ such as 'anime', 'photography', 'origami', etc.
7664
+ */
7665
+ STYLE = "STYLE"
7646
7666
  }
7647
7667
 
7648
7668
  /** Describes how the video in the Part should be used by the model. */