create_image_variation {openai} | R Documentation |
Create image variation
Description
Creates a variation of a given image. See this page for details.
Usage
create_image_variation(
image,
n = 1,
size = c("1024x1024", "256x256", "512x512"),
response_format = c("url", "b64_json"),
user = NULL,
openai_api_key = Sys.getenv("OPENAI_API_KEY"),
openai_organization = NULL
)
Arguments
image |
required; a length one character vector. |
n |
required; defaults to |
size |
required; defaults to |
response_format |
required; defaults to |
user |
optional; defaults to |
openai_api_key |
required; defaults to |
openai_organization |
optional; defaults to |
Details
For arguments description please refer to the official documentation.
Value
Returns a list, an element of which contain either a link to the image variation or the image variation decoded in Base64.
See Also
Other image functions:
create_image_edit()
,
create_image()
Examples
## Not run:
image <- system.file("extdata", "astronaut.png", package = "openai")
create_image_variation(
image = image,
n = 1,
size = "256x256",
response_format = "url"
)
## End(Not run)