This is a Next.js playground for to working with Replicate's API.
You can use this as a quick jumping-off point to build a web app using Replicate's API, or you can recreate this codebase from scratch by following the guide at replicate.com/docs/get-started/nextjs
- src/app/page.tsx - The React frontend that renders the home page in the browser
- src/app/api/predictions/route.ts - The backend API endpoint that calls Replicate's API to create a prediction
- clone this repo
- copy
.env.exampleto.env.local - browse models at https://replicate.com/explore
- add the model path to
route.ts
Cloned from replicate.com/docs/get-started/nextjs