GenCut Script Generator
Generate structured marketing video scripts from product info. Supports multiple styles (marketing funnel, product showcase) with automatic phase planning and duration allocation.
0 0by coliafosdpasson
videomarketingscriptaigcgencut
# GenCut 脚本生成
根据商品信息生成营销视频脚本。
## API 接口
### 请求
```
POST /api/v1/aigc/execute
```
```json
{
"case_type": "GENERATE_SCRIPT",
"input": {
"product_info": {
"product_name": "商品名称",
"category": "商品分类",
"selling_points": ["卖点1", "卖点2"],
"target_audience": "目标人群"
},
"duration_target": 30,
"style": "marketing_funnel",
"assets_meta": []
}
}
```
### 响应
```json
{
"success": true,
"data": {
"case_type": "GENERATE_SCRIPT",
"output": {
"title": "脚本标题",
"duration": 30,
"sections": [
{
"id": "section_1",
"phase": "Hook",
"duration": 3,
"script_text": "台词或场景描述",
"visual_suggestion": "视觉建议"
}
]
}
}
}
```
## 执行流程
```python
async def execute(input):
# 准备素材摘要 (WITH_ASSETS 模式)
assets_summary = ""
if input.assets_meta:
assets_summary = build_assets_summary(input.assets_meta)
# 生成脚本
script = await claude.chat(
prompt=SCRIPT_GENERATION_PROMPT.format(
duration=input.duration_target,
product_name=input.product_info.product_name,
category=input.product_info.category,
selling_points=", ".join(input.product_info.selling_points),
target_audience=input.product_info.target_audience,
assets_summary=assets_summary,
script_style=input.style,
BUSINESS_RULES=""
),
response_format="json"
)
return script
```
## 数据类型
### 输入
```typescript
interface GenerateScriptInput {
product_info: ProductInfo;
duration_target: number; // 目标时长 (秒)
style: "marketing_funnel" | "product_showcase";
assets_meta?: UserAsset[]; // WITH_ASSETS 模式
}
```
### 输出
```typescript
interface ScriptData {
title: string;
duration: number;
sections: ScriptSection[];
}
interface ScriptSection {
id: string;
phase: "Hook" | "Pain" | "Solution" | "Demo" | "Proof" | "Usage" | "Testimonial" | "CTA";
duration: number;
script_text: string; // 角色台词或场景描述
visual_suggestion: string; // 视觉建议
}
```
## 脚本风格
### marketing_funnel (营销漏斗)
适合转化导向的产品,完整营销逻辑:
```
Hook → Pain → Solution → Demo → Proof → CTA
```
### product_showcase (产品展示)
适合新品发布或品牌宣传,聚焦产品特性:
```
Hook → Demo → Usage → CTA
```
## 脚本阶段说明
| 阶段 | 时长建议 | 说明 |
|------|----------|------|
| Hook | 2-3秒 | 吸引注意力,提出问题 |
| Pain Point | 3-5秒 | 引发共鸣,描述痛点 |
| Solution | 3-5秒 | 引出产品,提供解决方案 |
| Product Demo | 5-10秒 | 展示产品,演示使用 |
| Proof | 3-5秒 | 证明效果,前后对比 |
| Usage | 5-8秒 | 使用场景化 |
| Testimonial | 3-5秒 | 用户证言,建立信任 |
| CTA | 2-3秒 | 行动号召,促进转化 |
## 核心原则
### DIEGETIC 原则
所有 script_text 必须是:
- 角色可说出的台词 (唇同步)
- 画面中可展示的内容
**禁止**:
- 画外音/旁白
- 不可见的营销文案
## Prompt
详细 prompt 见 [prompts/script_generation.md](prompts/script_generation.md)
## 依赖
- Claude Agent SDK: 脚本生成