chen704290901chen/dsh-newapi-video ↗★ 0
dsh-newapi-video
Call a new-api (one-api style) relay station's video model from the conversation, with @-referenced image/video materials plus a prompt.
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:chen704290901chen/dsh-newapi-video说明文档
阅读完整 README ↗配置(WebUI Settings → NewAPI Video)
| 键 | 默认 | 说明 |
|---|---|---|
enabled | true | 是否注册工具。由输入栏「视频创作」开关驱动:关闭时从 agent 工具列表彻底移除生成工具(agent 感知不到插件),同时隐藏上传/预览/资产库 UI。 |
mode | v1-videos | 中转协议:v1-videos(默认,适配 Seedance/Happyhorse)/ openai-videos / modelverse-tasks / generic-rest。 |
baseURL | 空 | 中转站 Base URL(含 /v1)。留空则默认读取 DSH「模型配置」里的 baseURL。 |
apiKey | 空 | 中转站 API Key。留空则用「模型配置」里的 key;不再支持环境变量回退。 |
model | doubao-seedance-2-0-mini-260615 | 视频模型 id(默认固定 Seedance mini;可切 happyhorse-1.1-i2v 等)。 |
imageModel | gpt-image-2 | 图片模型 id(默认固定;可切 qwen-image-2.0、Seedream 等)。 |
imageSize | 1024x1024 | 默认图片尺寸(OpenAI 式 1024x1024,或 qwen 式 宽x高)。 |
outputDir | newapi_output | 下载视频与任务台账目录(相对会话工作区)。 |
timeoutMs | 120000 | 单次 HTTP 请求超时(毫秒)。 |
pollIntervalMs | 5000 | 异步任务轮询间隔。 |
maxPollAttempts | 360 | 最大轮询次数。 |
aspectRatio | 16:9 | 默认画幅比。 |
durationSeconds | 5 | 默认时长(秒)。 |
resolution | 1080p | 输出档位:v1-videos 用小写 720p/1080p/480p/4k;modelverse-tasks 用 2K 等。 |
submitPath | /videos/generations | 提交任务路径(openai-videos / generic-rest)。 |
statusPathTemplate | /videos/{task_id} | 查询状态路径模板。 |
taskIdField / statusField / urlsField | 空 | generic-rest 的 JSON 点路径提取(如 output.task_id)。 |
也可以直接在 profile 的 cordis.patch.yml 里按 id 覆盖配置:
- id: newapi-video
name: dsh-newapi-video
config:
mode: modelverse-tasks
baseURL: https://api.modelverse.cn/v1
apiKey: your-key
model: doubao-seedance-2-0-260128
resolution: 2K
使用示例
在对话里(v1-videos 模式):
Seedance 2.0 文生视频
用 doubao-seedance-2-0-260128 生成一只猫在雨夜城市奔跑,1080p,16:9,5 秒。
Seedance 2.0 首尾帧
@first.png 做首帧 @last.png 做尾帧,让小猫从坐着站起来走向镜头,720p,自适应比例。
Happyhorse 图生视频
用 happyhorse-1.1-i2v,@ref.png 做参考图,让主体缓慢转身看向镜头,1080p,5 秒。
模型会调用 newapi_generate_video,插件自动拼出对应协议体(如上文「接入要点」)。
用 @cat.png 做首帧,让这只猫在草地上奔跑,电影感运镜,16:9,5 秒。
模型会调用:
{
"prompt": "A cat running across a grassy field, cinematic camera, ...",
"first_frame": "cat.png",
"aspect_ratio": "16:9",
"duration": 5
}
返回:
{
"model": "doubao-seedance-2-0-260128",
"prompt": "...",
"taskId": "abc123",
"status": "succeeded",
"mode": "modelverse-tasks",
"urls": ["https://..."],
"files": [{ "path": "newapi_output/video-....mp4", "url": "https://...", "mimeType": "video/mp4" }]
}