From 5e6ffbc583163f0be7fb3207baf2964ae89f8b1d Mon Sep 17 00:00:00 2001
From: Xinfan Chen <2024111082@stu.hit.edu.cn>
Date: Tue, 12 May 2026 21:29:33 +0800
Subject: [PATCH] merge branch main of github repo

---
 aigc-director/aigc-claw/backend/docs/api.md |  123 ++++++++++++++++++++++++++++------------
 1 files changed, 85 insertions(+), 38 deletions(-)

diff --git a/aigc-director/aigc-claw/backend/docs/api.md b/aigc-director/aigc-claw/backend/docs/api.md
index c130106..85e742a 100644
--- a/aigc-director/aigc-claw/backend/docs/api.md
+++ b/aigc-director/aigc-claw/backend/docs/api.md
@@ -40,11 +40,12 @@
 {
   "idea": "故事线描述",
   "style": "anime",
-  "llm_model": "qwen3.5-plus",
-  "vlm_model": "qwen-vl-plus",
-  "image_t2i_model": "doubao-seedream-5-0",
-  "image_it2i_model": "doubao-seedream-5-0",
-  "video_model": "wan2.6-i2v-flash",
+  "episodes": 4,
+  "llm_model": "deepseek-v3.2",
+  "vlm_model": "qwen3.5-plus",
+  "image_t2i_model": "doubao-seedream-5-0-260128",
+  "image_it2i_model": "doubao-seedream-5-0-260128",
+  "video_model": "wan2.7-i2v",
   "enable_concurrency": true
 }
 ```
@@ -54,22 +55,25 @@
 |------|------|------|------|--------|
 | idea | string | 是 | 故事线描述 | - |
 | style | string | 否 | 视频风格 | anime |
-| llm_model | string | 否 | LLM 模型 | qwen3.5-plus |
-| vlm_model | string | 否 | VLM 评估模型 | qwen-vl-plus |
-| image_t2i_model | string | 否 | 文生图模型 | doubao-seedream-5-0 |
-| image_it2i_model | string | 否 | 图生图模型 | doubao-seedream-5-0 |
-| video_model | string | 否 | 视频模型 | wan2.6-i2v-flash |
+| episodes | int | 否 | 生成的剧集数量 | 4 |
+| llm_model | string | 是 | LLM 模型;前端从 `backend/config.yaml` 读取默认值并传递 | - |
+| vlm_model | string | 是 | VLM 评估模型;前端从 `backend/config.yaml` 读取默认值并传递 | - |
+| image_t2i_model | string | 是 | 文生图模型;前端从 `backend/config.yaml` 读取默认值并传递 | - |
+| image_it2i_model | string | 是 | 图生图模型;前端从 `backend/config.yaml` 读取默认值并传递 | - |
+| video_model | string | 是 | 视频模型;前端从 `backend/config.yaml` 读取默认值并传递 | - |
 | enable_concurrency | bool | 否 | 开启并发生成(可同时生成多张图片/视频) | true |
 
 **响应示例**:
 ```json
 {
   "session_id": "1773208355389",
-  "status": "running",
+  "status": "stage_completed",
   "params": {
     "idea": "故事线描述",
     "style": "anime",
-    "llm_model": "gemini-3-flash-preview"
+    "llm_model": "deepseek-v3.2",
+    "vlm_model": "qwen3.5-plus",
+    "episodes": 4
   }
 }
 ```
@@ -89,15 +93,11 @@
 **请求体**:
 ```json
 {
-  "session_id": "1773208355389",
-  "style": "anime",
-  "llm_model": "deepseek-chat",
-  "vlm_model": "qwen3.5-plus",
-  "image_t2i_model": "jimeng_t2i_v40",
-  "image_it2i_model": "jimeng_t2i_v40",
-  "video_model": "wan2.6-i2v-flash"
+  "style": "anime"
 }
 ```
+
+> 请求体参数与创建项目相同(可选),会覆盖项目中已有的对应参数。
 
 **响应**: SSE 流式返回,包含以下事件类型:
 - `progress`: 进度更新
@@ -163,11 +163,11 @@
 {
   "stage": "script_generation",
   "artifact": {
-    "title": "影弑",
+    "title": "剧本名称",
     "logline": "...",
     "characters": [...],
     "settings": [...],
-    "scenes": [...]
+    "episodes": [...]
   }
 }
 ```
@@ -176,15 +176,59 @@
 
 ### 5. 更新阶段产物
 
-更新指定阶段的产物数据(如用户选择)。
+更新指定阶段的产物数据(如用户修改提示词、选择版本)。
 
 **接口**: `PATCH /api/project/{session_id}/artifact/{stage}`
 
-**请求体**:
+请求体格式**因阶段而异**:
+
+#### storyboard — 修改分集/片段/镜头
 ```json
 {
-  "selected_logline": "选中的logan",
-  "scenes": [...]
+  "episodes": [
+    {
+      "episode_number": 1,
+      "segments": [
+        {
+          "segment_id": "seg_01_01",
+          "total_duration": 10,
+          "visual_prompt": "新视觉提示词",
+          "video_prompt": "新视频提示词",
+          "shots": []
+        }
+      ]
+    }
+  ]
+}
+```
+
+#### reference_generation — 修改视觉提示词
+```json
+{
+  "segments": [
+    {"segment_id": "seg_01_01", "visual_prompt": "新提示词"}
+  ]
+}
+```
+
+#### reference_generation — 选择参考图版本
+```json
+{
+  "seg_01_01": "code/result/image/xxx/seg_01_01_v2.jpg"
+}
+```
+
+#### video_generation — 修改片段描述/时长
+```json
+{
+  "seg_01_01": {"description": "新描述", "duration": 5}
+}
+```
+
+#### video_generation — 选择视频版本
+```json
+{
+  "seg_01_01": "code/result/video/xxx/seg_01_01_v2.mp4"
 }
 ```
 
@@ -194,21 +238,27 @@
 
 ### 6. 干预阶段
 
-对已完成的阶段进行修改并重新执行。
+对已完成的阶段进行修改并重新执行(重新生成部分产物)。
 
 **接口**: `POST /api/project/{session_id}/intervene`
 
 **请求体**:
 ```json
 {
-  "stage": "script_generation",
+  "stage": "reference_generation",
   "modifications": {
-    "modified_script": "修改后的剧本内容"
+    "regenerate_scenes": ["shot_001_01", "shot_001_02"]
   }
 }
 ```
 
-**响应**: SSE 流式返回,同执行阶段。
+- `stage`:要干预的阶段
+- `modifications`:修改内容,目前支持 `regenerate_scenes`(要重新生成的镜头 ID 列表)
+
+**响应**: SSE 流式返回,包含以下事件类型:
+- `progress`: 进度更新
+- `stage_complete`: 阶段完成
+- `error`: 执行错误
 
 ---
 
@@ -306,10 +356,7 @@
 # 2. 执行第一阶段(剧本生成)- 监听 SSE
 curl -X POST "http://localhost:8000/api/project/${SESSION_ID}/execute/script_generation" \
   -H "Content-Type: application/json" \
-  -d '{
-    "session_id": "'$SESSION_ID'",
-    "style": "anime"
-  }'
+  -d '{"style": "anime"}'
 
 # 3. 获取剧本产物
 curl -s "http://localhost:8000/api/project/${SESSION_ID}/artifact/script_generation"
@@ -320,7 +367,7 @@
 # 5. 执行第二阶段(角色设计)
 curl -X POST "http://localhost:8000/api/project/${SESSION_ID}/execute/character_design" \
   -H "Content-Type: application/json" \
-  -d '{"session_id": "'$SESSION_ID'", "style": "anime"}'
+  -d '{"style": "anime"}'
 
 # 6. 确认并继续
 curl -s -X POST "http://localhost:8000/api/project/${SESSION_ID}/continue"
@@ -328,7 +375,7 @@
 # 7. 执行第三阶段(分镜设计)
 curl -X POST "http://localhost:8000/api/project/${SESSION_ID}/execute/storyboard" \
   -H "Content-Type: application/json" \
-  -d '{"session_id": "'$SESSION_ID'", "style": "anime"}'
+  -d '{"style": "anime"}'
 
 # 8. 确认并继续
 curl -s -X POST "http://localhost:8000/api/project/${SESSION_ID}/continue"
@@ -336,7 +383,7 @@
 # 9. 执行第四阶段(参考图生成)
 curl -X POST "http://localhost:8000/api/project/${SESSION_ID}/execute/reference_generation" \
   -H "Content-Type: application/json" \
-  -d '{"session_id": "'$SESSION_ID'", "style": "anime"}'
+  -d '{"style": "anime"}'
 
 # 10. 确认并继续
 curl -s -X POST "http://localhost:8000/api/project/${SESSION_ID}/continue"
@@ -344,7 +391,7 @@
 # 11. 执行第五阶段(视频生成)
 curl -X POST "http://localhost:8000/api/project/${SESSION_ID}/execute/video_generation" \
   -H "Content-Type: application/json" \
-  -d '{"session_id": "'$SESSION_ID'", "style": "anime"}'
+  -d '{"style": "anime"}'
 
 # 12. 确认并继续
 curl -s -X POST "http://localhost:8000/api/project/${SESSION_ID}/continue"
@@ -352,7 +399,7 @@
 # 13. 执行第六阶段(后期剪辑)
 curl -X POST "http://localhost:8000/api/project/${SESSION_ID}/execute/post_production" \
   -H "Content-Type: application/json" \
-  -d '{"session_id": "'$SESSION_ID'", "style": "anime"}'
+  -d '{"style": "anime"}'
 ```
 
 ### 使用 jq 简化

--
Gitblit v1.8.0