---
title: "generate"
sidebar_label: "generate"
description: "Kotlin binding reference: generate."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.modelverse](../index.md)/[ImageGenerationModel](index.md)/[generate](generate.md)

# generate

[common]\
fun [generate](generate.md)(prompt: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), options: [ImageGenerationOptions](../ImageGenerationOptions/index.md) = ImageGenerationOptions(), listener: [ImageGenerationListener](../ImageGenerationListener/index.md)): [ImageGenerationHandle](../ImageGenerationHandle/index.md)

Generate pictures for [prompt](generate.md) under [options](generate.md). Returns at once; the worker runs the request and calls [listener](generate.md) on its thread: [ImageGenerationListener.onImages](../ImageGenerationListener/onImages.md) with the pictures and the seed the model drew, then [ImageGenerationListener.onDone](../ImageGenerationListener/onDone.md) with the [ImageGenerationReport](../ImageGenerationReport/index.md). A knob left at its zero keeps the model's own default.