ts • Lines: 54/**
* @license
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { RequestOptions } from '../types';
import { AI, ImagenGenerationResponse, ImagenInlineImage, SingleRequestOptions } from '../public-types';
import { ApiSettings } from '../types/internal';
/**
* Class for Imagen model APIs that execute on a server-side template.
*
* This class should only be instantiated with {@link getTemplateImagenModel}.
*
* @deprecated All Imagen models are deprecated and will shut down as
* early as June 2026. As a replacement, you can
* {@link https://firebase.google.com/docs/ai-logic/imagen-models-migration |
* migrate your apps to use Gemini Image models (the "Nano Banana" models)}.
*/
export declare class TemplateImagenModel {
/**
* @internal
*/
_apiSettings: ApiSettings;
/**
* Additional options to use when making requests.
*/
requestOptions?: RequestOptions;
/**
* @hideconstructor
*/
constructor(ai: AI, requestOptions?: RequestOptions);
/**
* Makes a single call to the model and returns an object containing a single
* {@link ImagenGenerationResponse}.
*
* @param templateId - The ID of the server-side template to execute.
* @param templateVariables - A key-value map of variables to populate the
* template with.
*
* @beta
*/
generateImages(templateId: string, templateVariables: object, singleRequestOptions?: SingleRequestOptions): Promise<ImagenGenerationResponse<ImagenInlineImage>>;
}