Generate images from text prompts in a Next.js route with OpenAI GPT Image
A Next.js App Router endpoint that turns a prompt into a PNG with gpt-image-2.5-flare, plus a small page to try it in the browser.
What you'll need
Each one opens the page where you get itnpx wirestack add openai-image-generation-nextjs-route@1openai 7.28.0, creates the files and adds the key names to your .env. It shows everything first and asks before changing anything.Free accounts can open one adapted recipe a month. Sign in to try it.
