40 lines
1.1 KiB
Markdown
40 lines
1.1 KiB
Markdown
Recipe-AI Web
|
|
==============
|
|
|
|
This app takes a TikTok or Instagram share link, resolves it to a direct video, uploads the video to OpenAI, and asks the model to return only:
|
|
|
|
- Ingredients
|
|
- Prep steps
|
|
- Cooking steps
|
|
|
|
It uses environment variables for keys and optional RapidAPI resolvers.
|
|
|
|
requires ffmpeg on server
|
|
|
|
## Getting Started
|
|
|
|
1) Create your environment file:
|
|
|
|
```bash
|
|
cp .env.example .env.local
|
|
# set OPENAI_API_KEY, and optional RAPIDAPI_* values
|
|
```
|
|
|
|
2) Run the development server:
|
|
|
|
```bash
|
|
npm run dev
|
|
```
|
|
|
|
Open [http://localhost:3000/recipe](http://localhost:3000/recipe) to use the analyzer.
|
|
|
|
### API
|
|
|
|
- `POST /api/analyze` with JSON body `{ "url": "<share link>" }` returns `{ platform, analysis }` where `analysis` contains `ingredients`, `prep_steps`, `cooking_steps`.
|
|
|
|
### Notes
|
|
|
|
- The app includes first-party scrapers for TikTok and Instagram (HTML parsing of embedded JSON/meta). No RapidAPI is required.
|
|
- Resolution of direct video URLs is still best-effort; platforms change often. RapidAPI is optional as a fallback.
|
|
- OpenAI costs apply for file uploads and analysis; keep videos short.
|