Creates an image from the prompt, returning RemoteImage.
The function accepts the same parameters as openai.createImage, but instead of returning the result of OpenAI API call, wraps the returned URL in a RemoteImage with the title taken from prompt.
createRemoteImage(params)
params
An string with prompt or an object with request parameters:
prompt
A text description of the image.
model optional
A model to use (for example, "dall-e-2", “dall-e-3”). Defaults to "dall-e".
n optional
The number of images to generate (1 to 10, defaults to 1).
size optional
A string with the size of images to generate: "256x256", "512x512", or "1024x1024".
response_format optional
"url" (remote image URL) or "b64_url" (image data included with response as base64-encoded text). Defaults to "url".
user optional
A unique identifier of the end user.
A RemoteImage referencing the generated image.
await openai.createRemoteImage({
prompt: "Oriental cat, painting by Dali",
size: "256x256"
})