@acedatacloud/sdk 2026.614.0 → 2026.629.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/README.md CHANGED
@@ -45,10 +45,12 @@ for await (const chunk of stream) {
45
45
  |----------|-------------|
46
46
  | `client.openai` | OpenAI-compatible chat completions and responses |
47
47
  | `client.chat` | Native chat messages |
48
- | `client.images` | Image generation (Midjourney, Flux, etc.) |
48
+ | `client.images` | Image generation (Flux, Seedream, Nano Banana, etc.) |
49
49
  | `client.audio` | Music generation (Suno) |
50
50
  | `client.video` | Video generation (Luma, Sora, Veo, etc.) |
51
51
  | `client.search` | Web search (Google SERP) |
52
+ | `client.face` | Face analysis & transformation (swap, beautify, age, cartoon) |
53
+ | `client.shorturl` | Short URL creation |
52
54
  | `client.tasks` | Cross-service async task polling |
53
55
  | `client.files` | File uploads |
54
56
  | `client.platform` | Applications, credentials, models management |
@@ -62,9 +64,9 @@ const result = await task.wait();
62
64
  console.log(result.image_url);
63
65
 
64
66
  // Use a specific provider
65
- const mjTask = await client.images.generate({
67
+ const fluxTask = await client.images.generate({
66
68
  prompt: 'A sunset over mountains',
67
- provider: 'midjourney',
69
+ provider: 'flux',
68
70
  });
69
71
  ```
70
72
 
@@ -85,8 +87,8 @@ Available providers:
85
87
 
86
88
  | Resource | Providers |
87
89
  |----------|-----------|
88
- | `client.images` | `nano-banana` (default), `midjourney`, `flux`, `seedream` |
89
- | `client.video` | `sora` (default), `luma`, `veo`, `kling`, `hailuo`, `seedance`, `wan`, `pika`, `pixverse`, `midjourney` |
90
+ | `client.images` | `nano-banana` (default), `flux`, `seedream` |
91
+ | `client.video` | `sora` (default), `luma`, `veo`, `kling`, `hailuo`, `seedance`, `wan`, `pika`, `pixverse` |
90
92
  | `client.audio` | `suno` (default), `producer`, `fish` |
91
93
 
92
94
  ## Error Handling
package/dist/index.d.mts CHANGED
@@ -195,7 +195,7 @@ declare class TaskHandle {
195
195
 
196
196
  /** Image generation resources. */
197
197
 
198
- type ImageProvider = 'nano-banana' | 'midjourney' | 'flux' | 'seedream' | (string & {});
198
+ type ImageProvider = 'nano-banana' | 'flux' | 'seedream' | (string & {});
199
199
  declare class Images$1 {
200
200
  private transport;
201
201
  constructor(transport: Transport);
@@ -252,7 +252,7 @@ declare class Audio {
252
252
 
253
253
  /** Video generation resources. */
254
254
 
255
- type VideoProvider = 'sora' | 'luma' | 'veo' | 'kling' | 'hailuo' | 'seedance' | 'wan' | 'pika' | 'pixverse' | 'midjourney' | (string & {});
255
+ type VideoProvider = 'sora' | 'luma' | 'veo' | 'kling' | 'hailuo' | 'seedance' | 'wan' | 'pika' | 'pixverse' | (string & {});
256
256
  declare class Video {
257
257
  private transport;
258
258
  constructor(transport: Transport);
@@ -626,6 +626,55 @@ declare class WebExtrator {
626
626
  }): Promise<Record<string, unknown>>;
627
627
  }
628
628
 
629
+ /** Face transformation resources (`/face/*`). */
630
+
631
+ declare class Face {
632
+ private transport;
633
+ constructor(transport: Transport);
634
+ private call;
635
+ analyze(opts: {
636
+ imageUrl: string;
637
+ [key: string]: unknown;
638
+ }): Promise<Record<string, unknown>>;
639
+ beautify(opts: {
640
+ imageUrl: string;
641
+ [key: string]: unknown;
642
+ }): Promise<Record<string, unknown>>;
643
+ changeAge(opts: {
644
+ imageUrl: string;
645
+ [key: string]: unknown;
646
+ }): Promise<Record<string, unknown>>;
647
+ changeGender(opts: {
648
+ imageUrl: string;
649
+ [key: string]: unknown;
650
+ }): Promise<Record<string, unknown>>;
651
+ detectLive(opts: {
652
+ imageUrl: string;
653
+ [key: string]: unknown;
654
+ }): Promise<Record<string, unknown>>;
655
+ swap(opts: {
656
+ sourceImageUrl: string;
657
+ targetImageUrl: string;
658
+ [key: string]: unknown;
659
+ }): Promise<Record<string, unknown>>;
660
+ cartoon(opts: {
661
+ imageUrl: string;
662
+ [key: string]: unknown;
663
+ }): Promise<Record<string, unknown>>;
664
+ }
665
+
666
+ /** Short URL resource (`/shorturl`). */
667
+
668
+ declare class ShortUrl {
669
+ private transport;
670
+ constructor(transport: Transport);
671
+ create(opts: {
672
+ url: string;
673
+ slug?: string;
674
+ [key: string]: unknown;
675
+ }): Promise<Record<string, unknown>>;
676
+ }
677
+
629
678
  /** Top-level AceDataCloud client for TypeScript. */
630
679
 
631
680
  interface AceDataCloudOptions {
@@ -657,6 +706,8 @@ declare class AceDataCloud {
657
706
  readonly veo: Veo;
658
707
  readonly kling: Kling;
659
708
  readonly webextrator: WebExtrator;
709
+ readonly face: Face;
710
+ readonly shorturl: ShortUrl;
660
711
  private transport;
661
712
  constructor(opts?: AceDataCloudOptions);
662
713
  }
package/dist/index.d.ts CHANGED
@@ -195,7 +195,7 @@ declare class TaskHandle {
195
195
 
196
196
  /** Image generation resources. */
197
197
 
198
- type ImageProvider = 'nano-banana' | 'midjourney' | 'flux' | 'seedream' | (string & {});
198
+ type ImageProvider = 'nano-banana' | 'flux' | 'seedream' | (string & {});
199
199
  declare class Images$1 {
200
200
  private transport;
201
201
  constructor(transport: Transport);
@@ -252,7 +252,7 @@ declare class Audio {
252
252
 
253
253
  /** Video generation resources. */
254
254
 
255
- type VideoProvider = 'sora' | 'luma' | 'veo' | 'kling' | 'hailuo' | 'seedance' | 'wan' | 'pika' | 'pixverse' | 'midjourney' | (string & {});
255
+ type VideoProvider = 'sora' | 'luma' | 'veo' | 'kling' | 'hailuo' | 'seedance' | 'wan' | 'pika' | 'pixverse' | (string & {});
256
256
  declare class Video {
257
257
  private transport;
258
258
  constructor(transport: Transport);
@@ -626,6 +626,55 @@ declare class WebExtrator {
626
626
  }): Promise<Record<string, unknown>>;
627
627
  }
628
628
 
629
+ /** Face transformation resources (`/face/*`). */
630
+
631
+ declare class Face {
632
+ private transport;
633
+ constructor(transport: Transport);
634
+ private call;
635
+ analyze(opts: {
636
+ imageUrl: string;
637
+ [key: string]: unknown;
638
+ }): Promise<Record<string, unknown>>;
639
+ beautify(opts: {
640
+ imageUrl: string;
641
+ [key: string]: unknown;
642
+ }): Promise<Record<string, unknown>>;
643
+ changeAge(opts: {
644
+ imageUrl: string;
645
+ [key: string]: unknown;
646
+ }): Promise<Record<string, unknown>>;
647
+ changeGender(opts: {
648
+ imageUrl: string;
649
+ [key: string]: unknown;
650
+ }): Promise<Record<string, unknown>>;
651
+ detectLive(opts: {
652
+ imageUrl: string;
653
+ [key: string]: unknown;
654
+ }): Promise<Record<string, unknown>>;
655
+ swap(opts: {
656
+ sourceImageUrl: string;
657
+ targetImageUrl: string;
658
+ [key: string]: unknown;
659
+ }): Promise<Record<string, unknown>>;
660
+ cartoon(opts: {
661
+ imageUrl: string;
662
+ [key: string]: unknown;
663
+ }): Promise<Record<string, unknown>>;
664
+ }
665
+
666
+ /** Short URL resource (`/shorturl`). */
667
+
668
+ declare class ShortUrl {
669
+ private transport;
670
+ constructor(transport: Transport);
671
+ create(opts: {
672
+ url: string;
673
+ slug?: string;
674
+ [key: string]: unknown;
675
+ }): Promise<Record<string, unknown>>;
676
+ }
677
+
629
678
  /** Top-level AceDataCloud client for TypeScript. */
630
679
 
631
680
  interface AceDataCloudOptions {
@@ -657,6 +706,8 @@ declare class AceDataCloud {
657
706
  readonly veo: Veo;
658
707
  readonly kling: Kling;
659
708
  readonly webextrator: WebExtrator;
709
+ readonly face: Face;
710
+ readonly shorturl: ShortUrl;
660
711
  private transport;
661
712
  constructor(opts?: AceDataCloudOptions);
662
713
  }
package/dist/index.js CHANGED
@@ -462,7 +462,7 @@ var Images = class {
462
462
  if (aspectRatio !== void 0) body.aspect_ratio = aspectRatio;
463
463
  if (resolution !== void 0) body.resolution = resolution;
464
464
  if (callbackUrl !== void 0) body.callback_url = callbackUrl;
465
- const endpoint = provider === "midjourney" ? "/midjourney/imagine" : `/${provider}/images`;
465
+ const endpoint = `/${provider}/images`;
466
466
  const result = await this.transport.request("POST", endpoint, { json: body });
467
467
  const taskId = result.task_id;
468
468
  if (!taskId || result.data && !shouldWait) return result;
@@ -566,7 +566,6 @@ var SERVICE_TASK_ENDPOINTS = {
566
566
  seedream: "/seedream/tasks",
567
567
  seedance: "/seedance/tasks",
568
568
  sora: "/sora/tasks",
569
- midjourney: "/midjourney/tasks",
570
569
  luma: "/luma/tasks",
571
570
  veo: "/veo/tasks",
572
571
  flux: "/flux/tasks",
@@ -1000,6 +999,59 @@ var WebExtrator = class {
1000
999
  }
1001
1000
  };
1002
1001
 
1002
+ // src/resources/face.ts
1003
+ var Face = class {
1004
+ constructor(transport) {
1005
+ this.transport = transport;
1006
+ }
1007
+ transport;
1008
+ call(action, body) {
1009
+ return this.transport.request("POST", `/face/${action}`, { json: body });
1010
+ }
1011
+ analyze(opts) {
1012
+ const { imageUrl, ...rest } = opts;
1013
+ return this.call("analyze", { image_url: imageUrl, ...rest });
1014
+ }
1015
+ beautify(opts) {
1016
+ const { imageUrl, ...rest } = opts;
1017
+ return this.call("beautify", { image_url: imageUrl, ...rest });
1018
+ }
1019
+ changeAge(opts) {
1020
+ const { imageUrl, ...rest } = opts;
1021
+ return this.call("change-age", { image_url: imageUrl, ...rest });
1022
+ }
1023
+ changeGender(opts) {
1024
+ const { imageUrl, ...rest } = opts;
1025
+ return this.call("change-gender", { image_url: imageUrl, ...rest });
1026
+ }
1027
+ detectLive(opts) {
1028
+ const { imageUrl, ...rest } = opts;
1029
+ return this.call("detect-live", { image_url: imageUrl, ...rest });
1030
+ }
1031
+ swap(opts) {
1032
+ const { sourceImageUrl, targetImageUrl, ...rest } = opts;
1033
+ return this.call("swap", { source_image_url: sourceImageUrl, target_image_url: targetImageUrl, ...rest });
1034
+ }
1035
+ cartoon(opts) {
1036
+ const { imageUrl, ...rest } = opts;
1037
+ return this.call("cartoon", { image_url: imageUrl, ...rest });
1038
+ }
1039
+ };
1040
+
1041
+ // src/resources/shorturl.ts
1042
+ var ShortUrl = class {
1043
+ constructor(transport) {
1044
+ this.transport = transport;
1045
+ }
1046
+ transport;
1047
+ async create(opts) {
1048
+ const { url, slug, ...rest } = opts;
1049
+ const body = { url, ...rest };
1050
+ if (slug !== void 0) body.slug = slug;
1051
+ return this.transport.request("POST", "/shorturl", { json: body });
1052
+ }
1053
+ };
1054
+
1003
1055
  // src/client.ts
1004
1056
  var AceDataCloud = class {
1005
1057
  aichat;
@@ -1016,6 +1068,8 @@ var AceDataCloud = class {
1016
1068
  veo;
1017
1069
  kling;
1018
1070
  webextrator;
1071
+ face;
1072
+ shorturl;
1019
1073
  transport;
1020
1074
  constructor(opts = {}) {
1021
1075
  this.transport = new Transport({
@@ -1041,6 +1095,8 @@ var AceDataCloud = class {
1041
1095
  this.veo = new Veo(this.transport);
1042
1096
  this.kling = new Kling(this.transport);
1043
1097
  this.webextrator = new WebExtrator(this.transport);
1098
+ this.face = new Face(this.transport);
1099
+ this.shorturl = new ShortUrl(this.transport);
1044
1100
  }
1045
1101
  };
1046
1102
  // Annotate the CommonJS export names for ESM import in node: