@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.js CHANGED
@@ -527,9 +527,9 @@ var Tasks = class {
527
527
  }
528
528
  transport;
529
529
  retrieve(opts) {
530
- const { taskId: taskId16, ...rest } = opts;
530
+ const { taskId: taskId17, ...rest } = opts;
531
531
  return this.transport.request("POST", "/captcha/tasks", {
532
- json: { task_id: taskId16, ...rest }
532
+ json: { task_id: taskId17, ...rest }
533
533
  });
534
534
  }
535
535
  };
@@ -637,8 +637,8 @@ var TaskHandle = class {
637
637
  pollEndpoint;
638
638
  transport;
639
639
  _result = null;
640
- constructor(taskId16, pollEndpoint, transport, submitted) {
641
- this.id = taskId16;
640
+ constructor(taskId17, pollEndpoint, transport, submitted) {
641
+ this.id = taskId17;
642
642
  this.pollEndpoint = pollEndpoint;
643
643
  this.transport = transport;
644
644
  if (submitted && artifactUrls({ response: submitted }).length > 0) {
@@ -716,9 +716,9 @@ var Images = class {
716
716
  if (callbackUrl !== void 0) body.callback_url = callbackUrl;
717
717
  const endpoint = `/${provider}/images`;
718
718
  const result = await this.transport.request("POST", endpoint, { json: body });
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
  }
@@ -764,9 +764,9 @@ var Audio = class {
764
764
  if (callbackUrl !== void 0) body.callback_url = callbackUrl;
765
765
  result = await this.transport.request("POST", `/${provider}/audios`, { json: body });
766
766
  }
767
- const taskId16 = result.task_id;
768
- if (!taskId16 || result.data && !shouldWait) return result;
769
- const handle = new TaskHandle(taskId16, `/${provider}/tasks`, this.transport);
767
+ const taskId17 = result.task_id;
768
+ if (!taskId17 || result.data && !shouldWait) return result;
769
+ const handle = new TaskHandle(taskId17, `/${provider}/tasks`, this.transport);
770
770
  if (shouldWait) return handle.wait({ pollInterval, maxWait });
771
771
  return handle;
772
772
  }
@@ -785,9 +785,9 @@ var Video = class {
785
785
  if (imageUrl !== void 0) body.image_url = imageUrl;
786
786
  if (callbackUrl !== void 0) body.callback_url = callbackUrl;
787
787
  const result = await this.transport.request("POST", `/${provider}/videos`, { json: body });
788
- const taskId16 = result.task_id;
789
- if (!taskId16 || result.data && !shouldWait) return result;
790
- const handle = new TaskHandle(taskId16, `/${provider}/tasks`, this.transport);
788
+ const taskId17 = result.task_id;
789
+ if (!taskId17 || result.data && !shouldWait) return result;
790
+ const handle = new TaskHandle(taskId17, `/${provider}/tasks`, this.transport);
791
791
  if (shouldWait) return handle.wait({ pollInterval, maxWait });
792
792
  return handle;
793
793
  }
@@ -834,17 +834,17 @@ var Tasks2 = class {
834
834
  this.transport = transport;
835
835
  }
836
836
  transport;
837
- async get(taskId16, opts = {}) {
837
+ async get(taskId17, opts = {}) {
838
838
  const service = opts.service ?? "suno";
839
839
  const endpoint = SERVICE_TASK_ENDPOINTS[service] ?? `/${service}/tasks`;
840
840
  return this.transport.request("POST", endpoint, {
841
- json: { id: taskId16, action: "retrieve" }
841
+ json: { id: taskId17, action: "retrieve" }
842
842
  });
843
843
  }
844
- async wait(taskId16, opts = {}) {
844
+ async wait(taskId17, opts = {}) {
845
845
  const service = opts.service ?? "suno";
846
846
  const endpoint = SERVICE_TASK_ENDPOINTS[service] ?? `/${service}/tasks`;
847
- const handle = new TaskHandle(taskId16, endpoint, this.transport);
847
+ const handle = new TaskHandle(taskId17, endpoint, this.transport);
848
848
  return handle.wait({ pollInterval: opts.pollInterval, maxWait: opts.maxWait });
849
849
  }
850
850
  };
@@ -2016,13 +2016,55 @@ var Producer = class {
2016
2016
  }
2017
2017
  };
2018
2018
 
2019
- // src/resources/providers/seedance.ts
2019
+ // src/resources/providers/qwen-image.ts
2020
2020
  function taskId12(result) {
2021
2021
  if (typeof result?.task_id === "string") return result.task_id;
2022
2022
  const data = result?.data;
2023
2023
  if (data && typeof data.task_id === "string") return data.task_id;
2024
2024
  return typeof result?.id === "string" ? result.id : "";
2025
2025
  }
2026
+ var QwenImage = class {
2027
+ constructor(transport) {
2028
+ this.transport = transport;
2029
+ }
2030
+ transport;
2031
+ /** Call /qwen-image/images. */
2032
+ async generate(options) {
2033
+ const body = {};
2034
+ body["model"] = options.model;
2035
+ body["prompt"] = options.prompt;
2036
+ if (options.imageUrls !== void 0) body["image_urls"] = options.imageUrls;
2037
+ body["n"] = options.n ?? 1;
2038
+ if (options.size !== void 0) body["size"] = options.size;
2039
+ body["prompt_extend"] = options.promptExtend ?? true;
2040
+ body["prompt_extend_mode"] = options.promptExtendMode ?? "direct";
2041
+ body["enable_thinking"] = options.enableThinking ?? true;
2042
+ if (options.negativePrompt !== void 0) body["negative_prompt"] = options.negativePrompt;
2043
+ if (options.seed !== void 0) body["seed"] = options.seed;
2044
+ body["watermark"] = options.watermark ?? false;
2045
+ for (const [key, value] of Object.entries(options)) {
2046
+ if (!["async", "callbackUrl", "enableThinking", "imageUrls", "maxWait", "model", "n", "negativePrompt", "pollInterval", "prompt", "promptExtend", "promptExtendMode", "seed", "size", "wait", "watermark"].includes(key) && value !== void 0) {
2047
+ body[key] = value;
2048
+ }
2049
+ }
2050
+ if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
2051
+ body.async = options.async ?? true;
2052
+ const result = await this.transport.request("POST", "/qwen-image/images", { json: body });
2053
+ const handle = new TaskHandle(taskId12(result), "/qwen-image/tasks", this.transport, result);
2054
+ if (options.wait) {
2055
+ await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
2056
+ }
2057
+ return handle;
2058
+ }
2059
+ };
2060
+
2061
+ // src/resources/providers/seedance.ts
2062
+ function taskId13(result) {
2063
+ if (typeof result?.task_id === "string") return result.task_id;
2064
+ const data = result?.data;
2065
+ if (data && typeof data.task_id === "string") return data.task_id;
2066
+ return typeof result?.id === "string" ? result.id : "";
2067
+ }
2026
2068
  var Seedance = class {
2027
2069
  constructor(transport) {
2028
2070
  this.transport = transport;
@@ -2054,7 +2096,7 @@ var Seedance = class {
2054
2096
  if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
2055
2097
  body.async = options.async ?? true;
2056
2098
  const result = await this.transport.request("POST", "/seedance/videos", { json: body });
2057
- const handle = new TaskHandle(taskId12(result), "/seedance/tasks", this.transport, result);
2099
+ const handle = new TaskHandle(taskId13(result), "/seedance/tasks", this.transport, result);
2058
2100
  if (options.wait) {
2059
2101
  await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
2060
2102
  }
@@ -2063,7 +2105,7 @@ var Seedance = class {
2063
2105
  };
2064
2106
 
2065
2107
  // src/resources/providers/seedream.ts
2066
- function taskId13(result) {
2108
+ function taskId14(result) {
2067
2109
  if (typeof result?.task_id === "string") return result.task_id;
2068
2110
  const data = result?.data;
2069
2111
  if (data && typeof data.task_id === "string") return data.task_id;
@@ -2099,7 +2141,7 @@ var Seedream = class {
2099
2141
  if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
2100
2142
  body.async = options.async ?? true;
2101
2143
  const result = await this.transport.request("POST", "/seedream/images", { json: body });
2102
- const handle = new TaskHandle(taskId13(result), "/seedream/tasks", this.transport, result);
2144
+ const handle = new TaskHandle(taskId14(result), "/seedream/tasks", this.transport, result);
2103
2145
  if (options.wait) {
2104
2146
  await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
2105
2147
  }
@@ -2108,7 +2150,7 @@ var Seedream = class {
2108
2150
  };
2109
2151
 
2110
2152
  // src/resources/providers/suno.ts
2111
- function taskId14(result) {
2153
+ function taskId15(result) {
2112
2154
  if (typeof result?.task_id === "string") return result.task_id;
2113
2155
  const data = result?.data;
2114
2156
  if (data && typeof data.task_id === "string") return data.task_id;
@@ -2159,7 +2201,7 @@ var Suno = class {
2159
2201
  if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
2160
2202
  body.async = options.async ?? true;
2161
2203
  const result = await this.transport.request("POST", "/suno/audios", { json: body });
2162
- const handle = new TaskHandle(taskId14(result), "/suno/tasks", this.transport, result);
2204
+ const handle = new TaskHandle(taskId15(result), "/suno/tasks", this.transport, result);
2163
2205
  if (options.wait) {
2164
2206
  await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
2165
2207
  }
@@ -2234,7 +2276,7 @@ var Suno = class {
2234
2276
  if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
2235
2277
  body.async = options.async ?? true;
2236
2278
  const result = await this.transport.request("POST", "/suno/vox", { json: body });
2237
- const handle = new TaskHandle(taskId14(result), "/suno/tasks", this.transport, result);
2279
+ const handle = new TaskHandle(taskId15(result), "/suno/tasks", this.transport, result);
2238
2280
  if (options.wait) {
2239
2281
  await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
2240
2282
  }
@@ -2252,7 +2294,7 @@ var Suno = class {
2252
2294
  if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
2253
2295
  body.async = options.async ?? true;
2254
2296
  const result = await this.transport.request("POST", "/suno/wav", { json: body });
2255
- const handle = new TaskHandle(taskId14(result), "/suno/tasks", this.transport, result);
2297
+ const handle = new TaskHandle(taskId15(result), "/suno/tasks", this.transport, result);
2256
2298
  if (options.wait) {
2257
2299
  await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
2258
2300
  }
@@ -2270,7 +2312,7 @@ var Suno = class {
2270
2312
  if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
2271
2313
  body.async = options.async ?? true;
2272
2314
  const result = await this.transport.request("POST", "/suno/midi", { json: body });
2273
- const handle = new TaskHandle(taskId14(result), "/suno/tasks", this.transport, result);
2315
+ const handle = new TaskHandle(taskId15(result), "/suno/tasks", this.transport, result);
2274
2316
  if (options.wait) {
2275
2317
  await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
2276
2318
  }
@@ -2329,7 +2371,7 @@ var Suno = class {
2329
2371
  };
2330
2372
 
2331
2373
  // src/resources/providers/wan.ts
2332
- function taskId15(result) {
2374
+ function taskId16(result) {
2333
2375
  if (typeof result?.task_id === "string") return result.task_id;
2334
2376
  const data = result?.data;
2335
2377
  if (data && typeof data.task_id === "string") return data.task_id;
@@ -2344,27 +2386,31 @@ var Wan = class {
2344
2386
  async generate(options) {
2345
2387
  const body = {};
2346
2388
  body["model"] = options.model;
2347
- body["action"] = options.action;
2348
- body["prompt"] = options.prompt;
2349
- if (options.size !== void 0) body["size"] = options.size;
2350
2389
  body["audio"] = options.audio ?? false;
2351
- if (options.duration !== void 0) body["duration"] = options.duration;
2352
- if (options.audioUrl !== void 0) body["audio_url"] = options.audioUrl;
2353
- if (options.imageUrl !== void 0) body["image_url"] = options.imageUrl;
2354
- if (options.shotType !== void 0) body["shot_type"] = options.shotType;
2355
- if (options.resolution !== void 0) body["resolution"] = options.resolution;
2356
2390
  body["prompt_extend"] = options.promptExtend ?? false;
2391
+ body["action"] = options.action ?? "text2video";
2392
+ if (options.resolution !== void 0) body["resolution"] = options.resolution;
2393
+ if (options.shotType !== void 0) body["shot_type"] = options.shotType;
2394
+ if (options.duration !== void 0) body["duration"] = options.duration;
2395
+ if (options.prompt !== void 0) body["prompt"] = options.prompt;
2357
2396
  if (options.negativePrompt !== void 0) body["negative_prompt"] = options.negativePrompt;
2397
+ if (options.size !== void 0) body["size"] = options.size;
2398
+ if (options.audioUrl !== void 0) body["audio_url"] = options.audioUrl;
2358
2399
  if (options.referenceVideoUrls !== void 0) body["reference_video_urls"] = options.referenceVideoUrls;
2400
+ if (options.imageUrl !== void 0) body["image_url"] = options.imageUrl;
2401
+ if (options.media !== void 0) body["media"] = options.media;
2402
+ if (options.ratio !== void 0) body["ratio"] = options.ratio;
2403
+ if (options.seed !== void 0) body["seed"] = options.seed;
2404
+ body["watermark"] = options.watermark ?? false;
2359
2405
  for (const [key, value] of Object.entries(options)) {
2360
- if (!["action", "async", "audio", "audioUrl", "callbackUrl", "duration", "imageUrl", "maxWait", "model", "negativePrompt", "pollInterval", "prompt", "promptExtend", "referenceVideoUrls", "resolution", "shotType", "size", "wait"].includes(key) && value !== void 0) {
2406
+ 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) {
2361
2407
  body[key] = value;
2362
2408
  }
2363
2409
  }
2364
2410
  if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
2365
2411
  body.async = options.async ?? true;
2366
2412
  const result = await this.transport.request("POST", "/wan/videos", { json: body });
2367
- const handle = new TaskHandle(taskId15(result), "/wan/tasks", this.transport, result);
2413
+ const handle = new TaskHandle(taskId16(result), "/wan/tasks", this.transport, result);
2368
2414
  if (options.wait) {
2369
2415
  await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
2370
2416
  }
@@ -2386,6 +2432,7 @@ function attachProviders(client, transport) {
2386
2432
  client.minimax = new Minimax(transport);
2387
2433
  client.nanobanana = new NanoBanana(transport);
2388
2434
  client.producer = new Producer(transport);
2435
+ client.qwenimage = new QwenImage(transport);
2389
2436
  client.seedance = new Seedance(transport);
2390
2437
  client.seedream = new Seedream(transport);
2391
2438
  client.suno = new Suno(transport);