TemplateImagenModel
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
public final class TemplateImagenModel : SendableA type that represents a remote image generation model (like Imagen), with the ability to generate images based on various input types.
Public Preview: This API is a public preview and may be subject to change.
-
Generates images from a prompt template and variables.
Throws
An error if the request failed.Declaration
Swift
public func generateImages(templateID: String, inputs: [String: Any], options: RequestOptions = RequestOptions()) async throws -> ImagenGenerationResponse<ImagenInlineImage>Parameters
templateThe prompt template to use.
variablesA dictionary of variables to substitute into the template.
optionsThe
RequestOptionsfor the request, currently used to override default request timeout.Return Value
The images generated by the model.