Tinatin Gholadze commited on
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,78 +1,88 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
|
| 54 |
-
|
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: UGC Video Generator
|
| 3 |
+
emoji: 🎥
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: purple
|
| 6 |
+
sdk: static
|
| 7 |
+
pinned: false
|
| 8 |
+
license: apache-2.0
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# UGC Single Video Generator (n8n + AI)
|
| 12 |
+
|
| 13 |
+
Automatically generate authentic **User-Generated Content (UGC)** videos from a simple form submission, powered by **n8n**, **Anthropic**, and **KIE.AI** video generation.
|
| 14 |
+
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
## Overview
|
| 18 |
+
|
| 19 |
+
This workflow automates the process of creating influencer-style promotional videos.
|
| 20 |
+
Users describe the type of video and influencer, optionally let AI write the script, and select the video’s aspect ratio.
|
| 21 |
+
The workflow then generates a complete UGC-style MP4 video using AI, returning a video link automatically.
|
| 22 |
+
|
| 23 |
+
---
|
| 24 |
+
|
| 25 |
+
## How It Works
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
1. **Form Submission**
|
| 30 |
+
- A form asks the user for:
|
| 31 |
+
- Video description
|
| 32 |
+
- Influencer type
|
| 33 |
+
- Whether to auto-generate a script
|
| 34 |
+
- Optional custom script
|
| 35 |
+
- Aspect ratio (9:16 or 16:9)
|
| 36 |
+
|
| 37 |
+
2. **AI Script Generation**
|
| 38 |
+
- If “generate script” is checked, the workflow calls **Anthropic Claude** to produce a short, natural UGC-style script based on the video description and influencer type.
|
| 39 |
+
|
| 40 |
+
3. **Prompt Building**
|
| 41 |
+
- Combines description, script, and influencer details to create structured text prompts for video generation.
|
| 42 |
+
|
| 43 |
+
4. **Video Generation**
|
| 44 |
+
- Sends prompts to the **KIE.AI Video API** (`veo3_fast` model) to generate a realistic influencer-style video.
|
| 45 |
+
|
| 46 |
+
5. **Video Retrieval**
|
| 47 |
+
- Fetches the finished MP4 file and returns the link automatically.
|
| 48 |
+
|
| 49 |
+
---
|
| 50 |
+
|
| 51 |
+
## Workflow Structure
|
| 52 |
+
|
| 53 |
+
| Step | Node | Description |
|
| 54 |
+
|------|------|--------------|
|
| 55 |
+
| 1 | **Form Trigger** | Collects user input through a custom web form. |
|
| 56 |
+
| 2 | **Edit Fields** | Normalizes and prepares fields for downstream use. |
|
| 57 |
+
| 3 | **Script Decision** | Checks if the user wants to auto-generate or use a custom script. |
|
| 58 |
+
| 4 | **HTTP Request (Anthropic)** | Generates a short script using Claude. |
|
| 59 |
+
| 5 | **Determine Final Script** | Merges AI or manual script with user input. |
|
| 60 |
+
| 6 | **Create Prompts** | Builds natural prompts for image/video generation. |
|
| 61 |
+
| 7 | **Generate Video (KIE.AI)** | Sends request to the KIE.AI API to produce the video. |
|
| 62 |
+
| 8 | **Check Video Success** | Confirms if the API returned a success code. |
|
| 63 |
+
| 9 | **Get Video File** | Retrieves the video download link using the task ID. |
|
| 64 |
+
| 10 | **Output Result** | Outputs video URL and status as JSON. |
|
| 65 |
+
|
| 66 |
+
---
|
| 67 |
+
## Example Output
|
| 68 |
+
|
| 69 |
+
Watch the demo video:
|
| 70 |
+
👉 [UGC Video Example](https://tempfile.aiquickdraw.com/p/ae9d1909b26ece72d9464ee9ffdc1800_1760653790.mp4)
|
| 71 |
+
|
| 72 |
+
|
| 73 |
+
## Setup Instructions
|
| 74 |
+
|
| 75 |
+
### 1️⃣ Prerequisites
|
| 76 |
+
- [n8n](https://n8n.io) installed (self-hosted or Cloud)
|
| 77 |
+
- Accounts and API keys for:
|
| 78 |
+
- **Anthropic API**
|
| 79 |
+
- **KIE.AI Video API**
|
| 80 |
+
- Optional: a hosting service (e.g., Railway, Vercel) for the form trigger webhook.
|
| 81 |
+
|
| 82 |
+
### 2️⃣ Environment Variables
|
| 83 |
+
|
| 84 |
+
Create a `.env` file in your n8n environment:
|
| 85 |
+
|
| 86 |
+
```bash
|
| 87 |
+
ANTHROPIC_API_KEY=your-anthropic-key
|
| 88 |
+
KIE_API_KEY=your-kie-api-key
|