Vercel - Supported Languages for Serverless Functions - Vercel Documentation
Within the /api directory of your projects, Vercel will automatically recognize the languages listed on this page, through their file extensions, and serve them as Serverless Function. Note: In a Next.js application, use /pages/api for Node.js functions and use/api for all other languages.
https://vercel.com/docs/serverless-functions/supported-languages