@acedatacloud/sdk 2026.817.0 → 2026.824.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.mjs CHANGED
@@ -479,9 +479,9 @@ var Tasks = class {
479
479
  }
480
480
  transport;
481
481
  retrieve(opts) {
482
- const { taskId: taskId16, ...rest } = opts;
482
+ const { taskId: taskId17, ...rest } = opts;
483
483
  return this.transport.request("POST", "/captcha/tasks", {
484
- json: { task_id: taskId16, ...rest }
484
+ json: { task_id: taskId17, ...rest }
485
485
  });
486
486
  }
487
487
  };
@@ -589,8 +589,8 @@ var TaskHandle = class {
589
589
  pollEndpoint;
590
590
  transport;
591
591
  _result = null;
592
- constructor(taskId16, pollEndpoint, transport, submitted) {
593
- this.id = taskId16;
592
+ constructor(taskId17, pollEndpoint, transport, submitted) {
593
+ this.id = taskId17;
594
594
  this.pollEndpoint = pollEndpoint;
595
595
  this.transport = transport;
596
596
  if (submitted && artifactUrls({ response: submitted }).length > 0) {
@@ -668,9 +668,9 @@ var Images = class {
668
668
  if (callbackUrl !== void 0) body.callback_url = callbackUrl;
669
669
  const endpoint = `/${provider}/images`;
670
670
  const result = await this.transport.request("POST", endpoint, { json: body });
671
- const taskId16 = result.task_id;
672
- if (!taskId16 || result.data && !shouldWait) return result;
673
- const handle = new TaskHandle(taskId16, `/${provider}/tasks`, this.transport);
671
+ const taskId17 = result.task_id;
672
+ if (!taskId17 || result.data && !shouldWait) return result;
673
+ const handle = new TaskHandle(taskId17, `/${provider}/tasks`, this.transport);
674
674
  if (shouldWait) return handle.wait({ pollInterval, maxWait });
675
675
  return handle;
676
676
  }
@@ -716,9 +716,9 @@ var Audio = class {
716
716
  if (callbackUrl !== void 0) body.callback_url = callbackUrl;
717
717
  result = await this.transport.request("POST", `/${provider}/audios`, { json: body });
718
718
  }
719
- const taskId16 = result.task_id;
720
- if (!taskId16 || result.data && !shouldWait) return result;
721
- const handle = new TaskHandle(taskId16, `/${provider}/tasks`, this.transport);
719
+ const taskId17 = result.task_id;
720
+ if (!taskId17 || result.data && !shouldWait) return result;
721
+ const handle = new TaskHandle(taskId17, `/${provider}/tasks`, this.transport);
722
722
  if (shouldWait) return handle.wait({ pollInterval, maxWait });
723
723
  return handle;
724
724
  }
@@ -737,9 +737,9 @@ var Video = class {
737
737
  if (imageUrl !== void 0) body.image_url = imageUrl;
738
738
  if (callbackUrl !== void 0) body.callback_url = callbackUrl;
739
739
  const result = await this.transport.request("POST", `/${provider}/videos`, { json: body });
740
- const taskId16 = result.task_id;
741
- if (!taskId16 || result.data && !shouldWait) return result;
742
- const handle = new TaskHandle(taskId16, `/${provider}/tasks`, this.transport);
740
+ const taskId17 = result.task_id;
741
+ if (!taskId17 || result.data && !shouldWait) return result;
742
+ const handle = new TaskHandle(taskId17, `/${provider}/tasks`, this.transport);
743
743
  if (shouldWait) return handle.wait({ pollInterval, maxWait });
744
744
  return handle;
745
745
  }
@@ -786,17 +786,17 @@ var Tasks2 = class {
786
786
  this.transport = transport;
787
787
  }
788
788
  transport;
789
- async get(taskId16, opts = {}) {
789
+ async get(taskId17, opts = {}) {
790
790
  const service = opts.service ?? "suno";
791
791
  const endpoint = SERVICE_TASK_ENDPOINTS[service] ?? `/${service}/tasks`;
792
792
  return this.transport.request("POST", endpoint, {
793
- json: { id: taskId16, action: "retrieve" }
793
+ json: { id: taskId17, action: "retrieve" }
794
794
  });
795
795
  }
796
- async wait(taskId16, opts = {}) {
796
+ async wait(taskId17, opts = {}) {
797
797
  const service = opts.service ?? "suno";
798
798
  const endpoint = SERVICE_TASK_ENDPOINTS[service] ?? `/${service}/tasks`;
799
- const handle = new TaskHandle(taskId16, endpoint, this.transport);
799
+ const handle = new TaskHandle(taskId17, endpoint, this.transport);
800
800
  return handle.wait({ pollInterval: opts.pollInterval, maxWait: opts.maxWait });
801
801
  }
802
802
  };
@@ -1968,13 +1968,55 @@ var Producer = class {
1968
1968
  }
1969
1969
  };
1970
1970
 
1971
- // src/resources/providers/seedance.ts
1971
+ // src/resources/providers/qwen-image.ts
1972
1972
  function taskId12(result) {
1973
1973
  if (typeof result?.task_id === "string") return result.task_id;
1974
1974
  const data = result?.data;
1975
1975
  if (data && typeof data.task_id === "string") return data.task_id;
1976
1976
  return typeof result?.id === "string" ? result.id : "";
1977
1977
  }
1978
+ var QwenImage = class {
1979
+ constructor(transport) {
1980
+ this.transport = transport;
1981
+ }
1982
+ transport;
1983
+ /** Call /qwen-image/images. */
1984
+ async generate(options) {
1985
+ const body = {};
1986
+ body["model"] = options.model;
1987
+ body["prompt"] = options.prompt;
1988
+ if (options.imageUrls !== void 0) body["image_urls"] = options.imageUrls;
1989
+ body["n"] = options.n ?? 1;
1990
+ if (options.size !== void 0) body["size"] = options.size;
1991
+ body["prompt_extend"] = options.promptExtend ?? true;
1992
+ body["prompt_extend_mode"] = options.promptExtendMode ?? "direct";
1993
+ body["enable_thinking"] = options.enableThinking ?? true;
1994
+ if (options.negativePrompt !== void 0) body["negative_prompt"] = options.negativePrompt;
1995
+ if (options.seed !== void 0) body["seed"] = options.seed;
1996
+ body["watermark"] = options.watermark ?? false;
1997
+ for (const [key, value] of Object.entries(options)) {
1998
+ if (!["async", "callbackUrl", "enableThinking", "imageUrls", "maxWait", "model", "n", "negativePrompt", "pollInterval", "prompt", "promptExtend", "promptExtendMode", "seed", "size", "wait", "watermark"].includes(key) && value !== void 0) {
1999
+ body[key] = value;
2000
+ }
2001
+ }
2002
+ if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
2003
+ body.async = options.async ?? true;
2004
+ const result = await this.transport.request("POST", "/qwen-image/images", { json: body });
2005
+ const handle = new TaskHandle(taskId12(result), "/qwen-image/tasks", this.transport, result);
2006
+ if (options.wait) {
2007
+ await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
2008
+ }
2009
+ return handle;
2010
+ }
2011
+ };
2012
+
2013
+ // src/resources/providers/seedance.ts
2014
+ function taskId13(result) {
2015
+ if (typeof result?.task_id === "string") return result.task_id;
2016
+ const data = result?.data;
2017
+ if (data && typeof data.task_id === "string") return data.task_id;
2018
+ return typeof result?.id === "string" ? result.id : "";
2019
+ }
1978
2020
  var Seedance = class {
1979
2021
  constructor(transport) {
1980
2022
  this.transport = transport;
@@ -2006,7 +2048,7 @@ var Seedance = class {
2006
2048
  if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
2007
2049
  body.async = options.async ?? true;
2008
2050
  const result = await this.transport.request("POST", "/seedance/videos", { json: body });
2009
- const handle = new TaskHandle(taskId12(result), "/seedance/tasks", this.transport, result);
2051
+ const handle = new TaskHandle(taskId13(result), "/seedance/tasks", this.transport, result);
2010
2052
  if (options.wait) {
2011
2053
  await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
2012
2054
  }
@@ -2015,7 +2057,7 @@ var Seedance = class {
2015
2057
  };
2016
2058
 
2017
2059
  // src/resources/providers/seedream.ts
2018
- function taskId13(result) {
2060
+ function taskId14(result) {
2019
2061
  if (typeof result?.task_id === "string") return result.task_id;
2020
2062
  const data = result?.data;
2021
2063
  if (data && typeof data.task_id === "string") return data.task_id;
@@ -2051,7 +2093,7 @@ var Seedream = class {
2051
2093
  if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
2052
2094
  body.async = options.async ?? true;
2053
2095
  const result = await this.transport.request("POST", "/seedream/images", { json: body });
2054
- const handle = new TaskHandle(taskId13(result), "/seedream/tasks", this.transport, result);
2096
+ const handle = new TaskHandle(taskId14(result), "/seedream/tasks", this.transport, result);
2055
2097
  if (options.wait) {
2056
2098
  await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
2057
2099
  }
@@ -2060,7 +2102,7 @@ var Seedream = class {
2060
2102
  };
2061
2103
 
2062
2104
  // src/resources/providers/suno.ts
2063
- function taskId14(result) {
2105
+ function taskId15(result) {
2064
2106
  if (typeof result?.task_id === "string") return result.task_id;
2065
2107
  const data = result?.data;
2066
2108
  if (data && typeof data.task_id === "string") return data.task_id;
@@ -2111,7 +2153,7 @@ var Suno = class {
2111
2153
  if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
2112
2154
  body.async = options.async ?? true;
2113
2155
  const result = await this.transport.request("POST", "/suno/audios", { json: body });
2114
- const handle = new TaskHandle(taskId14(result), "/suno/tasks", this.transport, result);
2156
+ const handle = new TaskHandle(taskId15(result), "/suno/tasks", this.transport, result);
2115
2157
  if (options.wait) {
2116
2158
  await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
2117
2159
  }
@@ -2186,7 +2228,7 @@ var Suno = class {
2186
2228
  if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
2187
2229
  body.async = options.async ?? true;
2188
2230
  const result = await this.transport.request("POST", "/suno/vox", { json: body });
2189
- const handle = new TaskHandle(taskId14(result), "/suno/tasks", this.transport, result);
2231
+ const handle = new TaskHandle(taskId15(result), "/suno/tasks", this.transport, result);
2190
2232
  if (options.wait) {
2191
2233
  await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
2192
2234
  }
@@ -2204,7 +2246,7 @@ var Suno = class {
2204
2246
  if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
2205
2247
  body.async = options.async ?? true;
2206
2248
  const result = await this.transport.request("POST", "/suno/wav", { json: body });
2207
- const handle = new TaskHandle(taskId14(result), "/suno/tasks", this.transport, result);
2249
+ const handle = new TaskHandle(taskId15(result), "/suno/tasks", this.transport, result);
2208
2250
  if (options.wait) {
2209
2251
  await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
2210
2252
  }
@@ -2222,7 +2264,7 @@ var Suno = class {
2222
2264
  if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
2223
2265
  body.async = options.async ?? true;
2224
2266
  const result = await this.transport.request("POST", "/suno/midi", { json: body });
2225
- const handle = new TaskHandle(taskId14(result), "/suno/tasks", this.transport, result);
2267
+ const handle = new TaskHandle(taskId15(result), "/suno/tasks", this.transport, result);
2226
2268
  if (options.wait) {
2227
2269
  await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
2228
2270
  }
@@ -2281,7 +2323,7 @@ var Suno = class {
2281
2323
  };
2282
2324
 
2283
2325
  // src/resources/providers/wan.ts
2284
- function taskId15(result) {
2326
+ function taskId16(result) {
2285
2327
  if (typeof result?.task_id === "string") return result.task_id;
2286
2328
  const data = result?.data;
2287
2329
  if (data && typeof data.task_id === "string") return data.task_id;
@@ -2296,27 +2338,31 @@ var Wan = class {
2296
2338
  async generate(options) {
2297
2339
  const body = {};
2298
2340
  body["model"] = options.model;
2299
- body["action"] = options.action;
2300
- body["prompt"] = options.prompt;
2301
- if (options.size !== void 0) body["size"] = options.size;
2302
2341
  body["audio"] = options.audio ?? false;
2303
- if (options.duration !== void 0) body["duration"] = options.duration;
2304
- if (options.audioUrl !== void 0) body["audio_url"] = options.audioUrl;
2305
- if (options.imageUrl !== void 0) body["image_url"] = options.imageUrl;
2306
- if (options.shotType !== void 0) body["shot_type"] = options.shotType;
2307
- if (options.resolution !== void 0) body["resolution"] = options.resolution;
2308
2342
  body["prompt_extend"] = options.promptExtend ?? false;
2343
+ body["action"] = options.action ?? "text2video";
2344
+ if (options.resolution !== void 0) body["resolution"] = options.resolution;
2345
+ if (options.shotType !== void 0) body["shot_type"] = options.shotType;
2346
+ if (options.duration !== void 0) body["duration"] = options.duration;
2347
+ if (options.prompt !== void 0) body["prompt"] = options.prompt;
2309
2348
  if (options.negativePrompt !== void 0) body["negative_prompt"] = options.negativePrompt;
2349
+ if (options.size !== void 0) body["size"] = options.size;
2350
+ if (options.audioUrl !== void 0) body["audio_url"] = options.audioUrl;
2310
2351
  if (options.referenceVideoUrls !== void 0) body["reference_video_urls"] = options.referenceVideoUrls;
2352
+ if (options.imageUrl !== void 0) body["image_url"] = options.imageUrl;
2353
+ if (options.media !== void 0) body["media"] = options.media;
2354
+ if (options.ratio !== void 0) body["ratio"] = options.ratio;
2355
+ if (options.seed !== void 0) body["seed"] = options.seed;
2356
+ body["watermark"] = options.watermark ?? false;
2311
2357
  for (const [key, value] of Object.entries(options)) {
2312
- if (!["action", "async", "audio", "audioUrl", "callbackUrl", "duration", "imageUrl", "maxWait", "model", "negativePrompt", "pollInterval", "prompt", "promptExtend", "referenceVideoUrls", "resolution", "shotType", "size", "wait"].includes(key) && value !== void 0) {
2358
+ if (!["action", "async", "audio", "audioUrl", "callbackUrl", "duration", "imageUrl", "maxWait", "media", "model", "negativePrompt", "pollInterval", "prompt", "promptExtend", "ratio", "referenceVideoUrls", "resolution", "seed", "shotType", "size", "wait", "watermark"].includes(key) && value !== void 0) {
2313
2359
  body[key] = value;
2314
2360
  }
2315
2361
  }
2316
2362
  if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
2317
2363
  body.async = options.async ?? true;
2318
2364
  const result = await this.transport.request("POST", "/wan/videos", { json: body });
2319
- const handle = new TaskHandle(taskId15(result), "/wan/tasks", this.transport, result);
2365
+ const handle = new TaskHandle(taskId16(result), "/wan/tasks", this.transport, result);
2320
2366
  if (options.wait) {
2321
2367
  await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
2322
2368
  }
@@ -2338,6 +2384,7 @@ function attachProviders(client, transport) {
2338
2384
  client.minimax = new Minimax(transport);
2339
2385
  client.nanobanana = new NanoBanana(transport);
2340
2386
  client.producer = new Producer(transport);
2387
+ client.qwenimage = new QwenImage(transport);
2341
2388
  client.seedance = new Seedance(transport);
2342
2389
  client.seedream = new Seedream(transport);
2343
2390
  client.suno = new Suno(transport);