Skip to content

Commit 2596dd1

Browse files
authored
docs(ai): promote gemini developer api and imagen to GA (#9255)
1 parent ccbf7ba commit 2596dd1

17 files changed

+85
-193
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'firebase': patch
3+
'@firebase/ai': patch
4+
---
5+
6+
Imagen Generation is now Generally Available (GA).

.changeset/loud-tigers-compare.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'firebase': patch
3+
'@firebase/ai': patch
4+
---
5+
6+
The Gemini Developer API is now Generally Available (GA).

common/api-review/ai.api.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ export function getAI(app?: FirebaseApp, options?: AIOptions): AI;
553553
// @public
554554
export function getGenerativeModel(ai: AI, modelParams: ModelParams | HybridParams, requestOptions?: RequestOptions): GenerativeModel;
555555

556-
// @beta
556+
// @public
557557
export function getImagenModel(ai: AI, modelParams: ImagenModelParams, requestOptions?: RequestOptions): ImagenModel;
558558

559559
// @beta
@@ -712,7 +712,7 @@ export interface HybridParams {
712712
onDeviceParams?: OnDeviceParams;
713713
}
714714

715-
// @beta
715+
// @public
716716
export const ImagenAspectRatio: {
717717
readonly SQUARE: "1:1";
718718
readonly LANDSCAPE_3x4: "3:4";
@@ -721,16 +721,16 @@ export const ImagenAspectRatio: {
721721
readonly PORTRAIT_9x16: "9:16";
722722
};
723723

724-
// @beta
724+
// @public
725725
export type ImagenAspectRatio = (typeof ImagenAspectRatio)[keyof typeof ImagenAspectRatio];
726726

727-
// @beta
727+
// @public
728728
export interface ImagenGCSImage {
729729
gcsURI: string;
730730
mimeType: string;
731731
}
732732

733-
// @beta
733+
// @public
734734
export interface ImagenGenerationConfig {
735735
addWatermark?: boolean;
736736
aspectRatio?: ImagenAspectRatio;
@@ -739,27 +739,27 @@ export interface ImagenGenerationConfig {
739739
numberOfImages?: number;
740740
}
741741

742-
// @beta
742+
// @public
743743
export interface ImagenGenerationResponse<T extends ImagenInlineImage | ImagenGCSImage> {
744744
filteredReason?: string;
745745
images: T[];
746746
}
747747

748-
// @beta
748+
// @public
749749
export class ImagenImageFormat {
750750
compressionQuality?: number;
751751
static jpeg(compressionQuality?: number): ImagenImageFormat;
752752
mimeType: string;
753753
static png(): ImagenImageFormat;
754754
}
755755

756-
// @beta
756+
// @public
757757
export interface ImagenInlineImage {
758758
bytesBase64Encoded: string;
759759
mimeType: string;
760760
}
761761

762-
// @beta
762+
// @public
763763
export class ImagenModel extends AIModel {
764764
constructor(ai: AI, modelParams: ImagenModelParams, requestOptions?: RequestOptions | undefined);
765765
generateImages(prompt: string): Promise<ImagenGenerationResponse<ImagenInlineImage>>;
@@ -771,35 +771,35 @@ export class ImagenModel extends AIModel {
771771
safetySettings?: ImagenSafetySettings;
772772
}
773773

774-
// @beta
774+
// @public
775775
export interface ImagenModelParams {
776776
generationConfig?: ImagenGenerationConfig;
777777
model: string;
778778
safetySettings?: ImagenSafetySettings;
779779
}
780780

781-
// @beta
781+
// @public
782782
export const ImagenPersonFilterLevel: {
783783
readonly BLOCK_ALL: "dont_allow";
784784
readonly ALLOW_ADULT: "allow_adult";
785785
readonly ALLOW_ALL: "allow_all";
786786
};
787787

788-
// @beta
788+
// @public
789789
export type ImagenPersonFilterLevel = (typeof ImagenPersonFilterLevel)[keyof typeof ImagenPersonFilterLevel];
790790

791-
// @beta
791+
// @public
792792
export const ImagenSafetyFilterLevel: {
793793
readonly BLOCK_LOW_AND_ABOVE: "block_low_and_above";
794794
readonly BLOCK_MEDIUM_AND_ABOVE: "block_medium_and_above";
795795
readonly BLOCK_ONLY_HIGH: "block_only_high";
796796
readonly BLOCK_NONE: "block_none";
797797
};
798798

799-
// @beta
799+
// @public
800800
export type ImagenSafetyFilterLevel = (typeof ImagenSafetyFilterLevel)[keyof typeof ImagenSafetyFilterLevel];
801801

802-
// @beta
802+
// @public
803803
export interface ImagenSafetySettings {
804804
personFilterLevel?: ImagenPersonFilterLevel;
805805
safetyFilterLevel?: ImagenSafetyFilterLevel;

docs-devsite/ai.imagengcsimage.md

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

1212
# ImagenGCSImage interface
13-
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
14-
>
15-
1613
An image generated by Imagen, stored in a Cloud Storage for Firebase bucket.
1714

1815
This feature is not available yet.
@@ -27,14 +24,11 @@ export interface ImagenGCSImage
2724

2825
| Property | Type | Description |
2926
| --- | --- | --- |
30-
| [gcsURI](./ai.imagengcsimage.md#imagengcsimagegcsuri) | string | <b><i>(Public Preview)</i></b> The URI of the file stored in a Cloud Storage for Firebase bucket. |
31-
| [mimeType](./ai.imagengcsimage.md#imagengcsimagemimetype) | string | <b><i>(Public Preview)</i></b> The MIME type of the image; either <code>&quot;image/png&quot;</code> or <code>&quot;image/jpeg&quot;</code>.<!-- -->To request a different format, set the <code>imageFormat</code> property in your [ImagenGenerationConfig](./ai.imagengenerationconfig.md#imagengenerationconfig_interface)<!-- -->. |
27+
| [gcsURI](./ai.imagengcsimage.md#imagengcsimagegcsuri) | string | The URI of the file stored in a Cloud Storage for Firebase bucket. |
28+
| [mimeType](./ai.imagengcsimage.md#imagengcsimagemimetype) | string | The MIME type of the image; either <code>&quot;image/png&quot;</code> or <code>&quot;image/jpeg&quot;</code>.<!-- -->To request a different format, set the <code>imageFormat</code> property in your [ImagenGenerationConfig](./ai.imagengenerationconfig.md#imagengenerationconfig_interface)<!-- -->. |
3229

3330
## ImagenGCSImage.gcsURI
3431

35-
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
36-
>
37-
3832
The URI of the file stored in a Cloud Storage for Firebase bucket.
3933

4034
<b>Signature:</b>
@@ -49,9 +43,6 @@ gcsURI: string;
4943

5044
## ImagenGCSImage.mimeType
5145

52-
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
53-
>
54-
5546
The MIME type of the image; either `"image/png"` or `"image/jpeg"`<!-- -->.
5647

5748
To request a different format, set the `imageFormat` property in your [ImagenGenerationConfig](./ai.imagengenerationconfig.md#imagengenerationconfig_interface)<!-- -->.

docs-devsite/ai.imagengenerationconfig.md

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

1212
# ImagenGenerationConfig interface
13-
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
14-
>
15-
1613
Configuration options for generating images with Imagen.
1714

1815
See the [documentation](http://firebase.google.com/docs/vertex-ai/generate-images-imagen) for more details.
@@ -27,17 +24,14 @@ export interface ImagenGenerationConfig
2724

2825
| Property | Type | Description |
2926
| --- | --- | --- |
30-
| [addWatermark](./ai.imagengenerationconfig.md#imagengenerationconfigaddwatermark) | boolean | <b><i>(Public Preview)</i></b> Whether to add an invisible watermark to generated images.<!-- -->If set to <code>true</code>, an invisible SynthID watermark is embedded in generated images to indicate that they are AI generated. If set to <code>false</code>, watermarking will be disabled.<!-- -->For Imagen 3 models, the default value is <code>true</code>; see the <a href="http://firebase.google.com/docs/vertex-ai/model-parameters#imagen">addWatermark</a> documentation for more details.<!-- -->When using the Gemini Developer API ([GoogleAIBackend](./ai.googleaibackend.md#googleaibackend_class)<!-- -->), this will default to true, and cannot be turned off. |
31-
| [aspectRatio](./ai.imagengenerationconfig.md#imagengenerationconfigaspectratio) | [ImagenAspectRatio](./ai.md#imagenaspectratio) | <b><i>(Public Preview)</i></b> The aspect ratio of the generated images. The default value is square 1:1. Supported aspect ratios depend on the Imagen model, see [ImagenAspectRatio](./ai.md#imagenaspectratio) for more details. |
32-
| [imageFormat](./ai.imagengenerationconfig.md#imagengenerationconfigimageformat) | [ImagenImageFormat](./ai.imagenimageformat.md#imagenimageformat_class) | <b><i>(Public Preview)</i></b> The image format of the generated images. The default is PNG.<!-- -->See [ImagenImageFormat](./ai.imagenimageformat.md#imagenimageformat_class) for more details. |
33-
| [negativePrompt](./ai.imagengenerationconfig.md#imagengenerationconfignegativeprompt) | string | <b><i>(Public Preview)</i></b> A description of what should be omitted from the generated images.<!-- -->Support for negative prompts depends on the Imagen model.<!-- -->See the [documentation](http://firebase.google.com/docs/vertex-ai/model-parameters#imagen) for more details.<!-- -->This is no longer supported in the Gemini Developer API ([GoogleAIBackend](./ai.googleaibackend.md#googleaibackend_class)<!-- -->) in versions greater than <code>imagen-3.0-generate-002</code>. |
34-
| [numberOfImages](./ai.imagengenerationconfig.md#imagengenerationconfignumberofimages) | number | <b><i>(Public Preview)</i></b> The number of images to generate. The default value is 1.<!-- -->The number of sample images that may be generated in each request depends on the model (typically up to 4); see the <a href="http://firebase.google.com/docs/vertex-ai/model-parameters#imagen">sampleCount</a> documentation for more details. |
27+
| [addWatermark](./ai.imagengenerationconfig.md#imagengenerationconfigaddwatermark) | boolean | Whether to add an invisible watermark to generated images.<!-- -->If set to <code>true</code>, an invisible SynthID watermark is embedded in generated images to indicate that they are AI generated. If set to <code>false</code>, watermarking will be disabled.<!-- -->For Imagen 3 models, the default value is <code>true</code>; see the <a href="http://firebase.google.com/docs/vertex-ai/model-parameters#imagen">addWatermark</a> documentation for more details.<!-- -->When using the Gemini Developer API ([GoogleAIBackend](./ai.googleaibackend.md#googleaibackend_class)<!-- -->), this will default to true, and cannot be turned off. |
28+
| [aspectRatio](./ai.imagengenerationconfig.md#imagengenerationconfigaspectratio) | [ImagenAspectRatio](./ai.md#imagenaspectratio) | The aspect ratio of the generated images. The default value is square 1:1. Supported aspect ratios depend on the Imagen model, see [ImagenAspectRatio](./ai.md#imagenaspectratio) for more details. |
29+
| [imageFormat](./ai.imagengenerationconfig.md#imagengenerationconfigimageformat) | [ImagenImageFormat](./ai.imagenimageformat.md#imagenimageformat_class) | The image format of the generated images. The default is PNG.<!-- -->See [ImagenImageFormat](./ai.imagenimageformat.md#imagenimageformat_class) for more details. |
30+
| [negativePrompt](./ai.imagengenerationconfig.md#imagengenerationconfignegativeprompt) | string | A description of what should be omitted from the generated images.<!-- -->Support for negative prompts depends on the Imagen model.<!-- -->See the [documentation](http://firebase.google.com/docs/vertex-ai/model-parameters#imagen) for more details.<!-- -->This is no longer supported in the Gemini Developer API ([GoogleAIBackend](./ai.googleaibackend.md#googleaibackend_class)<!-- -->) in versions greater than <code>imagen-3.0-generate-002</code>. |
31+
| [numberOfImages](./ai.imagengenerationconfig.md#imagengenerationconfignumberofimages) | number | The number of images to generate. The default value is 1.<!-- -->The number of sample images that may be generated in each request depends on the model (typically up to 4); see the <a href="http://firebase.google.com/docs/vertex-ai/model-parameters#imagen">sampleCount</a> documentation for more details. |
3532

3633
## ImagenGenerationConfig.addWatermark
3734

38-
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
39-
>
40-
4135
Whether to add an invisible watermark to generated images.
4236

4337
If set to `true`<!-- -->, an invisible SynthID watermark is embedded in generated images to indicate that they are AI generated. If set to `false`<!-- -->, watermarking will be disabled.
@@ -54,9 +48,6 @@ addWatermark?: boolean;
5448

5549
## ImagenGenerationConfig.aspectRatio
5650

57-
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
58-
>
59-
6051
The aspect ratio of the generated images. The default value is square 1:1. Supported aspect ratios depend on the Imagen model, see [ImagenAspectRatio](./ai.md#imagenaspectratio) for more details.
6152

6253
<b>Signature:</b>
@@ -67,9 +58,6 @@ aspectRatio?: ImagenAspectRatio;
6758

6859
## ImagenGenerationConfig.imageFormat
6960

70-
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
71-
>
72-
7361
The image format of the generated images. The default is PNG.
7462

7563
See [ImagenImageFormat](./ai.imagenimageformat.md#imagenimageformat_class) for more details.
@@ -82,9 +70,6 @@ imageFormat?: ImagenImageFormat;
8270

8371
## ImagenGenerationConfig.negativePrompt
8472

85-
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
86-
>
87-
8873
A description of what should be omitted from the generated images.
8974

9075
Support for negative prompts depends on the Imagen model.
@@ -101,9 +86,6 @@ negativePrompt?: string;
10186

10287
## ImagenGenerationConfig.numberOfImages
10388

104-
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
105-
>
106-
10789
The number of images to generate. The default value is 1.
10890

10991
The number of sample images that may be generated in each request depends on the model (typically up to 4); see the <a href="http://firebase.google.com/docs/vertex-ai/model-parameters#imagen">sampleCount</a> documentation for more details.

docs-devsite/ai.imagengenerationresponse.md

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

1212
# ImagenGenerationResponse interface
13-
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
14-
>
15-
1613
The response from a request to generate images with Imagen.
1714

1815
<b>Signature:</b>
@@ -25,14 +22,11 @@ export interface ImagenGenerationResponse<T extends ImagenInlineImage | ImagenGC
2522

2623
| Property | Type | Description |
2724
| --- | --- | --- |
28-
| [filteredReason](./ai.imagengenerationresponse.md#imagengenerationresponsefilteredreason) | string | <b><i>(Public Preview)</i></b> The reason that images were filtered out. This property will only be defined if one or more images were filtered.<!-- -->Images may be filtered out due to the [ImagenSafetyFilterLevel](./ai.md#imagensafetyfilterlevel)<!-- -->, [ImagenPersonFilterLevel](./ai.md#imagenpersonfilterlevel)<!-- -->, or filtering included in the model. The filter levels may be adjusted in your [ImagenSafetySettings](./ai.imagensafetysettings.md#imagensafetysettings_interface)<!-- -->.<!-- -->See the [Responsible AI and usage guidelines for Imagen](https://cloud.google.com/vertex-ai/generative-ai/docs/image/responsible-ai-imagen) for more details. |
29-
| [images](./ai.imagengenerationresponse.md#imagengenerationresponseimages) | T\[\] | <b><i>(Public Preview)</i></b> The images generated by Imagen.<!-- -->The number of images generated may be fewer than the number requested if one or more were filtered out; see <code>filteredReason</code>. |
25+
| [filteredReason](./ai.imagengenerationresponse.md#imagengenerationresponsefilteredreason) | string | The reason that images were filtered out. This property will only be defined if one or more images were filtered.<!-- -->Images may be filtered out due to the [ImagenSafetyFilterLevel](./ai.md#imagensafetyfilterlevel)<!-- -->, [ImagenPersonFilterLevel](./ai.md#imagenpersonfilterlevel)<!-- -->, or filtering included in the model. The filter levels may be adjusted in your [ImagenSafetySettings](./ai.imagensafetysettings.md#imagensafetysettings_interface)<!-- -->.<!-- -->See the [Responsible AI and usage guidelines for Imagen](https://cloud.google.com/vertex-ai/generative-ai/docs/image/responsible-ai-imagen) for more details. |
26+
| [images](./ai.imagengenerationresponse.md#imagengenerationresponseimages) | T\[\] | The images generated by Imagen.<!-- -->The number of images generated may be fewer than the number requested if one or more were filtered out; see <code>filteredReason</code>. |
3027

3128
## ImagenGenerationResponse.filteredReason
3229

33-
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
34-
>
35-
3630
The reason that images were filtered out. This property will only be defined if one or more images were filtered.
3731

3832
Images may be filtered out due to the [ImagenSafetyFilterLevel](./ai.md#imagensafetyfilterlevel)<!-- -->, [ImagenPersonFilterLevel](./ai.md#imagenpersonfilterlevel)<!-- -->, or filtering included in the model. The filter levels may be adjusted in your [ImagenSafetySettings](./ai.imagensafetysettings.md#imagensafetysettings_interface)<!-- -->.
@@ -47,9 +41,6 @@ filteredReason?: string;
4741

4842
## ImagenGenerationResponse.images
4943

50-
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
51-
>
52-
5344
The images generated by Imagen.
5445

5546
The number of images generated may be fewer than the number requested if one or more were filtered out; see `filteredReason`<!-- -->.

0 commit comments

Comments
 (0)