TemplateImagenModel class final

An image model that connects to a remote server template.

Annotations
  • @experimental
  • @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).')

Properties

client → ApiClient
The API client.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
model → ({String name, String prefix})
The normalized model name.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

generateImages(String templateId, {required Map<String, Object?> inputs}) Future<ImagenGenerationResponse<ImagenInlineImage>>
Generates images from a template with the given templateId and inputs.
makeRequest<T>(Task task, Map<String, Object?> params, T parse(Map<String, Object?>)) Future<T>
Make a unary request for task with JSON encodable params.
inherited
makeTemplateRequest<T>(TemplateTask task, String templateId, Map<String, Object?>? inputs, Iterable<Content>? history, List<TemplateTool>? tools, TemplateToolConfig? toolConfig, T parse(Map<String, Object?>)) Future<T>
Makes a unary request to a template-based API.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
streamTemplateRequest<T>(TemplateTask task, String templateId, Map<String, Object?>? inputs, Iterable<Content>? history, List<TemplateTool>? tools, TemplateToolConfig? toolConfig, T parse(Map<String, Object?>)) Stream<T>
Makes a streaming request to a template-based API.
inherited
taskUri(Task task) Uri
Returns a URI for the given task.
inherited
templateName(String templateId) String
Returns the template name for the given templateId.
inherited
templateTaskUri(TemplateTask task, String templateId) Uri
Returns the URI for the given task and templateId.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited