OpenAI.image_generations
You're seeing just the function
image_generations
, 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.Images.Generations.fetch(
[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 for the complete list of parameters you can pass to the image creation function