@acedatacloud/sdk 2026.503.0 → 2026.504.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.d.mts CHANGED
@@ -334,7 +334,7 @@ declare class Platform {
334
334
 
335
335
  /** OpenAI-compatible facade resources. */
336
336
 
337
- declare class Completions {
337
+ declare class Completions$1 {
338
338
  private transport;
339
339
  constructor(transport: Transport);
340
340
  create(opts: {
@@ -351,8 +351,8 @@ declare class Completions {
351
351
  }): Promise<AsyncGenerator<Record<string, unknown>>>;
352
352
  private streamResponse;
353
353
  }
354
- declare class ChatNamespace {
355
- readonly completions: Completions;
354
+ declare class ChatNamespace$1 {
355
+ readonly completions: Completions$1;
356
356
  constructor(transport: Transport);
357
357
  }
358
358
  declare class Responses {
@@ -442,7 +442,7 @@ declare class Tasks {
442
442
  }): Promise<Record<string, unknown>>;
443
443
  }
444
444
  declare class OpenAI {
445
- readonly chat: ChatNamespace;
445
+ readonly chat: ChatNamespace$1;
446
446
  readonly responses: Responses;
447
447
  readonly images: Images;
448
448
  readonly embeddings: Embeddings;
@@ -450,6 +450,115 @@ declare class OpenAI {
450
450
  constructor(transport: Transport);
451
451
  }
452
452
 
453
+ /** GLM chat completions resource. */
454
+
455
+ type GlmModel = 'glm-5.1' | 'glm-4.7' | 'glm-4.6' | 'glm-4.5-air' | 'glm-3-turbo' | (string & {});
456
+ declare class Completions {
457
+ private transport;
458
+ constructor(transport: Transport);
459
+ create(opts: {
460
+ model: GlmModel;
461
+ messages: Array<Record<string, unknown>>;
462
+ stream?: false;
463
+ [key: string]: unknown;
464
+ }): Promise<Record<string, unknown>>;
465
+ create(opts: {
466
+ model: GlmModel;
467
+ messages: Array<Record<string, unknown>>;
468
+ stream: true;
469
+ [key: string]: unknown;
470
+ }): Promise<AsyncGenerator<Record<string, unknown>>>;
471
+ private streamResponse;
472
+ }
473
+ declare class ChatNamespace {
474
+ readonly completions: Completions;
475
+ constructor(transport: Transport);
476
+ }
477
+ declare class Glm {
478
+ readonly chat: ChatNamespace;
479
+ constructor(transport: Transport);
480
+ }
481
+
482
+ /** Veo-specific video generation and editing resources. */
483
+
484
+ type VeoModel = 'veo2' | 'veo2-fast' | 'veo3' | 'veo3-fast' | 'veo31-fast' | 'veo31' | 'veo31-fast-ingredients' | (string & {});
485
+ declare class Veo {
486
+ private transport;
487
+ constructor(transport: Transport);
488
+ generate(opts: {
489
+ action: 'text2video' | 'image2video' | 'ingredients2video' | 'get1080p';
490
+ prompt?: string;
491
+ model?: VeoModel;
492
+ resolution?: '4k' | '1080p' | 'gif';
493
+ videoId?: string;
494
+ translation?: string;
495
+ aspectRatio?: '9:16' | '1:1' | '3:4' | '4:3' | '16:9';
496
+ imageUrls?: string[];
497
+ callbackUrl?: string;
498
+ [key: string]: unknown;
499
+ }): Promise<Record<string, unknown>>;
500
+ upsample(opts: {
501
+ videoId: string;
502
+ action: '1080p' | '4k' | 'gif';
503
+ callbackUrl?: string;
504
+ [key: string]: unknown;
505
+ }): Promise<Record<string, unknown>>;
506
+ extend(opts: {
507
+ videoId: string;
508
+ model: 'veo31-fast' | 'veo31' | (string & {});
509
+ prompt?: string;
510
+ callbackUrl?: string;
511
+ [key: string]: unknown;
512
+ }): Promise<Record<string, unknown>>;
513
+ reshoot(opts: {
514
+ videoId: string;
515
+ motionType: 'STATIONARY' | 'STATIONARY_UP' | 'STATIONARY_DOWN' | 'STATIONARY_LEFT' | 'STATIONARY_RIGHT' | 'STATIONARY_DOLLY_IN_ZOOM_OUT' | 'STATIONARY_DOLLY_OUT_ZOOM_IN' | 'UP' | 'DOWN' | 'LEFT_TO_RIGHT' | 'RIGHT_TO_LEFT' | 'FORWARD' | 'BACKWARD' | 'DOLLY_IN_ZOOM_OUT' | 'DOLLY_OUT_ZOOM_IN' | (string & {});
516
+ callbackUrl?: string;
517
+ [key: string]: unknown;
518
+ }): Promise<Record<string, unknown>>;
519
+ objects(opts: {
520
+ videoId: string;
521
+ action: 'insert' | 'remove';
522
+ prompt?: string;
523
+ imageMask?: string;
524
+ callbackUrl?: string;
525
+ [key: string]: unknown;
526
+ }): Promise<Record<string, unknown>>;
527
+ }
528
+
529
+ /** WebExtrator web render & extract resources. */
530
+
531
+ declare class WebExtrator {
532
+ private transport;
533
+ constructor(transport: Transport);
534
+ extract(opts: {
535
+ url: string;
536
+ expectedType?: 'product' | 'article' | 'general';
537
+ enableLlm?: boolean;
538
+ waitUntil?: 'load' | 'domcontentloaded' | 'networkidle' | 'commit';
539
+ timeout?: number;
540
+ delay?: number;
541
+ waitForSelector?: string;
542
+ blockResources?: string[];
543
+ headers?: Record<string, string>;
544
+ userAgent?: string;
545
+ callbackUrl?: string;
546
+ [key: string]: unknown;
547
+ }): Promise<Record<string, unknown>>;
548
+ render(opts: {
549
+ url: string;
550
+ waitUntil?: 'load' | 'domcontentloaded' | 'networkidle' | 'commit';
551
+ timeout?: number;
552
+ delay?: number;
553
+ waitForSelector?: string;
554
+ blockResources?: string[];
555
+ headers?: Record<string, string>;
556
+ userAgent?: string;
557
+ callbackUrl?: string;
558
+ [key: string]: unknown;
559
+ }): Promise<Record<string, unknown>>;
560
+ }
561
+
453
562
  /** Top-level AceDataCloud client for TypeScript. */
454
563
 
455
564
  interface AceDataCloudOptions {
@@ -477,8 +586,11 @@ declare class AceDataCloud {
477
586
  readonly files: Files;
478
587
  readonly platform: Platform;
479
588
  readonly openai: OpenAI;
589
+ readonly glm: Glm;
590
+ readonly veo: Veo;
591
+ readonly webextrator: WebExtrator;
480
592
  private transport;
481
593
  constructor(opts?: AceDataCloudOptions);
482
594
  }
483
595
 
484
- export { APIError, AceDataCloud, AceDataCloudError, type AceDataCloudOptions, type AiChatModel, type AudioProvider, AuthenticationError, type ImageProvider, InsufficientBalanceError, ModerationError, type PaymentHandler, type PaymentHandlerContext, type PaymentHandlerResult, type PaymentRequiredBody, type PaymentRequirement, RateLimitError, ResourceDisabledError, TaskHandle, type TaskHandleOptions, TimeoutError, TokenMismatchError, TransportError, ValidationError, type VideoProvider };
596
+ export { APIError, AceDataCloud, AceDataCloudError, type AceDataCloudOptions, type AiChatModel, type AudioProvider, AuthenticationError, type GlmModel, type ImageProvider, InsufficientBalanceError, ModerationError, type PaymentHandler, type PaymentHandlerContext, type PaymentHandlerResult, type PaymentRequiredBody, type PaymentRequirement, RateLimitError, ResourceDisabledError, TaskHandle, type TaskHandleOptions, TimeoutError, TokenMismatchError, TransportError, ValidationError, type VeoModel, type VideoProvider };
package/dist/index.d.ts CHANGED
@@ -334,7 +334,7 @@ declare class Platform {
334
334
 
335
335
  /** OpenAI-compatible facade resources. */
336
336
 
337
- declare class Completions {
337
+ declare class Completions$1 {
338
338
  private transport;
339
339
  constructor(transport: Transport);
340
340
  create(opts: {
@@ -351,8 +351,8 @@ declare class Completions {
351
351
  }): Promise<AsyncGenerator<Record<string, unknown>>>;
352
352
  private streamResponse;
353
353
  }
354
- declare class ChatNamespace {
355
- readonly completions: Completions;
354
+ declare class ChatNamespace$1 {
355
+ readonly completions: Completions$1;
356
356
  constructor(transport: Transport);
357
357
  }
358
358
  declare class Responses {
@@ -442,7 +442,7 @@ declare class Tasks {
442
442
  }): Promise<Record<string, unknown>>;
443
443
  }
444
444
  declare class OpenAI {
445
- readonly chat: ChatNamespace;
445
+ readonly chat: ChatNamespace$1;
446
446
  readonly responses: Responses;
447
447
  readonly images: Images;
448
448
  readonly embeddings: Embeddings;
@@ -450,6 +450,115 @@ declare class OpenAI {
450
450
  constructor(transport: Transport);
451
451
  }
452
452
 
453
+ /** GLM chat completions resource. */
454
+
455
+ type GlmModel = 'glm-5.1' | 'glm-4.7' | 'glm-4.6' | 'glm-4.5-air' | 'glm-3-turbo' | (string & {});
456
+ declare class Completions {
457
+ private transport;
458
+ constructor(transport: Transport);
459
+ create(opts: {
460
+ model: GlmModel;
461
+ messages: Array<Record<string, unknown>>;
462
+ stream?: false;
463
+ [key: string]: unknown;
464
+ }): Promise<Record<string, unknown>>;
465
+ create(opts: {
466
+ model: GlmModel;
467
+ messages: Array<Record<string, unknown>>;
468
+ stream: true;
469
+ [key: string]: unknown;
470
+ }): Promise<AsyncGenerator<Record<string, unknown>>>;
471
+ private streamResponse;
472
+ }
473
+ declare class ChatNamespace {
474
+ readonly completions: Completions;
475
+ constructor(transport: Transport);
476
+ }
477
+ declare class Glm {
478
+ readonly chat: ChatNamespace;
479
+ constructor(transport: Transport);
480
+ }
481
+
482
+ /** Veo-specific video generation and editing resources. */
483
+
484
+ type VeoModel = 'veo2' | 'veo2-fast' | 'veo3' | 'veo3-fast' | 'veo31-fast' | 'veo31' | 'veo31-fast-ingredients' | (string & {});
485
+ declare class Veo {
486
+ private transport;
487
+ constructor(transport: Transport);
488
+ generate(opts: {
489
+ action: 'text2video' | 'image2video' | 'ingredients2video' | 'get1080p';
490
+ prompt?: string;
491
+ model?: VeoModel;
492
+ resolution?: '4k' | '1080p' | 'gif';
493
+ videoId?: string;
494
+ translation?: string;
495
+ aspectRatio?: '9:16' | '1:1' | '3:4' | '4:3' | '16:9';
496
+ imageUrls?: string[];
497
+ callbackUrl?: string;
498
+ [key: string]: unknown;
499
+ }): Promise<Record<string, unknown>>;
500
+ upsample(opts: {
501
+ videoId: string;
502
+ action: '1080p' | '4k' | 'gif';
503
+ callbackUrl?: string;
504
+ [key: string]: unknown;
505
+ }): Promise<Record<string, unknown>>;
506
+ extend(opts: {
507
+ videoId: string;
508
+ model: 'veo31-fast' | 'veo31' | (string & {});
509
+ prompt?: string;
510
+ callbackUrl?: string;
511
+ [key: string]: unknown;
512
+ }): Promise<Record<string, unknown>>;
513
+ reshoot(opts: {
514
+ videoId: string;
515
+ motionType: 'STATIONARY' | 'STATIONARY_UP' | 'STATIONARY_DOWN' | 'STATIONARY_LEFT' | 'STATIONARY_RIGHT' | 'STATIONARY_DOLLY_IN_ZOOM_OUT' | 'STATIONARY_DOLLY_OUT_ZOOM_IN' | 'UP' | 'DOWN' | 'LEFT_TO_RIGHT' | 'RIGHT_TO_LEFT' | 'FORWARD' | 'BACKWARD' | 'DOLLY_IN_ZOOM_OUT' | 'DOLLY_OUT_ZOOM_IN' | (string & {});
516
+ callbackUrl?: string;
517
+ [key: string]: unknown;
518
+ }): Promise<Record<string, unknown>>;
519
+ objects(opts: {
520
+ videoId: string;
521
+ action: 'insert' | 'remove';
522
+ prompt?: string;
523
+ imageMask?: string;
524
+ callbackUrl?: string;
525
+ [key: string]: unknown;
526
+ }): Promise<Record<string, unknown>>;
527
+ }
528
+
529
+ /** WebExtrator web render & extract resources. */
530
+
531
+ declare class WebExtrator {
532
+ private transport;
533
+ constructor(transport: Transport);
534
+ extract(opts: {
535
+ url: string;
536
+ expectedType?: 'product' | 'article' | 'general';
537
+ enableLlm?: boolean;
538
+ waitUntil?: 'load' | 'domcontentloaded' | 'networkidle' | 'commit';
539
+ timeout?: number;
540
+ delay?: number;
541
+ waitForSelector?: string;
542
+ blockResources?: string[];
543
+ headers?: Record<string, string>;
544
+ userAgent?: string;
545
+ callbackUrl?: string;
546
+ [key: string]: unknown;
547
+ }): Promise<Record<string, unknown>>;
548
+ render(opts: {
549
+ url: string;
550
+ waitUntil?: 'load' | 'domcontentloaded' | 'networkidle' | 'commit';
551
+ timeout?: number;
552
+ delay?: number;
553
+ waitForSelector?: string;
554
+ blockResources?: string[];
555
+ headers?: Record<string, string>;
556
+ userAgent?: string;
557
+ callbackUrl?: string;
558
+ [key: string]: unknown;
559
+ }): Promise<Record<string, unknown>>;
560
+ }
561
+
453
562
  /** Top-level AceDataCloud client for TypeScript. */
454
563
 
455
564
  interface AceDataCloudOptions {
@@ -477,8 +586,11 @@ declare class AceDataCloud {
477
586
  readonly files: Files;
478
587
  readonly platform: Platform;
479
588
  readonly openai: OpenAI;
589
+ readonly glm: Glm;
590
+ readonly veo: Veo;
591
+ readonly webextrator: WebExtrator;
480
592
  private transport;
481
593
  constructor(opts?: AceDataCloudOptions);
482
594
  }
483
595
 
484
- export { APIError, AceDataCloud, AceDataCloudError, type AceDataCloudOptions, type AiChatModel, type AudioProvider, AuthenticationError, type ImageProvider, InsufficientBalanceError, ModerationError, type PaymentHandler, type PaymentHandlerContext, type PaymentHandlerResult, type PaymentRequiredBody, type PaymentRequirement, RateLimitError, ResourceDisabledError, TaskHandle, type TaskHandleOptions, TimeoutError, TokenMismatchError, TransportError, ValidationError, type VideoProvider };
596
+ export { APIError, AceDataCloud, AceDataCloudError, type AceDataCloudOptions, type AiChatModel, type AudioProvider, AuthenticationError, type GlmModel, type ImageProvider, InsufficientBalanceError, ModerationError, type PaymentHandler, type PaymentHandlerContext, type PaymentHandlerResult, type PaymentRequiredBody, type PaymentRequirement, RateLimitError, ResourceDisabledError, TaskHandle, type TaskHandleOptions, TimeoutError, TokenMismatchError, TransportError, ValidationError, type VeoModel, type VideoProvider };
package/dist/index.js CHANGED
@@ -543,7 +543,8 @@ var SERVICE_TASK_ENDPOINTS = {
543
543
  hailuo: "/hailuo/tasks",
544
544
  wan: "/wan/tasks",
545
545
  pika: "/pika/tasks",
546
- pixverse: "/pixverse/tasks"
546
+ pixverse: "/pixverse/tasks",
547
+ webextrator: "/webextrator/tasks"
547
548
  };
548
549
  var Tasks = class {
549
550
  constructor(transport) {
@@ -790,6 +791,124 @@ var OpenAI = class {
790
791
  }
791
792
  };
792
793
 
794
+ // src/resources/glm.ts
795
+ var Completions2 = class {
796
+ constructor(transport) {
797
+ this.transport = transport;
798
+ }
799
+ transport;
800
+ async create(opts) {
801
+ const { model, messages, stream, ...rest } = opts;
802
+ const body = { model, messages, ...rest };
803
+ if (stream) {
804
+ body.stream = true;
805
+ return this.streamResponse(body);
806
+ }
807
+ return this.transport.request("POST", "/glm/chat/completions", { json: body });
808
+ }
809
+ async *streamResponse(body) {
810
+ for await (const chunk of this.transport.requestStream("POST", "/glm/chat/completions", { json: body })) {
811
+ yield JSON.parse(chunk);
812
+ }
813
+ }
814
+ };
815
+ var ChatNamespace2 = class {
816
+ completions;
817
+ constructor(transport) {
818
+ this.completions = new Completions2(transport);
819
+ }
820
+ };
821
+ var Glm = class {
822
+ chat;
823
+ constructor(transport) {
824
+ this.chat = new ChatNamespace2(transport);
825
+ }
826
+ };
827
+
828
+ // src/resources/veo.ts
829
+ var Veo = class {
830
+ constructor(transport) {
831
+ this.transport = transport;
832
+ }
833
+ transport;
834
+ async generate(opts) {
835
+ const { action, prompt, model, resolution, videoId, translation, aspectRatio, imageUrls, callbackUrl, ...rest } = opts;
836
+ const body = { action, ...rest };
837
+ if (prompt !== void 0) body.prompt = prompt;
838
+ if (model !== void 0) body.model = model;
839
+ if (resolution !== void 0) body.resolution = resolution;
840
+ if (videoId !== void 0) body.video_id = videoId;
841
+ if (translation !== void 0) body.translation = translation;
842
+ if (aspectRatio !== void 0) body.aspect_ratio = aspectRatio;
843
+ if (imageUrls !== void 0) body.image_urls = imageUrls;
844
+ if (callbackUrl !== void 0) body.callback_url = callbackUrl;
845
+ return this.transport.request("POST", "/veo/videos", { json: body });
846
+ }
847
+ async upsample(opts) {
848
+ const { videoId, action, callbackUrl, ...rest } = opts;
849
+ const body = { video_id: videoId, action, ...rest };
850
+ if (callbackUrl !== void 0) body.callback_url = callbackUrl;
851
+ return this.transport.request("POST", "/veo/upsample", { json: body });
852
+ }
853
+ async extend(opts) {
854
+ const { videoId, model, prompt, callbackUrl, ...rest } = opts;
855
+ const body = { video_id: videoId, model, ...rest };
856
+ if (prompt !== void 0) body.prompt = prompt;
857
+ if (callbackUrl !== void 0) body.callback_url = callbackUrl;
858
+ return this.transport.request("POST", "/veo/extend", { json: body });
859
+ }
860
+ async reshoot(opts) {
861
+ const { videoId, motionType, callbackUrl, ...rest } = opts;
862
+ const body = { video_id: videoId, motion_type: motionType, ...rest };
863
+ if (callbackUrl !== void 0) body.callback_url = callbackUrl;
864
+ return this.transport.request("POST", "/veo/reshoot", { json: body });
865
+ }
866
+ async objects(opts) {
867
+ const { videoId, action, prompt, imageMask, callbackUrl, ...rest } = opts;
868
+ const body = { video_id: videoId, action, ...rest };
869
+ if (prompt !== void 0) body.prompt = prompt;
870
+ if (imageMask !== void 0) body.image_mask = imageMask;
871
+ if (callbackUrl !== void 0) body.callback_url = callbackUrl;
872
+ return this.transport.request("POST", "/veo/objects", { json: body });
873
+ }
874
+ };
875
+
876
+ // src/resources/webextrator.ts
877
+ var WebExtrator = class {
878
+ constructor(transport) {
879
+ this.transport = transport;
880
+ }
881
+ transport;
882
+ async extract(opts) {
883
+ const { url, expectedType, enableLlm, waitUntil, timeout, delay, waitForSelector, blockResources, headers, userAgent, callbackUrl, ...rest } = opts;
884
+ const body = { url, ...rest };
885
+ if (expectedType !== void 0) body.expected_type = expectedType;
886
+ if (enableLlm !== void 0) body.enable_llm = enableLlm;
887
+ if (waitUntil !== void 0) body.wait_until = waitUntil;
888
+ if (timeout !== void 0) body.timeout = timeout;
889
+ if (delay !== void 0) body.delay = delay;
890
+ if (waitForSelector !== void 0) body.wait_for_selector = waitForSelector;
891
+ if (blockResources !== void 0) body.block_resources = blockResources;
892
+ if (headers !== void 0) body.headers = headers;
893
+ if (userAgent !== void 0) body.user_agent = userAgent;
894
+ if (callbackUrl !== void 0) body.callback_url = callbackUrl;
895
+ return this.transport.request("POST", "/webextrator/extract", { json: body });
896
+ }
897
+ async render(opts) {
898
+ const { url, waitUntil, timeout, delay, waitForSelector, blockResources, headers, userAgent, callbackUrl, ...rest } = opts;
899
+ const body = { url, ...rest };
900
+ if (waitUntil !== void 0) body.wait_until = waitUntil;
901
+ if (timeout !== void 0) body.timeout = timeout;
902
+ if (delay !== void 0) body.delay = delay;
903
+ if (waitForSelector !== void 0) body.wait_for_selector = waitForSelector;
904
+ if (blockResources !== void 0) body.block_resources = blockResources;
905
+ if (headers !== void 0) body.headers = headers;
906
+ if (userAgent !== void 0) body.user_agent = userAgent;
907
+ if (callbackUrl !== void 0) body.callback_url = callbackUrl;
908
+ return this.transport.request("POST", "/webextrator/render", { json: body });
909
+ }
910
+ };
911
+
793
912
  // src/client.ts
794
913
  var AceDataCloud = class {
795
914
  aichat;
@@ -802,6 +921,9 @@ var AceDataCloud = class {
802
921
  files;
803
922
  platform;
804
923
  openai;
924
+ glm;
925
+ veo;
926
+ webextrator;
805
927
  transport;
806
928
  constructor(opts = {}) {
807
929
  this.transport = new Transport({
@@ -823,6 +945,9 @@ var AceDataCloud = class {
823
945
  this.files = new Files(this.transport);
824
946
  this.platform = new Platform(this.transport);
825
947
  this.openai = new OpenAI(this.transport);
948
+ this.glm = new Glm(this.transport);
949
+ this.veo = new Veo(this.transport);
950
+ this.webextrator = new WebExtrator(this.transport);
826
951
  }
827
952
  };
828
953
  // Annotate the CommonJS export names for ESM import in node: