@acedatacloud/sdk 2026.503.0 → 2026.504.1
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 +155 -5
- package/dist/index.d.ts +155 -5
- package/dist/index.js +188 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +188 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +12 -0
- package/src/index.ts +3 -0
- package/src/resources/glm.ts +58 -0
- package/src/resources/kling.ts +100 -0
- package/src/resources/tasks.ts +1 -0
- package/src/resources/veo.ts +88 -0
- package/src/resources/webextrator.ts +61 -0
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,152 @@ 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
|
+
/** Kling-specific video generation resources. */
|
|
530
|
+
|
|
531
|
+
type KlingModel = 'kling-v1' | 'kling-v1-6' | 'kling-v2-master' | 'kling-v2-1-master' | 'kling-v2-5-turbo' | 'kling-v2-6' | 'kling-v3' | 'kling-v3-omni' | 'kling-video-o1' | (string & {});
|
|
532
|
+
declare class Kling {
|
|
533
|
+
private transport;
|
|
534
|
+
constructor(transport: Transport);
|
|
535
|
+
generate(opts: {
|
|
536
|
+
action: 'text2video' | 'image2video' | 'extend';
|
|
537
|
+
mode?: 'std' | 'pro' | '4k';
|
|
538
|
+
model?: KlingModel;
|
|
539
|
+
prompt?: string;
|
|
540
|
+
duration?: 5 | 10;
|
|
541
|
+
generateAudio?: boolean;
|
|
542
|
+
videoId?: string;
|
|
543
|
+
cfgScale?: number;
|
|
544
|
+
aspectRatio?: '16:9' | '9:16' | '1:1';
|
|
545
|
+
callbackUrl?: string;
|
|
546
|
+
endImageUrl?: string;
|
|
547
|
+
cameraControl?: string;
|
|
548
|
+
elementList?: unknown[];
|
|
549
|
+
videoList?: unknown[];
|
|
550
|
+
negativePrompt?: string;
|
|
551
|
+
startImageUrl?: string;
|
|
552
|
+
[key: string]: unknown;
|
|
553
|
+
}): Promise<Record<string, unknown>>;
|
|
554
|
+
motion(opts: {
|
|
555
|
+
mode: 'std' | 'pro';
|
|
556
|
+
imageUrl: string;
|
|
557
|
+
videoUrl: string;
|
|
558
|
+
characterOrientation: 'image' | 'video';
|
|
559
|
+
keepOriginalSound?: 'yes' | 'no';
|
|
560
|
+
prompt?: string;
|
|
561
|
+
callbackUrl?: string;
|
|
562
|
+
[key: string]: unknown;
|
|
563
|
+
}): Promise<Record<string, unknown>>;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
/** WebExtrator web render & extract resources. */
|
|
567
|
+
|
|
568
|
+
declare class WebExtrator {
|
|
569
|
+
private transport;
|
|
570
|
+
constructor(transport: Transport);
|
|
571
|
+
extract(opts: {
|
|
572
|
+
url: string;
|
|
573
|
+
expectedType?: 'product' | 'article' | 'general';
|
|
574
|
+
enableLlm?: boolean;
|
|
575
|
+
waitUntil?: 'load' | 'domcontentloaded' | 'networkidle' | 'commit';
|
|
576
|
+
timeout?: number;
|
|
577
|
+
delay?: number;
|
|
578
|
+
waitForSelector?: string;
|
|
579
|
+
blockResources?: string[];
|
|
580
|
+
headers?: Record<string, string>;
|
|
581
|
+
userAgent?: string;
|
|
582
|
+
callbackUrl?: string;
|
|
583
|
+
[key: string]: unknown;
|
|
584
|
+
}): Promise<Record<string, unknown>>;
|
|
585
|
+
render(opts: {
|
|
586
|
+
url: string;
|
|
587
|
+
waitUntil?: 'load' | 'domcontentloaded' | 'networkidle' | 'commit';
|
|
588
|
+
timeout?: number;
|
|
589
|
+
delay?: number;
|
|
590
|
+
waitForSelector?: string;
|
|
591
|
+
blockResources?: string[];
|
|
592
|
+
headers?: Record<string, string>;
|
|
593
|
+
userAgent?: string;
|
|
594
|
+
callbackUrl?: string;
|
|
595
|
+
[key: string]: unknown;
|
|
596
|
+
}): Promise<Record<string, unknown>>;
|
|
597
|
+
}
|
|
598
|
+
|
|
453
599
|
/** Top-level AceDataCloud client for TypeScript. */
|
|
454
600
|
|
|
455
601
|
interface AceDataCloudOptions {
|
|
@@ -477,8 +623,12 @@ declare class AceDataCloud {
|
|
|
477
623
|
readonly files: Files;
|
|
478
624
|
readonly platform: Platform;
|
|
479
625
|
readonly openai: OpenAI;
|
|
626
|
+
readonly glm: Glm;
|
|
627
|
+
readonly veo: Veo;
|
|
628
|
+
readonly kling: Kling;
|
|
629
|
+
readonly webextrator: WebExtrator;
|
|
480
630
|
private transport;
|
|
481
631
|
constructor(opts?: AceDataCloudOptions);
|
|
482
632
|
}
|
|
483
633
|
|
|
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 };
|
|
634
|
+
export { APIError, AceDataCloud, AceDataCloudError, type AceDataCloudOptions, type AiChatModel, type AudioProvider, AuthenticationError, type GlmModel, type ImageProvider, InsufficientBalanceError, type KlingModel, 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,152 @@ 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
|
+
/** Kling-specific video generation resources. */
|
|
530
|
+
|
|
531
|
+
type KlingModel = 'kling-v1' | 'kling-v1-6' | 'kling-v2-master' | 'kling-v2-1-master' | 'kling-v2-5-turbo' | 'kling-v2-6' | 'kling-v3' | 'kling-v3-omni' | 'kling-video-o1' | (string & {});
|
|
532
|
+
declare class Kling {
|
|
533
|
+
private transport;
|
|
534
|
+
constructor(transport: Transport);
|
|
535
|
+
generate(opts: {
|
|
536
|
+
action: 'text2video' | 'image2video' | 'extend';
|
|
537
|
+
mode?: 'std' | 'pro' | '4k';
|
|
538
|
+
model?: KlingModel;
|
|
539
|
+
prompt?: string;
|
|
540
|
+
duration?: 5 | 10;
|
|
541
|
+
generateAudio?: boolean;
|
|
542
|
+
videoId?: string;
|
|
543
|
+
cfgScale?: number;
|
|
544
|
+
aspectRatio?: '16:9' | '9:16' | '1:1';
|
|
545
|
+
callbackUrl?: string;
|
|
546
|
+
endImageUrl?: string;
|
|
547
|
+
cameraControl?: string;
|
|
548
|
+
elementList?: unknown[];
|
|
549
|
+
videoList?: unknown[];
|
|
550
|
+
negativePrompt?: string;
|
|
551
|
+
startImageUrl?: string;
|
|
552
|
+
[key: string]: unknown;
|
|
553
|
+
}): Promise<Record<string, unknown>>;
|
|
554
|
+
motion(opts: {
|
|
555
|
+
mode: 'std' | 'pro';
|
|
556
|
+
imageUrl: string;
|
|
557
|
+
videoUrl: string;
|
|
558
|
+
characterOrientation: 'image' | 'video';
|
|
559
|
+
keepOriginalSound?: 'yes' | 'no';
|
|
560
|
+
prompt?: string;
|
|
561
|
+
callbackUrl?: string;
|
|
562
|
+
[key: string]: unknown;
|
|
563
|
+
}): Promise<Record<string, unknown>>;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
/** WebExtrator web render & extract resources. */
|
|
567
|
+
|
|
568
|
+
declare class WebExtrator {
|
|
569
|
+
private transport;
|
|
570
|
+
constructor(transport: Transport);
|
|
571
|
+
extract(opts: {
|
|
572
|
+
url: string;
|
|
573
|
+
expectedType?: 'product' | 'article' | 'general';
|
|
574
|
+
enableLlm?: boolean;
|
|
575
|
+
waitUntil?: 'load' | 'domcontentloaded' | 'networkidle' | 'commit';
|
|
576
|
+
timeout?: number;
|
|
577
|
+
delay?: number;
|
|
578
|
+
waitForSelector?: string;
|
|
579
|
+
blockResources?: string[];
|
|
580
|
+
headers?: Record<string, string>;
|
|
581
|
+
userAgent?: string;
|
|
582
|
+
callbackUrl?: string;
|
|
583
|
+
[key: string]: unknown;
|
|
584
|
+
}): Promise<Record<string, unknown>>;
|
|
585
|
+
render(opts: {
|
|
586
|
+
url: string;
|
|
587
|
+
waitUntil?: 'load' | 'domcontentloaded' | 'networkidle' | 'commit';
|
|
588
|
+
timeout?: number;
|
|
589
|
+
delay?: number;
|
|
590
|
+
waitForSelector?: string;
|
|
591
|
+
blockResources?: string[];
|
|
592
|
+
headers?: Record<string, string>;
|
|
593
|
+
userAgent?: string;
|
|
594
|
+
callbackUrl?: string;
|
|
595
|
+
[key: string]: unknown;
|
|
596
|
+
}): Promise<Record<string, unknown>>;
|
|
597
|
+
}
|
|
598
|
+
|
|
453
599
|
/** Top-level AceDataCloud client for TypeScript. */
|
|
454
600
|
|
|
455
601
|
interface AceDataCloudOptions {
|
|
@@ -477,8 +623,12 @@ declare class AceDataCloud {
|
|
|
477
623
|
readonly files: Files;
|
|
478
624
|
readonly platform: Platform;
|
|
479
625
|
readonly openai: OpenAI;
|
|
626
|
+
readonly glm: Glm;
|
|
627
|
+
readonly veo: Veo;
|
|
628
|
+
readonly kling: Kling;
|
|
629
|
+
readonly webextrator: WebExtrator;
|
|
480
630
|
private transport;
|
|
481
631
|
constructor(opts?: AceDataCloudOptions);
|
|
482
632
|
}
|
|
483
633
|
|
|
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 };
|
|
634
|
+
export { APIError, AceDataCloud, AceDataCloudError, type AceDataCloudOptions, type AiChatModel, type AudioProvider, AuthenticationError, type GlmModel, type ImageProvider, InsufficientBalanceError, type KlingModel, 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,184 @@ 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/kling.ts
|
|
877
|
+
var Kling = class {
|
|
878
|
+
constructor(transport) {
|
|
879
|
+
this.transport = transport;
|
|
880
|
+
}
|
|
881
|
+
transport;
|
|
882
|
+
async generate(opts) {
|
|
883
|
+
const {
|
|
884
|
+
action,
|
|
885
|
+
mode,
|
|
886
|
+
model,
|
|
887
|
+
prompt,
|
|
888
|
+
duration,
|
|
889
|
+
generateAudio,
|
|
890
|
+
videoId,
|
|
891
|
+
cfgScale,
|
|
892
|
+
aspectRatio,
|
|
893
|
+
callbackUrl,
|
|
894
|
+
endImageUrl,
|
|
895
|
+
cameraControl,
|
|
896
|
+
elementList,
|
|
897
|
+
videoList,
|
|
898
|
+
negativePrompt,
|
|
899
|
+
startImageUrl,
|
|
900
|
+
...rest
|
|
901
|
+
} = opts;
|
|
902
|
+
const body = { action, ...rest };
|
|
903
|
+
if (mode !== void 0) body.mode = mode;
|
|
904
|
+
if (model !== void 0) body.model = model;
|
|
905
|
+
if (prompt !== void 0) body.prompt = prompt;
|
|
906
|
+
if (duration !== void 0) body.duration = duration;
|
|
907
|
+
if (generateAudio !== void 0) body.generate_audio = generateAudio;
|
|
908
|
+
if (videoId !== void 0) body.video_id = videoId;
|
|
909
|
+
if (cfgScale !== void 0) body.cfg_scale = cfgScale;
|
|
910
|
+
if (aspectRatio !== void 0) body.aspect_ratio = aspectRatio;
|
|
911
|
+
if (callbackUrl !== void 0) body.callback_url = callbackUrl;
|
|
912
|
+
if (endImageUrl !== void 0) body.end_image_url = endImageUrl;
|
|
913
|
+
if (cameraControl !== void 0) body.camera_control = cameraControl;
|
|
914
|
+
if (elementList !== void 0) body.element_list = elementList;
|
|
915
|
+
if (videoList !== void 0) body.video_list = videoList;
|
|
916
|
+
if (negativePrompt !== void 0) body.negative_prompt = negativePrompt;
|
|
917
|
+
if (startImageUrl !== void 0) body.start_image_url = startImageUrl;
|
|
918
|
+
return this.transport.request("POST", "/kling/videos", { json: body });
|
|
919
|
+
}
|
|
920
|
+
async motion(opts) {
|
|
921
|
+
const { mode, imageUrl, videoUrl, characterOrientation, keepOriginalSound, prompt, callbackUrl, ...rest } = opts;
|
|
922
|
+
const body = {
|
|
923
|
+
mode,
|
|
924
|
+
image_url: imageUrl,
|
|
925
|
+
video_url: videoUrl,
|
|
926
|
+
character_orientation: characterOrientation,
|
|
927
|
+
...rest
|
|
928
|
+
};
|
|
929
|
+
if (keepOriginalSound !== void 0) body.keep_original_sound = keepOriginalSound;
|
|
930
|
+
if (prompt !== void 0) body.prompt = prompt;
|
|
931
|
+
if (callbackUrl !== void 0) body.callback_url = callbackUrl;
|
|
932
|
+
return this.transport.request("POST", "/kling/motion", { json: body });
|
|
933
|
+
}
|
|
934
|
+
};
|
|
935
|
+
|
|
936
|
+
// src/resources/webextrator.ts
|
|
937
|
+
var WebExtrator = class {
|
|
938
|
+
constructor(transport) {
|
|
939
|
+
this.transport = transport;
|
|
940
|
+
}
|
|
941
|
+
transport;
|
|
942
|
+
async extract(opts) {
|
|
943
|
+
const { url, expectedType, enableLlm, waitUntil, timeout, delay, waitForSelector, blockResources, headers, userAgent, callbackUrl, ...rest } = opts;
|
|
944
|
+
const body = { url, ...rest };
|
|
945
|
+
if (expectedType !== void 0) body.expected_type = expectedType;
|
|
946
|
+
if (enableLlm !== void 0) body.enable_llm = enableLlm;
|
|
947
|
+
if (waitUntil !== void 0) body.wait_until = waitUntil;
|
|
948
|
+
if (timeout !== void 0) body.timeout = timeout;
|
|
949
|
+
if (delay !== void 0) body.delay = delay;
|
|
950
|
+
if (waitForSelector !== void 0) body.wait_for_selector = waitForSelector;
|
|
951
|
+
if (blockResources !== void 0) body.block_resources = blockResources;
|
|
952
|
+
if (headers !== void 0) body.headers = headers;
|
|
953
|
+
if (userAgent !== void 0) body.user_agent = userAgent;
|
|
954
|
+
if (callbackUrl !== void 0) body.callback_url = callbackUrl;
|
|
955
|
+
return this.transport.request("POST", "/webextrator/extract", { json: body });
|
|
956
|
+
}
|
|
957
|
+
async render(opts) {
|
|
958
|
+
const { url, waitUntil, timeout, delay, waitForSelector, blockResources, headers, userAgent, callbackUrl, ...rest } = opts;
|
|
959
|
+
const body = { url, ...rest };
|
|
960
|
+
if (waitUntil !== void 0) body.wait_until = waitUntil;
|
|
961
|
+
if (timeout !== void 0) body.timeout = timeout;
|
|
962
|
+
if (delay !== void 0) body.delay = delay;
|
|
963
|
+
if (waitForSelector !== void 0) body.wait_for_selector = waitForSelector;
|
|
964
|
+
if (blockResources !== void 0) body.block_resources = blockResources;
|
|
965
|
+
if (headers !== void 0) body.headers = headers;
|
|
966
|
+
if (userAgent !== void 0) body.user_agent = userAgent;
|
|
967
|
+
if (callbackUrl !== void 0) body.callback_url = callbackUrl;
|
|
968
|
+
return this.transport.request("POST", "/webextrator/render", { json: body });
|
|
969
|
+
}
|
|
970
|
+
};
|
|
971
|
+
|
|
793
972
|
// src/client.ts
|
|
794
973
|
var AceDataCloud = class {
|
|
795
974
|
aichat;
|
|
@@ -802,6 +981,10 @@ var AceDataCloud = class {
|
|
|
802
981
|
files;
|
|
803
982
|
platform;
|
|
804
983
|
openai;
|
|
984
|
+
glm;
|
|
985
|
+
veo;
|
|
986
|
+
kling;
|
|
987
|
+
webextrator;
|
|
805
988
|
transport;
|
|
806
989
|
constructor(opts = {}) {
|
|
807
990
|
this.transport = new Transport({
|
|
@@ -823,6 +1006,10 @@ var AceDataCloud = class {
|
|
|
823
1006
|
this.files = new Files(this.transport);
|
|
824
1007
|
this.platform = new Platform(this.transport);
|
|
825
1008
|
this.openai = new OpenAI(this.transport);
|
|
1009
|
+
this.glm = new Glm(this.transport);
|
|
1010
|
+
this.veo = new Veo(this.transport);
|
|
1011
|
+
this.kling = new Kling(this.transport);
|
|
1012
|
+
this.webextrator = new WebExtrator(this.transport);
|
|
826
1013
|
}
|
|
827
1014
|
};
|
|
828
1015
|
// Annotate the CommonJS export names for ESM import in node:
|