feat: 封面生成流水线、执黑先行二号风格扩展、账号配置更新

- 新增 gen-covers 系列脚本(kling/gpt/t2i/batch/direct/final等方案)
- 执黑先行二号添加9种风格提示词目录(梦核/剪纸/水墨/毛毡/硬核线条等)
- 执黑先行添加封面提示词、执黑先行二号更新图片提示词
- product_viral_factory 账号配置扩充并添加 cover_template 参考图
- capcut_assemble/kling-video-generator/oss-upload/poll-utils 细节修复
- CLAUDE.md 更新流程文档

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
lc
2026-06-06 16:44:47 +08:00
parent 1e110219ff
commit 9cbdabda31
71 changed files with 2444 additions and 119 deletions

View File

@@ -39,6 +39,7 @@ const Config = {
apiBase: (cfg.kelingApiBaseUrl || 'https://api-beijing.klingai.com').replace(/\/+$/, ''),
yunwuApiBase: (cfg.kelingYunwuApiBase || '').replace(/\/+$/, ''),
yunwuApiKey: cfg.kelingYunwuApiKey || cfg.minimaxApiKey || '',
yunwuVideoEndpoint: cfg.kelingYunwuVideoEndpoint || 'image2video',
model: cfg.kelingModel || 'kling-v2-5-turbo',
pollInterval: 10000,
maxPollTime: 600000,
@@ -197,6 +198,7 @@ const KlingApi = {
duration = 5,
mode = 'std',
lastFrameUrl = '',
aspectRatio = '9:16',
} = options
const yunwu = isYunwuMode()
@@ -205,22 +207,35 @@ const KlingApi = {
? `Bearer ${Config.yunwuApiKey}`
: `Bearer ${makeJwt(...Object.values(loadCredentials()))}`
const body = {
model_name: model,
image: imageUrl,
prompt,
duration: String(duration),
mode,
multi_shot: false,
}
const useMultiImage = yunwu && lastFrameUrl && Config.yunwuVideoEndpoint === 'multi-image2video'
if (lastFrameUrl) {
body.image_tail = lastFrameUrl
let body
if (useMultiImage) {
body = {
model_name: model,
image_list: [{ image: imageUrl }, { image: lastFrameUrl }],
prompt,
negative_prompt: '',
mode,
duration: String(duration),
aspect_ratio: aspectRatio,
}
} else {
body = {
model_name: model,
image: imageUrl,
prompt,
duration: String(duration),
mode,
multi_shot: false,
}
if (lastFrameUrl) body.image_tail = lastFrameUrl
}
const modeLabel = lastFrameUrl ? '首尾帧' : '单图'
const modeTag = useMultiImage ? ' [multi-image]' : ''
console.log(`\n📡 提交可灵视频任务 [${modeLabel}]${yunwu ? ' [云雾]' : ' [官方]'}`)
console.log(`\n📡 提交可灵视频任务 [${modeLabel}]${yunwu ? ' [云雾]' : ' [官方]'}${modeTag}`)
console.log(` API: ${apiBase}`)
console.log(` 模型: ${model}`)
console.log(` 提示词: ${prompt.substring(0, 80)}...`)
@@ -232,7 +247,8 @@ const KlingApi = {
}
console.log(` 时长: ${duration}s | 画质: ${mode}`)
const res = await fetch(`${apiBase}/v1/videos/image2video`, {
const videoEndpoint = (yunwu && lastFrameUrl) ? Config.yunwuVideoEndpoint : 'image2video'
const res = await fetch(`${apiBase}/v1/videos/${videoEndpoint}`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
@@ -265,7 +281,8 @@ const KlingApi = {
? `Bearer ${Config.yunwuApiKey}`
: `Bearer ${makeJwt(...Object.values(loadCredentials()))}`
const res = await fetch(`${apiBase}/v1/videos/image2video/${taskId}`, {
const queryEndpoint = yunwu ? Config.yunwuVideoEndpoint : 'image2video'
const res = await fetch(`${apiBase}/v1/videos/${queryEndpoint}/${taskId}`, {
headers: {
'Authorization': authHeader,
'Content-Type': 'application/json',