- Connect a Next.js app deployed on Vercel to fal.ai
- A fal.ai (opens in a new tab) account
- A Vercel account (opens in a new tab)
- A Next.js app. Check the Next.js guide if you don't have one yet.
- App deployed on Vercel. Run
npx vercelin your app directory to deploy it in case you haven't done it yet.
The recommended way to add fal.ai to your app deployed on Vercel is to use the official integration. You can find it in the Vercel marketplace (opens in a new tab).
Click on Add integration and follow the steps. After you're done, re-deploy your app and you're good to go!
You can also manually add fal credentials to your Vercel environment manually.
- Go to your fal.ai dashboard (opens in a new tab), create an API-scoped key and copy it. Make sure you create an alias do identify which app is using it.
- Go to your app settings in Vercel and add a new environment variable called
FAL_KEYwith the value of the key you just copied. You can choose other names, but keep in mind that the default convention of fal-provided libraries is
- Re-deploy your app and you're good to go!