if (FALSE) {
Sys.setenv(OPENAI_API_KEY = "sk-xxxxxx")
# Generate a standard image
resp <- create_image("A futuristic chart showing economic data, neon style")
cat(resp$data[[1]]$url)
# HD landscape
resp <- create_image(
prompt = "A detailed map of global trade routes",
model = "dall-e-3",
size = "1792x1024",
quality = "hd",
style = "natural"
)
cat(resp$data[[1]]$url)
}
Run the code above in your browser using DataLab