Using @unkey/ratelimit to protect your API routes from abuse
This is a Next.js project bootstrapped with create-next-app
.
Go to unkey.dev and create a new root key. The onboarding flow will create one for you.
Take the root key and create a .env.local
file in the root of the project. Add the following line to the file:
1UNKEY_ROOT_KEY=your_root_key_here
Then, run the development server:
1npm run dev2# or3yarn dev4# or5pnpm dev6# or7bun dev
Open http://localhost:3000/simple with your browser to see the result.
2500 verifications and 100K successful rate‑limited requests per month. No CC required.