OpenAI.image_variations
You're seeing just the function
image_variations
, go back to OpenAI module for more information.
This generates an image based on the given prompt. If needed, you can pass a second argument to the function to add specific http options to this specific call (i.e. increasing the timeout)
Example Request
OpenAI.image_variations(
"/home/developer/myImg.png",
{ "prompt", "A developer writing a test", "size": "256x256"},
recv_timeout: 10 * 60 * 1000
)
Example Response
{:ok,
%{
created: 1670341737,
data: [
%{
"url" => ...Returned url
}
]
}}
See: https://beta.openai.com/docs/api-reference/images/create-variation for the complete list of parameters you can pass to the image creation function