The more descriptive an image prompt, the better the results will be. That includes being able to take user input to help articulate what the image should look like.
Dynamic prompts in Next.js serverless functions can help us generate images based off of application input with the OpenAI SDK. You'll learn how to configure an API Endpoint to parse a body of a POST request to grab a dynamic prompt value and use it to configure the prompt for the createImage method.