@acedatacloud/sdk 2026.811.0 → 2026.817.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 +29 -26
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +29 -26
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/resources/providers/digitalhuman.ts +1 -1
- package/src/resources/providers/fish.ts +2 -2
- package/src/resources/providers/flux.ts +3 -3
- package/src/resources/providers/hailuo.ts +1 -1
- package/src/resources/providers/happyhorse.ts +3 -3
- package/src/resources/providers/luma.ts +3 -3
- package/src/resources/providers/minimax.ts +11 -9
- package/src/resources/providers/nano-banana.ts +1 -1
- package/src/resources/providers/seedance.ts +33 -24
- package/src/resources/providers/seedream.ts +1 -1
- package/src/resources/providers/suno.ts +5 -5
- package/src/resources/providers/wan.ts +2 -2
package/package.json
CHANGED
|
@@ -74,7 +74,7 @@ export class Digitalhuman {
|
|
|
74
74
|
async generate(options: DigitalhumanGenerateOptions): Promise<TaskHandle> {
|
|
75
75
|
const body: Record<string, unknown> = {};
|
|
76
76
|
body["video_url"] = options.videoUrl;
|
|
77
|
-
body["text"] = options.text
|
|
77
|
+
if (options.text !== undefined) body["text"] = options.text;
|
|
78
78
|
body["speed"] = options.speed ?? 1.0;
|
|
79
79
|
body["steps"] = options.steps ?? 40;
|
|
80
80
|
body["engine"] = options.engine ?? "latentsync";
|
|
@@ -30,7 +30,7 @@ export interface FishGenerateOptions {
|
|
|
30
30
|
/** Is the input text subjected to text normalization processing by the upstream? */
|
|
31
31
|
normalize?: boolean;
|
|
32
32
|
/** Inline reference audio samples will be forwarded upstream as is, for zero-shot voice cloning. */
|
|
33
|
-
references?: unknown
|
|
33
|
+
references?: Array<Record<string, unknown>>;
|
|
34
34
|
/** MP3 bitrate when `format=mp3`. */
|
|
35
35
|
mp3Bitrate?: number;
|
|
36
36
|
/** Output the audio sampling rate (e.g., 16000, 22050, 44100). */
|
|
@@ -103,7 +103,7 @@ export class Fish {
|
|
|
103
103
|
if (options.temperature !== undefined) body["temperature"] = options.temperature;
|
|
104
104
|
if (options.chunkLength !== undefined) body["chunk_length"] = options.chunkLength;
|
|
105
105
|
if (options.opusBitrate !== undefined) body["opus_bitrate"] = options.opusBitrate;
|
|
106
|
-
body["reference_id"] = options.referenceId
|
|
106
|
+
if (options.referenceId !== undefined) body["reference_id"] = options.referenceId;
|
|
107
107
|
if (options.maxNewTokens !== undefined) body["max_new_tokens"] = options.maxNewTokens;
|
|
108
108
|
if (options.minChunkLength !== undefined) body["min_chunk_length"] = options.minChunkLength;
|
|
109
109
|
if (options.repetitionPenalty !== undefined) body["repetition_penalty"] = options.repetitionPenalty;
|
|
@@ -17,12 +17,12 @@ function taskId(result: Record<string, unknown>): string {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export interface FluxGenerateOptions {
|
|
20
|
+
/** Image size specifications. */
|
|
21
|
+
size: string;
|
|
20
22
|
/** Types of operations for generating images. If it is `generate`, a new image will be created based on the prompt; if it is `edit`, the original image will be edited according to the prompt and `image_url`. */
|
|
21
23
|
action: "generate" | "edit";
|
|
22
24
|
/** Prompts for generating images. */
|
|
23
25
|
prompt: string;
|
|
24
|
-
/** Image size specifications. */
|
|
25
|
-
size?: string;
|
|
26
26
|
/** Number of generated images. */
|
|
27
27
|
count?: number;
|
|
28
28
|
/** Model used for generating images. */
|
|
@@ -47,9 +47,9 @@ export class Flux {
|
|
|
47
47
|
/** Flux AI image generation API, generates 1 image per request. */
|
|
48
48
|
async generate(options: FluxGenerateOptions): Promise<TaskHandle> {
|
|
49
49
|
const body: Record<string, unknown> = {};
|
|
50
|
+
body["size"] = options.size;
|
|
50
51
|
body["action"] = options.action;
|
|
51
52
|
body["prompt"] = options.prompt;
|
|
52
|
-
body["size"] = options.size ?? "1024x1024";
|
|
53
53
|
if (options.count !== undefined) body["count"] = options.count;
|
|
54
54
|
if (options.model !== undefined) body["model"] = options.model;
|
|
55
55
|
if (options.imageUrl !== undefined) body["image_url"] = options.imageUrl;
|
|
@@ -45,7 +45,7 @@ export class Hailuo {
|
|
|
45
45
|
const body: Record<string, unknown> = {};
|
|
46
46
|
body["action"] = options.action;
|
|
47
47
|
if (options.model !== undefined) body["model"] = options.model;
|
|
48
|
-
body["prompt"] = options.prompt
|
|
48
|
+
if (options.prompt !== undefined) body["prompt"] = options.prompt;
|
|
49
49
|
if (options.firstImageUrl !== undefined) body["first_image_url"] = options.firstImageUrl;
|
|
50
50
|
for (const [key, value] of Object.entries(options)) {
|
|
51
51
|
if (!["action", "async", "callbackUrl", "firstImageUrl", "maxWait", "model", "pollInterval", "prompt", "wait"].includes(key) && value !== undefined) {
|
|
@@ -63,10 +63,10 @@ export class Happyhorse {
|
|
|
63
63
|
body["model"] = options.model ?? "happyhorse-1.1-t2v";
|
|
64
64
|
body["ratio"] = options.ratio ?? "16:9";
|
|
65
65
|
body["action"] = options.action ?? "generate";
|
|
66
|
-
body["prompt"] = options.prompt
|
|
66
|
+
if (options.prompt !== undefined) body["prompt"] = options.prompt;
|
|
67
67
|
body["duration"] = options.duration ?? 5;
|
|
68
|
-
body["image_url"] = options.imageUrl
|
|
69
|
-
body["video_url"] = options.videoUrl
|
|
68
|
+
if (options.imageUrl !== undefined) body["image_url"] = options.imageUrl;
|
|
69
|
+
if (options.videoUrl !== undefined) body["video_url"] = options.videoUrl;
|
|
70
70
|
body["watermark"] = options.watermark ?? false;
|
|
71
71
|
if (options.imageUrls !== undefined) body["image_urls"] = options.imageUrls;
|
|
72
72
|
body["resolution"] = options.resolution ?? "1080P";
|
|
@@ -57,14 +57,14 @@ export class Luma {
|
|
|
57
57
|
const body: Record<string, unknown> = {};
|
|
58
58
|
body["loop"] = options.loop ?? false;
|
|
59
59
|
body["action"] = options.action ?? "generate";
|
|
60
|
-
body["prompt"] = options.prompt
|
|
60
|
+
if (options.prompt !== undefined) body["prompt"] = options.prompt;
|
|
61
61
|
body["timeout"] = options.timeout ?? 300;
|
|
62
62
|
if (options.videoId !== undefined) body["video_id"] = options.videoId;
|
|
63
63
|
if (options.videoUrl !== undefined) body["video_url"] = options.videoUrl;
|
|
64
64
|
body["enhancement"] = options.enhancement ?? true;
|
|
65
65
|
if (options.aspectRatio !== undefined) body["aspect_ratio"] = options.aspectRatio;
|
|
66
|
-
body["end_image_url"] = options.endImageUrl
|
|
67
|
-
body["start_image_url"] = options.startImageUrl
|
|
66
|
+
if (options.endImageUrl !== undefined) body["end_image_url"] = options.endImageUrl;
|
|
67
|
+
if (options.startImageUrl !== undefined) body["start_image_url"] = options.startImageUrl;
|
|
68
68
|
for (const [key, value] of Object.entries(options)) {
|
|
69
69
|
if (!["action", "aspectRatio", "async", "callbackUrl", "endImageUrl", "enhancement", "loop", "maxWait", "pollInterval", "prompt", "startImageUrl", "timeout", "videoId", "videoUrl", "wait"].includes(key) && value !== undefined) {
|
|
70
70
|
body[key] = value;
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
import { Transport } from '../../runtime/transport';
|
|
9
9
|
import { TaskHandle } from '../../runtime/tasks';
|
|
10
10
|
|
|
11
|
+
|
|
11
12
|
function taskId(result: Record<string, unknown>): string {
|
|
12
13
|
if (typeof result?.task_id === 'string') return result.task_id;
|
|
13
14
|
const data = result?.data as Record<string, unknown> | undefined;
|
|
@@ -15,19 +16,20 @@ function taskId(result: Record<string, unknown>): string {
|
|
|
15
16
|
return typeof result?.id === 'string' ? result.id : '';
|
|
16
17
|
}
|
|
17
18
|
|
|
18
|
-
|
|
19
19
|
export interface MinimaxGenerateOptions {
|
|
20
|
-
/**
|
|
20
|
+
/** Model name, currently only supports the official value `MiniMax-H3`. */
|
|
21
21
|
model: "MiniMax-H3";
|
|
22
|
-
/**
|
|
22
|
+
/** Official MiniMax H3 V2 multimodal input array. Each request must include a non-empty `text`; supports images at the beginning and end or multimodal reference materials, but the two types of scenes cannot be mixed. */
|
|
23
23
|
content: Array<Record<string, unknown>>;
|
|
24
|
-
/**
|
|
25
|
-
resolution: "768P" | "2K";
|
|
26
|
-
/** Minimax Videos Duration */
|
|
24
|
+
/** Video duration, required, integer between 4 and 15 seconds. */
|
|
27
25
|
duration: number;
|
|
28
|
-
/**
|
|
26
|
+
/** Video resolution, required, optional `768P` or `2K`. */
|
|
27
|
+
resolution: "768P" | "2K";
|
|
28
|
+
/** Video aspect ratio. Text-to-video is required and cannot be `adaptive`; image-to-video defaults to `adaptive`; multimodal reference is optional. */
|
|
29
29
|
ratio?: "adaptive" | "21:9" | "16:9" | "4:3" | "1:1" | "3:4" | "9:16";
|
|
30
|
+
/** Submit asynchronously and poll. Defaults to true. */
|
|
30
31
|
async?: boolean;
|
|
32
|
+
/** Wait for completion before returning the handle. */
|
|
31
33
|
wait?: boolean;
|
|
32
34
|
pollInterval?: number;
|
|
33
35
|
maxWait?: number;
|
|
@@ -40,13 +42,13 @@ export interface MinimaxGenerateOptions {
|
|
|
40
42
|
export class Minimax {
|
|
41
43
|
constructor(private transport: Transport) {}
|
|
42
44
|
|
|
43
|
-
/**
|
|
45
|
+
/** Call /minimax/videos. */
|
|
44
46
|
async generate(options: MinimaxGenerateOptions): Promise<TaskHandle> {
|
|
45
47
|
const body: Record<string, unknown> = {};
|
|
46
48
|
body["model"] = options.model;
|
|
47
49
|
body["content"] = options.content;
|
|
48
|
-
body["resolution"] = options.resolution;
|
|
49
50
|
body["duration"] = options.duration;
|
|
51
|
+
body["resolution"] = options.resolution;
|
|
50
52
|
if (options.ratio !== undefined) body["ratio"] = options.ratio;
|
|
51
53
|
for (const [key, value] of Object.entries(options)) {
|
|
52
54
|
if (!["async", "callbackUrl", "content", "duration", "maxWait", "model", "pollInterval", "ratio", "resolution", "wait"].includes(key) && value !== undefined) {
|
|
@@ -55,7 +55,7 @@ export class NanoBanana {
|
|
|
55
55
|
if (options.model !== undefined) body["model"] = options.model;
|
|
56
56
|
if (options.imageUrls !== undefined) body["image_urls"] = options.imageUrls;
|
|
57
57
|
if (options.resolution !== undefined) body["resolution"] = options.resolution;
|
|
58
|
-
body["aspect_ratio"] = options.aspectRatio
|
|
58
|
+
if (options.aspectRatio !== undefined) body["aspect_ratio"] = options.aspectRatio;
|
|
59
59
|
for (const [key, value] of Object.entries(options)) {
|
|
60
60
|
if (!["action", "aspectRatio", "async", "callbackUrl", "count", "imageUrls", "maxWait", "model", "pollInterval", "prompt", "resolution", "wait"].includes(key) && value !== undefined) {
|
|
61
61
|
body[key] = value;
|
|
@@ -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
|
-
/**
|
|
23
|
-
content: unknown
|
|
24
|
-
/**
|
|
25
|
-
|
|
26
|
-
/**
|
|
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
|
+
content: Array<Record<string, unknown>>;
|
|
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
|
}
|
|
@@ -28,7 +28,7 @@ export interface SeedreamGenerateOptions {
|
|
|
28
28
|
/** Reference image links for image editing are required, supporting accessible http/https URLs, or base64 encoded image strings in the format `data:image/png;base64,iVBORw0KG...`. Each image must not exceed 10MB in size. This parameter is mandatory when using image-to-image models (such as `doubao-seededit-3.0-i2i`). */
|
|
29
29
|
image?: string[];
|
|
30
30
|
/** List of tools that can be called by the model. Currently, only `web_search` is supported. Applicable only to `doubao-seedream-5.0-lite`. */
|
|
31
|
-
tools?: unknown
|
|
31
|
+
tools?: Array<Record<string, unknown>>;
|
|
32
32
|
/** Whether to return all images in a streaming manner, default is `false`. Only supports `doubao-seedream-5.0-lite`, `doubao-seedream-4.5`, and `doubao-seedream-4.0`. */
|
|
33
33
|
stream?: boolean;
|
|
34
34
|
/** Whether to add AI-generated watermark, default is `true`. */
|
|
@@ -222,16 +222,16 @@ export class Suno {
|
|
|
222
222
|
async generate(options: SunoGenerateOptions = {}): Promise<TaskHandle> {
|
|
223
223
|
const body: Record<string, unknown> = {};
|
|
224
224
|
if (options.lyric !== undefined) body["lyric"] = options.lyric;
|
|
225
|
-
body["model"] = options.model
|
|
225
|
+
if (options.model !== undefined) body["model"] = options.model;
|
|
226
226
|
if (options.style !== undefined) body["style"] = options.style;
|
|
227
227
|
if (options.title !== undefined) body["title"] = options.title;
|
|
228
|
-
body["action"] = options.action
|
|
228
|
+
if (options.action !== undefined) body["action"] = options.action;
|
|
229
229
|
if (options.custom !== undefined) body["custom"] = options.custom;
|
|
230
|
-
body["prompt"] = options.prompt
|
|
230
|
+
if (options.prompt !== undefined) body["prompt"] = options.prompt;
|
|
231
231
|
if (options.audioId !== undefined) body["audio_id"] = options.audioId;
|
|
232
232
|
if (options.duration !== undefined) body["duration"] = options.duration;
|
|
233
233
|
if (options.weirdness !== undefined) body["weirdness"] = options.weirdness;
|
|
234
|
-
body["audio_urls"] = options.audioUrls
|
|
234
|
+
if (options.audioUrls !== undefined) body["audio_urls"] = options.audioUrls;
|
|
235
235
|
if (options.personaId !== undefined) body["persona_id"] = options.personaId;
|
|
236
236
|
if (options.continueAt !== undefined) body["continue_at"] = options.continueAt;
|
|
237
237
|
if (options.samplesEnd !== undefined) body["samples_end"] = options.samplesEnd;
|
|
@@ -251,7 +251,7 @@ export class Suno {
|
|
|
251
251
|
if (options.underpaintingStart !== undefined) body["underpainting_start"] = options.underpaintingStart;
|
|
252
252
|
if (options.replaceSectionStart !== undefined) body["replace_section_start"] = options.replaceSectionStart;
|
|
253
253
|
for (const [key, value] of Object.entries(options)) {
|
|
254
|
-
if (!["action", "async", "audioId", "audioUrls", "audioWeight", "callbackUrl", "continueAt", "custom", "duration", "instrumental", "lyric", "lyricPrompt", "mashupAudioIds", "maxWait", "model", "overpaintingEnd", "overpaintingStart", "personaId", "pollInterval", "prompt", "replaceSectionEnd", "replaceSectionStart", "samplesEnd", "samplesStart", "style", "styleInfluence", "
|
|
254
|
+
if (!["action", "async", "audioId", "audioUrls", "audioWeight", "callbackUrl", "continueAt", "custom", "duration", "instrumental", "lyric", "lyricPrompt", "mashupAudioIds", "maxWait", "model", "negativeTags", "overpaintingEnd", "overpaintingStart", "personaId", "pollInterval", "prompt", "replaceSectionEnd", "replaceSectionStart", "samplesEnd", "samplesStart", "style", "styleInfluence", "title", "underpaintingEnd", "underpaintingStart", "variationCategory", "vocalGender", "wait", "weirdness"].includes(key) && value !== undefined) {
|
|
255
255
|
body[key] = value;
|
|
256
256
|
}
|
|
257
257
|
}
|
|
@@ -68,11 +68,11 @@ export class Wan {
|
|
|
68
68
|
body["audio"] = options.audio ?? false;
|
|
69
69
|
if (options.duration !== undefined) body["duration"] = options.duration;
|
|
70
70
|
if (options.audioUrl !== undefined) body["audio_url"] = options.audioUrl;
|
|
71
|
-
body["image_url"] = options.imageUrl
|
|
71
|
+
if (options.imageUrl !== undefined) body["image_url"] = options.imageUrl;
|
|
72
72
|
if (options.shotType !== undefined) body["shot_type"] = options.shotType;
|
|
73
73
|
if (options.resolution !== undefined) body["resolution"] = options.resolution;
|
|
74
74
|
body["prompt_extend"] = options.promptExtend ?? false;
|
|
75
|
-
body["negative_prompt"] = options.negativePrompt
|
|
75
|
+
if (options.negativePrompt !== undefined) body["negative_prompt"] = options.negativePrompt;
|
|
76
76
|
if (options.referenceVideoUrls !== undefined) body["reference_video_urls"] = options.referenceVideoUrls;
|
|
77
77
|
for (const [key, value] of Object.entries(options)) {
|
|
78
78
|
if (!["action", "async", "audio", "audioUrl", "callbackUrl", "duration", "imageUrl", "maxWait", "model", "negativePrompt", "pollInterval", "prompt", "promptExtend", "referenceVideoUrls", "resolution", "shotType", "size", "wait"].includes(key) && value !== undefined) {
|