provider Images POST
/images/generations @utdk/openai
/images/generations Creates an image given a prompt. [Learn more](/docs/guides/images).
Try it
Authentication
Configure credentials for OpenAI API
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.
Saved automatically to browser storage.
Code snippet
Updates live as you fill in the form above.
TypeScript
import openai from '@utdk/openai';
await openai.createimage({
"model": "dall-e-2",
"n": 1,
"quality": "auto",
"response_format": "url",
"output_format": "png",
"output_compression": 100,
"size": "auto",
"moderation": "auto",
"background": "auto",
"style": "vivid"
})