@acedatacloud/sdk 2026.814.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acedatacloud/sdk",
3
- "version": "2026.814.0",
3
+ "version": "2026.817.0",
4
4
  "description": "Official TypeScript SDK for AceDataCloud — AI-powered data services",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -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 ?? "\u5927\u5bb6\u597d\uff0c\u8fd9\u662f\u79bb\u7ebf\u751f\u6210\u7684\u6570\u5b57\u4eba\u3002";
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 ?? "d7900c21663f485ab63ebdb7e5905036";
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 ?? "\u706b\u6c14";
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 ?? "A cinematic white horse lifts its head, the mane moves gently in the sunrise wind, slow camera push in, warm film lighting";
66
+ if (options.prompt !== undefined) body["prompt"] = options.prompt;
67
67
  body["duration"] = options.duration ?? 5;
68
- body["image_url"] = options.imageUrl ?? "https://cdn.acedata.cloud/b1c82e4937.png";
69
- body["video_url"] = options.videoUrl ?? "https://platform2.cdn.acedata.cloud/happyhorse/27837f92-d1c1-4db4-ad9a-4e6e81d9f6c1.mp4";
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 ?? "Astronauts shuttle from space to volcano";
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 ?? "https://cdn.acedata.cloud/0iad3k.png";
67
- body["start_image_url"] = options.startImageUrl ?? "https://cdn.acedata.cloud/r9vsv9.png";
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
- /** Minimax Videos Model */
20
+ /** Model name, currently only supports the official value `MiniMax-H3`. */
21
21
  model: "MiniMax-H3";
22
- /** Minimax Videos Content */
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
- /** Minimax Videos Resolution */
25
- resolution: "768P" | "2K";
26
- /** Minimax Videos Duration */
24
+ /** Video duration, required, integer between 4 and 15 seconds. */
27
25
  duration: number;
28
- /** Minimax Videos Ratio */
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
- /** Minimax Videos */
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 ?? "1:1";
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;
@@ -20,7 +20,7 @@ export interface SeedanceGenerateOptions {
20
20
  /** $t(seedance_videos_model) */
21
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
22
  /** $t(seedance_videos) */
23
- content: unknown[];
23
+ content: Array<Record<string, unknown>>;
24
24
  /** $t(seedance_videos_resolution) */
25
25
  resolution?: "480p" | "720p" | "1080p" | "4k";
26
26
  /** $t(seedance_videos_ratio) */
@@ -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 ?? "chirp-v5-5";
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 ?? "generate";
228
+ if (options.action !== undefined) body["action"] = options.action;
229
229
  if (options.custom !== undefined) body["custom"] = options.custom;
230
- body["prompt"] = options.prompt ?? "A song for Christmas";
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 ?? ["https://cdn1.suno.ai/b481b17a-bf50-4e10-8adc-4d5635050893.mp3"];
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", "negativeTags", "title", "underpaintingEnd", "underpaintingStart", "variationCategory", "vocalGender", "wait", "weirdness"].includes(key) && value !== undefined) {
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 ?? "https://cdn.acedata.cloud/r9vsv9.png";
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 ?? "Astronauts shuttle from space to volcano";
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) {