@acedatacloud/sdk 2026.811.0 → 2026.814.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +9 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/resources/providers/seedance.ts +32 -23
package/package.json
CHANGED
|
@@ -17,30 +17,36 @@ function taskId(result: Record<string, unknown>): string {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export interface SeedanceGenerateOptions {
|
|
20
|
-
/**
|
|
21
|
-
model: "doubao-seedance-1-0-pro-250528" | "doubao-seedance-1-0-pro-fast-251015" | "doubao-seedance-1-5-pro-251215" | "doubao-seedance-1-0-lite-t2v-250428" | "doubao-seedance-1-0-lite-i2v-250428" | "doubao-seedance-2-0-260128" | "doubao-seedance-2-0-fast-260128" | "doubao-seedance-2-0-mini-260615";
|
|
22
|
-
/**
|
|
20
|
+
/** $t(seedance_videos_model) */
|
|
21
|
+
model: "doubao-seedance-1-0-pro-250528" | "doubao-seedance-1-0-pro-fast-251015" | "doubao-seedance-1-5-pro-251215" | "doubao-seedance-1-0-lite-t2v-250428" | "doubao-seedance-1-0-lite-i2v-250428" | "doubao-seedance-2-0-260128" | "doubao-seedance-2-0-fast-260128" | "doubao-seedance-2-0-mini-260615" | "doubao-seedance-2-5-260628";
|
|
22
|
+
/** $t(seedance_videos) */
|
|
23
23
|
content: unknown[];
|
|
24
|
-
/**
|
|
25
|
-
|
|
26
|
-
/**
|
|
24
|
+
/** $t(seedance_videos_resolution) */
|
|
25
|
+
resolution?: "480p" | "720p" | "1080p" | "4k";
|
|
26
|
+
/** $t(seedance_videos_ratio) */
|
|
27
27
|
ratio?: "16:9" | "4:3" | "1:1" | "3:4" | "9:16" | "21:9" | "adaptive";
|
|
28
|
-
/**
|
|
29
|
-
frames?: number;
|
|
30
|
-
/** The duration of the generated video, in seconds. Either duration or frames can be specified; if both are specified, frames take priority over duration. The duration range varies for each model: Seedance 2.0 series is 4 to 15 seconds or -1, Seedance 1.5 Pro is 4 to 12 seconds or -1, and Seedance 1.0 series is 2 to 12 seconds. -1 indicates automatic duration. */
|
|
28
|
+
/** $t(seedance_videos_duration) */
|
|
31
29
|
duration?: number;
|
|
32
|
-
/**
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
|
|
36
|
-
/**
|
|
30
|
+
/** $t(seedance_videos_frames) */
|
|
31
|
+
frames?: number;
|
|
32
|
+
/** $t(seedance_videos_seed) */
|
|
33
|
+
seed?: number;
|
|
34
|
+
/** $t(seedance_videos_camerafixed) */
|
|
37
35
|
camerafixed?: boolean;
|
|
38
|
-
/**
|
|
36
|
+
/** $t(seedance_videos_watermark) */
|
|
37
|
+
watermark?: boolean;
|
|
38
|
+
/** $t(seedance_videos_generate_audio) */
|
|
39
39
|
generateAudio?: boolean;
|
|
40
|
-
/**
|
|
40
|
+
/** $t(seedance_videos_return_last_frame) */
|
|
41
41
|
returnLastFrame?: boolean;
|
|
42
|
-
/**
|
|
42
|
+
/** $t(seedance_videos_execution_expires_after) */
|
|
43
43
|
executionExpiresAfter?: number;
|
|
44
|
+
/** $t(seedance_videos_omni_reference_task_type) */
|
|
45
|
+
omniReferenceTaskType?: "auto" | "edit" | "extend";
|
|
46
|
+
/** $t(seedance_videos_output_format) */
|
|
47
|
+
outputFormat?: "mp4" | "mov";
|
|
48
|
+
/** $t(seedance_videos_tools) */
|
|
49
|
+
tools?: Array<Record<string, unknown>>;
|
|
44
50
|
/** Submit asynchronously and poll. Defaults to true. */
|
|
45
51
|
async?: boolean;
|
|
46
52
|
/** Wait for completion before returning the handle. */
|
|
@@ -56,23 +62,26 @@ export interface SeedanceGenerateOptions {
|
|
|
56
62
|
export class Seedance {
|
|
57
63
|
constructor(private transport: Transport) {}
|
|
58
64
|
|
|
59
|
-
/**
|
|
65
|
+
/** Call /seedance/videos. */
|
|
60
66
|
async generate(options: SeedanceGenerateOptions): Promise<TaskHandle> {
|
|
61
67
|
const body: Record<string, unknown> = {};
|
|
62
68
|
body["model"] = options.model;
|
|
63
69
|
body["content"] = options.content;
|
|
64
|
-
if (options.
|
|
70
|
+
if (options.resolution !== undefined) body["resolution"] = options.resolution;
|
|
65
71
|
body["ratio"] = options.ratio ?? "16:9";
|
|
66
|
-
if (options.frames !== undefined) body["frames"] = options.frames;
|
|
67
72
|
if (options.duration !== undefined) body["duration"] = options.duration;
|
|
68
|
-
if (options.
|
|
69
|
-
if (options.
|
|
73
|
+
if (options.frames !== undefined) body["frames"] = options.frames;
|
|
74
|
+
if (options.seed !== undefined) body["seed"] = options.seed;
|
|
70
75
|
if (options.camerafixed !== undefined) body["camerafixed"] = options.camerafixed;
|
|
76
|
+
if (options.watermark !== undefined) body["watermark"] = options.watermark;
|
|
71
77
|
body["generate_audio"] = options.generateAudio ?? false;
|
|
72
78
|
body["return_last_frame"] = options.returnLastFrame ?? false;
|
|
73
79
|
body["execution_expires_after"] = options.executionExpiresAfter ?? 172800;
|
|
80
|
+
if (options.omniReferenceTaskType !== undefined) body["omni_reference_task_type"] = options.omniReferenceTaskType;
|
|
81
|
+
if (options.outputFormat !== undefined) body["output_format"] = options.outputFormat;
|
|
82
|
+
if (options.tools !== undefined) body["tools"] = options.tools;
|
|
74
83
|
for (const [key, value] of Object.entries(options)) {
|
|
75
|
-
if (!["async", "callbackUrl", "camerafixed", "content", "duration", "executionExpiresAfter", "frames", "generateAudio", "maxWait", "model", "pollInterval", "ratio", "resolution", "returnLastFrame", "seed", "wait", "watermark"].includes(key) && value !== undefined) {
|
|
84
|
+
if (!["async", "callbackUrl", "camerafixed", "content", "duration", "executionExpiresAfter", "frames", "generateAudio", "maxWait", "model", "omniReferenceTaskType", "outputFormat", "pollInterval", "ratio", "resolution", "returnLastFrame", "seed", "tools", "wait", "watermark"].includes(key) && value !== undefined) {
|
|
76
85
|
body[key] = value;
|
|
77
86
|
}
|
|
78
87
|
}
|