feat(api): 火山模型协议 - 接入方舟与即梦图片视频生成并支持 AK/SK 凭证

This commit is contained in:
ddCat committed 2026-07-29 18:08:01 +08:00
1 parent 9ad2fb1b99
commit c33e05ff63
29 files changed
+1739 -310

No files matched your search

+2 -1
View File
@@ -1,9 +1,10 @@
export const VIDEO_DURATION_OPTIONS = [6, 9, 10, 15] as const;
export const VIDEO_RESOLUTION_OPTIONS = [480, 720, 1080] as const;
const NORMALIZED_VIDEO_DURATION_OPTIONS = [5, ...VIDEO_DURATION_OPTIONS] as const;
export function normalizeVideoDuration(value: string | number | undefined) {
const seconds = Math.floor(Number(value) || VIDEO_DURATION_OPTIONS[0]);
return String(nearestOption(seconds, VIDEO_DURATION_OPTIONS));
return String(nearestOption(seconds, NORMALIZED_VIDEO_DURATION_OPTIONS));
}
export function normalizeVideoResolution(value: string | number | undefined) {