chen704290901chen/dsh-newapi-video0

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.

包名
dsh-newapi-video
版本
1.0.0
最近更新
2026年9月8日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:chen704290901chen/dsh-newapi-video

配置(WebUI Settings → NewAPI Video)

默认说明
enabledtrue是否注册工具。由输入栏「视频创作」开关驱动:关闭时从 agent 工具列表彻底移除生成工具(agent 感知不到插件),同时隐藏上传/预览/资产库 UI。
modev1-videos中转协议:v1-videos(默认,适配 Seedance/Happyhorse)/ openai-videos / modelverse-tasks / generic-rest
baseURL中转站 Base URL(含 /v1)。留空则默认读取 DSH「模型配置」里的 baseURL
apiKey中转站 API Key。留空则用「模型配置」里的 key;不再支持环境变量回退。
modeldoubao-seedance-2-0-mini-260615视频模型 id(默认固定 Seedance mini;可切 happyhorse-1.1-i2v 等)。
imageModelgpt-image-2图片模型 id(默认固定;可切 qwen-image-2.0、Seedream 等)。
imageSize1024x1024默认图片尺寸(OpenAI 式 1024x1024,或 qwen 式 宽x高)。
outputDirnewapi_output下载视频与任务台账目录(相对会话工作区)。
timeoutMs120000单次 HTTP 请求超时(毫秒)。
pollIntervalMs5000异步任务轮询间隔。
maxPollAttempts360最大轮询次数。
aspectRatio16:9默认画幅比。
durationSeconds5默认时长(秒)。
resolution1080p输出档位:v1-videos 用小写 720p/1080p/480p/4k;modelverse-tasks 用 2K 等。
submitPath/videos/generations提交任务路径(openai-videos / generic-rest)。
statusPathTemplate/videos/{task_id}查询状态路径模板。
taskIdField / statusField / urlsFieldgeneric-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" }]
}