Skip to main content

Next.js starter

The Hyperserve Next.js starter is a small Next.js app that uploads a video, waits for it to transcode, receives the completion webhook, and plays it back. Paste in an API key and it works. Requires Node 20.9 or newer.

Clone and run

git clone https://github.com/hyper-serve/hyperserve-nextjs-starter
cd hyperserve-nextjs-starter
npm install
cp .env.example .env.local

Open .env.local and put your key in as HYPERSERVE_API_KEY, then start the app:

npm run dev

The two demos

RouteWhat it showsRequires
/Uploads a video and polls getVideo until status is readyJust an API key
/webhooksReads the playable URL out of the webhook payload instead of pollingA public URL and a webhook registered against it

Security note

This is a reference integration, not a production template. It has no authentication of its own, so a deployed instance is an open upload proxy on whatever API key it holds. Do not deploy it publicly without adding your own auth in front of it.

Next steps

If you use an AI coding agent, Integrate with AI will do this same integration directly in your own project. Otherwise, read through the starter's README for how the pieces fit together.