@acedatacloud/sdk 2026.606.1 → 2026.627.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 +5 -5
- package/dist/index.d.mts +16 -2
- package/dist/index.d.ts +16 -2
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/resources/audio.ts +1 -0
- package/src/resources/images.ts +3 -2
- package/src/resources/kling.ts +2 -0
- package/src/resources/openai.ts +2 -0
- package/src/resources/tasks.ts +0 -1
- package/src/resources/veo.ts +5 -0
- package/src/resources/video.ts +2 -1
- package/src/resources/webextrator.ts +2 -0
package/README.md
CHANGED
|
@@ -45,7 +45,7 @@ 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 (
|
|
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) |
|
|
@@ -62,9 +62,9 @@ const result = await task.wait();
|
|
|
62
62
|
console.log(result.image_url);
|
|
63
63
|
|
|
64
64
|
// Use a specific provider
|
|
65
|
-
const
|
|
65
|
+
const fluxTask = await client.images.generate({
|
|
66
66
|
prompt: 'A sunset over mountains',
|
|
67
|
-
provider: '
|
|
67
|
+
provider: 'flux',
|
|
68
68
|
});
|
|
69
69
|
```
|
|
70
70
|
|
|
@@ -85,8 +85,8 @@ Available providers:
|
|
|
85
85
|
|
|
86
86
|
| Resource | Providers |
|
|
87
87
|
|----------|-----------|
|
|
88
|
-
| `client.images` | `nano-banana` (default), `
|
|
89
|
-
| `client.video` | `sora` (default), `luma`, `veo`, `kling`, `hailuo`, `seedance`, `wan`, `pika`, `pixverse
|
|
88
|
+
| `client.images` | `nano-banana` (default), `flux`, `seedream` |
|
|
89
|
+
| `client.video` | `sora` (default), `luma`, `veo`, `kling`, `hailuo`, `seedance`, `wan`, `pika`, `pixverse` |
|
|
90
90
|
| `client.audio` | `suno` (default), `producer`, `fish` |
|
|
91
91
|
|
|
92
92
|
## 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' | '
|
|
198
|
+
type ImageProvider = 'nano-banana' | 'flux' | 'seedream' | (string & {});
|
|
199
199
|
declare class Images$1 {
|
|
200
200
|
private transport;
|
|
201
201
|
constructor(transport: Transport);
|
|
@@ -210,6 +210,7 @@ declare class Images$1 {
|
|
|
210
210
|
aspectRatio?: string;
|
|
211
211
|
resolution?: string;
|
|
212
212
|
callbackUrl?: string;
|
|
213
|
+
async?: boolean;
|
|
213
214
|
wait?: boolean;
|
|
214
215
|
pollInterval?: number;
|
|
215
216
|
maxWait?: number;
|
|
@@ -241,6 +242,7 @@ declare class Audio {
|
|
|
241
242
|
model?: string;
|
|
242
243
|
tags?: string;
|
|
243
244
|
callbackUrl?: string;
|
|
245
|
+
async?: boolean;
|
|
244
246
|
wait?: boolean;
|
|
245
247
|
pollInterval?: number;
|
|
246
248
|
maxWait?: number;
|
|
@@ -250,7 +252,7 @@ declare class Audio {
|
|
|
250
252
|
|
|
251
253
|
/** Video generation resources. */
|
|
252
254
|
|
|
253
|
-
type VideoProvider = 'sora' | 'luma' | 'veo' | 'kling' | 'hailuo' | 'seedance' | 'wan' | 'pika' | 'pixverse' |
|
|
255
|
+
type VideoProvider = 'sora' | 'luma' | 'veo' | 'kling' | 'hailuo' | 'seedance' | 'wan' | 'pika' | 'pixverse' | (string & {});
|
|
254
256
|
declare class Video {
|
|
255
257
|
private transport;
|
|
256
258
|
constructor(transport: Transport);
|
|
@@ -260,6 +262,7 @@ declare class Video {
|
|
|
260
262
|
model?: string;
|
|
261
263
|
imageUrl?: string;
|
|
262
264
|
callbackUrl?: string;
|
|
265
|
+
async?: boolean;
|
|
263
266
|
wait?: boolean;
|
|
264
267
|
pollInterval?: number;
|
|
265
268
|
maxWait?: number;
|
|
@@ -405,6 +408,7 @@ declare class Images {
|
|
|
405
408
|
responseFormat?: string;
|
|
406
409
|
style?: string;
|
|
407
410
|
callbackUrl?: string;
|
|
411
|
+
async?: boolean;
|
|
408
412
|
[key: string]: unknown;
|
|
409
413
|
}): Promise<Record<string, unknown>>;
|
|
410
414
|
edit(opts: {
|
|
@@ -422,6 +426,7 @@ declare class Images {
|
|
|
422
426
|
size?: string;
|
|
423
427
|
responseFormat?: string;
|
|
424
428
|
callbackUrl?: string;
|
|
429
|
+
async?: boolean;
|
|
425
430
|
[key: string]: unknown;
|
|
426
431
|
}): Promise<Record<string, unknown>>;
|
|
427
432
|
}
|
|
@@ -511,12 +516,14 @@ declare class Veo {
|
|
|
511
516
|
aspectRatio?: '9:16' | '1:1' | '3:4' | '4:3' | '16:9';
|
|
512
517
|
imageUrls?: string[];
|
|
513
518
|
callbackUrl?: string;
|
|
519
|
+
async?: boolean;
|
|
514
520
|
[key: string]: unknown;
|
|
515
521
|
}): Promise<Record<string, unknown>>;
|
|
516
522
|
upsample(opts: {
|
|
517
523
|
videoId: string;
|
|
518
524
|
action: '1080p' | '4k' | 'gif';
|
|
519
525
|
callbackUrl?: string;
|
|
526
|
+
async?: boolean;
|
|
520
527
|
[key: string]: unknown;
|
|
521
528
|
}): Promise<Record<string, unknown>>;
|
|
522
529
|
extend(opts: {
|
|
@@ -524,12 +531,14 @@ declare class Veo {
|
|
|
524
531
|
model: 'veo31-fast' | 'veo31' | (string & {});
|
|
525
532
|
prompt?: string;
|
|
526
533
|
callbackUrl?: string;
|
|
534
|
+
async?: boolean;
|
|
527
535
|
[key: string]: unknown;
|
|
528
536
|
}): Promise<Record<string, unknown>>;
|
|
529
537
|
reshoot(opts: {
|
|
530
538
|
videoId: string;
|
|
531
539
|
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 & {});
|
|
532
540
|
callbackUrl?: string;
|
|
541
|
+
async?: boolean;
|
|
533
542
|
[key: string]: unknown;
|
|
534
543
|
}): Promise<Record<string, unknown>>;
|
|
535
544
|
objects(opts: {
|
|
@@ -538,6 +547,7 @@ declare class Veo {
|
|
|
538
547
|
prompt?: string;
|
|
539
548
|
imageMask?: string;
|
|
540
549
|
callbackUrl?: string;
|
|
550
|
+
async?: boolean;
|
|
541
551
|
[key: string]: unknown;
|
|
542
552
|
}): Promise<Record<string, unknown>>;
|
|
543
553
|
}
|
|
@@ -559,6 +569,7 @@ declare class Kling {
|
|
|
559
569
|
cfgScale?: number;
|
|
560
570
|
aspectRatio?: '16:9' | '9:16' | '1:1';
|
|
561
571
|
callbackUrl?: string;
|
|
572
|
+
async?: boolean;
|
|
562
573
|
endImageUrl?: string;
|
|
563
574
|
cameraControl?: string;
|
|
564
575
|
elementList?: unknown[];
|
|
@@ -575,6 +586,7 @@ declare class Kling {
|
|
|
575
586
|
keepOriginalSound?: 'yes' | 'no';
|
|
576
587
|
prompt?: string;
|
|
577
588
|
callbackUrl?: string;
|
|
589
|
+
async?: boolean;
|
|
578
590
|
[key: string]: unknown;
|
|
579
591
|
}): Promise<Record<string, unknown>>;
|
|
580
592
|
}
|
|
@@ -596,6 +608,7 @@ declare class WebExtrator {
|
|
|
596
608
|
headers?: Record<string, string>;
|
|
597
609
|
userAgent?: string;
|
|
598
610
|
callbackUrl?: string;
|
|
611
|
+
async?: boolean;
|
|
599
612
|
[key: string]: unknown;
|
|
600
613
|
}): Promise<Record<string, unknown>>;
|
|
601
614
|
render(opts: {
|
|
@@ -608,6 +621,7 @@ declare class WebExtrator {
|
|
|
608
621
|
headers?: Record<string, string>;
|
|
609
622
|
userAgent?: string;
|
|
610
623
|
callbackUrl?: string;
|
|
624
|
+
async?: boolean;
|
|
611
625
|
[key: string]: unknown;
|
|
612
626
|
}): Promise<Record<string, unknown>>;
|
|
613
627
|
}
|
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' | '
|
|
198
|
+
type ImageProvider = 'nano-banana' | 'flux' | 'seedream' | (string & {});
|
|
199
199
|
declare class Images$1 {
|
|
200
200
|
private transport;
|
|
201
201
|
constructor(transport: Transport);
|
|
@@ -210,6 +210,7 @@ declare class Images$1 {
|
|
|
210
210
|
aspectRatio?: string;
|
|
211
211
|
resolution?: string;
|
|
212
212
|
callbackUrl?: string;
|
|
213
|
+
async?: boolean;
|
|
213
214
|
wait?: boolean;
|
|
214
215
|
pollInterval?: number;
|
|
215
216
|
maxWait?: number;
|
|
@@ -241,6 +242,7 @@ declare class Audio {
|
|
|
241
242
|
model?: string;
|
|
242
243
|
tags?: string;
|
|
243
244
|
callbackUrl?: string;
|
|
245
|
+
async?: boolean;
|
|
244
246
|
wait?: boolean;
|
|
245
247
|
pollInterval?: number;
|
|
246
248
|
maxWait?: number;
|
|
@@ -250,7 +252,7 @@ declare class Audio {
|
|
|
250
252
|
|
|
251
253
|
/** Video generation resources. */
|
|
252
254
|
|
|
253
|
-
type VideoProvider = 'sora' | 'luma' | 'veo' | 'kling' | 'hailuo' | 'seedance' | 'wan' | 'pika' | 'pixverse' |
|
|
255
|
+
type VideoProvider = 'sora' | 'luma' | 'veo' | 'kling' | 'hailuo' | 'seedance' | 'wan' | 'pika' | 'pixverse' | (string & {});
|
|
254
256
|
declare class Video {
|
|
255
257
|
private transport;
|
|
256
258
|
constructor(transport: Transport);
|
|
@@ -260,6 +262,7 @@ declare class Video {
|
|
|
260
262
|
model?: string;
|
|
261
263
|
imageUrl?: string;
|
|
262
264
|
callbackUrl?: string;
|
|
265
|
+
async?: boolean;
|
|
263
266
|
wait?: boolean;
|
|
264
267
|
pollInterval?: number;
|
|
265
268
|
maxWait?: number;
|
|
@@ -405,6 +408,7 @@ declare class Images {
|
|
|
405
408
|
responseFormat?: string;
|
|
406
409
|
style?: string;
|
|
407
410
|
callbackUrl?: string;
|
|
411
|
+
async?: boolean;
|
|
408
412
|
[key: string]: unknown;
|
|
409
413
|
}): Promise<Record<string, unknown>>;
|
|
410
414
|
edit(opts: {
|
|
@@ -422,6 +426,7 @@ declare class Images {
|
|
|
422
426
|
size?: string;
|
|
423
427
|
responseFormat?: string;
|
|
424
428
|
callbackUrl?: string;
|
|
429
|
+
async?: boolean;
|
|
425
430
|
[key: string]: unknown;
|
|
426
431
|
}): Promise<Record<string, unknown>>;
|
|
427
432
|
}
|
|
@@ -511,12 +516,14 @@ declare class Veo {
|
|
|
511
516
|
aspectRatio?: '9:16' | '1:1' | '3:4' | '4:3' | '16:9';
|
|
512
517
|
imageUrls?: string[];
|
|
513
518
|
callbackUrl?: string;
|
|
519
|
+
async?: boolean;
|
|
514
520
|
[key: string]: unknown;
|
|
515
521
|
}): Promise<Record<string, unknown>>;
|
|
516
522
|
upsample(opts: {
|
|
517
523
|
videoId: string;
|
|
518
524
|
action: '1080p' | '4k' | 'gif';
|
|
519
525
|
callbackUrl?: string;
|
|
526
|
+
async?: boolean;
|
|
520
527
|
[key: string]: unknown;
|
|
521
528
|
}): Promise<Record<string, unknown>>;
|
|
522
529
|
extend(opts: {
|
|
@@ -524,12 +531,14 @@ declare class Veo {
|
|
|
524
531
|
model: 'veo31-fast' | 'veo31' | (string & {});
|
|
525
532
|
prompt?: string;
|
|
526
533
|
callbackUrl?: string;
|
|
534
|
+
async?: boolean;
|
|
527
535
|
[key: string]: unknown;
|
|
528
536
|
}): Promise<Record<string, unknown>>;
|
|
529
537
|
reshoot(opts: {
|
|
530
538
|
videoId: string;
|
|
531
539
|
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 & {});
|
|
532
540
|
callbackUrl?: string;
|
|
541
|
+
async?: boolean;
|
|
533
542
|
[key: string]: unknown;
|
|
534
543
|
}): Promise<Record<string, unknown>>;
|
|
535
544
|
objects(opts: {
|
|
@@ -538,6 +547,7 @@ declare class Veo {
|
|
|
538
547
|
prompt?: string;
|
|
539
548
|
imageMask?: string;
|
|
540
549
|
callbackUrl?: string;
|
|
550
|
+
async?: boolean;
|
|
541
551
|
[key: string]: unknown;
|
|
542
552
|
}): Promise<Record<string, unknown>>;
|
|
543
553
|
}
|
|
@@ -559,6 +569,7 @@ declare class Kling {
|
|
|
559
569
|
cfgScale?: number;
|
|
560
570
|
aspectRatio?: '16:9' | '9:16' | '1:1';
|
|
561
571
|
callbackUrl?: string;
|
|
572
|
+
async?: boolean;
|
|
562
573
|
endImageUrl?: string;
|
|
563
574
|
cameraControl?: string;
|
|
564
575
|
elementList?: unknown[];
|
|
@@ -575,6 +586,7 @@ declare class Kling {
|
|
|
575
586
|
keepOriginalSound?: 'yes' | 'no';
|
|
576
587
|
prompt?: string;
|
|
577
588
|
callbackUrl?: string;
|
|
589
|
+
async?: boolean;
|
|
578
590
|
[key: string]: unknown;
|
|
579
591
|
}): Promise<Record<string, unknown>>;
|
|
580
592
|
}
|
|
@@ -596,6 +608,7 @@ declare class WebExtrator {
|
|
|
596
608
|
headers?: Record<string, string>;
|
|
597
609
|
userAgent?: string;
|
|
598
610
|
callbackUrl?: string;
|
|
611
|
+
async?: boolean;
|
|
599
612
|
[key: string]: unknown;
|
|
600
613
|
}): Promise<Record<string, unknown>>;
|
|
601
614
|
render(opts: {
|
|
@@ -608,6 +621,7 @@ declare class WebExtrator {
|
|
|
608
621
|
headers?: Record<string, string>;
|
|
609
622
|
userAgent?: string;
|
|
610
623
|
callbackUrl?: string;
|
|
624
|
+
async?: boolean;
|
|
611
625
|
[key: string]: unknown;
|
|
612
626
|
}): Promise<Record<string, unknown>>;
|
|
613
627
|
}
|
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 =
|
|
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",
|