本文为您提供了服务端 Node.js SDK 的媒体处理模块相关的 API 调用示例。主要包含:触发工作流等。
设置 AK/SK 和地域,具体可参考初始化。
接口请求参数和返回参数详见 OpenAPI:触发工作流。
const startWorkflow = async () => {
try {
const options = {
Vid: "your vid", // 视频 ID
TemplateId: "your template id", // 工作流 Id
Priority: 0, // 任务优先级。范围[-5,5],默认值 0
CallbackArgs: "your callback args", // 回调参数。最大长度 512字节。
};
const res = await vodOpenapiService.StartWorkflow(options);
// do your work
// ...
} catch (err) {
console.log(err);
}
};