gen_image | R Documentation |
Generate an image using Gemini's image generation capabilities and save it to a file
gen_image(
prompt,
filename = "gemini_image.png",
overwrite = TRUE,
model = "2.0-flash-exp-image-generation",
temperature = 1,
seed = 1234
)
prompt |
The prompt to generate an image from |
filename |
The filename to save the image to. Default is "gemini_image.png" |
overwrite |
Logical, whether to overwrite existing file. Default is TRUE |
model |
The model to use. Default is "2.0-flash-exp-image-generation" |
temperature |
The temperature to use. Default is 1 |
seed |
The seed to use. Default is 1234 |
The path to the saved file
## Not run:
library(gemini.R)
setAPI("YOUR_API_KEY")
gen_image("Create an image of a cat wearing sunglasses")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.