seacloud-sdk 0.12.4 → 0.12.5
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/cli.js +56 -50
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +9 -3
- package/dist/index.js +239 -196
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -90,6 +90,43 @@ async function getHostFromParent(timeout = 5e3) {
|
|
|
90
90
|
}
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
|
+
async function getEnvFromParent(timeout = 5e3) {
|
|
94
|
+
if (!isInIframe()) {
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
return new Promise((resolve) => {
|
|
98
|
+
const messageHandler = (event) => {
|
|
99
|
+
if (event.data && event.data.type === "seaverse:env") {
|
|
100
|
+
cleanup();
|
|
101
|
+
const env = event.data.payload?.env;
|
|
102
|
+
resolve(env || null);
|
|
103
|
+
} else if (event.data && event.data.type === "seaverse:error") {
|
|
104
|
+
cleanup();
|
|
105
|
+
console.warn("[SeaCloud SDK] Error getting env from parent:", event.data.error);
|
|
106
|
+
resolve(null);
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
const timeoutId = setTimeout(() => {
|
|
110
|
+
cleanup();
|
|
111
|
+
resolve(null);
|
|
112
|
+
}, timeout);
|
|
113
|
+
const cleanup = () => {
|
|
114
|
+
clearTimeout(timeoutId);
|
|
115
|
+
globalThis.window.removeEventListener("message", messageHandler);
|
|
116
|
+
};
|
|
117
|
+
globalThis.window.addEventListener("message", messageHandler);
|
|
118
|
+
try {
|
|
119
|
+
globalThis.window.parent.postMessage(
|
|
120
|
+
{ type: "seaverse:get_env" },
|
|
121
|
+
"*"
|
|
122
|
+
// 允许任何源,支持跨域场景
|
|
123
|
+
);
|
|
124
|
+
} catch (e) {
|
|
125
|
+
cleanup();
|
|
126
|
+
resolve(null);
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
}
|
|
93
130
|
async function getApiToken(providedApiKey) {
|
|
94
131
|
if (providedApiKey) {
|
|
95
132
|
return providedApiKey;
|
|
@@ -118,22 +155,34 @@ function checkIsDevelopmentHost(host) {
|
|
|
118
155
|
const devHostPatterns = ["localhost", "127.0.0.1", ":3000", ":8080", "seaverse.dev"];
|
|
119
156
|
return devHostPatterns.some((pattern) => host.includes(pattern));
|
|
120
157
|
}
|
|
121
|
-
function
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
const
|
|
130
|
-
if (
|
|
131
|
-
|
|
132
|
-
|
|
158
|
+
async function getBaseUrl(userBaseUrl) {
|
|
159
|
+
if (userBaseUrl) {
|
|
160
|
+
return userBaseUrl;
|
|
161
|
+
}
|
|
162
|
+
if (typeof process !== "undefined" && process.env?.SEACLOUD_BASE_URL) {
|
|
163
|
+
return process.env.SEACLOUD_BASE_URL;
|
|
164
|
+
}
|
|
165
|
+
if (isInIframe()) {
|
|
166
|
+
const parentEnv = await getEnvFromParent(3e3);
|
|
167
|
+
if (parentEnv === "develop") {
|
|
168
|
+
console.log("[SeaCloud SDK] iframe \u73AF\u5883\uFF1A\u7236\u9875\u9762\u8FD4\u56DE\u5F00\u53D1\u73AF\u5883\uFF0C\u4F7F\u7528\u5F00\u53D1 baseUrl");
|
|
169
|
+
return "https://proxy-rs.sg.seaverse.dev";
|
|
133
170
|
} else {
|
|
134
|
-
|
|
171
|
+
console.log("[SeaCloud SDK] iframe \u73AF\u5883\uFF1A\u4F7F\u7528\u7EBF\u4E0A baseUrl");
|
|
172
|
+
return "https://proxy-rs.seaverse.ai";
|
|
135
173
|
}
|
|
136
174
|
}
|
|
175
|
+
const currentHost = typeof globalThis !== "undefined" && typeof globalThis.window !== "undefined" ? globalThis.window.location.host : "";
|
|
176
|
+
if (checkIsDevelopmentHost(currentHost)) {
|
|
177
|
+
console.log("[SeaCloud SDK] \u68C0\u6D4B\u5230\u5F00\u53D1\u73AF\u5883\uFF08currentHost\uFF09\uFF0C\u4F7F\u7528\u5F00\u53D1 baseUrl");
|
|
178
|
+
return "https://proxy-rs.sg.seaverse.dev";
|
|
179
|
+
} else {
|
|
180
|
+
return "https://proxy-rs.seaverse.ai";
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
async function createConfig(options = {}) {
|
|
184
|
+
const apiKey = options.apiKey;
|
|
185
|
+
const baseUrl = await getBaseUrl(options.baseUrl);
|
|
137
186
|
const fetchImpl = options.fetch || (globalThis.fetch ? globalThis.fetch.bind(globalThis) : void 0);
|
|
138
187
|
if (!fetchImpl) {
|
|
139
188
|
throw new Error("fetch is not available. Please provide a fetch implementation in config or upgrade to Node.js 18+");
|
|
@@ -157,14 +206,14 @@ function validateConfig(config) {
|
|
|
157
206
|
}
|
|
158
207
|
|
|
159
208
|
// src/core/version.ts
|
|
160
|
-
var VERSION = "0.
|
|
209
|
+
var VERSION = "0.12.5";
|
|
161
210
|
|
|
162
211
|
// src/core/client.ts
|
|
163
|
-
var SeacloudClient = class {
|
|
212
|
+
var SeacloudClient = class _SeacloudClient {
|
|
164
213
|
// 保存用户提供的 apiKey
|
|
165
|
-
constructor(config
|
|
166
|
-
this.config =
|
|
167
|
-
this.providedApiKey =
|
|
214
|
+
constructor(config, providedApiKey) {
|
|
215
|
+
this.config = config;
|
|
216
|
+
this.providedApiKey = providedApiKey;
|
|
168
217
|
validateConfig(this.config);
|
|
169
218
|
const isBrowser = typeof globalThis.window !== "undefined" && typeof globalThis.localStorage !== "undefined";
|
|
170
219
|
if (isBrowser) {
|
|
@@ -178,6 +227,15 @@ var SeacloudClient = class {
|
|
|
178
227
|
});
|
|
179
228
|
}
|
|
180
229
|
}
|
|
230
|
+
/**
|
|
231
|
+
* 创建 SeacloudClient 实例(异步工厂方法)
|
|
232
|
+
* @param config 配置选项
|
|
233
|
+
* @returns SeacloudClient 实例
|
|
234
|
+
*/
|
|
235
|
+
static async create(config = {}) {
|
|
236
|
+
const fullConfig = await createConfig(config);
|
|
237
|
+
return new _SeacloudClient(fullConfig, config.apiKey);
|
|
238
|
+
}
|
|
181
239
|
/**
|
|
182
240
|
* 创建一个新任务
|
|
183
241
|
* @param endpoint API 端点路径(例如:/model/tasks)
|
|
@@ -302,24 +360,9 @@ async function initSeacloud(apiKeyOrConfig, options) {
|
|
|
302
360
|
apiKey = void 0;
|
|
303
361
|
}
|
|
304
362
|
if (!config.baseUrl) {
|
|
305
|
-
|
|
306
|
-
const parentHost = await getHostFromParent(3e3);
|
|
307
|
-
if (parentHost) {
|
|
308
|
-
const currentHost = typeof globalThis !== "undefined" && typeof globalThis.window !== "undefined" ? globalThis.window.location.host : "";
|
|
309
|
-
const isDevelopment = checkIsDevelopmentHost(currentHost) || checkIsDevelopmentHost(parentHost);
|
|
310
|
-
if (isDevelopment) {
|
|
311
|
-
config.baseUrl = "https://proxy-rs.sg.seaverse.dev";
|
|
312
|
-
console.log("[SeaCloud SDK] \u68C0\u6D4B\u5230\u5F00\u53D1\u73AF\u5883\uFF0C\u4F7F\u7528\u5F00\u53D1 baseUrl:", config.baseUrl);
|
|
313
|
-
} else {
|
|
314
|
-
config.baseUrl = "https://proxy-rs.seaverse.ai";
|
|
315
|
-
console.log("[SeaCloud SDK] \u68C0\u6D4B\u5230\u6B63\u5F0F\u73AF\u5883\uFF0C\u4F7F\u7528\u6B63\u5F0F baseUrl:", config.baseUrl);
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
} catch (error) {
|
|
319
|
-
console.warn("[SeaCloud SDK] \u83B7\u53D6\u7236\u9875\u9762 host \u5931\u8D25\uFF0C\u4F7F\u7528\u9ED8\u8BA4\u914D\u7F6E", error);
|
|
320
|
-
}
|
|
363
|
+
config.baseUrl = await getBaseUrl();
|
|
321
364
|
}
|
|
322
|
-
globalConfig.client =
|
|
365
|
+
globalConfig.client = await SeacloudClient.create({
|
|
323
366
|
apiKey: apiKey || "",
|
|
324
367
|
baseUrl: config.baseUrl,
|
|
325
368
|
timeout: config.timeout,
|
|
@@ -333,11 +376,11 @@ async function initSeacloud(apiKeyOrConfig, options) {
|
|
|
333
376
|
}
|
|
334
377
|
return globalConfig.client;
|
|
335
378
|
}
|
|
336
|
-
function getClient() {
|
|
379
|
+
async function getClient() {
|
|
337
380
|
if (globalConfig.client) {
|
|
338
381
|
return globalConfig.client;
|
|
339
382
|
}
|
|
340
|
-
return
|
|
383
|
+
return await SeacloudClient.create({
|
|
341
384
|
// 不传 apiKey - 让 createConfig() 自动从环境变量/localStorage 读取
|
|
342
385
|
// 不传 baseUrl - 让 createConfig() 自动从环境变量读取或使用默认值
|
|
343
386
|
// 不传 timeout - 使用默认 30000ms
|
|
@@ -465,13 +508,13 @@ async function createAndWaitTask(client, endpoint, body, options = {}) {
|
|
|
465
508
|
|
|
466
509
|
// src/core/index.ts
|
|
467
510
|
async function getTaskStatus(endpoint, taskId) {
|
|
468
|
-
const client = getClient();
|
|
511
|
+
const client = await getClient();
|
|
469
512
|
return client.getTaskStatus(endpoint, taskId);
|
|
470
513
|
}
|
|
471
514
|
|
|
472
515
|
// src/api/alibaba_animate_anyone_detect.ts
|
|
473
516
|
async function alibabaAnimateAnyoneDetect(params) {
|
|
474
|
-
const client = getClient();
|
|
517
|
+
const client = await getClient();
|
|
475
518
|
const pollingOptions = {
|
|
476
519
|
intervalMs: 3e3,
|
|
477
520
|
maxAttempts: 60
|
|
@@ -506,7 +549,7 @@ async function alibabaAnimateAnyoneDetect(params) {
|
|
|
506
549
|
|
|
507
550
|
// src/api/alibaba_animate_anyone_template.ts
|
|
508
551
|
async function alibabaAnimateAnyoneTemplate(params) {
|
|
509
|
-
const client = getClient();
|
|
552
|
+
const client = await getClient();
|
|
510
553
|
const pollingOptions = {
|
|
511
554
|
intervalMs: 3e3,
|
|
512
555
|
maxAttempts: 60
|
|
@@ -541,7 +584,7 @@ async function alibabaAnimateAnyoneTemplate(params) {
|
|
|
541
584
|
|
|
542
585
|
// src/api/alibaba_animate_anyone_video.ts
|
|
543
586
|
async function alibabaAnimateAnyoneVideo(params) {
|
|
544
|
-
const client = getClient();
|
|
587
|
+
const client = await getClient();
|
|
545
588
|
const pollingOptions = {
|
|
546
589
|
intervalMs: 5e3,
|
|
547
590
|
maxAttempts: 120
|
|
@@ -576,7 +619,7 @@ async function alibabaAnimateAnyoneVideo(params) {
|
|
|
576
619
|
|
|
577
620
|
// src/api/alibaba_qianwen_image.ts
|
|
578
621
|
async function alibabaQianwenImage(params) {
|
|
579
|
-
const client = getClient();
|
|
622
|
+
const client = await getClient();
|
|
580
623
|
const pollingOptions = {
|
|
581
624
|
intervalMs: 3e3,
|
|
582
625
|
maxAttempts: 60
|
|
@@ -611,7 +654,7 @@ async function alibabaQianwenImage(params) {
|
|
|
611
654
|
|
|
612
655
|
// src/api/alibaba_wan22_t2i_flash.ts
|
|
613
656
|
async function alibabaWan22T2iFlash(params) {
|
|
614
|
-
const client = getClient();
|
|
657
|
+
const client = await getClient();
|
|
615
658
|
const pollingOptions = {
|
|
616
659
|
intervalMs: 3e3,
|
|
617
660
|
maxAttempts: 60
|
|
@@ -646,7 +689,7 @@ async function alibabaWan22T2iFlash(params) {
|
|
|
646
689
|
|
|
647
690
|
// src/api/alibaba_wan22_t2i_plus.ts
|
|
648
691
|
async function alibabaWan22T2iPlus(params) {
|
|
649
|
-
const client = getClient();
|
|
692
|
+
const client = await getClient();
|
|
650
693
|
const pollingOptions = {
|
|
651
694
|
intervalMs: 3e3,
|
|
652
695
|
maxAttempts: 60
|
|
@@ -707,7 +750,7 @@ function validateResources(resources, resourceType = "resource") {
|
|
|
707
750
|
|
|
708
751
|
// src/api/alibaba_wan25_i2i_preview.ts
|
|
709
752
|
async function alibabaWan25I2iPreview(params) {
|
|
710
|
-
const client = getClient();
|
|
753
|
+
const client = await getClient();
|
|
711
754
|
const pollingOptions = {
|
|
712
755
|
intervalMs: 3e3,
|
|
713
756
|
maxAttempts: 60
|
|
@@ -743,7 +786,7 @@ async function alibabaWan25I2iPreview(params) {
|
|
|
743
786
|
|
|
744
787
|
// src/api/alibaba_wan25_t2i_preview.ts
|
|
745
788
|
async function alibabaWan25T2iPreview(params) {
|
|
746
|
-
const client = getClient();
|
|
789
|
+
const client = await getClient();
|
|
747
790
|
const pollingOptions = {
|
|
748
791
|
intervalMs: 3e3,
|
|
749
792
|
maxAttempts: 60
|
|
@@ -779,7 +822,7 @@ async function alibabaWan25T2iPreview(params) {
|
|
|
779
822
|
|
|
780
823
|
// src/api/alibaba_wanx20_t2i_turbo.ts
|
|
781
824
|
async function alibabaWanx20T2iTurbo(params) {
|
|
782
|
-
const client = getClient();
|
|
825
|
+
const client = await getClient();
|
|
783
826
|
const pollingOptions = {
|
|
784
827
|
intervalMs: 3e3,
|
|
785
828
|
maxAttempts: 60
|
|
@@ -814,7 +857,7 @@ async function alibabaWanx20T2iTurbo(params) {
|
|
|
814
857
|
|
|
815
858
|
// src/api/alibaba_wanx21_i2v_plus.ts
|
|
816
859
|
async function alibabaWanx21I2vPlus(params) {
|
|
817
|
-
const client = getClient();
|
|
860
|
+
const client = await getClient();
|
|
818
861
|
const pollingOptions = {
|
|
819
862
|
intervalMs: 5e3,
|
|
820
863
|
maxAttempts: 120
|
|
@@ -849,7 +892,7 @@ async function alibabaWanx21I2vPlus(params) {
|
|
|
849
892
|
|
|
850
893
|
// src/api/alibaba_wanx21_i2v_turbo.ts
|
|
851
894
|
async function alibabaWanx21I2vTurbo(params) {
|
|
852
|
-
const client = getClient();
|
|
895
|
+
const client = await getClient();
|
|
853
896
|
const pollingOptions = {
|
|
854
897
|
intervalMs: 5e3,
|
|
855
898
|
maxAttempts: 120
|
|
@@ -884,7 +927,7 @@ async function alibabaWanx21I2vTurbo(params) {
|
|
|
884
927
|
|
|
885
928
|
// src/api/alibaba_wanx21_t2i_plus.ts
|
|
886
929
|
async function alibabaWanx21T2iPlus(params) {
|
|
887
|
-
const client = getClient();
|
|
930
|
+
const client = await getClient();
|
|
888
931
|
const pollingOptions = {
|
|
889
932
|
intervalMs: 3e3,
|
|
890
933
|
maxAttempts: 60
|
|
@@ -919,7 +962,7 @@ async function alibabaWanx21T2iPlus(params) {
|
|
|
919
962
|
|
|
920
963
|
// src/api/alibaba_wanx21_t2i_turbo.ts
|
|
921
964
|
async function alibabaWanx21T2iTurbo(params) {
|
|
922
|
-
const client = getClient();
|
|
965
|
+
const client = await getClient();
|
|
923
966
|
const pollingOptions = {
|
|
924
967
|
intervalMs: 3e3,
|
|
925
968
|
maxAttempts: 60
|
|
@@ -954,7 +997,7 @@ async function alibabaWanx21T2iTurbo(params) {
|
|
|
954
997
|
|
|
955
998
|
// src/api/alibaba_wanx21_t2v_plus.ts
|
|
956
999
|
async function alibabaWanx21T2vPlus(params) {
|
|
957
|
-
const client = getClient();
|
|
1000
|
+
const client = await getClient();
|
|
958
1001
|
const pollingOptions = {
|
|
959
1002
|
intervalMs: 5e3,
|
|
960
1003
|
maxAttempts: 120
|
|
@@ -989,7 +1032,7 @@ async function alibabaWanx21T2vPlus(params) {
|
|
|
989
1032
|
|
|
990
1033
|
// src/api/alibaba_wanx21_t2v_turbo.ts
|
|
991
1034
|
async function alibabaWanx21T2vTurbo(params) {
|
|
992
|
-
const client = getClient();
|
|
1035
|
+
const client = await getClient();
|
|
993
1036
|
const pollingOptions = {
|
|
994
1037
|
intervalMs: 5e3,
|
|
995
1038
|
maxAttempts: 120
|
|
@@ -1024,7 +1067,7 @@ async function alibabaWanx21T2vTurbo(params) {
|
|
|
1024
1067
|
|
|
1025
1068
|
// src/api/alibaba_wanx22_i2v_flash.ts
|
|
1026
1069
|
async function alibabaWanx22I2vFlash(params) {
|
|
1027
|
-
const client = getClient();
|
|
1070
|
+
const client = await getClient();
|
|
1028
1071
|
const pollingOptions = {
|
|
1029
1072
|
intervalMs: 5e3,
|
|
1030
1073
|
maxAttempts: 120
|
|
@@ -1059,7 +1102,7 @@ async function alibabaWanx22I2vFlash(params) {
|
|
|
1059
1102
|
|
|
1060
1103
|
// src/api/alibaba_wanx22_i2v_plus.ts
|
|
1061
1104
|
async function alibabaWanx22I2vPlus(params) {
|
|
1062
|
-
const client = getClient();
|
|
1105
|
+
const client = await getClient();
|
|
1063
1106
|
const pollingOptions = {
|
|
1064
1107
|
intervalMs: 5e3,
|
|
1065
1108
|
maxAttempts: 120
|
|
@@ -1094,7 +1137,7 @@ async function alibabaWanx22I2vPlus(params) {
|
|
|
1094
1137
|
|
|
1095
1138
|
// src/api/alibaba_wanx22_t2v_plus.ts
|
|
1096
1139
|
async function alibabaWanx22T2vPlus(params) {
|
|
1097
|
-
const client = getClient();
|
|
1140
|
+
const client = await getClient();
|
|
1098
1141
|
const pollingOptions = {
|
|
1099
1142
|
intervalMs: 5e3,
|
|
1100
1143
|
maxAttempts: 120
|
|
@@ -1129,7 +1172,7 @@ async function alibabaWanx22T2vPlus(params) {
|
|
|
1129
1172
|
|
|
1130
1173
|
// src/api/alibaba_wanx25_i2v_preview.ts
|
|
1131
1174
|
async function alibabaWanx25I2vPreview(params) {
|
|
1132
|
-
const client = getClient();
|
|
1175
|
+
const client = await getClient();
|
|
1133
1176
|
const pollingOptions = {
|
|
1134
1177
|
intervalMs: 5e3,
|
|
1135
1178
|
maxAttempts: 120
|
|
@@ -1165,7 +1208,7 @@ async function alibabaWanx25I2vPreview(params) {
|
|
|
1165
1208
|
|
|
1166
1209
|
// src/api/alibaba_wanx25_t2v_preview.ts
|
|
1167
1210
|
async function alibabaWanx25T2vPreview(params) {
|
|
1168
|
-
const client = getClient();
|
|
1211
|
+
const client = await getClient();
|
|
1169
1212
|
const pollingOptions = {
|
|
1170
1213
|
intervalMs: 5e3,
|
|
1171
1214
|
maxAttempts: 120
|
|
@@ -1201,7 +1244,7 @@ async function alibabaWanx25T2vPreview(params) {
|
|
|
1201
1244
|
|
|
1202
1245
|
// src/api/alibaba_wanx26_i2v.ts
|
|
1203
1246
|
async function alibabaWanx26I2v(params) {
|
|
1204
|
-
const client = getClient();
|
|
1247
|
+
const client = await getClient();
|
|
1205
1248
|
const pollingOptions = {
|
|
1206
1249
|
intervalMs: 5e3,
|
|
1207
1250
|
maxAttempts: 120
|
|
@@ -1236,7 +1279,7 @@ async function alibabaWanx26I2v(params) {
|
|
|
1236
1279
|
|
|
1237
1280
|
// src/api/alibaba_wanx26_reference.ts
|
|
1238
1281
|
async function alibabaWanx26Reference(params) {
|
|
1239
|
-
const client = getClient();
|
|
1282
|
+
const client = await getClient();
|
|
1240
1283
|
const pollingOptions = {
|
|
1241
1284
|
intervalMs: 3e3,
|
|
1242
1285
|
maxAttempts: 60
|
|
@@ -1271,7 +1314,7 @@ async function alibabaWanx26Reference(params) {
|
|
|
1271
1314
|
|
|
1272
1315
|
// src/api/alibaba_wanx26_t2v.ts
|
|
1273
1316
|
async function alibabaWanx26T2v(params) {
|
|
1274
|
-
const client = getClient();
|
|
1317
|
+
const client = await getClient();
|
|
1275
1318
|
const pollingOptions = {
|
|
1276
1319
|
intervalMs: 5e3,
|
|
1277
1320
|
maxAttempts: 120
|
|
@@ -1306,7 +1349,7 @@ async function alibabaWanx26T2v(params) {
|
|
|
1306
1349
|
|
|
1307
1350
|
// src/api/blackforestlabs_flux_11_pro.ts
|
|
1308
1351
|
async function blackforestlabsFlux11Pro(params) {
|
|
1309
|
-
const client = getClient();
|
|
1352
|
+
const client = await getClient();
|
|
1310
1353
|
const pollingOptions = {
|
|
1311
1354
|
intervalMs: 3e3,
|
|
1312
1355
|
maxAttempts: 60
|
|
@@ -1341,7 +1384,7 @@ async function blackforestlabsFlux11Pro(params) {
|
|
|
1341
1384
|
|
|
1342
1385
|
// src/api/blackforestlabs_flux_1_pro.ts
|
|
1343
1386
|
async function blackforestlabsFlux1Pro(params) {
|
|
1344
|
-
const client = getClient();
|
|
1387
|
+
const client = await getClient();
|
|
1345
1388
|
const pollingOptions = {
|
|
1346
1389
|
intervalMs: 3e3,
|
|
1347
1390
|
maxAttempts: 60
|
|
@@ -1376,7 +1419,7 @@ async function blackforestlabsFlux1Pro(params) {
|
|
|
1376
1419
|
|
|
1377
1420
|
// src/api/blackforestlabs_flux_2_flex.ts
|
|
1378
1421
|
async function blackforestlabsFlux2Flex(params) {
|
|
1379
|
-
const client = getClient();
|
|
1422
|
+
const client = await getClient();
|
|
1380
1423
|
const pollingOptions = {
|
|
1381
1424
|
intervalMs: 3e3,
|
|
1382
1425
|
maxAttempts: 60
|
|
@@ -1411,7 +1454,7 @@ async function blackforestlabsFlux2Flex(params) {
|
|
|
1411
1454
|
|
|
1412
1455
|
// src/api/blackforestlabs_flux_2_flex_edit.ts
|
|
1413
1456
|
async function blackforestlabsFlux2FlexEdit(params) {
|
|
1414
|
-
const client = getClient();
|
|
1457
|
+
const client = await getClient();
|
|
1415
1458
|
const pollingOptions = {
|
|
1416
1459
|
intervalMs: 3e3,
|
|
1417
1460
|
maxAttempts: 60
|
|
@@ -1446,7 +1489,7 @@ async function blackforestlabsFlux2FlexEdit(params) {
|
|
|
1446
1489
|
|
|
1447
1490
|
// src/api/blackforestlabs_flux_2_pro.ts
|
|
1448
1491
|
async function blackforestlabsFlux2Pro(params) {
|
|
1449
|
-
const client = getClient();
|
|
1492
|
+
const client = await getClient();
|
|
1450
1493
|
const pollingOptions = {
|
|
1451
1494
|
intervalMs: 3e3,
|
|
1452
1495
|
maxAttempts: 60
|
|
@@ -1481,7 +1524,7 @@ async function blackforestlabsFlux2Pro(params) {
|
|
|
1481
1524
|
|
|
1482
1525
|
// src/api/blackforestlabs_flux_2_pro_edit.ts
|
|
1483
1526
|
async function blackforestlabsFlux2ProEdit(params) {
|
|
1484
|
-
const client = getClient();
|
|
1527
|
+
const client = await getClient();
|
|
1485
1528
|
const pollingOptions = {
|
|
1486
1529
|
intervalMs: 3e3,
|
|
1487
1530
|
maxAttempts: 60
|
|
@@ -1516,7 +1559,7 @@ async function blackforestlabsFlux2ProEdit(params) {
|
|
|
1516
1559
|
|
|
1517
1560
|
// src/api/blackforestlabs_flux_kontext_max.ts
|
|
1518
1561
|
async function blackforestlabsFluxKontextMax(params) {
|
|
1519
|
-
const client = getClient();
|
|
1562
|
+
const client = await getClient();
|
|
1520
1563
|
const pollingOptions = {
|
|
1521
1564
|
intervalMs: 3e3,
|
|
1522
1565
|
maxAttempts: 60
|
|
@@ -1551,7 +1594,7 @@ async function blackforestlabsFluxKontextMax(params) {
|
|
|
1551
1594
|
|
|
1552
1595
|
// src/api/blackforestlabs_flux_kontext_pro.ts
|
|
1553
1596
|
async function blackforestlabsFluxKontextPro(params) {
|
|
1554
|
-
const client = getClient();
|
|
1597
|
+
const client = await getClient();
|
|
1555
1598
|
const pollingOptions = {
|
|
1556
1599
|
intervalMs: 3e3,
|
|
1557
1600
|
maxAttempts: 60
|
|
@@ -1586,7 +1629,7 @@ async function blackforestlabsFluxKontextPro(params) {
|
|
|
1586
1629
|
|
|
1587
1630
|
// src/api/elevenlabs_tts_generator.ts
|
|
1588
1631
|
async function elevenlabsTtsGenerator(params) {
|
|
1589
|
-
const client = getClient();
|
|
1632
|
+
const client = await getClient();
|
|
1590
1633
|
const pollingOptions = {
|
|
1591
1634
|
intervalMs: 2e3,
|
|
1592
1635
|
maxAttempts: 60
|
|
@@ -1621,7 +1664,7 @@ async function elevenlabsTtsGenerator(params) {
|
|
|
1621
1664
|
|
|
1622
1665
|
// src/api/google_gemini3_pro_image.ts
|
|
1623
1666
|
async function googleGemini3ProImage(params) {
|
|
1624
|
-
const client = getClient();
|
|
1667
|
+
const client = await getClient();
|
|
1625
1668
|
const pollingOptions = {
|
|
1626
1669
|
intervalMs: 3e3,
|
|
1627
1670
|
maxAttempts: 60
|
|
@@ -1657,7 +1700,7 @@ async function googleGemini3ProImage(params) {
|
|
|
1657
1700
|
|
|
1658
1701
|
// src/api/google_gemini_image.ts
|
|
1659
1702
|
async function googleGeminiImage(params) {
|
|
1660
|
-
const client = getClient();
|
|
1703
|
+
const client = await getClient();
|
|
1661
1704
|
const pollingOptions = {
|
|
1662
1705
|
intervalMs: 3e3,
|
|
1663
1706
|
maxAttempts: 60
|
|
@@ -1704,7 +1747,7 @@ async function googleGeminiImage(params) {
|
|
|
1704
1747
|
|
|
1705
1748
|
// src/api/google_imagen_4_fast_generate.ts
|
|
1706
1749
|
async function googleImagen4FastGenerate(params) {
|
|
1707
|
-
const client = getClient();
|
|
1750
|
+
const client = await getClient();
|
|
1708
1751
|
const pollingOptions = {
|
|
1709
1752
|
intervalMs: 3e3,
|
|
1710
1753
|
maxAttempts: 60
|
|
@@ -1739,7 +1782,7 @@ async function googleImagen4FastGenerate(params) {
|
|
|
1739
1782
|
|
|
1740
1783
|
// src/api/google_imagen_4_generate.ts
|
|
1741
1784
|
async function googleImagen4Generate(params) {
|
|
1742
|
-
const client = getClient();
|
|
1785
|
+
const client = await getClient();
|
|
1743
1786
|
const pollingOptions = {
|
|
1744
1787
|
intervalMs: 3e3,
|
|
1745
1788
|
maxAttempts: 60
|
|
@@ -1774,7 +1817,7 @@ async function googleImagen4Generate(params) {
|
|
|
1774
1817
|
|
|
1775
1818
|
// src/api/google_imagen_4_ultra_generate.ts
|
|
1776
1819
|
async function googleImagen4UltraGenerate(params) {
|
|
1777
|
-
const client = getClient();
|
|
1820
|
+
const client = await getClient();
|
|
1778
1821
|
const pollingOptions = {
|
|
1779
1822
|
intervalMs: 3e3,
|
|
1780
1823
|
maxAttempts: 60
|
|
@@ -1809,7 +1852,7 @@ async function googleImagen4UltraGenerate(params) {
|
|
|
1809
1852
|
|
|
1810
1853
|
// src/api/google_veo_20_generate_001.ts
|
|
1811
1854
|
async function googleVeo20Generate001(params) {
|
|
1812
|
-
const client = getClient();
|
|
1855
|
+
const client = await getClient();
|
|
1813
1856
|
const pollingOptions = {
|
|
1814
1857
|
intervalMs: 3e3,
|
|
1815
1858
|
maxAttempts: 60
|
|
@@ -1844,7 +1887,7 @@ async function googleVeo20Generate001(params) {
|
|
|
1844
1887
|
|
|
1845
1888
|
// src/api/google_veo_20_generate_exp.ts
|
|
1846
1889
|
async function googleVeo20GenerateExp(params) {
|
|
1847
|
-
const client = getClient();
|
|
1890
|
+
const client = await getClient();
|
|
1848
1891
|
const pollingOptions = {
|
|
1849
1892
|
intervalMs: 3e3,
|
|
1850
1893
|
maxAttempts: 60
|
|
@@ -1879,7 +1922,7 @@ async function googleVeo20GenerateExp(params) {
|
|
|
1879
1922
|
|
|
1880
1923
|
// src/api/google_veo_20_generate_preview.ts
|
|
1881
1924
|
async function googleVeo20GeneratePreview(params) {
|
|
1882
|
-
const client = getClient();
|
|
1925
|
+
const client = await getClient();
|
|
1883
1926
|
const pollingOptions = {
|
|
1884
1927
|
intervalMs: 3e3,
|
|
1885
1928
|
maxAttempts: 60
|
|
@@ -1914,7 +1957,7 @@ async function googleVeo20GeneratePreview(params) {
|
|
|
1914
1957
|
|
|
1915
1958
|
// src/api/google_veo_30_fast_generate_001.ts
|
|
1916
1959
|
async function googleVeo30FastGenerate001(params) {
|
|
1917
|
-
const client = getClient();
|
|
1960
|
+
const client = await getClient();
|
|
1918
1961
|
const pollingOptions = {
|
|
1919
1962
|
intervalMs: 3e3,
|
|
1920
1963
|
maxAttempts: 60
|
|
@@ -1949,7 +1992,7 @@ async function googleVeo30FastGenerate001(params) {
|
|
|
1949
1992
|
|
|
1950
1993
|
// src/api/google_veo_30_generate_001.ts
|
|
1951
1994
|
async function googleVeo30Generate001(params) {
|
|
1952
|
-
const client = getClient();
|
|
1995
|
+
const client = await getClient();
|
|
1953
1996
|
const pollingOptions = {
|
|
1954
1997
|
intervalMs: 3e3,
|
|
1955
1998
|
maxAttempts: 60
|
|
@@ -1984,7 +2027,7 @@ async function googleVeo30Generate001(params) {
|
|
|
1984
2027
|
|
|
1985
2028
|
// src/api/google_veo_31.ts
|
|
1986
2029
|
async function googleVeo31(params) {
|
|
1987
|
-
const client = getClient();
|
|
2030
|
+
const client = await getClient();
|
|
1988
2031
|
const pollingOptions = {
|
|
1989
2032
|
intervalMs: 3e3,
|
|
1990
2033
|
maxAttempts: 60
|
|
@@ -2019,7 +2062,7 @@ async function googleVeo31(params) {
|
|
|
2019
2062
|
|
|
2020
2063
|
// src/api/kling_avatar.ts
|
|
2021
2064
|
async function klingAvatar(params) {
|
|
2022
|
-
const client = getClient();
|
|
2065
|
+
const client = await getClient();
|
|
2023
2066
|
const pollingOptions = {
|
|
2024
2067
|
intervalMs: 5e3,
|
|
2025
2068
|
maxAttempts: 120
|
|
@@ -2054,7 +2097,7 @@ async function klingAvatar(params) {
|
|
|
2054
2097
|
|
|
2055
2098
|
// src/api/kling_duration_extension.ts
|
|
2056
2099
|
async function klingDurationExtension(params) {
|
|
2057
|
-
const client = getClient();
|
|
2100
|
+
const client = await getClient();
|
|
2058
2101
|
const pollingOptions = {
|
|
2059
2102
|
intervalMs: 3e3,
|
|
2060
2103
|
maxAttempts: 60
|
|
@@ -2089,7 +2132,7 @@ async function klingDurationExtension(params) {
|
|
|
2089
2132
|
|
|
2090
2133
|
// src/api/kling_effects_multi_v1.ts
|
|
2091
2134
|
async function klingEffectsMultiV1(params) {
|
|
2092
|
-
const client = getClient();
|
|
2135
|
+
const client = await getClient();
|
|
2093
2136
|
const pollingOptions = {
|
|
2094
2137
|
intervalMs: 3e3,
|
|
2095
2138
|
maxAttempts: 60
|
|
@@ -2124,7 +2167,7 @@ async function klingEffectsMultiV1(params) {
|
|
|
2124
2167
|
|
|
2125
2168
|
// src/api/kling_effects_multi_v15.ts
|
|
2126
2169
|
async function klingEffectsMultiV15(params) {
|
|
2127
|
-
const client = getClient();
|
|
2170
|
+
const client = await getClient();
|
|
2128
2171
|
const pollingOptions = {
|
|
2129
2172
|
intervalMs: 3e3,
|
|
2130
2173
|
maxAttempts: 60
|
|
@@ -2159,7 +2202,7 @@ async function klingEffectsMultiV15(params) {
|
|
|
2159
2202
|
|
|
2160
2203
|
// src/api/kling_effects_multi_v16.ts
|
|
2161
2204
|
async function klingEffectsMultiV16(params) {
|
|
2162
|
-
const client = getClient();
|
|
2205
|
+
const client = await getClient();
|
|
2163
2206
|
const pollingOptions = {
|
|
2164
2207
|
intervalMs: 3e3,
|
|
2165
2208
|
maxAttempts: 60
|
|
@@ -2194,7 +2237,7 @@ async function klingEffectsMultiV16(params) {
|
|
|
2194
2237
|
|
|
2195
2238
|
// src/api/kling_effects_single.ts
|
|
2196
2239
|
async function klingEffectsSingle(params) {
|
|
2197
|
-
const client = getClient();
|
|
2240
|
+
const client = await getClient();
|
|
2198
2241
|
const pollingOptions = {
|
|
2199
2242
|
intervalMs: 3e3,
|
|
2200
2243
|
maxAttempts: 60
|
|
@@ -2229,7 +2272,7 @@ async function klingEffectsSingle(params) {
|
|
|
2229
2272
|
|
|
2230
2273
|
// src/api/kling_lipsync.ts
|
|
2231
2274
|
async function klingLipsync(params) {
|
|
2232
|
-
const client = getClient();
|
|
2275
|
+
const client = await getClient();
|
|
2233
2276
|
const pollingOptions = {
|
|
2234
2277
|
intervalMs: 5e3,
|
|
2235
2278
|
maxAttempts: 120
|
|
@@ -2264,7 +2307,7 @@ async function klingLipsync(params) {
|
|
|
2264
2307
|
|
|
2265
2308
|
// src/api/kling_omni_image.ts
|
|
2266
2309
|
async function klingOmniImage(params) {
|
|
2267
|
-
const client = getClient();
|
|
2310
|
+
const client = await getClient();
|
|
2268
2311
|
const pollingOptions = {
|
|
2269
2312
|
intervalMs: 3e3,
|
|
2270
2313
|
maxAttempts: 60
|
|
@@ -2299,7 +2342,7 @@ async function klingOmniImage(params) {
|
|
|
2299
2342
|
|
|
2300
2343
|
// src/api/kling_omni_video.ts
|
|
2301
2344
|
async function klingOmniVideo(params) {
|
|
2302
|
-
const client = getClient();
|
|
2345
|
+
const client = await getClient();
|
|
2303
2346
|
const pollingOptions = {
|
|
2304
2347
|
intervalMs: 5e3,
|
|
2305
2348
|
maxAttempts: 120
|
|
@@ -2334,7 +2377,7 @@ async function klingOmniVideo(params) {
|
|
|
2334
2377
|
|
|
2335
2378
|
// src/api/kling_v1.ts
|
|
2336
2379
|
async function klingV1(params) {
|
|
2337
|
-
const client = getClient();
|
|
2380
|
+
const client = await getClient();
|
|
2338
2381
|
const pollingOptions = {
|
|
2339
2382
|
intervalMs: 3e3,
|
|
2340
2383
|
maxAttempts: 60
|
|
@@ -2369,7 +2412,7 @@ async function klingV1(params) {
|
|
|
2369
2412
|
|
|
2370
2413
|
// src/api/kling_v1_5.ts
|
|
2371
2414
|
async function klingV15(params) {
|
|
2372
|
-
const client = getClient();
|
|
2415
|
+
const client = await getClient();
|
|
2373
2416
|
const pollingOptions = {
|
|
2374
2417
|
intervalMs: 3e3,
|
|
2375
2418
|
maxAttempts: 60
|
|
@@ -2404,7 +2447,7 @@ async function klingV15(params) {
|
|
|
2404
2447
|
|
|
2405
2448
|
// src/api/kling_v1_5_i2v.ts
|
|
2406
2449
|
async function klingV15I2v(params) {
|
|
2407
|
-
const client = getClient();
|
|
2450
|
+
const client = await getClient();
|
|
2408
2451
|
const pollingOptions = {
|
|
2409
2452
|
intervalMs: 5e3,
|
|
2410
2453
|
maxAttempts: 120
|
|
@@ -2439,7 +2482,7 @@ async function klingV15I2v(params) {
|
|
|
2439
2482
|
|
|
2440
2483
|
// src/api/kling_v1_6.ts
|
|
2441
2484
|
async function klingV16(params) {
|
|
2442
|
-
const client = getClient();
|
|
2485
|
+
const client = await getClient();
|
|
2443
2486
|
const pollingOptions = {
|
|
2444
2487
|
intervalMs: 3e3,
|
|
2445
2488
|
maxAttempts: 60
|
|
@@ -2474,7 +2517,7 @@ async function klingV16(params) {
|
|
|
2474
2517
|
|
|
2475
2518
|
// src/api/kling_v1_6_i2v.ts
|
|
2476
2519
|
async function klingV16I2v(params) {
|
|
2477
|
-
const client = getClient();
|
|
2520
|
+
const client = await getClient();
|
|
2478
2521
|
const pollingOptions = {
|
|
2479
2522
|
intervalMs: 5e3,
|
|
2480
2523
|
maxAttempts: 120
|
|
@@ -2509,7 +2552,7 @@ async function klingV16I2v(params) {
|
|
|
2509
2552
|
|
|
2510
2553
|
// src/api/kling_v1_i2v.ts
|
|
2511
2554
|
async function klingV1I2v(params) {
|
|
2512
|
-
const client = getClient();
|
|
2555
|
+
const client = await getClient();
|
|
2513
2556
|
const pollingOptions = {
|
|
2514
2557
|
intervalMs: 5e3,
|
|
2515
2558
|
maxAttempts: 120
|
|
@@ -2544,7 +2587,7 @@ async function klingV1I2v(params) {
|
|
|
2544
2587
|
|
|
2545
2588
|
// src/api/kling_v2_1_i2v.ts
|
|
2546
2589
|
async function klingV21I2v(params) {
|
|
2547
|
-
const client = getClient();
|
|
2590
|
+
const client = await getClient();
|
|
2548
2591
|
const pollingOptions = {
|
|
2549
2592
|
intervalMs: 5e3,
|
|
2550
2593
|
maxAttempts: 120
|
|
@@ -2579,7 +2622,7 @@ async function klingV21I2v(params) {
|
|
|
2579
2622
|
|
|
2580
2623
|
// src/api/kling_v2_1_master.ts
|
|
2581
2624
|
async function klingV21Master(params) {
|
|
2582
|
-
const client = getClient();
|
|
2625
|
+
const client = await getClient();
|
|
2583
2626
|
const pollingOptions = {
|
|
2584
2627
|
intervalMs: 3e3,
|
|
2585
2628
|
maxAttempts: 60
|
|
@@ -2614,7 +2657,7 @@ async function klingV21Master(params) {
|
|
|
2614
2657
|
|
|
2615
2658
|
// src/api/kling_v2_1_master_i2v.ts
|
|
2616
2659
|
async function klingV21MasterI2v(params) {
|
|
2617
|
-
const client = getClient();
|
|
2660
|
+
const client = await getClient();
|
|
2618
2661
|
const pollingOptions = {
|
|
2619
2662
|
intervalMs: 5e3,
|
|
2620
2663
|
maxAttempts: 120
|
|
@@ -2649,7 +2692,7 @@ async function klingV21MasterI2v(params) {
|
|
|
2649
2692
|
|
|
2650
2693
|
// src/api/kling_v2_5_turbo.ts
|
|
2651
2694
|
async function klingV25Turbo(params) {
|
|
2652
|
-
const client = getClient();
|
|
2695
|
+
const client = await getClient();
|
|
2653
2696
|
const pollingOptions = {
|
|
2654
2697
|
intervalMs: 3e3,
|
|
2655
2698
|
maxAttempts: 60
|
|
@@ -2684,7 +2727,7 @@ async function klingV25Turbo(params) {
|
|
|
2684
2727
|
|
|
2685
2728
|
// src/api/kling_v2_5_turbo_i2v.ts
|
|
2686
2729
|
async function klingV25TurboI2v(params) {
|
|
2687
|
-
const client = getClient();
|
|
2730
|
+
const client = await getClient();
|
|
2688
2731
|
const pollingOptions = {
|
|
2689
2732
|
intervalMs: 5e3,
|
|
2690
2733
|
maxAttempts: 120
|
|
@@ -2719,7 +2762,7 @@ async function klingV25TurboI2v(params) {
|
|
|
2719
2762
|
|
|
2720
2763
|
// src/api/kling_v2_6.ts
|
|
2721
2764
|
async function klingV26(params) {
|
|
2722
|
-
const client = getClient();
|
|
2765
|
+
const client = await getClient();
|
|
2723
2766
|
const pollingOptions = {
|
|
2724
2767
|
intervalMs: 3e3,
|
|
2725
2768
|
maxAttempts: 60
|
|
@@ -2754,7 +2797,7 @@ async function klingV26(params) {
|
|
|
2754
2797
|
|
|
2755
2798
|
// src/api/kling_v2_6_i2v.ts
|
|
2756
2799
|
async function klingV26I2v(params) {
|
|
2757
|
-
const client = getClient();
|
|
2800
|
+
const client = await getClient();
|
|
2758
2801
|
const pollingOptions = {
|
|
2759
2802
|
intervalMs: 5e3,
|
|
2760
2803
|
maxAttempts: 120
|
|
@@ -2789,7 +2832,7 @@ async function klingV26I2v(params) {
|
|
|
2789
2832
|
|
|
2790
2833
|
// src/api/kling_v2_master.ts
|
|
2791
2834
|
async function klingV2Master(params) {
|
|
2792
|
-
const client = getClient();
|
|
2835
|
+
const client = await getClient();
|
|
2793
2836
|
const pollingOptions = {
|
|
2794
2837
|
intervalMs: 3e3,
|
|
2795
2838
|
maxAttempts: 60
|
|
@@ -2824,7 +2867,7 @@ async function klingV2Master(params) {
|
|
|
2824
2867
|
|
|
2825
2868
|
// src/api/kling_v2_master_i2v.ts
|
|
2826
2869
|
async function klingV2MasterI2v(params) {
|
|
2827
|
-
const client = getClient();
|
|
2870
|
+
const client = await getClient();
|
|
2828
2871
|
const pollingOptions = {
|
|
2829
2872
|
intervalMs: 5e3,
|
|
2830
2873
|
maxAttempts: 120
|
|
@@ -2859,7 +2902,7 @@ async function klingV2MasterI2v(params) {
|
|
|
2859
2902
|
|
|
2860
2903
|
// src/api/microsoft_gpt_image_1.ts
|
|
2861
2904
|
async function microsoftGptImage1(params) {
|
|
2862
|
-
const client = getClient();
|
|
2905
|
+
const client = await getClient();
|
|
2863
2906
|
const pollingOptions = {
|
|
2864
2907
|
intervalMs: 3e3,
|
|
2865
2908
|
maxAttempts: 60
|
|
@@ -2894,7 +2937,7 @@ async function microsoftGptImage1(params) {
|
|
|
2894
2937
|
|
|
2895
2938
|
// src/api/microsoft_gpt_image_15.ts
|
|
2896
2939
|
async function microsoftGptImage15(params) {
|
|
2897
|
-
const client = getClient();
|
|
2940
|
+
const client = await getClient();
|
|
2898
2941
|
const pollingOptions = {
|
|
2899
2942
|
intervalMs: 3e3,
|
|
2900
2943
|
maxAttempts: 60
|
|
@@ -2929,7 +2972,7 @@ async function microsoftGptImage15(params) {
|
|
|
2929
2972
|
|
|
2930
2973
|
// src/api/microsoft_sora2.ts
|
|
2931
2974
|
async function microsoftSora2(params) {
|
|
2932
|
-
const client = getClient();
|
|
2975
|
+
const client = await getClient();
|
|
2933
2976
|
const pollingOptions = {
|
|
2934
2977
|
intervalMs: 3e3,
|
|
2935
2978
|
maxAttempts: 60
|
|
@@ -2964,7 +3007,7 @@ async function microsoftSora2(params) {
|
|
|
2964
3007
|
|
|
2965
3008
|
// src/api/minimax_hailuo_02.ts
|
|
2966
3009
|
async function minimaxHailuo02(params) {
|
|
2967
|
-
const client = getClient();
|
|
3010
|
+
const client = await getClient();
|
|
2968
3011
|
const pollingOptions = {
|
|
2969
3012
|
intervalMs: 3e3,
|
|
2970
3013
|
maxAttempts: 60
|
|
@@ -2999,7 +3042,7 @@ async function minimaxHailuo02(params) {
|
|
|
2999
3042
|
|
|
3000
3043
|
// src/api/minimax_hailuo_02_i2v.ts
|
|
3001
3044
|
async function minimaxHailuo02I2v(params) {
|
|
3002
|
-
const client = getClient();
|
|
3045
|
+
const client = await getClient();
|
|
3003
3046
|
const pollingOptions = {
|
|
3004
3047
|
intervalMs: 5e3,
|
|
3005
3048
|
maxAttempts: 120
|
|
@@ -3034,7 +3077,7 @@ async function minimaxHailuo02I2v(params) {
|
|
|
3034
3077
|
|
|
3035
3078
|
// src/api/minimax_hailuo_23_fast_i2v.ts
|
|
3036
3079
|
async function minimaxHailuo23FastI2v(params) {
|
|
3037
|
-
const client = getClient();
|
|
3080
|
+
const client = await getClient();
|
|
3038
3081
|
const pollingOptions = {
|
|
3039
3082
|
intervalMs: 5e3,
|
|
3040
3083
|
maxAttempts: 120
|
|
@@ -3069,7 +3112,7 @@ async function minimaxHailuo23FastI2v(params) {
|
|
|
3069
3112
|
|
|
3070
3113
|
// src/api/minimax_hailuo_23_i2v.ts
|
|
3071
3114
|
async function minimaxHailuo23I2v(params) {
|
|
3072
|
-
const client = getClient();
|
|
3115
|
+
const client = await getClient();
|
|
3073
3116
|
const pollingOptions = {
|
|
3074
3117
|
intervalMs: 5e3,
|
|
3075
3118
|
maxAttempts: 120
|
|
@@ -3104,7 +3147,7 @@ async function minimaxHailuo23I2v(params) {
|
|
|
3104
3147
|
|
|
3105
3148
|
// src/api/minimax_i2v_01.ts
|
|
3106
3149
|
async function minimaxI2v01(params) {
|
|
3107
|
-
const client = getClient();
|
|
3150
|
+
const client = await getClient();
|
|
3108
3151
|
const pollingOptions = {
|
|
3109
3152
|
intervalMs: 5e3,
|
|
3110
3153
|
maxAttempts: 120
|
|
@@ -3139,7 +3182,7 @@ async function minimaxI2v01(params) {
|
|
|
3139
3182
|
|
|
3140
3183
|
// src/api/minimax_i2v_01_director.ts
|
|
3141
3184
|
async function minimaxI2v01Director(params) {
|
|
3142
|
-
const client = getClient();
|
|
3185
|
+
const client = await getClient();
|
|
3143
3186
|
const pollingOptions = {
|
|
3144
3187
|
intervalMs: 5e3,
|
|
3145
3188
|
maxAttempts: 120
|
|
@@ -3174,7 +3217,7 @@ async function minimaxI2v01Director(params) {
|
|
|
3174
3217
|
|
|
3175
3218
|
// src/api/minimax_i2v_01_live.ts
|
|
3176
3219
|
async function minimaxI2v01Live(params) {
|
|
3177
|
-
const client = getClient();
|
|
3220
|
+
const client = await getClient();
|
|
3178
3221
|
const pollingOptions = {
|
|
3179
3222
|
intervalMs: 5e3,
|
|
3180
3223
|
maxAttempts: 120
|
|
@@ -3209,7 +3252,7 @@ async function minimaxI2v01Live(params) {
|
|
|
3209
3252
|
|
|
3210
3253
|
// src/api/minimax_t2a.ts
|
|
3211
3254
|
async function minimaxT2a(params) {
|
|
3212
|
-
const client = getClient();
|
|
3255
|
+
const client = await getClient();
|
|
3213
3256
|
const pollingOptions = {
|
|
3214
3257
|
intervalMs: 3e3,
|
|
3215
3258
|
maxAttempts: 60
|
|
@@ -3244,7 +3287,7 @@ async function minimaxT2a(params) {
|
|
|
3244
3287
|
|
|
3245
3288
|
// src/api/minimax_t2v_01.ts
|
|
3246
3289
|
async function minimaxT2v01(params) {
|
|
3247
|
-
const client = getClient();
|
|
3290
|
+
const client = await getClient();
|
|
3248
3291
|
const pollingOptions = {
|
|
3249
3292
|
intervalMs: 5e3,
|
|
3250
3293
|
maxAttempts: 120
|
|
@@ -3279,7 +3322,7 @@ async function minimaxT2v01(params) {
|
|
|
3279
3322
|
|
|
3280
3323
|
// src/api/minimax_t2v_01_director.ts
|
|
3281
3324
|
async function minimaxT2v01Director(params) {
|
|
3282
|
-
const client = getClient();
|
|
3325
|
+
const client = await getClient();
|
|
3283
3326
|
const pollingOptions = {
|
|
3284
3327
|
intervalMs: 5e3,
|
|
3285
3328
|
maxAttempts: 120
|
|
@@ -3314,7 +3357,7 @@ async function minimaxT2v01Director(params) {
|
|
|
3314
3357
|
|
|
3315
3358
|
// src/api/pixverse_v35_transition.ts
|
|
3316
3359
|
async function pixverseV35Transition(params) {
|
|
3317
|
-
const client = getClient();
|
|
3360
|
+
const client = await getClient();
|
|
3318
3361
|
const pollingOptions = {
|
|
3319
3362
|
intervalMs: 3e3,
|
|
3320
3363
|
maxAttempts: 60
|
|
@@ -3349,7 +3392,7 @@ async function pixverseV35Transition(params) {
|
|
|
3349
3392
|
|
|
3350
3393
|
// src/api/pixverse_v3_5_i2v.ts
|
|
3351
3394
|
async function pixverseV35I2v(params) {
|
|
3352
|
-
const client = getClient();
|
|
3395
|
+
const client = await getClient();
|
|
3353
3396
|
const pollingOptions = {
|
|
3354
3397
|
intervalMs: 5e3,
|
|
3355
3398
|
maxAttempts: 120
|
|
@@ -3384,7 +3427,7 @@ async function pixverseV35I2v(params) {
|
|
|
3384
3427
|
|
|
3385
3428
|
// src/api/pixverse_v3_5_t2v.ts
|
|
3386
3429
|
async function pixverseV35T2v(params) {
|
|
3387
|
-
const client = getClient();
|
|
3430
|
+
const client = await getClient();
|
|
3388
3431
|
const pollingOptions = {
|
|
3389
3432
|
intervalMs: 5e3,
|
|
3390
3433
|
maxAttempts: 120
|
|
@@ -3419,7 +3462,7 @@ async function pixverseV35T2v(params) {
|
|
|
3419
3462
|
|
|
3420
3463
|
// src/api/pixverse_v45_transition.ts
|
|
3421
3464
|
async function pixverseV45Transition(params) {
|
|
3422
|
-
const client = getClient();
|
|
3465
|
+
const client = await getClient();
|
|
3423
3466
|
const pollingOptions = {
|
|
3424
3467
|
intervalMs: 3e3,
|
|
3425
3468
|
maxAttempts: 60
|
|
@@ -3454,7 +3497,7 @@ async function pixverseV45Transition(params) {
|
|
|
3454
3497
|
|
|
3455
3498
|
// src/api/pixverse_v4_5_i2v.ts
|
|
3456
3499
|
async function pixverseV45I2v(params) {
|
|
3457
|
-
const client = getClient();
|
|
3500
|
+
const client = await getClient();
|
|
3458
3501
|
const pollingOptions = {
|
|
3459
3502
|
intervalMs: 5e3,
|
|
3460
3503
|
maxAttempts: 120
|
|
@@ -3489,7 +3532,7 @@ async function pixverseV45I2v(params) {
|
|
|
3489
3532
|
|
|
3490
3533
|
// src/api/pixverse_v4_5_t2v.ts
|
|
3491
3534
|
async function pixverseV45T2v(params) {
|
|
3492
|
-
const client = getClient();
|
|
3535
|
+
const client = await getClient();
|
|
3493
3536
|
const pollingOptions = {
|
|
3494
3537
|
intervalMs: 5e3,
|
|
3495
3538
|
maxAttempts: 120
|
|
@@ -3524,7 +3567,7 @@ async function pixverseV45T2v(params) {
|
|
|
3524
3567
|
|
|
3525
3568
|
// src/api/pixverse_v4_i2v.ts
|
|
3526
3569
|
async function pixverseV4I2v(params) {
|
|
3527
|
-
const client = getClient();
|
|
3570
|
+
const client = await getClient();
|
|
3528
3571
|
const pollingOptions = {
|
|
3529
3572
|
intervalMs: 5e3,
|
|
3530
3573
|
maxAttempts: 120
|
|
@@ -3559,7 +3602,7 @@ async function pixverseV4I2v(params) {
|
|
|
3559
3602
|
|
|
3560
3603
|
// src/api/pixverse_v4_t2v.ts
|
|
3561
3604
|
async function pixverseV4T2v(params) {
|
|
3562
|
-
const client = getClient();
|
|
3605
|
+
const client = await getClient();
|
|
3563
3606
|
const pollingOptions = {
|
|
3564
3607
|
intervalMs: 5e3,
|
|
3565
3608
|
maxAttempts: 120
|
|
@@ -3594,7 +3637,7 @@ async function pixverseV4T2v(params) {
|
|
|
3594
3637
|
|
|
3595
3638
|
// src/api/pixverse_v4_transition.ts
|
|
3596
3639
|
async function pixverseV4Transition(params) {
|
|
3597
|
-
const client = getClient();
|
|
3640
|
+
const client = await getClient();
|
|
3598
3641
|
const pollingOptions = {
|
|
3599
3642
|
intervalMs: 3e3,
|
|
3600
3643
|
maxAttempts: 60
|
|
@@ -3629,7 +3672,7 @@ async function pixverseV4Transition(params) {
|
|
|
3629
3672
|
|
|
3630
3673
|
// src/api/pixverse_v5_5_i2v.ts
|
|
3631
3674
|
async function pixverseV55I2v(params) {
|
|
3632
|
-
const client = getClient();
|
|
3675
|
+
const client = await getClient();
|
|
3633
3676
|
const pollingOptions = {
|
|
3634
3677
|
intervalMs: 5e3,
|
|
3635
3678
|
maxAttempts: 120
|
|
@@ -3664,7 +3707,7 @@ async function pixverseV55I2v(params) {
|
|
|
3664
3707
|
|
|
3665
3708
|
// src/api/pixverse_v5_5_t2v.ts
|
|
3666
3709
|
async function pixverseV55T2v(params) {
|
|
3667
|
-
const client = getClient();
|
|
3710
|
+
const client = await getClient();
|
|
3668
3711
|
const pollingOptions = {
|
|
3669
3712
|
intervalMs: 5e3,
|
|
3670
3713
|
maxAttempts: 120
|
|
@@ -3699,7 +3742,7 @@ async function pixverseV55T2v(params) {
|
|
|
3699
3742
|
|
|
3700
3743
|
// src/api/pixverse_v5_5_transition.ts
|
|
3701
3744
|
async function pixverseV55Transition(params) {
|
|
3702
|
-
const client = getClient();
|
|
3745
|
+
const client = await getClient();
|
|
3703
3746
|
const pollingOptions = {
|
|
3704
3747
|
intervalMs: 3e3,
|
|
3705
3748
|
maxAttempts: 60
|
|
@@ -3734,7 +3777,7 @@ async function pixverseV55Transition(params) {
|
|
|
3734
3777
|
|
|
3735
3778
|
// src/api/pixverse_v5_i2v.ts
|
|
3736
3779
|
async function pixverseV5I2v(params) {
|
|
3737
|
-
const client = getClient();
|
|
3780
|
+
const client = await getClient();
|
|
3738
3781
|
const pollingOptions = {
|
|
3739
3782
|
intervalMs: 5e3,
|
|
3740
3783
|
maxAttempts: 120
|
|
@@ -3769,7 +3812,7 @@ async function pixverseV5I2v(params) {
|
|
|
3769
3812
|
|
|
3770
3813
|
// src/api/pixverse_v5_t2v.ts
|
|
3771
3814
|
async function pixverseV5T2v(params) {
|
|
3772
|
-
const client = getClient();
|
|
3815
|
+
const client = await getClient();
|
|
3773
3816
|
const pollingOptions = {
|
|
3774
3817
|
intervalMs: 5e3,
|
|
3775
3818
|
maxAttempts: 120
|
|
@@ -3804,7 +3847,7 @@ async function pixverseV5T2v(params) {
|
|
|
3804
3847
|
|
|
3805
3848
|
// src/api/pixverse_v5_transition.ts
|
|
3806
3849
|
async function pixverseV5Transition(params) {
|
|
3807
|
-
const client = getClient();
|
|
3850
|
+
const client = await getClient();
|
|
3808
3851
|
const pollingOptions = {
|
|
3809
3852
|
intervalMs: 3e3,
|
|
3810
3853
|
maxAttempts: 60
|
|
@@ -3839,7 +3882,7 @@ async function pixverseV5Transition(params) {
|
|
|
3839
3882
|
|
|
3840
3883
|
// src/api/quick_app_background_remover_standard.ts
|
|
3841
3884
|
async function quickAppBackgroundRemoverStandard(params) {
|
|
3842
|
-
const client = getClient();
|
|
3885
|
+
const client = await getClient();
|
|
3843
3886
|
const inputs = [
|
|
3844
3887
|
{ field: "image", value: params.imageUrl }
|
|
3845
3888
|
];
|
|
@@ -3886,7 +3929,7 @@ async function quickAppBackgroundRemoverStandard(params) {
|
|
|
3886
3929
|
|
|
3887
3930
|
// src/api/runway_gen3a_turbo_i2v.ts
|
|
3888
3931
|
async function runwayGen3aTurboI2v(params) {
|
|
3889
|
-
const client = getClient();
|
|
3932
|
+
const client = await getClient();
|
|
3890
3933
|
const pollingOptions = {
|
|
3891
3934
|
intervalMs: 5e3,
|
|
3892
3935
|
maxAttempts: 120
|
|
@@ -3921,7 +3964,7 @@ async function runwayGen3aTurboI2v(params) {
|
|
|
3921
3964
|
|
|
3922
3965
|
// src/api/tencent_hunyuan_3d.ts
|
|
3923
3966
|
async function tencentHunyuan3d(params) {
|
|
3924
|
-
const client = getClient();
|
|
3967
|
+
const client = await getClient();
|
|
3925
3968
|
const pollingOptions = {
|
|
3926
3969
|
intervalMs: 4e3,
|
|
3927
3970
|
maxAttempts: 90
|
|
@@ -3956,7 +3999,7 @@ async function tencentHunyuan3d(params) {
|
|
|
3956
3999
|
|
|
3957
4000
|
// src/api/tencent_hunyuan_3d_pro.ts
|
|
3958
4001
|
async function tencentHunyuan3dPro(params) {
|
|
3959
|
-
const client = getClient();
|
|
4002
|
+
const client = await getClient();
|
|
3960
4003
|
const pollingOptions = {
|
|
3961
4004
|
intervalMs: 4e3,
|
|
3962
4005
|
maxAttempts: 90
|
|
@@ -3991,7 +4034,7 @@ async function tencentHunyuan3dPro(params) {
|
|
|
3991
4034
|
|
|
3992
4035
|
// src/api/tencent_hunyuan_3d_rapid.ts
|
|
3993
4036
|
async function tencentHunyuan3dRapid(params) {
|
|
3994
|
-
const client = getClient();
|
|
4037
|
+
const client = await getClient();
|
|
3995
4038
|
const pollingOptions = {
|
|
3996
4039
|
intervalMs: 4e3,
|
|
3997
4040
|
maxAttempts: 90
|
|
@@ -4026,7 +4069,7 @@ async function tencentHunyuan3dRapid(params) {
|
|
|
4026
4069
|
|
|
4027
4070
|
// src/api/tencent_image_creation_3.ts
|
|
4028
4071
|
async function tencentImageCreation3(params) {
|
|
4029
|
-
const client = getClient();
|
|
4072
|
+
const client = await getClient();
|
|
4030
4073
|
const pollingOptions = {
|
|
4031
4074
|
intervalMs: 3e3,
|
|
4032
4075
|
maxAttempts: 60
|
|
@@ -4061,7 +4104,7 @@ async function tencentImageCreation3(params) {
|
|
|
4061
4104
|
|
|
4062
4105
|
// src/api/tencent_mps_super_resolution.ts
|
|
4063
4106
|
async function tencentMpsSuperResolution(params) {
|
|
4064
|
-
const client = getClient();
|
|
4107
|
+
const client = await getClient();
|
|
4065
4108
|
const pollingOptions = {
|
|
4066
4109
|
intervalMs: 3e3,
|
|
4067
4110
|
maxAttempts: 60
|
|
@@ -4096,7 +4139,7 @@ async function tencentMpsSuperResolution(params) {
|
|
|
4096
4139
|
|
|
4097
4140
|
// src/api/app_search.ts
|
|
4098
4141
|
async function appSearch(params) {
|
|
4099
|
-
const client = getClient();
|
|
4142
|
+
const client = await getClient();
|
|
4100
4143
|
const config = client.getConfig();
|
|
4101
4144
|
const url = `${config.baseUrl}/model/v1/template/specs`;
|
|
4102
4145
|
const controller = new AbortController();
|
|
@@ -4133,7 +4176,7 @@ var templateSpecs = appSearch;
|
|
|
4133
4176
|
|
|
4134
4177
|
// src/api/vidu_15.ts
|
|
4135
4178
|
async function vidu15(params) {
|
|
4136
|
-
const client = getClient();
|
|
4179
|
+
const client = await getClient();
|
|
4137
4180
|
const pollingOptions = {
|
|
4138
4181
|
intervalMs: 3e3,
|
|
4139
4182
|
maxAttempts: 60
|
|
@@ -4168,7 +4211,7 @@ async function vidu15(params) {
|
|
|
4168
4211
|
|
|
4169
4212
|
// src/api/vidu_15_i2v.ts
|
|
4170
4213
|
async function vidu15I2v(params) {
|
|
4171
|
-
const client = getClient();
|
|
4214
|
+
const client = await getClient();
|
|
4172
4215
|
const pollingOptions = {
|
|
4173
4216
|
intervalMs: 5e3,
|
|
4174
4217
|
maxAttempts: 120
|
|
@@ -4203,7 +4246,7 @@ async function vidu15I2v(params) {
|
|
|
4203
4246
|
|
|
4204
4247
|
// src/api/vidu_20_i2v.ts
|
|
4205
4248
|
async function vidu20I2v(params) {
|
|
4206
|
-
const client = getClient();
|
|
4249
|
+
const client = await getClient();
|
|
4207
4250
|
const pollingOptions = {
|
|
4208
4251
|
intervalMs: 5e3,
|
|
4209
4252
|
maxAttempts: 120
|
|
@@ -4238,7 +4281,7 @@ async function vidu20I2v(params) {
|
|
|
4238
4281
|
|
|
4239
4282
|
// src/api/vidu_q1.ts
|
|
4240
4283
|
async function viduQ1(params) {
|
|
4241
|
-
const client = getClient();
|
|
4284
|
+
const client = await getClient();
|
|
4242
4285
|
const pollingOptions = {
|
|
4243
4286
|
intervalMs: 3e3,
|
|
4244
4287
|
maxAttempts: 60
|
|
@@ -4273,7 +4316,7 @@ async function viduQ1(params) {
|
|
|
4273
4316
|
|
|
4274
4317
|
// src/api/vidu_q1_i2v.ts
|
|
4275
4318
|
async function viduQ1I2v(params) {
|
|
4276
|
-
const client = getClient();
|
|
4319
|
+
const client = await getClient();
|
|
4277
4320
|
const pollingOptions = {
|
|
4278
4321
|
intervalMs: 5e3,
|
|
4279
4322
|
maxAttempts: 120
|
|
@@ -4308,7 +4351,7 @@ async function viduQ1I2v(params) {
|
|
|
4308
4351
|
|
|
4309
4352
|
// src/api/vidu_q2.ts
|
|
4310
4353
|
async function viduQ2(params) {
|
|
4311
|
-
const client = getClient();
|
|
4354
|
+
const client = await getClient();
|
|
4312
4355
|
const pollingOptions = {
|
|
4313
4356
|
intervalMs: 3e3,
|
|
4314
4357
|
maxAttempts: 60
|
|
@@ -4343,7 +4386,7 @@ async function viduQ2(params) {
|
|
|
4343
4386
|
|
|
4344
4387
|
// src/api/viduq2_i2v_reference.ts
|
|
4345
4388
|
async function viduQ2I2vReference(params) {
|
|
4346
|
-
const client = getClient();
|
|
4389
|
+
const client = await getClient();
|
|
4347
4390
|
if (params.images && params.subjects) {
|
|
4348
4391
|
throw new Error("images \u548C subjects \u53C2\u6570\u4E92\u65A5\uFF0C\u53EA\u80FD\u9009\u62E9\u5176\u4E2D\u4E00\u4E2A");
|
|
4349
4392
|
}
|
|
@@ -4386,7 +4429,7 @@ async function viduQ2I2vReference(params) {
|
|
|
4386
4429
|
|
|
4387
4430
|
// src/api/vidu_template.ts
|
|
4388
4431
|
async function viduTemplate(params) {
|
|
4389
|
-
const client = getClient();
|
|
4432
|
+
const client = await getClient();
|
|
4390
4433
|
const pollingOptions = {
|
|
4391
4434
|
intervalMs: 3e3,
|
|
4392
4435
|
maxAttempts: 60
|
|
@@ -4421,7 +4464,7 @@ async function viduTemplate(params) {
|
|
|
4421
4464
|
|
|
4422
4465
|
// src/api/vidu_template_v2.ts
|
|
4423
4466
|
async function viduTemplateV2(params) {
|
|
4424
|
-
const client = getClient();
|
|
4467
|
+
const client = await getClient();
|
|
4425
4468
|
const pollingOptions = {
|
|
4426
4469
|
intervalMs: 3e3,
|
|
4427
4470
|
maxAttempts: 60
|
|
@@ -4456,7 +4499,7 @@ async function viduTemplateV2(params) {
|
|
|
4456
4499
|
|
|
4457
4500
|
// src/api/volces_jimeng_3_0.ts
|
|
4458
4501
|
async function volcesJimeng30(params) {
|
|
4459
|
-
const client = getClient();
|
|
4502
|
+
const client = await getClient();
|
|
4460
4503
|
const pollingOptions = {
|
|
4461
4504
|
intervalMs: 3e3,
|
|
4462
4505
|
maxAttempts: 60
|
|
@@ -4491,7 +4534,7 @@ async function volcesJimeng30(params) {
|
|
|
4491
4534
|
|
|
4492
4535
|
// src/api/volces_jimeng_3_1.ts
|
|
4493
4536
|
async function volcesJimeng31(params) {
|
|
4494
|
-
const client = getClient();
|
|
4537
|
+
const client = await getClient();
|
|
4495
4538
|
const pollingOptions = {
|
|
4496
4539
|
intervalMs: 3e3,
|
|
4497
4540
|
maxAttempts: 60
|
|
@@ -4526,7 +4569,7 @@ async function volcesJimeng31(params) {
|
|
|
4526
4569
|
|
|
4527
4570
|
// src/api/volces_jimeng_dream_actor_m1.ts
|
|
4528
4571
|
async function volcesJimengDreamActorM1(params) {
|
|
4529
|
-
const client = getClient();
|
|
4572
|
+
const client = await getClient();
|
|
4530
4573
|
const pollingOptions = {
|
|
4531
4574
|
intervalMs: 3e3,
|
|
4532
4575
|
maxAttempts: 60
|
|
@@ -4561,7 +4604,7 @@ async function volcesJimengDreamActorM1(params) {
|
|
|
4561
4604
|
|
|
4562
4605
|
// src/api/volces_jimeng_i2i_3_0.ts
|
|
4563
4606
|
async function volcesJimengI2i30(params) {
|
|
4564
|
-
const client = getClient();
|
|
4607
|
+
const client = await getClient();
|
|
4565
4608
|
const pollingOptions = {
|
|
4566
4609
|
intervalMs: 3e3,
|
|
4567
4610
|
maxAttempts: 60
|
|
@@ -4596,7 +4639,7 @@ async function volcesJimengI2i30(params) {
|
|
|
4596
4639
|
|
|
4597
4640
|
// src/api/volces_realman_avatar_imitator_v2v.ts
|
|
4598
4641
|
async function volcesRealmanAvatarImitatorV2v(params) {
|
|
4599
|
-
const client = getClient();
|
|
4642
|
+
const client = await getClient();
|
|
4600
4643
|
const pollingOptions = {
|
|
4601
4644
|
intervalMs: 5e3,
|
|
4602
4645
|
maxAttempts: 120
|
|
@@ -4631,7 +4674,7 @@ async function volcesRealmanAvatarImitatorV2v(params) {
|
|
|
4631
4674
|
|
|
4632
4675
|
// src/api/volces_realman_avatar_picture_omni_v15.ts
|
|
4633
4676
|
async function volcesRealmanAvatarPictureOmniV15(params) {
|
|
4634
|
-
const client = getClient();
|
|
4677
|
+
const client = await getClient();
|
|
4635
4678
|
const pollingOptions = {
|
|
4636
4679
|
intervalMs: 5e3,
|
|
4637
4680
|
maxAttempts: 120
|
|
@@ -4666,7 +4709,7 @@ async function volcesRealmanAvatarPictureOmniV15(params) {
|
|
|
4666
4709
|
|
|
4667
4710
|
// src/api/volces_realman_avatar_picture_omni_v2.ts
|
|
4668
4711
|
async function volcesRealmanAvatarPictureOmniV2(params) {
|
|
4669
|
-
const client = getClient();
|
|
4712
|
+
const client = await getClient();
|
|
4670
4713
|
const pollingOptions = {
|
|
4671
4714
|
intervalMs: 5e3,
|
|
4672
4715
|
maxAttempts: 120
|
|
@@ -4701,7 +4744,7 @@ async function volcesRealmanAvatarPictureOmniV2(params) {
|
|
|
4701
4744
|
|
|
4702
4745
|
// src/api/volces_seed3d.ts
|
|
4703
4746
|
async function volcesSeed3d(params) {
|
|
4704
|
-
const client = getClient();
|
|
4747
|
+
const client = await getClient();
|
|
4705
4748
|
const pollingOptions = {
|
|
4706
4749
|
intervalMs: 4e3,
|
|
4707
4750
|
maxAttempts: 90
|
|
@@ -4736,7 +4779,7 @@ async function volcesSeed3d(params) {
|
|
|
4736
4779
|
|
|
4737
4780
|
// src/api/volces_seedance_30_i2v.ts
|
|
4738
4781
|
async function volcesSeedance30I2v(params) {
|
|
4739
|
-
const client = getClient();
|
|
4782
|
+
const client = await getClient();
|
|
4740
4783
|
const pollingOptions = {
|
|
4741
4784
|
intervalMs: 5e3,
|
|
4742
4785
|
maxAttempts: 120
|
|
@@ -4771,7 +4814,7 @@ async function volcesSeedance30I2v(params) {
|
|
|
4771
4814
|
|
|
4772
4815
|
// src/api/volces_seedance_3_0.ts
|
|
4773
4816
|
async function volcesSeedance30(params) {
|
|
4774
|
-
const client = getClient();
|
|
4817
|
+
const client = await getClient();
|
|
4775
4818
|
const pollingOptions = {
|
|
4776
4819
|
intervalMs: 3e3,
|
|
4777
4820
|
maxAttempts: 60
|
|
@@ -4806,7 +4849,7 @@ async function volcesSeedance30(params) {
|
|
|
4806
4849
|
|
|
4807
4850
|
// src/api/volces_seedance_3_0_pro.ts
|
|
4808
4851
|
async function volcesSeedance30Pro(params) {
|
|
4809
|
-
const client = getClient();
|
|
4852
|
+
const client = await getClient();
|
|
4810
4853
|
const pollingOptions = {
|
|
4811
4854
|
intervalMs: 3e3,
|
|
4812
4855
|
maxAttempts: 60
|
|
@@ -4841,7 +4884,7 @@ async function volcesSeedance30Pro(params) {
|
|
|
4841
4884
|
|
|
4842
4885
|
// src/api/volces_seedance_pro_fast.ts
|
|
4843
4886
|
async function volcesSeedanceProFast(params) {
|
|
4844
|
-
const client = getClient();
|
|
4887
|
+
const client = await getClient();
|
|
4845
4888
|
const pollingOptions = {
|
|
4846
4889
|
intervalMs: 3e3,
|
|
4847
4890
|
maxAttempts: 60
|
|
@@ -4876,7 +4919,7 @@ async function volcesSeedanceProFast(params) {
|
|
|
4876
4919
|
|
|
4877
4920
|
// src/api/volces_seededit_2_0.ts
|
|
4878
4921
|
async function volcesSeededit20(params) {
|
|
4879
|
-
const client = getClient();
|
|
4922
|
+
const client = await getClient();
|
|
4880
4923
|
const pollingOptions = {
|
|
4881
4924
|
intervalMs: 3e3,
|
|
4882
4925
|
maxAttempts: 60
|
|
@@ -4910,7 +4953,7 @@ async function volcesSeededit20(params) {
|
|
|
4910
4953
|
|
|
4911
4954
|
// src/api/volces_seededit_3_0.ts
|
|
4912
4955
|
async function volcesSeededit30(params) {
|
|
4913
|
-
const client = getClient();
|
|
4956
|
+
const client = await getClient();
|
|
4914
4957
|
const pollingOptions = {
|
|
4915
4958
|
intervalMs: 3e3,
|
|
4916
4959
|
maxAttempts: 60
|
|
@@ -4946,7 +4989,7 @@ async function volcesSeededit30(params) {
|
|
|
4946
4989
|
|
|
4947
4990
|
// src/api/volces_seededit_3_0_i2i.ts
|
|
4948
4991
|
async function volcesSeededit30I2i(params) {
|
|
4949
|
-
const client = getClient();
|
|
4992
|
+
const client = await getClient();
|
|
4950
4993
|
const pollingOptions = {
|
|
4951
4994
|
intervalMs: 3e3,
|
|
4952
4995
|
maxAttempts: 60
|
|
@@ -4981,7 +5024,7 @@ async function volcesSeededit30I2i(params) {
|
|
|
4981
5024
|
|
|
4982
5025
|
// src/api/volces_seededit_3d_style.ts
|
|
4983
5026
|
async function volcesSeededit3dStyle(params) {
|
|
4984
|
-
const client = getClient();
|
|
5027
|
+
const client = await getClient();
|
|
4985
5028
|
const pollingOptions = {
|
|
4986
5029
|
intervalMs: 4e3,
|
|
4987
5030
|
maxAttempts: 90
|
|
@@ -5016,7 +5059,7 @@ async function volcesSeededit3dStyle(params) {
|
|
|
5016
5059
|
|
|
5017
5060
|
// src/api/volces_seededit_multi_ip.ts
|
|
5018
5061
|
async function volcesSeededitMultiIp(params) {
|
|
5019
|
-
const client = getClient();
|
|
5062
|
+
const client = await getClient();
|
|
5020
5063
|
const pollingOptions = {
|
|
5021
5064
|
intervalMs: 3e3,
|
|
5022
5065
|
maxAttempts: 60
|
|
@@ -5051,7 +5094,7 @@ async function volcesSeededitMultiIp(params) {
|
|
|
5051
5094
|
|
|
5052
5095
|
// src/api/volces_seededit_multi_style.ts
|
|
5053
5096
|
async function volcesSeededitMultiStyle(params) {
|
|
5054
|
-
const client = getClient();
|
|
5097
|
+
const client = await getClient();
|
|
5055
5098
|
const pollingOptions = {
|
|
5056
5099
|
intervalMs: 3e3,
|
|
5057
5100
|
maxAttempts: 60
|
|
@@ -5086,7 +5129,7 @@ async function volcesSeededitMultiStyle(params) {
|
|
|
5086
5129
|
|
|
5087
5130
|
// src/api/volces_seededit_portrait.ts
|
|
5088
5131
|
async function volcesSeededitPortrait(params) {
|
|
5089
|
-
const client = getClient();
|
|
5132
|
+
const client = await getClient();
|
|
5090
5133
|
const pollingOptions = {
|
|
5091
5134
|
intervalMs: 3e3,
|
|
5092
5135
|
maxAttempts: 60
|
|
@@ -5121,7 +5164,7 @@ async function volcesSeededitPortrait(params) {
|
|
|
5121
5164
|
|
|
5122
5165
|
// src/api/volces_seededit_single_ip.ts
|
|
5123
5166
|
async function volcesSeededitSingleIp(params) {
|
|
5124
|
-
const client = getClient();
|
|
5167
|
+
const client = await getClient();
|
|
5125
5168
|
const pollingOptions = {
|
|
5126
5169
|
intervalMs: 3e3,
|
|
5127
5170
|
maxAttempts: 60
|
|
@@ -5156,7 +5199,7 @@ async function volcesSeededitSingleIp(params) {
|
|
|
5156
5199
|
|
|
5157
5200
|
// src/api/volces_seedream_3_0.ts
|
|
5158
5201
|
async function volcesSeedream30(params) {
|
|
5159
|
-
const client = getClient();
|
|
5202
|
+
const client = await getClient();
|
|
5160
5203
|
const pollingOptions = {
|
|
5161
5204
|
intervalMs: 3e3,
|
|
5162
5205
|
maxAttempts: 60
|
|
@@ -5192,7 +5235,7 @@ async function volcesSeedream30(params) {
|
|
|
5192
5235
|
|
|
5193
5236
|
// src/api/volces_seedream_4_0.ts
|
|
5194
5237
|
async function volcesSeedream40(params) {
|
|
5195
|
-
const client = getClient();
|
|
5238
|
+
const client = await getClient();
|
|
5196
5239
|
const pollingOptions = {
|
|
5197
5240
|
intervalMs: 3e3,
|
|
5198
5241
|
maxAttempts: 60
|
|
@@ -5228,7 +5271,7 @@ async function volcesSeedream40(params) {
|
|
|
5228
5271
|
|
|
5229
5272
|
// src/api/volces_seedream_4_5.ts
|
|
5230
5273
|
async function volcesSeedream45(params) {
|
|
5231
|
-
const client = getClient();
|
|
5274
|
+
const client = await getClient();
|
|
5232
5275
|
const pollingOptions = {
|
|
5233
5276
|
intervalMs: 3e3,
|
|
5234
5277
|
maxAttempts: 60
|
|
@@ -5264,7 +5307,7 @@ async function volcesSeedream45(params) {
|
|
|
5264
5307
|
|
|
5265
5308
|
// src/api/volces_seedream_4_5_i2i.ts
|
|
5266
5309
|
async function volcesSeedream45I2i(params) {
|
|
5267
|
-
const client = getClient();
|
|
5310
|
+
const client = await getClient();
|
|
5268
5311
|
const pollingOptions = {
|
|
5269
5312
|
intervalMs: 3e3,
|
|
5270
5313
|
maxAttempts: 60
|
|
@@ -5299,7 +5342,7 @@ async function volcesSeedream45I2i(params) {
|
|
|
5299
5342
|
|
|
5300
5343
|
// src/api/volces_seedream_4_5_multi_blend.ts
|
|
5301
5344
|
async function volcesSeedream45MultiBlend(params) {
|
|
5302
|
-
const client = getClient();
|
|
5345
|
+
const client = await getClient();
|
|
5303
5346
|
const imageList = params.image || params.images;
|
|
5304
5347
|
if (!imageList || !Array.isArray(imageList)) {
|
|
5305
5348
|
throw new Error('Parameter "image" or "images" is required and must be an array');
|
|
@@ -5346,7 +5389,7 @@ async function volcesSeedream45MultiBlend(params) {
|
|
|
5346
5389
|
|
|
5347
5390
|
// src/api/volces_subject_detection.ts
|
|
5348
5391
|
async function volcesSubjectDetection(params) {
|
|
5349
|
-
const client = getClient();
|
|
5392
|
+
const client = await getClient();
|
|
5350
5393
|
const pollingOptions = {
|
|
5351
5394
|
intervalMs: 3e3,
|
|
5352
5395
|
maxAttempts: 60
|
|
@@ -5381,7 +5424,7 @@ async function volcesSubjectDetection(params) {
|
|
|
5381
5424
|
|
|
5382
5425
|
// src/api/volces_subject_recognition.ts
|
|
5383
5426
|
async function volcesSubjectRecognition(params) {
|
|
5384
|
-
const client = getClient();
|
|
5427
|
+
const client = await getClient();
|
|
5385
5428
|
const pollingOptions = {
|
|
5386
5429
|
intervalMs: 3e3,
|
|
5387
5430
|
maxAttempts: 60
|
|
@@ -5416,7 +5459,7 @@ async function volcesSubjectRecognition(params) {
|
|
|
5416
5459
|
|
|
5417
5460
|
// src/api/llm_chat_completions.ts
|
|
5418
5461
|
async function llmChatCompletions(params) {
|
|
5419
|
-
const client = getClient();
|
|
5462
|
+
const client = await getClient();
|
|
5420
5463
|
const config = client.getConfig();
|
|
5421
5464
|
const url = `${config.baseUrl}/llm/chat/completions`;
|
|
5422
5465
|
const token = await getApiToken(config.apiKey);
|
|
@@ -5500,7 +5543,7 @@ async function* parseStreamingResponse(response) {
|
|
|
5500
5543
|
|
|
5501
5544
|
// src/api/agent_chat_completions.ts
|
|
5502
5545
|
async function agentChatCompletions(params) {
|
|
5503
|
-
const client = getClient();
|
|
5546
|
+
const client = await getClient();
|
|
5504
5547
|
const config = client.getConfig();
|
|
5505
5548
|
const url = `${config.baseUrl}/agent/api/v1/chat/completions`;
|
|
5506
5549
|
const model = params.model || "custom_openai/vertex-ai-claude-sonnet-4.5";
|
|
@@ -5737,7 +5780,7 @@ function createTool(toolName) {
|
|
|
5737
5780
|
|
|
5738
5781
|
// src/api/app_generation.ts
|
|
5739
5782
|
async function appGeneration(params) {
|
|
5740
|
-
const client = getClient();
|
|
5783
|
+
const client = await getClient();
|
|
5741
5784
|
const pollingOptions = {
|
|
5742
5785
|
intervalMs: 3e3,
|
|
5743
5786
|
maxAttempts: 120
|
|
@@ -5765,7 +5808,7 @@ async function scan(params) {
|
|
|
5765
5808
|
if (!params.risk_types || params.risk_types.length === 0) {
|
|
5766
5809
|
throw new SeacloudError("\u5FC5\u987B\u63D0\u4F9B\u81F3\u5C11\u4E00\u4E2A\u98CE\u9669\u7C7B\u578B");
|
|
5767
5810
|
}
|
|
5768
|
-
const client = getClient();
|
|
5811
|
+
const client = await getClient();
|
|
5769
5812
|
const config = client.getConfig();
|
|
5770
5813
|
const url = `${config.baseUrl}/scan`;
|
|
5771
5814
|
const token = await getApiToken(config.apiKey);
|
|
@@ -5823,7 +5866,7 @@ async function scan(params) {
|
|
|
5823
5866
|
|
|
5824
5867
|
// src/api/youchuan_diffusion.ts
|
|
5825
5868
|
async function youchuanDiffusion(params) {
|
|
5826
|
-
const client = getClient();
|
|
5869
|
+
const client = await getClient();
|
|
5827
5870
|
const pollingOptions = {
|
|
5828
5871
|
intervalMs: 3e3,
|
|
5829
5872
|
maxAttempts: 60
|
|
@@ -5858,7 +5901,7 @@ async function youchuanDiffusion(params) {
|
|
|
5858
5901
|
|
|
5859
5902
|
// src/api/youchuan_edit.ts
|
|
5860
5903
|
async function youchuanEdit(params) {
|
|
5861
|
-
const client = getClient();
|
|
5904
|
+
const client = await getClient();
|
|
5862
5905
|
const pollingOptions = {
|
|
5863
5906
|
intervalMs: 3e3,
|
|
5864
5907
|
maxAttempts: 60
|
|
@@ -5893,7 +5936,7 @@ async function youchuanEdit(params) {
|
|
|
5893
5936
|
|
|
5894
5937
|
// src/api/youchuan_enhance.ts
|
|
5895
5938
|
async function youchuanEnhance(params) {
|
|
5896
|
-
const client = getClient();
|
|
5939
|
+
const client = await getClient();
|
|
5897
5940
|
const pollingOptions = {
|
|
5898
5941
|
intervalMs: 3e3,
|
|
5899
5942
|
maxAttempts: 60
|
|
@@ -5928,7 +5971,7 @@ async function youchuanEnhance(params) {
|
|
|
5928
5971
|
|
|
5929
5972
|
// src/api/youchuan_extend_video.ts
|
|
5930
5973
|
async function youchuanExtendVideo(params) {
|
|
5931
|
-
const client = getClient();
|
|
5974
|
+
const client = await getClient();
|
|
5932
5975
|
const pollingOptions = {
|
|
5933
5976
|
intervalMs: 3e3,
|
|
5934
5977
|
maxAttempts: 60
|
|
@@ -5963,7 +6006,7 @@ async function youchuanExtendVideo(params) {
|
|
|
5963
6006
|
|
|
5964
6007
|
// src/api/youchuan_inpaint.ts
|
|
5965
6008
|
async function youchuanInpaint(params) {
|
|
5966
|
-
const client = getClient();
|
|
6009
|
+
const client = await getClient();
|
|
5967
6010
|
const pollingOptions = {
|
|
5968
6011
|
intervalMs: 3e3,
|
|
5969
6012
|
maxAttempts: 60
|
|
@@ -5998,7 +6041,7 @@ async function youchuanInpaint(params) {
|
|
|
5998
6041
|
|
|
5999
6042
|
// src/api/youchuan_outpaint.ts
|
|
6000
6043
|
async function youchuanOutpaint(params) {
|
|
6001
|
-
const client = getClient();
|
|
6044
|
+
const client = await getClient();
|
|
6002
6045
|
const pollingOptions = {
|
|
6003
6046
|
intervalMs: 3e3,
|
|
6004
6047
|
maxAttempts: 60
|
|
@@ -6033,7 +6076,7 @@ async function youchuanOutpaint(params) {
|
|
|
6033
6076
|
|
|
6034
6077
|
// src/api/youchuan_pan.ts
|
|
6035
6078
|
async function youchuanPan(params) {
|
|
6036
|
-
const client = getClient();
|
|
6079
|
+
const client = await getClient();
|
|
6037
6080
|
const pollingOptions = {
|
|
6038
6081
|
intervalMs: 3e3,
|
|
6039
6082
|
maxAttempts: 60
|
|
@@ -6068,7 +6111,7 @@ async function youchuanPan(params) {
|
|
|
6068
6111
|
|
|
6069
6112
|
// src/api/youchuan_remix.ts
|
|
6070
6113
|
async function youchuanRemix(params) {
|
|
6071
|
-
const client = getClient();
|
|
6114
|
+
const client = await getClient();
|
|
6072
6115
|
const pollingOptions = {
|
|
6073
6116
|
intervalMs: 3e3,
|
|
6074
6117
|
maxAttempts: 60
|
|
@@ -6103,7 +6146,7 @@ async function youchuanRemix(params) {
|
|
|
6103
6146
|
|
|
6104
6147
|
// src/api/youchuan_remove_background.ts
|
|
6105
6148
|
async function youchuanRemoveBackground(params) {
|
|
6106
|
-
const client = getClient();
|
|
6149
|
+
const client = await getClient();
|
|
6107
6150
|
const pollingOptions = {
|
|
6108
6151
|
intervalMs: 3e3,
|
|
6109
6152
|
maxAttempts: 60
|
|
@@ -6138,7 +6181,7 @@ async function youchuanRemoveBackground(params) {
|
|
|
6138
6181
|
|
|
6139
6182
|
// src/api/youchuan_retexture.ts
|
|
6140
6183
|
async function youchuanRetexture(params) {
|
|
6141
|
-
const client = getClient();
|
|
6184
|
+
const client = await getClient();
|
|
6142
6185
|
const pollingOptions = {
|
|
6143
6186
|
intervalMs: 3e3,
|
|
6144
6187
|
maxAttempts: 60
|
|
@@ -6173,7 +6216,7 @@ async function youchuanRetexture(params) {
|
|
|
6173
6216
|
|
|
6174
6217
|
// src/api/youchuan_uploadpaint.ts
|
|
6175
6218
|
async function youchuanUploadpaint(params) {
|
|
6176
|
-
const client = getClient();
|
|
6219
|
+
const client = await getClient();
|
|
6177
6220
|
const pollingOptions = {
|
|
6178
6221
|
intervalMs: 3e3,
|
|
6179
6222
|
maxAttempts: 60
|
|
@@ -6208,7 +6251,7 @@ async function youchuanUploadpaint(params) {
|
|
|
6208
6251
|
|
|
6209
6252
|
// src/api/youchuan_upscale.ts
|
|
6210
6253
|
async function youchuanUpscale(params) {
|
|
6211
|
-
const client = getClient();
|
|
6254
|
+
const client = await getClient();
|
|
6212
6255
|
const pollingOptions = {
|
|
6213
6256
|
intervalMs: 3e3,
|
|
6214
6257
|
maxAttempts: 60
|
|
@@ -6243,7 +6286,7 @@ async function youchuanUpscale(params) {
|
|
|
6243
6286
|
|
|
6244
6287
|
// src/api/youchuan_variation.ts
|
|
6245
6288
|
async function youchuanVariation(params) {
|
|
6246
|
-
const client = getClient();
|
|
6289
|
+
const client = await getClient();
|
|
6247
6290
|
const pollingOptions = {
|
|
6248
6291
|
intervalMs: 3e3,
|
|
6249
6292
|
maxAttempts: 60
|
|
@@ -6278,7 +6321,7 @@ async function youchuanVariation(params) {
|
|
|
6278
6321
|
|
|
6279
6322
|
// src/api/youchuan_video_diffusion.ts
|
|
6280
6323
|
async function youchuanVideoDiffusion(params) {
|
|
6281
|
-
const client = getClient();
|
|
6324
|
+
const client = await getClient();
|
|
6282
6325
|
const pollingOptions = {
|
|
6283
6326
|
intervalMs: 3e3,
|
|
6284
6327
|
maxAttempts: 60
|
|
@@ -6313,7 +6356,7 @@ async function youchuanVideoDiffusion(params) {
|
|
|
6313
6356
|
|
|
6314
6357
|
// src/api/youchuan_video_upscale.ts
|
|
6315
6358
|
async function youchuanVideoUpscale(params) {
|
|
6316
|
-
const client = getClient();
|
|
6359
|
+
const client = await getClient();
|
|
6317
6360
|
const pollingOptions = {
|
|
6318
6361
|
intervalMs: 3e3,
|
|
6319
6362
|
maxAttempts: 60
|