Back to Writing
NOTESnextjsedge-runtimenodejsopenaiweb-dev

Next.js 15 Edge Runtime

May 14, 2020Updated Feb 17, 2026

Next.js 15 runs on the Edge runtime by default.

This generally isn't an issue for database operations, but when fetching OpenAI's API — which only supports Node — you need to specify the Node runtime:

export const runtime = 'nodejs'

This is how you designate the Node runtime.