@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.
package/dist/genai.d.ts CHANGED
@@ -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;
@@ -3596,12 +3615,10 @@ export declare class HttpResponse {
3596
3615
  /** An image. */
3597
3616
  declare interface Image_2 {
3598
3617
  /** The Cloud Storage URI of the image. ``Image`` can contain a value
3599
- for this field or the ``image_bytes`` field but not both.
3600
- */
3618
+ for this field or the ``image_bytes`` field but not both. */
3601
3619
  gcsUri?: string;
3602
3620
  /** The image bytes data. ``Image`` can contain a value for this field
3603
3621
  or the ``gcs_uri`` field but not both.
3604
-
3605
3622
  * @remarks Encoded as base64 string. */
3606
3623
  imageBytes?: string;
3607
3624
  /** The MIME type of the image. */
@@ -4652,6 +4669,7 @@ export declare interface LiveServerSessionResumptionUpdate {
4652
4669
  lastConsumedClientMessageIndex?: string;
4653
4670
  }
4654
4671
 
4672
+ /** Sent in response to a `LiveGenerateContentSetup` message from the client. */
4655
4673
  export declare interface LiveServerSetupComplete {
4656
4674
  /** The session id of the live session. */
4657
4675
  sessionId?: string;
@@ -5050,7 +5068,9 @@ export declare class Models extends BaseModule {
5050
5068
  * ```ts
5051
5069
  * const operation = await ai.models.generateVideos({
5052
5070
  * model: 'veo-2.0-generate-001',
5053
- * prompt: 'A neon hologram of a cat driving at top speed',
5071
+ * source: {
5072
+ * prompt: 'A neon hologram of a cat driving at top speed',
5073
+ * },
5054
5074
  * config: {
5055
5075
  * numberOfVideos: 1
5056
5076
  * });
@@ -5089,26 +5109,16 @@ export declare class Models extends BaseModule {
5089
5109
  */
5090
5110
  embedContent(params: types.EmbedContentParameters): Promise<types.EmbedContentResponse>;
5091
5111
  /**
5092
- * Generates an image based on a text description and configuration.
5093
- *
5094
- * @param params - The parameters for generating images.
5095
- * @return The response from the API.
5096
- *
5097
- * @example
5098
- * ```ts
5099
- * const response = await ai.models.generateImages({
5100
- * model: 'imagen-3.0-generate-002',
5101
- * prompt: 'Robot holding a red skateboard',
5102
- * config: {
5103
- * numberOfImages: 1,
5104
- * includeRaiReason: true,
5105
- * },
5106
- * });
5107
- * console.log(response?.generatedImages?.[0]?.image?.imageBytes);
5108
- * ```
5112
+ * Private method for generating images.
5109
5113
  */
5110
5114
  private generateImagesInternal;
5115
+ /**
5116
+ * Private method for editing an image.
5117
+ */
5111
5118
  private editImageInternal;
5119
+ /**
5120
+ * Private method for upscaling an image.
5121
+ */
5112
5122
  private upscaleImageInternal;
5113
5123
  /**
5114
5124
  * Recontextualizes an image.
@@ -5247,27 +5257,7 @@ export declare class Models extends BaseModule {
5247
5257
  */
5248
5258
  computeTokens(params: types.ComputeTokensParameters): Promise<types.ComputeTokensResponse>;
5249
5259
  /**
5250
- * Generates videos based on a text description and configuration.
5251
- *
5252
- * @param params - The parameters for generating videos.
5253
- * @return A Promise<GenerateVideosOperation> which allows you to track the progress and eventually retrieve the generated videos using the operations.get method.
5254
- *
5255
- * @example
5256
- * ```ts
5257
- * const operation = await ai.models.generateVideos({
5258
- * model: 'veo-2.0-generate-001',
5259
- * prompt: 'A neon hologram of a cat driving at top speed',
5260
- * config: {
5261
- * numberOfVideos: 1
5262
- * });
5263
- *
5264
- * while (!operation.done) {
5265
- * await new Promise(resolve => setTimeout(resolve, 10000));
5266
- * operation = await ai.operations.getVideosOperation({operation: operation});
5267
- * }
5268
- *
5269
- * console.log(operation.response?.generatedVideos?.[0]?.video?.uri);
5270
- * ```
5260
+ * Private method for generating videos.
5271
5261
  */
5272
5262
  private generateVideosInternal;
5273
5263
  }
@@ -5336,10 +5326,10 @@ export declare interface OperationFromAPIResponseParameters {
5336
5326
 
5337
5327
  /** Parameters for the get method of the operations module. */
5338
5328
  export declare interface OperationGetParameters<T, U extends Operation<T>> {
5339
- /** The operation to be retrieved. */
5340
- operation: U;
5341
5329
  /** Used to override the default configuration. */
5342
5330
  config?: GetOperationConfig;
5331
+ /** The operation to be retrieved. */
5332
+ operation: U;
5343
5333
  }
5344
5334
 
5345
5335
  export declare class Operations extends BaseModule {
@@ -5738,6 +5728,8 @@ export declare interface RecontextImageConfig {
5738
5728
  /** Whether allow to generate person images, and restrict to specific
5739
5729
  ages. */
5740
5730
  personGeneration?: PersonGeneration;
5731
+ /** Whether to add a SynthID watermark to the generated images. */
5732
+ addWatermark?: boolean;
5741
5733
  /** MIME type of the generated image. */
5742
5734
  outputMimeType?: string;
5743
5735
  /** Compression quality of the generated image (for ``image/jpeg``
@@ -5853,14 +5845,11 @@ export declare interface RetrievalMetadata {
5853
5845
 
5854
5846
  /** Safety attributes of a GeneratedImage or the user-provided prompt. */
5855
5847
  export declare interface SafetyAttributes {
5856
- /** List of RAI categories.
5857
- */
5848
+ /** List of RAI categories. */
5858
5849
  categories?: string[];
5859
- /** List of scores of each categories.
5860
- */
5850
+ /** List of scores of each categories. */
5861
5851
  scores?: number[];
5862
- /** Internal use only.
5863
- */
5852
+ /** Internal use only. */
5864
5853
  contentType?: string;
5865
5854
  }
5866
5855
 
@@ -6622,7 +6611,7 @@ export declare class Tokens extends BaseModule {
6622
6611
 
6623
6612
  /** Tokens info with a list of tokens and the corresponding list of token ids. */
6624
6613
  export declare interface TokensInfo {
6625
- /** Optional. Optional fields for the role from the corresponding Content. */
6614
+ /** Optional fields for the role from the corresponding Content. */
6626
6615
  role?: string;
6627
6616
  /** A list of token ids from the input. */
6628
6617
  tokenIds?: string[];
@@ -6889,6 +6878,18 @@ declare class Tunings extends BaseModule {
6889
6878
  tune: (params: types.CreateTuningJobParameters) => Promise<types.TuningJob>;
6890
6879
  private getInternal;
6891
6880
  private listInternal;
6881
+ /**
6882
+ * Cancels a tuning job.
6883
+ *
6884
+ * @param params - The parameters for the cancel request.
6885
+ * @return The empty response returned by the API.
6886
+ *
6887
+ * @example
6888
+ * ```ts
6889
+ * await ai.tunings.cancel({name: '...'}); // The server-generated resource name.
6890
+ * ```
6891
+ */
6892
+ cancel(params: types.CancelTuningJobParameters): Promise<void>;
6892
6893
  private tuneInternal;
6893
6894
  private tuneMldevInternal;
6894
6895
  }
@@ -6996,6 +6997,7 @@ declare namespace types {
6996
6997
  SubjectReferenceType,
6997
6998
  EditMode,
6998
6999
  SegmentMode,
7000
+ VideoGenerationReferenceType,
6999
7001
  VideoCompressionQuality,
7000
7002
  FileState,
7001
7003
  FileSource,
@@ -7157,11 +7159,14 @@ declare namespace types {
7157
7159
  TokensInfo,
7158
7160
  ComputeTokensResponse,
7159
7161
  Video,
7162
+ GenerateVideosSource,
7160
7163
  VideoGenerationReferenceImage,
7161
7164
  GenerateVideosConfig,
7162
7165
  GenerateVideosParameters,
7163
7166
  GeneratedVideo,
7164
7167
  GenerateVideosResponse,
7168
+ Operation,
7169
+ GenerateVideosOperation,
7165
7170
  GetTuningJobConfig,
7166
7171
  GetTuningJobParameters,
7167
7172
  TunedModelCheckpoint,
@@ -7187,6 +7192,8 @@ declare namespace types {
7187
7192
  ListTuningJobsConfig,
7188
7193
  ListTuningJobsParameters,
7189
7194
  ListTuningJobsResponse,
7195
+ CancelTuningJobConfig,
7196
+ CancelTuningJobParameters,
7190
7197
  TuningExample,
7191
7198
  TuningDataset,
7192
7199
  TuningValidationDataset,
@@ -7267,10 +7274,7 @@ declare namespace types {
7267
7274
  LiveServerGoAway,
7268
7275
  LiveServerSessionResumptionUpdate,
7269
7276
  LiveServerMessage,
7270
- OperationGetParameters,
7271
7277
  OperationFromAPIResponseParameters,
7272
- Operation,
7273
- GenerateVideosOperation,
7274
7278
  AutomaticActivityDetection,
7275
7279
  RealtimeInputConfig,
7276
7280
  SessionResumptionConfig,
@@ -7314,6 +7318,7 @@ declare namespace types {
7314
7318
  LiveConnectConstraints,
7315
7319
  CreateAuthTokenConfig,
7316
7320
  CreateAuthTokenParameters,
7321
+ OperationGetParameters,
7317
7322
  CreateTuningJobParameters,
7318
7323
  BlobImageUnion,
7319
7324
  PartUnion,
@@ -7444,13 +7449,15 @@ export declare interface UpscaleImageConfig {
7444
7449
  be charged usage for any applicable operations.
7445
7450
  */
7446
7451
  abortSignal?: AbortSignal;
7452
+ /** Cloud Storage URI used to store the generated images. */
7453
+ outputGcsUri?: string;
7447
7454
  /** Whether to include a reason for filtered-out images in the
7448
7455
  response. */
7449
7456
  includeRaiReason?: boolean;
7450
7457
  /** The image format that the output should be saved as. */
7451
7458
  outputMimeType?: string;
7452
- /** The level of compression if the ``output_mime_type`` is
7453
- ``image/jpeg``. */
7459
+ /** The level of compression. Only applicable if the
7460
+ ``output_mime_type`` is ``image/jpeg``. */
7454
7461
  outputCompressionQuality?: number;
7455
7462
  /** Whether to add an image enhancing step before upscaling.
7456
7463
  It is expected to suppress the noise and JPEG compression artifacts
@@ -7604,7 +7611,7 @@ export declare interface Video {
7604
7611
  /** Video bytes.
7605
7612
  * @remarks Encoded as base64 string. */
7606
7613
  videoBytes?: string;
7607
- /** Video encoding, for example "video/mp4". */
7614
+ /** Video encoding, for example ``video/mp4``. */
7608
7615
  mimeType?: string;
7609
7616
  }
7610
7617
 
@@ -7624,13 +7631,26 @@ export declare enum VideoCompressionQuality {
7624
7631
 
7625
7632
  /** A reference image for video generation. */
7626
7633
  export declare interface VideoGenerationReferenceImage {
7627
- /** The reference image.
7628
- */
7634
+ /** The reference image. */
7629
7635
  image?: Image_2;
7630
7636
  /** The type of the reference image, which defines how the reference
7631
- image will be used to generate the video. Supported values are 'asset'
7632
- or 'style'. */
7633
- referenceType?: string;
7637
+ image will be used to generate the video. */
7638
+ referenceType?: VideoGenerationReferenceType;
7639
+ }
7640
+
7641
+ /** Enum for the reference type of a video generation reference image. */
7642
+ export declare enum VideoGenerationReferenceType {
7643
+ /**
7644
+ * A reference image that provides assets to the generated video,
7645
+ such as the scene, an object, a character, etc.
7646
+ */
7647
+ ASSET = "ASSET",
7648
+ /**
7649
+ * A reference image that provides aesthetics including colors,
7650
+ lighting, texture, etc., to be used as the style of the generated video,
7651
+ such as 'anime', 'photography', 'origami', etc.
7652
+ */
7653
+ STYLE = "STYLE"
7634
7654
  }
7635
7655
 
7636
7656
  /** Describes how the video in the Part should be used by the model. */