Skip to content

Commit cccb6d0

Browse files
authored
docs(ai): Imagen deprecation comments (#9771)
1 parent f87c15e commit cccb6d0

18 files changed

Lines changed: 194 additions & 32 deletions

.changeset/angry-ears-grow.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@firebase/ai': minor
3+
'firebase': minor
4+
---
5+
6+
[deprecated] All Imagen models are deprecated and will shut down as early as June 2026. As a replacement, you can [migrate your apps to use Gemini Image models (the "Nano Banana" models)](https://firebase.google.com/docs/ai-logic/imagen-models-migration).

common/api-review/ai.api.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ export function getAI(app?: FirebaseApp, options?: AIOptions): AI;
575575
// @public
576576
export function getGenerativeModel(ai: AI, modelParams: ModelParams | HybridParams, requestOptions?: RequestOptions): GenerativeModel;
577577

578-
// @public
578+
// @public @deprecated
579579
export function getImagenModel(ai: AI, modelParams: ImagenModelParams, requestOptions?: RequestOptions): ImagenModel;
580580

581581
// @beta
@@ -584,7 +584,7 @@ export function getLiveGenerativeModel(ai: AI, modelParams: LiveModelParams): Li
584584
// @beta
585585
export function getTemplateGenerativeModel(ai: AI, requestOptions?: RequestOptions): TemplateGenerativeModel;
586586

587-
// @beta
587+
// @public @deprecated
588588
export function getTemplateImagenModel(ai: AI, requestOptions?: RequestOptions): TemplateImagenModel;
589589

590590
// @public
@@ -744,7 +744,7 @@ export interface HybridParams {
744744
onDeviceParams?: OnDeviceParams;
745745
}
746746

747-
// @public
747+
// @public @deprecated
748748
export const ImagenAspectRatio: {
749749
readonly SQUARE: "1:1";
750750
readonly LANDSCAPE_3x4: "3:4";
@@ -753,16 +753,16 @@ export const ImagenAspectRatio: {
753753
readonly PORTRAIT_9x16: "9:16";
754754
};
755755

756-
// @public
756+
// @public @deprecated
757757
export type ImagenAspectRatio = (typeof ImagenAspectRatio)[keyof typeof ImagenAspectRatio];
758758

759-
// @public
759+
// @public @deprecated
760760
export interface ImagenGCSImage {
761761
gcsURI: string;
762762
mimeType: string;
763763
}
764764

765-
// @public
765+
// @public @deprecated
766766
export interface ImagenGenerationConfig {
767767
addWatermark?: boolean;
768768
aspectRatio?: ImagenAspectRatio;
@@ -771,27 +771,27 @@ export interface ImagenGenerationConfig {
771771
numberOfImages?: number;
772772
}
773773

774-
// @public
774+
// @public @deprecated
775775
export interface ImagenGenerationResponse<T extends ImagenInlineImage | ImagenGCSImage> {
776776
filteredReason?: string;
777777
images: T[];
778778
}
779779

780-
// @public
780+
// @public @deprecated
781781
export class ImagenImageFormat {
782782
compressionQuality?: number;
783783
static jpeg(compressionQuality?: number): ImagenImageFormat;
784784
mimeType: string;
785785
static png(): ImagenImageFormat;
786786
}
787787

788-
// @public
788+
// @public @deprecated
789789
export interface ImagenInlineImage {
790790
bytesBase64Encoded: string;
791791
mimeType: string;
792792
}
793793

794-
// @public
794+
// @public @deprecated
795795
export class ImagenModel extends AIModel {
796796
constructor(ai: AI, modelParams: ImagenModelParams, requestOptions?: RequestOptions | undefined);
797797
generateImages(prompt: string, singleRequestOptions?: SingleRequestOptions): Promise<ImagenGenerationResponse<ImagenInlineImage>>;
@@ -803,35 +803,35 @@ export class ImagenModel extends AIModel {
803803
safetySettings?: ImagenSafetySettings;
804804
}
805805

806-
// @public
806+
// @public @deprecated
807807
export interface ImagenModelParams {
808808
generationConfig?: ImagenGenerationConfig;
809809
model: string;
810810
safetySettings?: ImagenSafetySettings;
811811
}
812812

813-
// @public
813+
// @public @deprecated
814814
export const ImagenPersonFilterLevel: {
815815
readonly BLOCK_ALL: "dont_allow";
816816
readonly ALLOW_ADULT: "allow_adult";
817817
readonly ALLOW_ALL: "allow_all";
818818
};
819819

820-
// @public
820+
// @public @deprecated
821821
export type ImagenPersonFilterLevel = (typeof ImagenPersonFilterLevel)[keyof typeof ImagenPersonFilterLevel];
822822

823-
// @public
823+
// @public @deprecated
824824
export const ImagenSafetyFilterLevel: {
825825
readonly BLOCK_LOW_AND_ABOVE: "block_low_and_above";
826826
readonly BLOCK_MEDIUM_AND_ABOVE: "block_medium_and_above";
827827
readonly BLOCK_ONLY_HIGH: "block_only_high";
828828
readonly BLOCK_NONE: "block_none";
829829
};
830830

831-
// @public
831+
// @public @deprecated
832832
export type ImagenSafetyFilterLevel = (typeof ImagenSafetyFilterLevel)[keyof typeof ImagenSafetyFilterLevel];
833833

834-
// @public
834+
// @public @deprecated
835835
export interface ImagenSafetySettings {
836836
personFilterLevel?: ImagenPersonFilterLevel;
837837
safetyFilterLevel?: ImagenSafetyFilterLevel;
@@ -1359,11 +1359,12 @@ export class TemplateGenerativeModel {
13591359
requestOptions?: RequestOptions;
13601360
}
13611361

1362-
// @beta
1362+
// @public @deprecated
13631363
export class TemplateImagenModel {
13641364
constructor(ai: AI, requestOptions?: RequestOptions);
13651365
// @internal (undocumented)
13661366
_apiSettings: ApiSettings;
1367+
// @beta
13671368
generateImages(templateId: string, templateVariables: object, singleRequestOptions?: SingleRequestOptions): Promise<ImagenGenerationResponse<ImagenInlineImage>>;
13681369
requestOptions?: RequestOptions;
13691370
}

docs-devsite/ai.imagengcsimage.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ https://github.com/firebase/firebase-js-sdk
1010
{% endcomment %}
1111

1212
# ImagenGCSImage interface
13+
> Warning: This API is now obsolete.
14+
>
15+
> All Imagen models are deprecated and will shut down as early as June 2026. As a replacement, you can [migrate your apps to use Gemini Image models (the "Nano Banana" models)](https://firebase.google.com/docs/ai-logic/imagen-models-migration)<!-- -->.
16+
>
17+
1318
An image generated by Imagen, stored in a Cloud Storage for Firebase bucket.
1419

1520
This feature is not available yet.

docs-devsite/ai.imagengenerationconfig.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ https://github.com/firebase/firebase-js-sdk
1010
{% endcomment %}
1111

1212
# ImagenGenerationConfig interface
13+
> Warning: This API is now obsolete.
14+
>
15+
> All Imagen models are deprecated and will shut down as early as June 2026. As a replacement, you can [migrate your apps to use Gemini Image models (the "Nano Banana" models)](https://firebase.google.com/docs/ai-logic/imagen-models-migration)<!-- -->.
16+
>
17+
1318
Configuration options for generating images with Imagen.
1419

1520
See the [documentation](http://firebase.google.com/docs/vertex-ai/generate-images-imagen) for more details.

docs-devsite/ai.imagengenerationresponse.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ https://github.com/firebase/firebase-js-sdk
1010
{% endcomment %}
1111

1212
# ImagenGenerationResponse interface
13+
> Warning: This API is now obsolete.
14+
>
15+
> All Imagen models are deprecated and will shut down as early as June 2026. As a replacement, you can [migrate your apps to use Gemini Image models (the "Nano Banana" models)](https://firebase.google.com/docs/ai-logic/imagen-models-migration)<!-- -->.
16+
>
17+
1318
The response from a request to generate images with Imagen.
1419

1520
<b>Signature:</b>

docs-devsite/ai.imagenimageformat.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ https://github.com/firebase/firebase-js-sdk
1010
{% endcomment %}
1111

1212
# ImagenImageFormat class
13+
> Warning: This API is now obsolete.
14+
>
15+
> All Imagen models are deprecated and will shut down as early as June 2026. As a replacement, you can [migrate your apps to use Gemini Image models (the "Nano Banana" models)](https://firebase.google.com/docs/ai-logic/imagen-models-migration)<!-- -->.
16+
>
17+
1318
Defines the image format for images generated by Imagen.
1419

1520
Use this class to specify the desired format (JPEG or PNG) and compression quality for images generated by Imagen. This is typically included as part of [ImagenModelParams](./ai.imagenmodelparams.md#imagenmodelparams_interface)<!-- -->.

docs-devsite/ai.imageninlineimage.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ https://github.com/firebase/firebase-js-sdk
1010
{% endcomment %}
1111

1212
# ImagenInlineImage interface
13+
> Warning: This API is now obsolete.
14+
>
15+
> All Imagen models are deprecated and will shut down as early as June 2026. As a replacement, you can [migrate your apps to use Gemini Image models (the "Nano Banana" models)](https://firebase.google.com/docs/ai-logic/imagen-models-migration)<!-- -->.
16+
>
17+
1318
An image generated by Imagen, represented as inline data.
1419

1520
<b>Signature:</b>

docs-devsite/ai.imagenmodel.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ https://github.com/firebase/firebase-js-sdk
1010
{% endcomment %}
1111

1212
# ImagenModel class
13+
> Warning: This API is now obsolete.
14+
>
15+
> All Imagen models are deprecated and will shut down as early as June 2026. As a replacement, you can [migrate your apps to use Gemini Image models (the "Nano Banana" models)](https://firebase.google.com/docs/ai-logic/imagen-models-migration)<!-- -->.
16+
>
17+
1318
Class for Imagen model APIs.
1419

1520
This class provides methods for generating images using the Imagen model.

docs-devsite/ai.imagenmodelparams.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ https://github.com/firebase/firebase-js-sdk
1010
{% endcomment %}
1111

1212
# ImagenModelParams interface
13+
> Warning: This API is now obsolete.
14+
>
15+
> All Imagen models are deprecated and will shut down as early as June 2026. As a replacement, you can [migrate your apps to use Gemini Image models (the "Nano Banana" models)](https://firebase.google.com/docs/ai-logic/imagen-models-migration)<!-- -->.
16+
>
17+
1318
Parameters for configuring an [ImagenModel](./ai.imagenmodel.md#imagenmodel_class)<!-- -->.
1419

1520
<b>Signature:</b>

docs-devsite/ai.imagensafetysettings.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ https://github.com/firebase/firebase-js-sdk
1010
{% endcomment %}
1111

1212
# ImagenSafetySettings interface
13+
> Warning: This API is now obsolete.
14+
>
15+
> All Imagen models are deprecated and will shut down as early as June 2026. As a replacement, you can [migrate your apps to use Gemini Image models (the "Nano Banana" models)](https://firebase.google.com/docs/ai-logic/imagen-models-migration)<!-- -->.
16+
>
17+
1318
Settings for controlling the aggressiveness of filtering out sensitive content.
1419

1520
See the [documentation](http://firebase.google.com/docs/vertex-ai/generate-images) for more details.

0 commit comments

Comments
 (0)