@huyooo/ui 0.13.6 → 0.13.9

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.
Files changed (54) hide show
  1. package/dist/{AuthkitAppSetting-EL2ZvAVT.js → AuthkitAppSetting-Xe-QQSQ4.js} +405 -408
  2. package/dist/{AuthkitGithubBinding-Ba9sbNEh.js → AuthkitGithubBinding-CK6ijijV.js} +330 -331
  3. package/dist/{Clipboard-CdJtMvg6.js → Clipboard-C8ncjaAJ.js} +1 -1
  4. package/dist/{Contact-Z2VFVeKK.js → Contact-mb7deQOs.js} +2 -2
  5. package/dist/CustomTable-BT-cnhLR.js +280 -0
  6. package/dist/{FeedbackItem-B_MDdk4s.js → FeedbackItem-C9FQThXG.js} +3 -3
  7. package/dist/{FeedbackModal-qrcBDDQM.js → FeedbackModal-R3NKRxr7.js} +3 -3
  8. package/dist/{MessageHandle-Y96z-IXv.js → MessageHandle-CVueKPFG.js} +2 -2
  9. package/dist/{MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-CfmjFcay.js → MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-DL4qP8DA.js} +2 -2
  10. package/dist/{PaySubscriptions-C75OtmYw.js → PaySubscriptions-BkZaeTgv.js} +5 -5
  11. package/dist/{PricingPlans-DCYIVuuT.js → PricingPlans-B-GWpft_.js} +4 -4
  12. package/dist/{ReferrerReferees-8eSsuPfa.js → ReferrerReferees-DFCwvXJ6.js} +5 -5
  13. package/dist/{Upload.vue_vue_type_script_setup_true_lang-BAibfVEN.js → Upload.vue_vue_type_script_setup_true_lang-dLSky4Yx.js} +1 -1
  14. package/dist/{UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-BEVmBNlU.js → UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-Iwq1MOFa.js} +33 -34
  15. package/dist/WidthContainer-jOX17pDu.js +691 -0
  16. package/dist/api/billingSubscriptionApi.d.ts +3 -0
  17. package/dist/{apiClients-D56ALwwO.js → apiClients-CkI47p36.js} +11 -7
  18. package/dist/authkit.js +9 -9
  19. package/dist/common.js +2 -2
  20. package/dist/composables/Authkit/resolveRoutePermission.d.ts +4 -0
  21. package/dist/composables/Authkit/useAuthkitAppsAuthPageInfo.d.ts +1 -1
  22. package/dist/composables/Authkit/useAuthkitUsersProfile.d.ts +1 -1
  23. package/dist/composables/useMessageList.d.ts +2 -2
  24. package/dist/composables.js +13 -13
  25. package/dist/feedback.js +3 -3
  26. package/dist/main.js +32 -32
  27. package/dist/message.js +3 -3
  28. package/dist/pay.js +4 -4
  29. package/dist/privateCom.js +1 -1
  30. package/dist/referrer.js +1 -1
  31. package/dist/style.css +1 -1
  32. package/dist/types/api/ai.generated.d.ts +3248 -335
  33. package/dist/types/api/billing.generated.d.ts +2162 -500
  34. package/dist/upload.js +2 -2
  35. package/dist/{useAuthkitAppsAuthPageInfo-RMs8sOwk.js → useAuthkitAppsAuthPageInfo-nCjfAjiw.js} +17 -7
  36. package/dist/{useAuthkitAuth-B8aO6aMa.js → useAuthkitAuth-C--qS6UE.js} +1 -1
  37. package/dist/useAuthkitCreateAndUpdate-u-ceTc-m.js +25 -0
  38. package/dist/useAuthkitUsersProfile-BC5EsA2f.js +40 -0
  39. package/dist/useBillingStatusOptions-D5Ehwtbj.js +145 -0
  40. package/dist/{useDownloads-DqF1USJ7.js → useDownloads-BC0QyEFr.js} +10 -10
  41. package/dist/{useEnsureAuthenticated-D99GiwEk.js → useEnsureAuthenticated-C4tsSfv6.js} +2 -2
  42. package/dist/{useLegalLinks-DRTOYp3n.js → useLegalLinks-DeXLE-yv.js} +2 -2
  43. package/dist/{useMessageNotifications-CUpk6zCE.js → useMessageNotifications-BMUx5xfX.js} +1 -1
  44. package/dist/{useSEO-CUKPmGRx.js → useSEO-BWAREYk4.js} +238 -227
  45. package/dist/{useSubscriptionCheckout-CAgy1CFj.js → useSubscriptionCheckout-CHAF20s-.js} +102 -108
  46. package/dist/{useTableHandle-CCKjahT0.js → useTableHandle-9alnSWt0.js} +1 -1
  47. package/dist/{useUploadCos-Bxctd4E6.js → useUploadCos-DGPnLOC9.js} +1 -1
  48. package/dist/user.js +1 -1
  49. package/package.json +3 -2
  50. package/dist/CustomTable-BBcd4nNL.js +0 -278
  51. package/dist/WidthContainer-Dqf_-qGk.js +0 -694
  52. package/dist/useAuthkitCreateAndUpdate-DkiLs143.js +0 -25
  53. package/dist/useAuthkitUsersProfile-CWAr0CNv.js +0 -36
  54. package/dist/useBillingStatusOptions-CottFcAr.js +0 -127
@@ -1,4 +1,4 @@
1
- import { ApiResponse, RequestConfig, Client, EdenClient } from '@vafast/api-client';
1
+ import { RequestConfig, Client, EdenClient, RequestBuilder } from '@vafast/api-client';
2
2
  /** API 契约类型 */
3
3
  export type Api = {
4
4
  health: {
@@ -12,38 +12,201 @@ export type Api = {
12
12
  return: any;
13
13
  };
14
14
  };
15
- chat: {
15
+ agent: {
16
16
  models: {
17
- /** 获取聊天可用的 AI 模型列表 */
17
+ /** 获取 Platform Agent 支持的模型列表(含定价信息) */
18
18
  get: {
19
19
  return: any;
20
20
  };
21
21
  };
22
22
  stream: {
23
- /** 发起流式 AI 对话请求 */
23
+ /** 发起流式 AI 对话请求(SSE),含计费 */
24
24
  post: {
25
25
  body: {
26
- message: string;
26
+ message?: string;
27
27
  images?: string[];
28
+ sessionId?: string;
29
+ tools?: {
30
+ name: string;
31
+ description: string;
32
+ parameters: {
33
+ type: "object";
34
+ properties: Record<string, {
35
+ type?: string;
36
+ description?: string;
37
+ properties?: Record<string, unknown>;
38
+ items?: unknown;
39
+ required?: string[];
40
+ enum?: unknown[];
41
+ default?: unknown;
42
+ }>;
43
+ required?: string[];
44
+ description?: string;
45
+ };
46
+ }[];
47
+ skillContents?: string[];
28
48
  options?: {
29
49
  mode?: "agent" | "ask";
30
50
  model?: string;
31
- provider?: "ark" | "deepseek" | "qwen" | "gemini" | "openai" | "anthropic";
32
51
  enableWebSearch?: boolean;
33
52
  thinkingMode?: "enabled" | "disabled";
34
53
  enabledTools?: string[];
54
+ autoRunConfig?: {
55
+ mode?: "off" | "run-everything" | "approve-all";
56
+ };
35
57
  history?: {
36
58
  role: "user" | "assistant" | "system" | "tool";
37
59
  content: string;
60
+ tool_call_id?: string;
61
+ tool_calls?: {
62
+ id: string;
63
+ type: "function";
64
+ function: {
65
+ name: string;
66
+ arguments: string;
67
+ };
68
+ }[];
38
69
  }[];
70
+ serviceTier?: string;
71
+ billingPlan?: "online_standard" | "online_low_latency" | "batch";
39
72
  };
40
73
  };
41
74
  return: any;
42
75
  };
43
76
  };
44
- abort: {
45
- /** 中止正在进行的对话请求 */
77
+ complete: {
78
+ /** 创建 Agent 非流式补全请求(含计费),使用 ai-chat-core 统一引擎 */
79
+ post: {
80
+ body: {
81
+ model: string;
82
+ max_tokens?: number;
83
+ temperature?: number;
84
+ messages: {
85
+ role: "user" | "assistant" | "system";
86
+ content: string | unknown[];
87
+ }[];
88
+ service_tier?: string;
89
+ billing_plan?: "online_standard" | "online_low_latency" | "batch";
90
+ };
91
+ return: any;
92
+ };
93
+ };
94
+ cancel: {
95
+ /** 取消正在进行的对话请求 */
96
+ post: {
97
+ return: any;
98
+ };
99
+ };
100
+ sessions: {
101
+ /** 获取当前用户的所有会话 */
102
+ get: {
103
+ return: any;
104
+ };
105
+ /** 创建新的聊天会话 */
46
106
  post: {
107
+ body: {
108
+ title?: string;
109
+ model?: string;
110
+ mode?: "agent" | "ask";
111
+ webSearchEnabled?: boolean;
112
+ thinkingEnabled?: boolean;
113
+ };
114
+ return: any;
115
+ };
116
+ ':id': {
117
+ /** 更新会话信息 */
118
+ put: {
119
+ body: {
120
+ title?: string;
121
+ model?: string;
122
+ mode?: "agent" | "ask";
123
+ webSearchEnabled?: boolean;
124
+ thinkingEnabled?: boolean;
125
+ hidden?: boolean;
126
+ };
127
+ params: {
128
+ sessionId: string;
129
+ };
130
+ return: any;
131
+ };
132
+ /** 删除会话及其所有消息 */
133
+ delete: {
134
+ params: {
135
+ sessionId: string;
136
+ };
137
+ return: any;
138
+ };
139
+ messages: {
140
+ /** 获取会话的所有消息 */
141
+ get: {
142
+ params: {
143
+ sessionId: string;
144
+ };
145
+ return: any;
146
+ };
147
+ /** 保存聊天消息 */
148
+ post: {
149
+ body: {
150
+ id?: string;
151
+ role: "user" | "assistant";
152
+ content: string;
153
+ images?: string[];
154
+ model?: string;
155
+ mode?: string;
156
+ webSearchEnabled?: boolean;
157
+ thinkingEnabled?: boolean;
158
+ steps?: string;
159
+ operationIds?: string;
160
+ };
161
+ params: {
162
+ sessionId: string;
163
+ };
164
+ return: any;
165
+ };
166
+ after: {
167
+ ':id': {
168
+ /** 用于分叉:删除指定消息之后的所有消息 */
169
+ delete: {
170
+ params: {
171
+ sessionId: string;
172
+ messageId: string;
173
+ };
174
+ return: any;
175
+ };
176
+ };
177
+ };
178
+ };
179
+ };
180
+ };
181
+ messages: {
182
+ ':id': {
183
+ /** 更新消息内容(支持 usage、duration、operationIds),含归属验证 */
184
+ put: {
185
+ body: {
186
+ content?: string;
187
+ steps?: string;
188
+ operationIds?: string;
189
+ usage?: string;
190
+ duration?: number;
191
+ };
192
+ params: {
193
+ id: string;
194
+ };
195
+ return: any;
196
+ };
197
+ };
198
+ };
199
+ settings: {
200
+ /** 获取用户的 Platform Agent 设置 */
201
+ get: {
202
+ return: any;
203
+ };
204
+ /** 更新用户的 Platform Agent 设置 */
205
+ put: {
206
+ body: {
207
+ key: string;
208
+ value: string;
209
+ };
47
210
  return: any;
48
211
  };
49
212
  };
@@ -195,7 +358,7 @@ export type Api = {
195
358
  modelIds: string[];
196
359
  promptTestDataIds: string[];
197
360
  status: "enabled" | "disabled";
198
- providers: "ark" | "deepseek" | "qwen" | "gemini" | "openai" | "anthropic" | "openrouter"[];
361
+ providers: string[];
199
362
  description: string;
200
363
  };
201
364
  return: any;
@@ -220,7 +383,7 @@ export type Api = {
220
383
  modelIds: string[];
221
384
  promptTestDataIds: string[];
222
385
  status: "enabled" | "disabled";
223
- providers: "ark" | "deepseek" | "qwen" | "gemini" | "openai" | "anthropic" | "openrouter"[];
386
+ providers: string[];
224
387
  description: string;
225
388
  };
226
389
  return: any;
@@ -259,26 +422,8 @@ export type Api = {
259
422
  return: any;
260
423
  };
261
424
  };
262
- };
263
- completions: {
264
- create: {
265
- /** 创建 AI 补全请求 */
266
- post: {
267
- body: {
268
- model: string;
269
- max_tokens?: number;
270
- stream?: boolean;
271
- temperature?: number;
272
- messages: {
273
- role: "user" | "assistant" | "system";
274
- content: string | unknown[];
275
- }[];
276
- };
277
- return: any;
278
- };
279
- };
280
- prompt: {
281
- /** 基于提示词模板进行 AI 补全 */
425
+ run: {
426
+ /** 基于提示词模板进行 AI 补全(含计费) */
282
427
  post: {
283
428
  body: {
284
429
  promptId: string;
@@ -288,8 +433,9 @@ export type Api = {
288
433
  }[];
289
434
  model: string;
290
435
  max_tokens?: number;
291
- stream?: boolean;
292
436
  temperature?: number;
437
+ service_tier?: string;
438
+ billing_plan?: "online_standard" | "online_low_latency" | "batch";
293
439
  };
294
440
  return: any;
295
441
  };
@@ -304,7 +450,290 @@ export type Api = {
304
450
  };
305
451
  };
306
452
  };
307
- promptsHistroy: {
453
+ dashscope: {
454
+ 'compatible-mode': {
455
+ v1: {
456
+ chat: {
457
+ completions: {
458
+ /** 原样代理 DashScope compatible-mode /chat/completions,并统一加登录态、额度和计费 */
459
+ post: {
460
+ body: Record<string, unknown>;
461
+ return: any;
462
+ };
463
+ };
464
+ };
465
+ };
466
+ };
467
+ api: {
468
+ v1: {
469
+ services: {
470
+ aigc: {
471
+ 'text-generation': {
472
+ generation: {
473
+ /** 原样代理 DashScope 原生 text-generation,并统一加登录态、额度和计费 */
474
+ post: {
475
+ body: Record<string, unknown>;
476
+ return: any;
477
+ };
478
+ };
479
+ };
480
+ 'multimodal-generation': {
481
+ generation: {
482
+ /** 原样代理 DashScope 原生 multimodal-generation,并统一加登录态、额度和计费 */
483
+ post: {
484
+ body: Record<string, unknown>;
485
+ return: any;
486
+ };
487
+ };
488
+ };
489
+ };
490
+ };
491
+ };
492
+ };
493
+ };
494
+ deepseek: {
495
+ v1: {
496
+ chat: {
497
+ completions: {
498
+ /** 原样代理 DeepSeek /chat/completions,并统一加登录态、额度和计费 */
499
+ post: {
500
+ body: Record<string, unknown>;
501
+ return: any;
502
+ };
503
+ };
504
+ };
505
+ };
506
+ };
507
+ openrouter: {
508
+ v1: {
509
+ chat: {
510
+ completions: {
511
+ /** 原样代理 OpenRouter /chat/completions,并统一加登录态、额度和计费 */
512
+ post: {
513
+ body: Record<string, unknown>;
514
+ return: any;
515
+ };
516
+ };
517
+ };
518
+ };
519
+ };
520
+ openai: {
521
+ v1: {
522
+ responses: {
523
+ /** 原样代理 OpenAI /responses,并统一加登录态、额度和计费 */
524
+ post: {
525
+ body: Record<string, unknown>;
526
+ return: any;
527
+ };
528
+ };
529
+ chat: {
530
+ completions: {
531
+ /** 原样代理 OpenAI /chat/completions,并统一加登录态、额度和计费 */
532
+ post: {
533
+ body: Record<string, unknown>;
534
+ return: any;
535
+ };
536
+ };
537
+ };
538
+ images: {
539
+ generations: {
540
+ /** 原样代理 OpenAI /images/generations(DALL·E 按张 · GPT Image 按 token) */
541
+ post: {
542
+ body: Record<string, unknown>;
543
+ return: any;
544
+ };
545
+ };
546
+ edits: {
547
+ /** 原样代理 OpenAI /images/edits(GPT Image 按 token · multipart) */
548
+ post: {
549
+ return: any;
550
+ };
551
+ };
552
+ };
553
+ };
554
+ };
555
+ anthropic: {
556
+ v1: {
557
+ messages: {
558
+ /** 原样代理 Anthropic /messages,并统一加登录态、额度和计费 */
559
+ post: {
560
+ body: Record<string, unknown>;
561
+ return: any;
562
+ };
563
+ };
564
+ };
565
+ };
566
+ gemini: {
567
+ v1beta: {
568
+ models: {
569
+ ':id': {
570
+ /** 原样代理 Gemini /models/{model}:generateContent 等接口,并统一加登录态、额度和计费 */
571
+ post: {
572
+ body: Record<string, unknown>;
573
+ params: {
574
+ modelAction: string;
575
+ };
576
+ return: any;
577
+ };
578
+ };
579
+ };
580
+ };
581
+ };
582
+ glm: {
583
+ v1: {
584
+ chat: {
585
+ completions: {
586
+ /** 原样代理 GLM /chat/completions,并统一加登录态、额度和计费 */
587
+ post: {
588
+ body: Record<string, unknown>;
589
+ return: any;
590
+ };
591
+ };
592
+ };
593
+ };
594
+ };
595
+ grok: {
596
+ v1: {
597
+ responses: {
598
+ /** 通过 LLM Proxy 原样代理 Grok /responses,并统一加登录态、额度和计费 */
599
+ post: {
600
+ body: Record<string, unknown>;
601
+ return: any;
602
+ };
603
+ };
604
+ chat: {
605
+ completions: {
606
+ /** 通过 LLM Proxy 原样代理 Grok /chat/completions,并统一加登录态、额度和计费 */
607
+ post: {
608
+ body: Record<string, unknown>;
609
+ return: any;
610
+ };
611
+ };
612
+ };
613
+ images: {
614
+ generations: {
615
+ /** 通过 LLM Proxy 原样代理 Grok /images/generations,并按张计费 */
616
+ post: {
617
+ body: Record<string, unknown>;
618
+ return: any;
619
+ };
620
+ };
621
+ };
622
+ videos: {
623
+ generations: {
624
+ /** 通过 LLM Proxy 代理 Grok /videos/generations,提交任务不扣费 */
625
+ post: {
626
+ body: Record<string, unknown>;
627
+ return: any;
628
+ };
629
+ };
630
+ ':id': {
631
+ /** 通过 LLM Proxy 转发 Grok /videos/{request_id},视频生成成功后按秒扣费 */
632
+ get: {
633
+ params: {
634
+ requestId: string;
635
+ };
636
+ return: any;
637
+ };
638
+ };
639
+ };
640
+ };
641
+ };
642
+ moonshot: {
643
+ v1: {
644
+ chat: {
645
+ completions: {
646
+ /** 原样代理 Moonshot /chat/completions,并统一加登录态、额度和计费 */
647
+ post: {
648
+ body: Record<string, unknown>;
649
+ return: any;
650
+ };
651
+ };
652
+ };
653
+ };
654
+ };
655
+ minimax: {
656
+ anthropic: {
657
+ v1: {
658
+ messages: {
659
+ /** 原样代理 MiniMax Anthropic /messages,并统一加登录态、额度和计费 */
660
+ post: {
661
+ body: Record<string, unknown>;
662
+ return: any;
663
+ };
664
+ };
665
+ };
666
+ };
667
+ };
668
+ volcengine: {
669
+ ark: {
670
+ api: {
671
+ v3: {
672
+ responses: {
673
+ /** 原样代理火山方舟原厂 /api/v3/responses,并统一加登录态、额度和计费 */
674
+ post: {
675
+ body: Record<string, unknown>;
676
+ return: any;
677
+ };
678
+ };
679
+ chat: {
680
+ completions: {
681
+ /** 原样代理火山方舟原厂 /api/v3/chat/completions,并统一加登录态、额度和计费 */
682
+ post: {
683
+ body: Record<string, unknown>;
684
+ return: any;
685
+ };
686
+ };
687
+ };
688
+ };
689
+ plan: {
690
+ v3: {
691
+ chat: {
692
+ completions: {
693
+ /** 平台暂未开放 Agent Plan 官方线路 */
694
+ post: {
695
+ body: Record<string, unknown>;
696
+ return: any;
697
+ };
698
+ };
699
+ };
700
+ };
701
+ v1: {
702
+ messages: {
703
+ /** 平台暂未开放 Agent Plan 官方线路 */
704
+ post: {
705
+ body: Record<string, unknown>;
706
+ return: any;
707
+ };
708
+ };
709
+ };
710
+ };
711
+ coding: {
712
+ v3: {
713
+ chat: {
714
+ completions: {
715
+ /** 平台暂未开放 Coding Plan 官方线路 */
716
+ post: {
717
+ body: Record<string, unknown>;
718
+ return: any;
719
+ };
720
+ };
721
+ };
722
+ };
723
+ v1: {
724
+ messages: {
725
+ /** 平台暂未开放 Coding Plan 官方线路 */
726
+ post: {
727
+ body: Record<string, unknown>;
728
+ return: any;
729
+ };
730
+ };
731
+ };
732
+ };
733
+ };
734
+ };
735
+ };
736
+ promptsHistory: {
308
737
  find: {
309
738
  /** 分页查询提示词历史记录 */
310
739
  post: {
@@ -420,20 +849,16 @@ export type Api = {
420
849
  audio: {
421
850
  url: string;
422
851
  format: "wav" | "mp3";
423
- codec?: "raw";
424
- rate?: number;
425
- bits?: number;
426
- channel?: number;
427
852
  };
428
853
  request: {
429
- enableItn?: boolean;
430
- enablePunc?: boolean;
431
- enableDdc?: boolean;
432
- enableSpeakerInfo?: boolean;
433
- enableChannelSplit?: boolean;
434
- showUtterances?: boolean;
435
- vadSegment?: boolean;
436
- context: unknown;
854
+ enableItn: boolean;
855
+ enablePunc: boolean;
856
+ enableDdc: boolean;
857
+ enableSpeakerInfo: boolean;
858
+ enableChannelSplit: boolean;
859
+ showUtterances: boolean;
860
+ vadSegment: boolean;
861
+ context?: unknown;
437
862
  };
438
863
  };
439
864
  return: any;
@@ -462,6 +887,15 @@ export type Api = {
462
887
  return: any;
463
888
  };
464
889
  };
890
+ findOne: {
891
+ /** 根据 ID 查询单条 ASR 任务详情 */
892
+ post: {
893
+ body: {
894
+ id: string;
895
+ };
896
+ return: any;
897
+ };
898
+ };
465
899
  status: {
466
900
  /** 查询 ASR 任务处理状态 */
467
901
  post: {
@@ -482,13 +916,23 @@ export type Api = {
482
916
  };
483
917
  tts: {
484
918
  create: {
485
- /** 创建新的 TTS 任务 */
919
+ /** 创建新的 TTS 任务;默认 V3 单向流式,长文本需显式传 synthesisMode=longText */
486
920
  post: {
487
921
  body: {
488
- sceneKey: string;
922
+ voiceKind: "official" | "clone" | "design";
489
923
  voiceType: string;
490
924
  text: string;
491
925
  encoding?: "wav";
926
+ synthesisMode?: "unidirectional" | "longText";
927
+ };
928
+ return: any;
929
+ };
930
+ };
931
+ status: {
932
+ /** 查询长文本 TTS 任务处理状态(仅 synthesisMode=longText) */
933
+ post: {
934
+ body: {
935
+ id: string;
492
936
  };
493
937
  return: any;
494
938
  };
@@ -509,9 +953,11 @@ export type Api = {
509
953
  current: number;
510
954
  pageSize: number;
511
955
  where: {
512
- sceneKey?: string;
956
+ id?: string;
957
+ voiceKind?: "official" | "clone" | "design";
513
958
  voiceType?: string;
514
959
  text?: string;
960
+ status?: "running" | "success" | "failure";
515
961
  };
516
962
  };
517
963
  return: any;
@@ -526,10 +972,18 @@ export type Api = {
526
972
  return: any;
527
973
  };
528
974
  };
975
+ options: {
976
+ status: {
977
+ /** 获取 TTS 任务状态下拉选项 */
978
+ post: {
979
+ return: any;
980
+ };
981
+ };
982
+ };
529
983
  };
530
984
  si: {
531
985
  create: {
532
- /** 创建新的同声传译任务 */
986
+ /** 创建新的同声传译任务(ASR → 翻译 → TTS) */
533
987
  post: {
534
988
  body: {
535
989
  audios: {
@@ -543,6 +997,15 @@ export type Api = {
543
997
  return: any;
544
998
  };
545
999
  };
1000
+ status: {
1001
+ /** 查询同声传译任务当前状态与结果 */
1002
+ post: {
1003
+ body: {
1004
+ id: string;
1005
+ };
1006
+ return: any;
1007
+ };
1008
+ };
546
1009
  delete: {
547
1010
  /** 删除同声传译任务 */
548
1011
  post: {
@@ -559,11 +1022,9 @@ export type Api = {
559
1022
  current: number;
560
1023
  pageSize: number;
561
1024
  where: {
562
- name?: string;
563
- value?: string;
564
- version?: number;
565
- modelId?: string;
566
- providerId?: string;
1025
+ id?: string;
1026
+ speakerID?: string;
1027
+ language?: string;
567
1028
  status?: string;
568
1029
  };
569
1030
  };
@@ -580,14 +1041,66 @@ export type Api = {
580
1041
  };
581
1042
  };
582
1043
  };
1044
+ realtimeSpeech: {
1045
+ session: {
1046
+ create: {
1047
+ /** 创建实时语音交互会话(complete 时扣费) */
1048
+ post: {
1049
+ body: {
1050
+ language?: string;
1051
+ modelType?: 0 | 1;
1052
+ };
1053
+ return: any;
1054
+ };
1055
+ };
1056
+ complete: {
1057
+ /** 提交上游 usage 并完成实时语音扣费 */
1058
+ post: {
1059
+ body: {
1060
+ id: string;
1061
+ usage: {
1062
+ inputAudioTokens: number;
1063
+ outputTextTokens: number;
1064
+ outputAudioTokens: number;
1065
+ inputAudioCachedTokens?: number;
1066
+ };
1067
+ };
1068
+ return: any;
1069
+ };
1070
+ };
1071
+ };
1072
+ find: {
1073
+ /** 分页查询实时语音会话 */
1074
+ post: {
1075
+ body: {
1076
+ current: number;
1077
+ pageSize: number;
1078
+ where: {
1079
+ sessionId?: string;
1080
+ status?: string;
1081
+ };
1082
+ };
1083
+ return: any;
1084
+ };
1085
+ };
1086
+ findOne: {
1087
+ /** 根据 ID 查询实时语音会话详情 */
1088
+ post: {
1089
+ body: {
1090
+ id: string;
1091
+ };
1092
+ return: any;
1093
+ };
1094
+ };
1095
+ };
583
1096
  copyVoice: {
584
1097
  create: {
585
- /** 创建新的声音复刻任务 */
1098
+ /** 选择已购买音色槽位创建声音复刻资产 */
586
1099
  post: {
587
1100
  body: {
588
1101
  name: string;
589
1102
  tags: string[];
590
- times: number;
1103
+ voiceSlotId: string;
591
1104
  description?: string;
592
1105
  };
593
1106
  return: any;
@@ -612,6 +1125,7 @@ export type Api = {
612
1125
  current: number;
613
1126
  pageSize: number;
614
1127
  where: {
1128
+ id?: string;
615
1129
  name?: string;
616
1130
  speakerID?: string;
617
1131
  status?: string;
@@ -641,16 +1155,188 @@ export type Api = {
641
1155
  };
642
1156
  };
643
1157
  };
644
- };
645
- voiceTypes: {
646
- create: {
647
- /** 创建新音色类型 */
1158
+ status: {
1159
+ /** 查询声音复刻的训练状态 */
648
1160
  post: {
649
1161
  body: {
650
- name: string;
651
- value: string;
652
- modelIds: string[];
653
- promptTestDataIds: string[];
1162
+ id: string;
1163
+ };
1164
+ return: any;
1165
+ };
1166
+ };
1167
+ };
1168
+ voiceSlots: {
1169
+ create: {
1170
+ /** 统一购买音色槽位,后续可绑定到声音复刻或音色设计 */
1171
+ post: {
1172
+ body: {
1173
+ name: string;
1174
+ tags: string[];
1175
+ times: number;
1176
+ quantity?: number;
1177
+ description?: string;
1178
+ };
1179
+ return: any;
1180
+ };
1181
+ };
1182
+ renew: {
1183
+ /** 统一续费音色槽位 */
1184
+ post: {
1185
+ body: {
1186
+ id: string;
1187
+ times: number;
1188
+ };
1189
+ return: any;
1190
+ };
1191
+ };
1192
+ refresh: {
1193
+ /** 从火山控制台同步槽位状态 */
1194
+ post: {
1195
+ body: {
1196
+ id: string;
1197
+ };
1198
+ return: any;
1199
+ };
1200
+ };
1201
+ find: {
1202
+ /** 分页查询统一音色槽位 */
1203
+ post: {
1204
+ body: {
1205
+ current: number;
1206
+ pageSize: number;
1207
+ where: {
1208
+ id?: string;
1209
+ name?: string;
1210
+ speakerID?: string;
1211
+ status?: string;
1212
+ usageType?: string;
1213
+ };
1214
+ };
1215
+ return: any;
1216
+ };
1217
+ };
1218
+ findOne: {
1219
+ /** 根据 ID 查询音色槽位详情 */
1220
+ post: {
1221
+ body: {
1222
+ id: string;
1223
+ };
1224
+ return: any;
1225
+ };
1226
+ };
1227
+ options: {
1228
+ /** 获取未绑定且已交付的音色槽位选项 */
1229
+ post: {
1230
+ body: {
1231
+ usageType?: "copyVoice" | "voiceDesign";
1232
+ };
1233
+ return: any;
1234
+ };
1235
+ status: {
1236
+ /** 获取音色槽位状态下拉选项 */
1237
+ post: {
1238
+ return: any;
1239
+ };
1240
+ };
1241
+ };
1242
+ };
1243
+ voiceDesign: {
1244
+ create: {
1245
+ /** 选择已购买音色槽位创建音色设计资产 */
1246
+ post: {
1247
+ body: {
1248
+ name: string;
1249
+ tags: string[];
1250
+ voiceSlotId: string;
1251
+ description?: string;
1252
+ };
1253
+ return: any;
1254
+ };
1255
+ };
1256
+ design: {
1257
+ /** 基于文本/图片提示词设计音色并生成试听 */
1258
+ post: {
1259
+ body: {
1260
+ id: string;
1261
+ previewText: string;
1262
+ textPrompt?: string;
1263
+ language?: 0 | 1;
1264
+ imagePrompt?: {
1265
+ imageUrl?: string;
1266
+ imageBytes?: string;
1267
+ };
1268
+ };
1269
+ return: any;
1270
+ };
1271
+ };
1272
+ update: {
1273
+ /** 更新音色设计名称、标签与描述 */
1274
+ post: {
1275
+ body: {
1276
+ id: string;
1277
+ name: string;
1278
+ tags: string[];
1279
+ description?: string;
1280
+ };
1281
+ return: any;
1282
+ };
1283
+ };
1284
+ find: {
1285
+ /** 分页查询音色设计任务 */
1286
+ post: {
1287
+ body: {
1288
+ current: number;
1289
+ pageSize: number;
1290
+ where: {
1291
+ id?: string;
1292
+ name?: string;
1293
+ speakerID?: string;
1294
+ status?: string;
1295
+ };
1296
+ };
1297
+ return: any;
1298
+ };
1299
+ };
1300
+ findOne: {
1301
+ /** 根据 ID 查询音色设计详情 */
1302
+ post: {
1303
+ body: {
1304
+ id: string;
1305
+ };
1306
+ return: any;
1307
+ };
1308
+ };
1309
+ status: {
1310
+ /** 从上游刷新 SpeakerID 状态 */
1311
+ post: {
1312
+ body: {
1313
+ id: string;
1314
+ };
1315
+ return: any;
1316
+ };
1317
+ };
1318
+ options: {
1319
+ /** 获取音色设计下拉选项 */
1320
+ post: {
1321
+ return: any;
1322
+ };
1323
+ status: {
1324
+ /** 获取音色设计状态下拉选项 */
1325
+ post: {
1326
+ return: any;
1327
+ };
1328
+ };
1329
+ };
1330
+ };
1331
+ voiceTypes: {
1332
+ create: {
1333
+ /** 创建新音色类型 */
1334
+ post: {
1335
+ body: {
1336
+ name: string;
1337
+ value: string;
1338
+ modelIds: string[];
1339
+ promptTestDataIds: string[];
654
1340
  status: "enabled" | "disabled";
655
1341
  providers: string[];
656
1342
  description: string;
@@ -714,12 +1400,14 @@ export type Api = {
714
1400
  /** 获取音色下拉选项 */
715
1401
  post: {
716
1402
  body: {
717
- sceneKey?: string;
1403
+ voiceKind?: "official" | "clone" | "design";
1404
+ category?: string;
1405
+ resourceId?: string;
718
1406
  };
719
1407
  return: any;
720
1408
  };
721
- voiceScene: {
722
- /** 获取音色场景下拉选项 */
1409
+ categories: {
1410
+ /** 聚合 ListSpeakers 返回的分类列表 */
723
1411
  post: {
724
1412
  return: any;
725
1413
  };
@@ -732,11 +1420,16 @@ export type Api = {
732
1420
  post: {
733
1421
  body: {
734
1422
  copyVoiceId: string;
735
- audios: {
1423
+ audio: {
736
1424
  audioFormat: "wav" | "mp3" | "ogg" | "m4a" | "aac" | "pcm";
737
1425
  audioBytes: string;
738
1426
  text?: string;
739
- }[];
1427
+ extraParams?: {
1428
+ demoText?: string;
1429
+ enableAudioDenoise?: boolean;
1430
+ disableVolumeNormalization?: boolean;
1431
+ };
1432
+ };
740
1433
  language: number;
741
1434
  };
742
1435
  return: any;
@@ -781,56 +1474,22 @@ export type Api = {
781
1474
  };
782
1475
  };
783
1476
  };
784
- copyVoiceRenew: {
785
- create: {
786
- /** 创建声音复刻续期申请 */
787
- post: {
788
- body: {
789
- copyVoiceId: string;
790
- times: number;
791
- };
792
- return: any;
793
- };
794
- };
795
- find: {
796
- /** 分页查询声音复刻续期列表 */
797
- post: {
798
- body: {
799
- current: number;
800
- pageSize: number;
801
- where: {
802
- speakerID?: string;
803
- copyVoiceId?: string;
804
- status?: string;
805
- };
806
- };
807
- return: any;
808
- };
809
- };
810
- findOne: {
811
- /** 根据 ID 查询声音复刻续期详情 */
812
- post: {
813
- body: {
814
- id: string;
815
- };
816
- return: any;
817
- };
818
- };
819
- };
820
1477
  imageGeneration: {
821
1478
  create: {
822
- /** 创建新的图片生成任务 */
1479
+ /** 创建新的图片生成任务(火山方舟,后台异步处理) */
823
1480
  post: {
824
1481
  body: {
825
1482
  model: string;
826
1483
  prompt: string;
827
1484
  sizeType?: "resolution" | "pixel";
828
- size?: "1K" | "2K" | "4K";
1485
+ size?: "1K" | "2K" | "3K" | "4K";
829
1486
  width?: number;
830
1487
  height?: number;
831
1488
  watermark?: boolean;
832
- guidanceScale?: number;
833
- seed?: number;
1489
+ outputFormat?: "png" | "jpeg";
1490
+ referenceImageUrls?: string[];
1491
+ sequentialImageGeneration?: "disabled" | "auto";
1492
+ maxImages?: number;
834
1493
  };
835
1494
  return: any;
836
1495
  };
@@ -851,7 +1510,9 @@ export type Api = {
851
1510
  current: number;
852
1511
  pageSize: number;
853
1512
  where: {
1513
+ id?: string;
854
1514
  prompt?: string;
1515
+ status?: string;
855
1516
  };
856
1517
  };
857
1518
  return: any;
@@ -866,10 +1527,24 @@ export type Api = {
866
1527
  return: any;
867
1528
  };
868
1529
  };
1530
+ options: {
1531
+ status: {
1532
+ /** 获取图片生成任务状态下拉选项 */
1533
+ post: {
1534
+ return: any;
1535
+ };
1536
+ };
1537
+ model: {
1538
+ /** 获取豆包 Seedream 图片模型下拉选项 */
1539
+ post: {
1540
+ return: any;
1541
+ };
1542
+ };
1543
+ };
869
1544
  };
870
1545
  videoGeneration: {
871
1546
  create: {
872
- /** 创建新的视频生成任务 */
1547
+ /** 创建新的视频生成任务(提交不扣费,请轮询 /status) */
873
1548
  post: {
874
1549
  body: {
875
1550
  model?: string;
@@ -885,6 +1560,15 @@ export type Api = {
885
1560
  return: any;
886
1561
  };
887
1562
  };
1563
+ status: {
1564
+ /** 查询 Veo 任务状态 */
1565
+ post: {
1566
+ body: {
1567
+ id: string;
1568
+ };
1569
+ return: any;
1570
+ };
1571
+ };
888
1572
  delete: {
889
1573
  /** 删除视频生成任务 */
890
1574
  post: {
@@ -901,6 +1585,7 @@ export type Api = {
901
1585
  current: number;
902
1586
  pageSize: number;
903
1587
  where: {
1588
+ id?: string;
904
1589
  prompt?: string;
905
1590
  status?: string;
906
1591
  };
@@ -918,7 +1603,7 @@ export type Api = {
918
1603
  };
919
1604
  };
920
1605
  refresh: {
921
- /** 刷新视频生成任务状态 */
1606
+ /** 刷新视频生成任务状态(不扣费) */
922
1607
  post: {
923
1608
  body: {
924
1609
  id: string;
@@ -933,24 +1618,63 @@ export type Api = {
933
1618
  return: any;
934
1619
  };
935
1620
  };
1621
+ model: {
1622
+ /** 获取 Google Veo 视频模型下拉选项 */
1623
+ post: {
1624
+ return: any;
1625
+ };
1626
+ };
1627
+ };
1628
+ progress: {
1629
+ ':id': {
1630
+ /** 通过 SSE 实时获取视频生成任务进度(需登录,仅任务创建者可访问) */
1631
+ get: {
1632
+ params: {
1633
+ id: string;
1634
+ };
1635
+ return: any;
1636
+ };
1637
+ };
936
1638
  };
937
1639
  };
938
- geminiImage: {
1640
+ seedanceVideoGeneration: {
939
1641
  create: {
940
- /** 创建 Gemini 图片生成任务 */
1642
+ /** 提交火山方舟 Seedance 异步视频任务 */
941
1643
  post: {
942
1644
  body: {
943
- model?: string;
944
- prompt: string;
945
- negativePrompt?: string;
946
- aspectRatio?: string;
947
- numberOfImages?: number;
1645
+ model: string;
1646
+ content: unknown[];
1647
+ ratio?: string;
1648
+ duration?: number;
1649
+ resolution?: string;
1650
+ watermark?: boolean;
1651
+ generate_audio?: boolean;
1652
+ seed?: number;
1653
+ service_tier?: string;
1654
+ };
1655
+ return: any;
1656
+ };
1657
+ };
1658
+ status: {
1659
+ /** 轮询火山方舟任务状态 */
1660
+ post: {
1661
+ body: {
1662
+ id: string;
1663
+ };
1664
+ return: any;
1665
+ };
1666
+ };
1667
+ refresh: {
1668
+ /** 轮询上游任务状态 */
1669
+ post: {
1670
+ body: {
1671
+ id: string;
948
1672
  };
949
1673
  return: any;
950
1674
  };
951
1675
  };
952
1676
  delete: {
953
- /** 删除 Gemini 图片生成任务 */
1677
+ /** 删除 Seedance 视频任务记录 */
954
1678
  post: {
955
1679
  body: {
956
1680
  id: string;
@@ -959,12 +1683,13 @@ export type Api = {
959
1683
  };
960
1684
  };
961
1685
  find: {
962
- /** 分页查询 Gemini 图片列表 */
1686
+ /** 分页查询 Seedance 视频任务 */
963
1687
  post: {
964
1688
  body: {
965
- pageSize: number;
966
1689
  current: number;
967
- where?: {
1690
+ pageSize: number;
1691
+ where: {
1692
+ id?: string;
968
1693
  prompt?: string;
969
1694
  status?: string;
970
1695
  };
@@ -973,7 +1698,7 @@ export type Api = {
973
1698
  };
974
1699
  };
975
1700
  findOne: {
976
- /** 根据 ID 查询 Gemini 图片详情 */
1701
+ /** 查询单条 Seedance 视频任务 */
977
1702
  post: {
978
1703
  body: {
979
1704
  id: string;
@@ -983,7 +1708,152 @@ export type Api = {
983
1708
  };
984
1709
  options: {
985
1710
  status: {
986
- /** 获取 Gemini 图片状态下拉选项 */
1711
+ /** 获取 Seedance 视频任务状态下拉选项 */
1712
+ post: {
1713
+ return: any;
1714
+ };
1715
+ };
1716
+ };
1717
+ };
1718
+ mesh3dGeneration: {
1719
+ create: {
1720
+ /** 提交火山方舟 3D 异步生成任务 */
1721
+ post: {
1722
+ body: {
1723
+ model: string;
1724
+ content: unknown[];
1725
+ subdivision_level?: string;
1726
+ file_format?: string;
1727
+ seed?: number;
1728
+ };
1729
+ return: any;
1730
+ };
1731
+ };
1732
+ status: {
1733
+ /** 轮询火山方舟 3D 任务状态 */
1734
+ post: {
1735
+ body: {
1736
+ id: string;
1737
+ };
1738
+ return: any;
1739
+ };
1740
+ };
1741
+ refresh: {
1742
+ /** 轮询上游 3D 任务状态 */
1743
+ post: {
1744
+ body: {
1745
+ id: string;
1746
+ };
1747
+ return: any;
1748
+ };
1749
+ };
1750
+ delete: {
1751
+ /** 删除 3D 生成任务记录 */
1752
+ post: {
1753
+ body: {
1754
+ id: string;
1755
+ };
1756
+ return: any;
1757
+ };
1758
+ };
1759
+ find: {
1760
+ /** 分页查询 3D 生成任务 */
1761
+ post: {
1762
+ body: {
1763
+ current: number;
1764
+ pageSize: number;
1765
+ where: {
1766
+ id?: string;
1767
+ prompt?: string;
1768
+ status?: string;
1769
+ supplierId?: string;
1770
+ model?: string;
1771
+ };
1772
+ };
1773
+ return: any;
1774
+ };
1775
+ };
1776
+ findOne: {
1777
+ /** 查询单条 3D 生成任务 */
1778
+ post: {
1779
+ body: {
1780
+ id: string;
1781
+ };
1782
+ return: any;
1783
+ };
1784
+ };
1785
+ options: {
1786
+ status: {
1787
+ /** 获取 3D 生成任务状态下拉选项 */
1788
+ post: {
1789
+ return: any;
1790
+ };
1791
+ };
1792
+ };
1793
+ };
1794
+ geminiImage: {
1795
+ create: {
1796
+ /** 经 LLM Proxy 异步生成 Gemini 图片(提交不扣费,请轮询 /status) */
1797
+ post: {
1798
+ body: {
1799
+ model?: string;
1800
+ prompt: string;
1801
+ negativePrompt?: string;
1802
+ aspectRatio?: string;
1803
+ numberOfImages?: number;
1804
+ personGeneration?: string;
1805
+ resolution?: string;
1806
+ referenceImageBase64?: string;
1807
+ referenceImageMimeType?: string;
1808
+ };
1809
+ return: any;
1810
+ };
1811
+ };
1812
+ status: {
1813
+ /** 查询 Gemini 生图任务状态 */
1814
+ post: {
1815
+ body: {
1816
+ id: string;
1817
+ };
1818
+ return: any;
1819
+ };
1820
+ };
1821
+ delete: {
1822
+ /** 删除 Gemini 图片生成任务 */
1823
+ post: {
1824
+ body: {
1825
+ id: string;
1826
+ };
1827
+ return: any;
1828
+ };
1829
+ };
1830
+ find: {
1831
+ /** 分页查询 Gemini 图片列表 */
1832
+ post: {
1833
+ body: {
1834
+ pageSize: number;
1835
+ current: number;
1836
+ where?: {
1837
+ id?: string;
1838
+ prompt?: string;
1839
+ status?: string;
1840
+ };
1841
+ };
1842
+ return: any;
1843
+ };
1844
+ };
1845
+ findOne: {
1846
+ /** 根据 ID 查询 Gemini 图片详情 */
1847
+ post: {
1848
+ body: {
1849
+ id: string;
1850
+ };
1851
+ return: any;
1852
+ };
1853
+ };
1854
+ options: {
1855
+ status: {
1856
+ /** 获取 Gemini 图片状态下拉选项 */
987
1857
  post: {
988
1858
  return: any;
989
1859
  };
@@ -994,14 +1864,801 @@ export type Api = {
994
1864
  return: any;
995
1865
  };
996
1866
  };
997
- aspectRatio: {
998
- /** 获取 Gemini 图片宽高比下拉选项 */
1867
+ aspectRatio: {
1868
+ /** 获取 Gemini 图片宽高比下拉选项 */
1869
+ post: {
1870
+ return: any;
1871
+ };
1872
+ };
1873
+ resolution: {
1874
+ /** 获取 Gemini 图片分辨率下拉选项 */
1875
+ post: {
1876
+ return: any;
1877
+ };
1878
+ };
1879
+ };
1880
+ };
1881
+ billing: {
1882
+ balance: {
1883
+ /** 查询用户积分余额 */
1884
+ post: {
1885
+ body: Record<string, unknown>;
1886
+ return: any;
1887
+ };
1888
+ };
1889
+ estimate: {
1890
+ /** 根据 token 数量预估费用 */
1891
+ post: {
1892
+ body: {
1893
+ model: string;
1894
+ promptTokens: number;
1895
+ completionTokens: number;
1896
+ };
1897
+ return: any;
1898
+ };
1899
+ };
1900
+ usage: {
1901
+ stats: {
1902
+ /** 统计用户的 AI 使用情况 */
1903
+ post: {
1904
+ body: {
1905
+ userId?: string;
1906
+ model?: string;
1907
+ supplierId?: string;
1908
+ profileId?: string;
1909
+ protocolId?: string;
1910
+ startTime?: string;
1911
+ endTime?: string;
1912
+ };
1913
+ return: any;
1914
+ };
1915
+ };
1916
+ find: {
1917
+ /** 查询用户的 AI 使用记录 */
1918
+ post: {
1919
+ body: {
1920
+ userId?: string;
1921
+ model?: string;
1922
+ supplierId?: string;
1923
+ profileId?: string;
1924
+ protocolId?: string;
1925
+ billingRouteKey?: string;
1926
+ id?: string;
1927
+ requestId?: string;
1928
+ resourceId?: string;
1929
+ startTime?: string;
1930
+ endTime?: string;
1931
+ page?: number;
1932
+ pageSize?: number;
1933
+ };
1934
+ return: any;
1935
+ };
1936
+ };
1937
+ };
1938
+ trace: {
1939
+ resource: {
1940
+ /** 按 resourceId 查询用量与积分流水 */
1941
+ post: {
1942
+ body: {
1943
+ resourceId: string;
1944
+ serviceKey?: string;
1945
+ };
1946
+ return: any;
1947
+ };
1948
+ };
1949
+ };
1950
+ };
1951
+ modelCatalog: {
1952
+ suppliers: {
1953
+ find: {
1954
+ post: {
1955
+ body: {
1956
+ page?: number;
1957
+ pageSize?: number;
1958
+ keyword?: string;
1959
+ enabled?: boolean;
1960
+ supplierKind?: "agent_vendor" | "agent_proxy";
1961
+ agentVendorOnly?: boolean;
1962
+ platformUpstream?: "direct" | "proxy_railway";
1963
+ downstreamAccessMode?: "official" | "self_key";
1964
+ };
1965
+ return: any;
1966
+ };
1967
+ };
1968
+ options: {
1969
+ /** 筛选项、表单 Select 用供应商下拉 */
1970
+ post: {
1971
+ body: {
1972
+ enabled?: boolean;
1973
+ supplierKind?: "agent_vendor" | "agent_proxy";
1974
+ agentVendorOnly?: boolean;
1975
+ };
1976
+ return: any;
1977
+ };
1978
+ };
1979
+ upsert: {
1980
+ post: {
1981
+ body: {
1982
+ supplierId: string;
1983
+ name: string;
1984
+ supplierKind: "agent_vendor" | "agent_proxy";
1985
+ enabled?: boolean;
1986
+ description?: string;
1987
+ platformUpstream: "direct" | "proxy_railway";
1988
+ downstreamAccessModes: "official" | "self_key"[];
1989
+ };
1990
+ return: any;
1991
+ };
1992
+ };
1993
+ delete: {
1994
+ post: {
1995
+ body: {
1996
+ supplierId: string;
1997
+ };
1998
+ return: any;
1999
+ };
2000
+ };
2001
+ };
2002
+ productLines: {
2003
+ find: {
2004
+ post: {
2005
+ body: {
2006
+ page?: number;
2007
+ pageSize?: number;
2008
+ supplierId?: string;
2009
+ keyword?: string;
2010
+ enabled?: boolean;
2011
+ withStats?: boolean;
2012
+ };
2013
+ return: any;
2014
+ };
2015
+ };
2016
+ findOne: {
2017
+ post: {
2018
+ body: {
2019
+ productLineId: string;
2020
+ };
2021
+ return: any;
2022
+ };
2023
+ };
2024
+ options: {
2025
+ /** 筛选项、表单 Select 用产品线下拉 */
2026
+ post: {
2027
+ body: {
2028
+ supplierId?: string;
2029
+ enabled?: boolean;
2030
+ };
2031
+ return: any;
2032
+ };
2033
+ };
2034
+ create: {
2035
+ post: {
2036
+ body: {
2037
+ supplierId: string;
2038
+ productLineKey: string;
2039
+ label: string;
2040
+ };
2041
+ return: any;
2042
+ };
2043
+ };
2044
+ update: {
2045
+ post: {
2046
+ body: {
2047
+ productLineId: string;
2048
+ label?: string;
2049
+ enabled?: boolean;
2050
+ };
2051
+ return: any;
2052
+ };
2053
+ };
2054
+ delete: {
2055
+ post: {
2056
+ body: {
2057
+ productLineId: string;
2058
+ };
2059
+ return: any;
2060
+ };
2061
+ };
2062
+ };
2063
+ protocols: {
2064
+ find: {
2065
+ post: {
2066
+ body: {
2067
+ page?: number;
2068
+ pageSize?: number;
2069
+ supplierId?: string;
2070
+ keyword?: string;
2071
+ enabled?: boolean;
2072
+ chatRuntimeEnabled?: boolean;
2073
+ method?: "POST" | "GET";
2074
+ };
2075
+ return: any;
2076
+ };
2077
+ };
2078
+ listBySupplier: {
2079
+ post: {
2080
+ body: {
2081
+ supplierId: string;
2082
+ enabledOnly?: boolean;
2083
+ };
2084
+ return: any;
2085
+ };
2086
+ };
2087
+ create: {
2088
+ post: {
2089
+ body: {
2090
+ protocolId: string;
2091
+ supplierId: string;
2092
+ name: string;
2093
+ baseUrl: string;
2094
+ path: string;
2095
+ chatRuntimeProtocol?: string;
2096
+ method?: "POST" | "GET";
2097
+ docUrl?: string;
2098
+ description?: string;
2099
+ enabled?: boolean;
2100
+ };
2101
+ return: any;
2102
+ };
2103
+ };
2104
+ update: {
2105
+ post: {
2106
+ body: {
2107
+ protocolId: string;
2108
+ supplierId?: string;
2109
+ name?: string;
2110
+ baseUrl?: string;
2111
+ path?: string;
2112
+ chatRuntimeProtocol?: string;
2113
+ method?: "POST" | "GET";
2114
+ docUrl?: string;
2115
+ description?: string;
2116
+ enabled?: boolean;
2117
+ };
2118
+ return: any;
2119
+ };
2120
+ };
2121
+ delete: {
2122
+ post: {
2123
+ body: {
2124
+ protocolId: string;
2125
+ };
2126
+ return: any;
2127
+ };
2128
+ };
2129
+ supplierOptions: {
2130
+ /** 协议管理筛选用供应商全量(key/label) */
2131
+ post: {
2132
+ return: any;
2133
+ };
2134
+ };
2135
+ protocolOptions: {
2136
+ /** 按供应商加载接入协议选项(key/label) */
2137
+ post: {
2138
+ body: {
2139
+ supplierId: string;
2140
+ enabledOnly?: boolean;
2141
+ };
2142
+ return: any;
2143
+ };
2144
+ };
2145
+ };
2146
+ profiles: {
2147
+ find: {
2148
+ post: {
2149
+ body: {
2150
+ page?: number;
2151
+ pageSize?: number;
2152
+ referenceVendor?: string;
2153
+ family?: string;
2154
+ tag?: string;
2155
+ keyword?: string;
2156
+ status?: "active" | "deprecated";
2157
+ inputType?: "text" | "image" | "audio" | "video" | "embedding" | "mesh_3d";
2158
+ outputType?: "text" | "image" | "audio" | "video" | "embedding" | "mesh_3d";
2159
+ };
2160
+ return: any;
2161
+ };
2162
+ };
2163
+ listBrief: {
2164
+ post: {
2165
+ body: {
2166
+ enabledOnly?: boolean;
2167
+ };
2168
+ return: any;
2169
+ };
2170
+ };
2171
+ referenceVendorOptions: {
2172
+ /** 模型信息筛选用原厂供应商全量(key/label) */
2173
+ post: {
2174
+ body: {
2175
+ enabledOnly?: boolean;
2176
+ };
2177
+ return: any;
2178
+ };
2179
+ };
2180
+ create: {
2181
+ post: {
2182
+ body: {
2183
+ profileId: string;
2184
+ referenceVendor: string;
2185
+ name: string;
2186
+ family?: string;
2187
+ tags?: string[];
2188
+ description?: string;
2189
+ capabilities: {
2190
+ inputTypes: "text" | "image" | "audio" | "video" | "embedding" | "mesh_3d"[];
2191
+ outputType: "text" | "image" | "audio" | "video" | "embedding" | "mesh_3d";
2192
+ rateLimits?: {
2193
+ tpmPerMinute?: number;
2194
+ rpmPerMinute?: number;
2195
+ qpmPerMinute?: number;
2196
+ ipmPerMinute?: number;
2197
+ maxConcurrency?: number;
2198
+ };
2199
+ text?: {
2200
+ contextWindow?: number;
2201
+ maxInputTokens?: number;
2202
+ maxOutputTokens?: number;
2203
+ maxThinkingTokens?: number;
2204
+ };
2205
+ image?: {
2206
+ minWidth?: number;
2207
+ minHeight?: number;
2208
+ maxWidth?: number;
2209
+ maxHeight?: number;
2210
+ maxImagesPerRequest?: number;
2211
+ supportedAspectRatios?: string[];
2212
+ supportsInpainting?: boolean;
2213
+ };
2214
+ video?: {
2215
+ supportedResolutions?: string[];
2216
+ maxFps?: number;
2217
+ maxDurationSeconds?: number;
2218
+ minDurationSeconds?: number;
2219
+ supportedAspectRatios?: string[];
2220
+ supportsImageToVideo?: boolean;
2221
+ supportsVideoExtend?: boolean;
2222
+ };
2223
+ mesh3d?: {
2224
+ supportsImageTo3d?: boolean;
2225
+ outputFormats?: string[];
2226
+ maxPolygons?: number;
2227
+ };
2228
+ speech?: {
2229
+ mode: "tts" | "asr";
2230
+ billingMode?: "token_io" | "inference_chars" | "inference_hour" | "realtime_duplex";
2231
+ };
2232
+ embedding?: {
2233
+ contextWindow?: number;
2234
+ dimensions?: number;
2235
+ maxInputTokens?: number;
2236
+ maxBatchSize?: number;
2237
+ normalization?: "l2" | "none";
2238
+ };
2239
+ webSearchDetail?: {
2240
+ maxResults?: number;
2241
+ };
2242
+ thinking?: boolean;
2243
+ structuredOutput?: boolean;
2244
+ contextCache?: boolean;
2245
+ onlineInference?: boolean;
2246
+ lowLatencyInference?: boolean;
2247
+ batchInference?: boolean;
2248
+ fineTuning?: boolean;
2249
+ toolUse?: boolean;
2250
+ webSearch?: boolean;
2251
+ knowledgeBase?: boolean;
2252
+ mcp?: boolean;
2253
+ };
2254
+ status?: "active" | "deprecated";
2255
+ };
2256
+ return: any;
2257
+ };
2258
+ };
2259
+ update: {
2260
+ post: {
2261
+ body: {
2262
+ profileId: string;
2263
+ referenceVendor?: string;
2264
+ name?: string;
2265
+ family?: string;
2266
+ tags?: string[];
2267
+ description?: string;
2268
+ capabilities?: {
2269
+ inputTypes: "text" | "image" | "audio" | "video" | "embedding" | "mesh_3d"[];
2270
+ outputType: "text" | "image" | "audio" | "video" | "embedding" | "mesh_3d";
2271
+ rateLimits?: {
2272
+ tpmPerMinute?: number;
2273
+ rpmPerMinute?: number;
2274
+ qpmPerMinute?: number;
2275
+ ipmPerMinute?: number;
2276
+ maxConcurrency?: number;
2277
+ };
2278
+ text?: {
2279
+ contextWindow?: number;
2280
+ maxInputTokens?: number;
2281
+ maxOutputTokens?: number;
2282
+ maxThinkingTokens?: number;
2283
+ };
2284
+ image?: {
2285
+ minWidth?: number;
2286
+ minHeight?: number;
2287
+ maxWidth?: number;
2288
+ maxHeight?: number;
2289
+ maxImagesPerRequest?: number;
2290
+ supportedAspectRatios?: string[];
2291
+ supportsInpainting?: boolean;
2292
+ };
2293
+ video?: {
2294
+ supportedResolutions?: string[];
2295
+ maxFps?: number;
2296
+ maxDurationSeconds?: number;
2297
+ minDurationSeconds?: number;
2298
+ supportedAspectRatios?: string[];
2299
+ supportsImageToVideo?: boolean;
2300
+ supportsVideoExtend?: boolean;
2301
+ };
2302
+ mesh3d?: {
2303
+ supportsImageTo3d?: boolean;
2304
+ outputFormats?: string[];
2305
+ maxPolygons?: number;
2306
+ };
2307
+ speech?: {
2308
+ mode: "tts" | "asr";
2309
+ billingMode?: "token_io" | "inference_chars" | "inference_hour" | "realtime_duplex";
2310
+ };
2311
+ embedding?: {
2312
+ contextWindow?: number;
2313
+ dimensions?: number;
2314
+ maxInputTokens?: number;
2315
+ maxBatchSize?: number;
2316
+ normalization?: "l2" | "none";
2317
+ };
2318
+ webSearchDetail?: {
2319
+ maxResults?: number;
2320
+ };
2321
+ thinking?: boolean;
2322
+ structuredOutput?: boolean;
2323
+ contextCache?: boolean;
2324
+ onlineInference?: boolean;
2325
+ lowLatencyInference?: boolean;
2326
+ batchInference?: boolean;
2327
+ fineTuning?: boolean;
2328
+ toolUse?: boolean;
2329
+ webSearch?: boolean;
2330
+ knowledgeBase?: boolean;
2331
+ mcp?: boolean;
2332
+ };
2333
+ status?: "active" | "deprecated";
2334
+ };
2335
+ return: any;
2336
+ };
2337
+ };
2338
+ delete: {
2339
+ post: {
2340
+ body: {
2341
+ profileId: string;
2342
+ };
2343
+ return: any;
2344
+ };
2345
+ };
2346
+ };
2347
+ offerings: {
2348
+ supplierOptions: {
2349
+ /** 管理后台筛选用供应商全量(key/label) */
2350
+ post: {
2351
+ return: any;
2352
+ };
2353
+ };
2354
+ profileOptions: {
2355
+ /** 管理后台筛选用模型信息全量(key/label) */
2356
+ post: {
2357
+ return: any;
2358
+ };
2359
+ };
2360
+ modelOptions: {
2361
+ /** 管理后台筛选用计费标识全量(key/label/value,支持联动筛选) */
2362
+ post: {
2363
+ body: {
2364
+ supplierId?: string;
2365
+ profileId?: string;
2366
+ protocolId?: string;
2367
+ productLineId?: string;
2368
+ billingRouteKey?: string;
2369
+ tag?: string;
2370
+ enabled?: boolean;
2371
+ };
2372
+ return: any;
2373
+ };
2374
+ };
2375
+ };
2376
+ models: {
2377
+ find: {
2378
+ post: {
2379
+ body: {
2380
+ page?: number;
2381
+ pageSize?: number;
2382
+ profileId?: string;
2383
+ referenceVendor?: string;
2384
+ supplierId?: string;
2385
+ supplierKind?: "agent_vendor" | "agent_proxy";
2386
+ protocolId?: string;
2387
+ tag?: string;
2388
+ productLineId?: string;
2389
+ billingRouteKey?: string;
2390
+ keyword?: string;
2391
+ enabled?: boolean;
2392
+ platformAvailable?: boolean;
2393
+ };
2394
+ return: any;
2395
+ };
2396
+ };
2397
+ unconfigured: {
999
2398
  post: {
2399
+ body: {
2400
+ supplierId?: string;
2401
+ supplierKind?: "agent_vendor" | "agent_proxy";
2402
+ };
1000
2403
  return: any;
1001
2404
  };
1002
2405
  };
1003
- resolution: {
1004
- /** 获取 Gemini 图片分辨率下拉选项 */
2406
+ create: {
2407
+ post: {
2408
+ body: {
2409
+ profileId: string;
2410
+ supplierId: string;
2411
+ productLineId: string;
2412
+ protocolId: string;
2413
+ providerModelId: string;
2414
+ name?: string;
2415
+ version?: string;
2416
+ status?: "active" | "deprecated";
2417
+ enabled?: boolean;
2418
+ description?: string;
2419
+ };
2420
+ return: any;
2421
+ };
2422
+ };
2423
+ update: {
2424
+ post: {
2425
+ body: {
2426
+ modelId: string;
2427
+ supplierId?: string;
2428
+ profileId?: string;
2429
+ productLineId?: string;
2430
+ protocolId?: string;
2431
+ providerModelId?: string;
2432
+ name?: string;
2433
+ version?: string;
2434
+ status?: "active" | "deprecated";
2435
+ enabled?: boolean;
2436
+ description?: string;
2437
+ };
2438
+ return: any;
2439
+ };
2440
+ };
2441
+ delete: {
2442
+ post: {
2443
+ body: {
2444
+ modelId: string;
2445
+ };
2446
+ return: any;
2447
+ };
2448
+ };
2449
+ };
2450
+ chat: {
2451
+ supplierOptions: {
2452
+ /** 获取下游应用对话模型设置可用的供应商(与 Ones 已启用 aiSupplier 列表一致) */
2453
+ post: {
2454
+ return: any;
2455
+ };
2456
+ };
2457
+ modelOptions: {
2458
+ /** 获取下游应用可用的对话模型目录项(已启用 text_generation) */
2459
+ post: {
2460
+ body: {
2461
+ supplierIds?: string[];
2462
+ };
2463
+ return: any;
2464
+ };
2465
+ };
2466
+ integrationExport: {
2467
+ /** 按 offeringModelId 生成 LLMConfig 片段与下游 API 说明,供 Ones 复制或调试 */
2468
+ post: {
2469
+ body: {
2470
+ offeringModelId: string;
2471
+ };
2472
+ return: any;
2473
+ };
2474
+ };
2475
+ reloadRuntime: {
2476
+ /** 目录或 Key 变更后,从 Mongo 重新编译 /agent/* 可用模型(无需重启进程) */
2477
+ post: {
2478
+ return: any;
2479
+ };
2480
+ };
2481
+ };
2482
+ prompt: {
2483
+ supplierOptions: {
2484
+ /** Prompt 模块:筛选平台 Runtime 已就绪的文本模型供应商 */
2485
+ post: {
2486
+ return: any;
2487
+ };
2488
+ };
2489
+ modelOptions: {
2490
+ /** Prompt 模块:从平台 Runtime 目录筛选文本模型(offering modelId + providerModelId) */
2491
+ post: {
2492
+ body: {
2493
+ supplierIds?: string[];
2494
+ };
2495
+ return: any;
2496
+ };
2497
+ };
2498
+ };
2499
+ };
2500
+ billingCatalog: {
2501
+ suppliers: {
2502
+ options: {
2503
+ /** 筛选项、表单 Select 用供应商下拉 */
2504
+ post: {
2505
+ body: {
2506
+ enabled?: boolean;
2507
+ supplierKind?: "agent_vendor" | "agent_proxy";
2508
+ agentVendorOnly?: boolean;
2509
+ };
2510
+ return: any;
2511
+ };
2512
+ };
2513
+ };
2514
+ models: {
2515
+ find: {
2516
+ post: {
2517
+ body: {
2518
+ page?: number;
2519
+ pageSize?: number;
2520
+ supplierId?: string;
2521
+ profileId?: string;
2522
+ protocolId?: string;
2523
+ tag?: string;
2524
+ keyword?: string;
2525
+ enabled?: boolean;
2526
+ };
2527
+ return: any;
2528
+ };
2529
+ };
2530
+ };
2531
+ billingEntries: {
2532
+ find: {
2533
+ /** 按 supplier+profile 聚合的价表列表 */
2534
+ post: {
2535
+ body: {
2536
+ page?: number;
2537
+ pageSize?: number;
2538
+ supplierId?: string;
2539
+ profileId?: string;
2540
+ productLine?: "" | "text" | "multimodal" | "image_gen" | "video_gen" | "mesh_3d" | "embedding" | "speech_tts" | "speech_voice_clone" | "speech_voice_design" | "speech_asr_file" | "speech_asr_stream" | "speech_si" | "speech_realtime_duplex";
2541
+ keyword?: string;
2542
+ pricingConfigured?: boolean;
2543
+ billable?: boolean;
2544
+ };
2545
+ return: any;
2546
+ };
2547
+ };
2548
+ unconfigured: {
2549
+ post: {
2550
+ body: {
2551
+ supplierId?: string;
2552
+ productLine?: "" | "text" | "multimodal" | "image_gen" | "video_gen" | "mesh_3d" | "embedding" | "speech_tts" | "speech_voice_clone" | "speech_voice_design" | "speech_asr_file" | "speech_asr_stream" | "speech_si" | "speech_realtime_duplex";
2553
+ keyword?: string;
2554
+ };
2555
+ return: any;
2556
+ };
2557
+ };
2558
+ findOne: {
2559
+ post: {
2560
+ body: {
2561
+ supplierId: string;
2562
+ profileId: string;
2563
+ };
2564
+ return: any;
2565
+ };
2566
+ };
2567
+ statuses: {
2568
+ post: {
2569
+ return: any;
2570
+ };
2571
+ };
2572
+ };
2573
+ modelPricing: {
2574
+ delete: {
2575
+ post: {
2576
+ body: {
2577
+ supplierId: string;
2578
+ profileId: string;
2579
+ };
2580
+ return: any;
2581
+ };
2582
+ };
2583
+ };
2584
+ builtinServices: {
2585
+ options: {
2586
+ /** 只读内置服务与价目表 catalog */
2587
+ post: {
2588
+ body: {
2589
+ group?: "ai" | "storage" | "platform";
2590
+ };
2591
+ return: any;
2592
+ };
2593
+ };
2594
+ };
2595
+ exchangeRate: {
2596
+ findOne: {
2597
+ post: {
2598
+ return: any;
2599
+ };
2600
+ };
2601
+ update: {
2602
+ post: {
2603
+ body: {
2604
+ usdToCny: number;
2605
+ };
2606
+ return: any;
2607
+ };
2608
+ };
2609
+ };
2610
+ };
2611
+ embeddings: {
2612
+ create: {
2613
+ /** 将文本转换为向量(豆包 doubao-embedding-vision-250615),含计费 */
2614
+ post: {
2615
+ body: {
2616
+ model?: string;
2617
+ input: string;
2618
+ dimensions?: number;
2619
+ instructions?: string;
2620
+ };
2621
+ return: any;
2622
+ };
2623
+ };
2624
+ delete: {
2625
+ /** 删除向量生成任务记录 */
2626
+ post: {
2627
+ body: {
2628
+ id: string;
2629
+ };
2630
+ return: any;
2631
+ };
2632
+ };
2633
+ find: {
2634
+ /** 分页查询向量生成任务 */
2635
+ post: {
2636
+ body: {
2637
+ current: number;
2638
+ pageSize: number;
2639
+ where: {
2640
+ id?: string;
2641
+ input?: string;
2642
+ supplierId?: string;
2643
+ model?: string;
2644
+ status?: string;
2645
+ };
2646
+ };
2647
+ return: any;
2648
+ };
2649
+ };
2650
+ findOne: {
2651
+ /** 查询单条向量生成任务 */
2652
+ post: {
2653
+ body: {
2654
+ id: string;
2655
+ };
2656
+ return: any;
2657
+ };
2658
+ };
2659
+ options: {
2660
+ status: {
2661
+ /** 获取向量任务状态下拉选项 */
1005
2662
  post: {
1006
2663
  return: any;
1007
2664
  };
@@ -1035,39 +2692,155 @@ export type Api = {
1035
2692
  /** API 客户端类型(提供完整的 IDE 智能提示) */
1036
2693
  export interface ApiClient {
1037
2694
  health: {
1038
- get: (config?: RequestConfig) => Promise<ApiResponse<any>>;
2695
+ get: (config?: RequestConfig) => RequestBuilder<any>;
1039
2696
  };
1040
2697
  'api-spec': {
1041
2698
  /** 获取 API 规范,用于类型同步 */
1042
- get: (config?: RequestConfig) => Promise<ApiResponse<any>>;
2699
+ get: (config?: RequestConfig) => RequestBuilder<any>;
1043
2700
  };
1044
- chat: {
2701
+ agent: {
1045
2702
  models: {
1046
- /** 获取聊天可用的 AI 模型列表 */
1047
- get: (config?: RequestConfig) => Promise<ApiResponse<any>>;
2703
+ /** 获取 Platform Agent 支持的模型列表(含定价信息) */
2704
+ get: (config?: RequestConfig) => RequestBuilder<any>;
1048
2705
  };
1049
2706
  stream: {
1050
- /** 发起流式 AI 对话请求 */
2707
+ /** 发起流式 AI 对话请求(SSE),含计费 */
1051
2708
  post: (body: {
1052
- message: string;
2709
+ message?: string;
1053
2710
  images?: string[];
2711
+ sessionId?: string;
2712
+ tools?: {
2713
+ name: string;
2714
+ description: string;
2715
+ parameters: {
2716
+ type: "object";
2717
+ properties: Record<string, {
2718
+ type?: string;
2719
+ description?: string;
2720
+ properties?: Record<string, unknown>;
2721
+ items?: unknown;
2722
+ required?: string[];
2723
+ enum?: unknown[];
2724
+ default?: unknown;
2725
+ }>;
2726
+ required?: string[];
2727
+ description?: string;
2728
+ };
2729
+ }[];
2730
+ skillContents?: string[];
1054
2731
  options?: {
1055
2732
  mode?: "agent" | "ask";
1056
2733
  model?: string;
1057
- provider?: "ark" | "deepseek" | "qwen" | "gemini" | "openai" | "anthropic";
1058
2734
  enableWebSearch?: boolean;
1059
2735
  thinkingMode?: "enabled" | "disabled";
1060
2736
  enabledTools?: string[];
2737
+ autoRunConfig?: {
2738
+ mode?: "off" | "run-everything" | "approve-all";
2739
+ };
1061
2740
  history?: {
1062
2741
  role: "user" | "assistant" | "system" | "tool";
1063
2742
  content: string;
2743
+ tool_call_id?: string;
2744
+ tool_calls?: {
2745
+ id: string;
2746
+ type: "function";
2747
+ function: {
2748
+ name: string;
2749
+ arguments: string;
2750
+ };
2751
+ }[];
1064
2752
  }[];
2753
+ serviceTier?: string;
2754
+ billingPlan?: "online_standard" | "online_low_latency" | "batch";
2755
+ };
2756
+ }, config?: RequestConfig) => RequestBuilder<any>;
2757
+ };
2758
+ complete: {
2759
+ /** 创建 Agent 非流式补全请求(含计费),使用 ai-chat-core 统一引擎 */
2760
+ post: (body: {
2761
+ model: string;
2762
+ max_tokens?: number;
2763
+ temperature?: number;
2764
+ messages: {
2765
+ role: "user" | "assistant" | "system";
2766
+ content: string | unknown[];
2767
+ }[];
2768
+ service_tier?: string;
2769
+ billing_plan?: "online_standard" | "online_low_latency" | "batch";
2770
+ }, config?: RequestConfig) => RequestBuilder<any>;
2771
+ };
2772
+ cancel: {
2773
+ /** 取消正在进行的对话请求 */
2774
+ post: (config?: RequestConfig) => RequestBuilder<any>;
2775
+ };
2776
+ sessions: {
2777
+ /** 获取当前用户的所有会话 */
2778
+ get: (config?: RequestConfig) => RequestBuilder<any>;
2779
+ /** 创建新的聊天会话 */
2780
+ post: (body: {
2781
+ title?: string;
2782
+ model?: string;
2783
+ mode?: "agent" | "ask";
2784
+ webSearchEnabled?: boolean;
2785
+ thinkingEnabled?: boolean;
2786
+ }, config?: RequestConfig) => RequestBuilder<any>;
2787
+ ':id': {
2788
+ /** 更新会话信息 */
2789
+ put: (body: {
2790
+ title?: string;
2791
+ model?: string;
2792
+ mode?: "agent" | "ask";
2793
+ webSearchEnabled?: boolean;
2794
+ thinkingEnabled?: boolean;
2795
+ hidden?: boolean;
2796
+ }, config?: RequestConfig) => RequestBuilder<any>;
2797
+ /** 删除会话及其所有消息 */
2798
+ delete: (config?: RequestConfig) => RequestBuilder<any>;
2799
+ messages: {
2800
+ /** 获取会话的所有消息 */
2801
+ get: (config?: RequestConfig) => RequestBuilder<any>;
2802
+ /** 保存聊天消息 */
2803
+ post: (body: {
2804
+ id?: string;
2805
+ role: "user" | "assistant";
2806
+ content: string;
2807
+ images?: string[];
2808
+ model?: string;
2809
+ mode?: string;
2810
+ webSearchEnabled?: boolean;
2811
+ thinkingEnabled?: boolean;
2812
+ steps?: string;
2813
+ operationIds?: string;
2814
+ }, config?: RequestConfig) => RequestBuilder<any>;
2815
+ after: {
2816
+ ':id': {
2817
+ /** 用于分叉:删除指定消息之后的所有消息 */
2818
+ delete: (config?: RequestConfig) => RequestBuilder<any>;
2819
+ };
2820
+ };
1065
2821
  };
1066
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2822
+ };
2823
+ };
2824
+ messages: {
2825
+ ':id': {
2826
+ /** 更新消息内容(支持 usage、duration、operationIds),含归属验证 */
2827
+ put: (body: {
2828
+ content?: string;
2829
+ steps?: string;
2830
+ operationIds?: string;
2831
+ usage?: string;
2832
+ duration?: number;
2833
+ }, config?: RequestConfig) => RequestBuilder<any>;
2834
+ };
1067
2835
  };
1068
- abort: {
1069
- /** 中止正在进行的对话请求 */
1070
- post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
2836
+ settings: {
2837
+ /** 获取用户的 Platform Agent 设置 */
2838
+ get: (config?: RequestConfig) => RequestBuilder<any>;
2839
+ /** 更新用户的 Platform Agent 设置 */
2840
+ put: (body: {
2841
+ key: string;
2842
+ value: string;
2843
+ }, config?: RequestConfig) => RequestBuilder<any>;
1071
2844
  };
1072
2845
  };
1073
2846
  models: {
@@ -1104,13 +2877,13 @@ export interface ApiClient {
1104
2877
  baseURL: string;
1105
2878
  mappingModel: string;
1106
2879
  }[];
1107
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2880
+ }, config?: RequestConfig) => RequestBuilder<any>;
1108
2881
  };
1109
2882
  delete: {
1110
2883
  /** 删除模型配置 */
1111
2884
  post: (body: {
1112
2885
  id: string;
1113
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2886
+ }, config?: RequestConfig) => RequestBuilder<any>;
1114
2887
  };
1115
2888
  update: {
1116
2889
  /** 更新模型配置 */
@@ -1145,7 +2918,7 @@ export interface ApiClient {
1145
2918
  baseURL: string;
1146
2919
  mappingModel: string;
1147
2920
  }[];
1148
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2921
+ }, config?: RequestConfig) => RequestBuilder<any>;
1149
2922
  };
1150
2923
  find: {
1151
2924
  /** 分页查询模型配置列表 */
@@ -1156,31 +2929,31 @@ export interface ApiClient {
1156
2929
  name?: string;
1157
2930
  provider?: string;
1158
2931
  };
1159
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2932
+ }, config?: RequestConfig) => RequestBuilder<any>;
1160
2933
  };
1161
2934
  findOne: {
1162
2935
  /** 根据 ID 查询模型详情 */
1163
2936
  post: (body: {
1164
2937
  id: string;
1165
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2938
+ }, config?: RequestConfig) => RequestBuilder<any>;
1166
2939
  };
1167
2940
  options: {
1168
2941
  /** 获取模型下拉选项 */
1169
2942
  post: (body: {
1170
2943
  providers?: string[];
1171
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2944
+ }, config?: RequestConfig) => RequestBuilder<any>;
1172
2945
  };
1173
2946
  typesOptions: {
1174
2947
  /** 获取模型类型下拉选项 */
1175
- post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
2948
+ post: (config?: RequestConfig) => RequestBuilder<any>;
1176
2949
  };
1177
2950
  modelProviderOptions: {
1178
2951
  /** 获取模型供应商下拉选项 */
1179
- post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
2952
+ post: (config?: RequestConfig) => RequestBuilder<any>;
1180
2953
  };
1181
2954
  tagsOptions: {
1182
2955
  /** 获取模型标签下拉选项 */
1183
- post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
2956
+ post: (config?: RequestConfig) => RequestBuilder<any>;
1184
2957
  };
1185
2958
  };
1186
2959
  prompts: {
@@ -1192,15 +2965,15 @@ export interface ApiClient {
1192
2965
  modelIds: string[];
1193
2966
  promptTestDataIds: string[];
1194
2967
  status: "enabled" | "disabled";
1195
- providers: "ark" | "deepseek" | "qwen" | "gemini" | "openai" | "anthropic" | "openrouter"[];
2968
+ providers: string[];
1196
2969
  description: string;
1197
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2970
+ }, config?: RequestConfig) => RequestBuilder<any>;
1198
2971
  };
1199
2972
  delete: {
1200
2973
  /** 删除提示词 */
1201
2974
  post: (body: {
1202
2975
  id: string;
1203
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2976
+ }, config?: RequestConfig) => RequestBuilder<any>;
1204
2977
  };
1205
2978
  update: {
1206
2979
  /** 更新提示词内容 */
@@ -1211,9 +2984,9 @@ export interface ApiClient {
1211
2984
  modelIds: string[];
1212
2985
  promptTestDataIds: string[];
1213
2986
  status: "enabled" | "disabled";
1214
- providers: "ark" | "deepseek" | "qwen" | "gemini" | "openai" | "anthropic" | "openrouter"[];
2987
+ providers: string[];
1215
2988
  description: string;
1216
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2989
+ }, config?: RequestConfig) => RequestBuilder<any>;
1217
2990
  };
1218
2991
  find: {
1219
2992
  /** 分页查询提示词列表 */
@@ -1228,55 +3001,245 @@ export interface ApiClient {
1228
3001
  providerId?: string;
1229
3002
  status?: string;
1230
3003
  };
1231
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3004
+ }, config?: RequestConfig) => RequestBuilder<any>;
3005
+ };
3006
+ findOne: {
3007
+ /** 根据 ID 查询提示词详情 */
3008
+ post: (body: {
3009
+ id: string;
3010
+ }, config?: RequestConfig) => RequestBuilder<any>;
3011
+ };
3012
+ options: {
3013
+ /** 获取提示词下拉选项 */
3014
+ post: (config?: RequestConfig) => RequestBuilder<any>;
3015
+ };
3016
+ run: {
3017
+ /** 基于提示词模板进行 AI 补全(含计费) */
3018
+ post: (body: {
3019
+ promptId: string;
3020
+ promptVars: {
3021
+ key: string;
3022
+ value: unknown;
3023
+ }[];
3024
+ model: string;
3025
+ max_tokens?: number;
3026
+ temperature?: number;
3027
+ service_tier?: string;
3028
+ billing_plan?: "online_standard" | "online_low_latency" | "batch";
3029
+ }, config?: RequestConfig) => RequestBuilder<any>;
3030
+ models: {
3031
+ /** 获取指定提示词可用的模型列表 */
3032
+ post: (body: {
3033
+ promptId: string;
3034
+ }, config?: RequestConfig) => RequestBuilder<any>;
3035
+ };
3036
+ };
3037
+ };
3038
+ dashscope: {
3039
+ 'compatible-mode': {
3040
+ v1: {
3041
+ chat: {
3042
+ completions: {
3043
+ /** 原样代理 DashScope compatible-mode /chat/completions,并统一加登录态、额度和计费 */
3044
+ post: (body: Record<string, unknown>, config?: RequestConfig) => RequestBuilder<any>;
3045
+ };
3046
+ };
3047
+ };
3048
+ };
3049
+ api: {
3050
+ v1: {
3051
+ services: {
3052
+ aigc: {
3053
+ 'text-generation': {
3054
+ generation: {
3055
+ /** 原样代理 DashScope 原生 text-generation,并统一加登录态、额度和计费 */
3056
+ post: (body: Record<string, unknown>, config?: RequestConfig) => RequestBuilder<any>;
3057
+ };
3058
+ };
3059
+ 'multimodal-generation': {
3060
+ generation: {
3061
+ /** 原样代理 DashScope 原生 multimodal-generation,并统一加登录态、额度和计费 */
3062
+ post: (body: Record<string, unknown>, config?: RequestConfig) => RequestBuilder<any>;
3063
+ };
3064
+ };
3065
+ };
3066
+ };
3067
+ };
3068
+ };
3069
+ };
3070
+ deepseek: {
3071
+ v1: {
3072
+ chat: {
3073
+ completions: {
3074
+ /** 原样代理 DeepSeek /chat/completions,并统一加登录态、额度和计费 */
3075
+ post: (body: Record<string, unknown>, config?: RequestConfig) => RequestBuilder<any>;
3076
+ };
3077
+ };
3078
+ };
3079
+ };
3080
+ openrouter: {
3081
+ v1: {
3082
+ chat: {
3083
+ completions: {
3084
+ /** 原样代理 OpenRouter /chat/completions,并统一加登录态、额度和计费 */
3085
+ post: (body: Record<string, unknown>, config?: RequestConfig) => RequestBuilder<any>;
3086
+ };
3087
+ };
3088
+ };
3089
+ };
3090
+ openai: {
3091
+ v1: {
3092
+ responses: {
3093
+ /** 原样代理 OpenAI /responses,并统一加登录态、额度和计费 */
3094
+ post: (body: Record<string, unknown>, config?: RequestConfig) => RequestBuilder<any>;
3095
+ };
3096
+ chat: {
3097
+ completions: {
3098
+ /** 原样代理 OpenAI /chat/completions,并统一加登录态、额度和计费 */
3099
+ post: (body: Record<string, unknown>, config?: RequestConfig) => RequestBuilder<any>;
3100
+ };
3101
+ };
3102
+ images: {
3103
+ generations: {
3104
+ /** 原样代理 OpenAI /images/generations(DALL·E 按张 · GPT Image 按 token) */
3105
+ post: (body: Record<string, unknown>, config?: RequestConfig) => RequestBuilder<any>;
3106
+ };
3107
+ edits: {
3108
+ /** 原样代理 OpenAI /images/edits(GPT Image 按 token · multipart) */
3109
+ post: (config?: RequestConfig) => RequestBuilder<any>;
3110
+ };
3111
+ };
3112
+ };
3113
+ };
3114
+ anthropic: {
3115
+ v1: {
3116
+ messages: {
3117
+ /** 原样代理 Anthropic /messages,并统一加登录态、额度和计费 */
3118
+ post: (body: Record<string, unknown>, config?: RequestConfig) => RequestBuilder<any>;
3119
+ };
3120
+ };
3121
+ };
3122
+ gemini: {
3123
+ v1beta: {
3124
+ models: {
3125
+ ':id': {
3126
+ /** 原样代理 Gemini /models/{model}:generateContent 等接口,并统一加登录态、额度和计费 */
3127
+ post: (body: Record<string, unknown>, config?: RequestConfig) => RequestBuilder<any>;
3128
+ };
3129
+ };
1232
3130
  };
1233
- findOne: {
1234
- /** 根据 ID 查询提示词详情 */
1235
- post: (body: {
1236
- id: string;
1237
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3131
+ };
3132
+ glm: {
3133
+ v1: {
3134
+ chat: {
3135
+ completions: {
3136
+ /** 原样代理 GLM /chat/completions,并统一加登录态、额度和计费 */
3137
+ post: (body: Record<string, unknown>, config?: RequestConfig) => RequestBuilder<any>;
3138
+ };
3139
+ };
1238
3140
  };
1239
- options: {
1240
- /** 获取提示词下拉选项 */
1241
- post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
3141
+ };
3142
+ grok: {
3143
+ v1: {
3144
+ responses: {
3145
+ /** 通过 LLM Proxy 原样代理 Grok /responses,并统一加登录态、额度和计费 */
3146
+ post: (body: Record<string, unknown>, config?: RequestConfig) => RequestBuilder<any>;
3147
+ };
3148
+ chat: {
3149
+ completions: {
3150
+ /** 通过 LLM Proxy 原样代理 Grok /chat/completions,并统一加登录态、额度和计费 */
3151
+ post: (body: Record<string, unknown>, config?: RequestConfig) => RequestBuilder<any>;
3152
+ };
3153
+ };
3154
+ images: {
3155
+ generations: {
3156
+ /** 通过 LLM Proxy 原样代理 Grok /images/generations,并按张计费 */
3157
+ post: (body: Record<string, unknown>, config?: RequestConfig) => RequestBuilder<any>;
3158
+ };
3159
+ };
3160
+ videos: {
3161
+ generations: {
3162
+ /** 通过 LLM Proxy 代理 Grok /videos/generations,提交任务不扣费 */
3163
+ post: (body: Record<string, unknown>, config?: RequestConfig) => RequestBuilder<any>;
3164
+ };
3165
+ ':id': {
3166
+ /** 通过 LLM Proxy 转发 Grok /videos/{request_id},视频生成成功后按秒扣费 */
3167
+ get: (config?: RequestConfig) => RequestBuilder<any>;
3168
+ };
3169
+ };
1242
3170
  };
1243
3171
  };
1244
- completions: {
1245
- create: {
1246
- /** 创建 AI 补全请求 */
1247
- post: (body: {
1248
- model: string;
1249
- max_tokens?: number;
1250
- stream?: boolean;
1251
- temperature?: number;
3172
+ moonshot: {
3173
+ v1: {
3174
+ chat: {
3175
+ completions: {
3176
+ /** 原样代理 Moonshot /chat/completions,并统一加登录态、额度和计费 */
3177
+ post: (body: Record<string, unknown>, config?: RequestConfig) => RequestBuilder<any>;
3178
+ };
3179
+ };
3180
+ };
3181
+ };
3182
+ minimax: {
3183
+ anthropic: {
3184
+ v1: {
1252
3185
  messages: {
1253
- role: "user" | "assistant" | "system";
1254
- content: string | unknown[];
1255
- }[];
1256
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3186
+ /** 原样代理 MiniMax Anthropic /messages,并统一加登录态、额度和计费 */
3187
+ post: (body: Record<string, unknown>, config?: RequestConfig) => RequestBuilder<any>;
3188
+ };
3189
+ };
1257
3190
  };
1258
- prompt: {
1259
- /** 基于提示词模板进行 AI 补全 */
1260
- post: (body: {
1261
- promptId: string;
1262
- promptVars: {
1263
- key: string;
1264
- value: unknown;
1265
- }[];
1266
- model: string;
1267
- max_tokens?: number;
1268
- stream?: boolean;
1269
- temperature?: number;
1270
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1271
- models: {
1272
- /** 获取指定提示词可用的模型列表 */
1273
- post: (body: {
1274
- promptId: string;
1275
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3191
+ };
3192
+ volcengine: {
3193
+ ark: {
3194
+ api: {
3195
+ v3: {
3196
+ responses: {
3197
+ /** 原样代理火山方舟原厂 /api/v3/responses,并统一加登录态、额度和计费 */
3198
+ post: (body: Record<string, unknown>, config?: RequestConfig) => RequestBuilder<any>;
3199
+ };
3200
+ chat: {
3201
+ completions: {
3202
+ /** 原样代理火山方舟原厂 /api/v3/chat/completions,并统一加登录态、额度和计费 */
3203
+ post: (body: Record<string, unknown>, config?: RequestConfig) => RequestBuilder<any>;
3204
+ };
3205
+ };
3206
+ };
3207
+ plan: {
3208
+ v3: {
3209
+ chat: {
3210
+ completions: {
3211
+ /** 平台暂未开放 Agent Plan 官方线路 */
3212
+ post: (body: Record<string, unknown>, config?: RequestConfig) => RequestBuilder<any>;
3213
+ };
3214
+ };
3215
+ };
3216
+ v1: {
3217
+ messages: {
3218
+ /** 平台暂未开放 Agent Plan 官方线路 */
3219
+ post: (body: Record<string, unknown>, config?: RequestConfig) => RequestBuilder<any>;
3220
+ };
3221
+ };
3222
+ };
3223
+ coding: {
3224
+ v3: {
3225
+ chat: {
3226
+ completions: {
3227
+ /** 平台暂未开放 Coding Plan 官方线路 */
3228
+ post: (body: Record<string, unknown>, config?: RequestConfig) => RequestBuilder<any>;
3229
+ };
3230
+ };
3231
+ };
3232
+ v1: {
3233
+ messages: {
3234
+ /** 平台暂未开放 Coding Plan 官方线路 */
3235
+ post: (body: Record<string, unknown>, config?: RequestConfig) => RequestBuilder<any>;
3236
+ };
3237
+ };
3238
+ };
1276
3239
  };
1277
3240
  };
1278
3241
  };
1279
- promptsHistroy: {
3242
+ promptsHistory: {
1280
3243
  find: {
1281
3244
  /** 分页查询提示词历史记录 */
1282
3245
  post: (body: {
@@ -1287,25 +3250,25 @@ export interface ApiClient {
1287
3250
  value?: string;
1288
3251
  version?: number;
1289
3252
  };
1290
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3253
+ }, config?: RequestConfig) => RequestBuilder<any>;
1291
3254
  };
1292
3255
  findOne: {
1293
3256
  /** 根据 ID 查询提示词历史详情 */
1294
3257
  post: (body: {
1295
3258
  id: string;
1296
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3259
+ }, config?: RequestConfig) => RequestBuilder<any>;
1297
3260
  };
1298
3261
  options: {
1299
3262
  /** 获取提示词历史版本下拉选项 */
1300
3263
  post: (body: {
1301
3264
  promptId: string;
1302
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3265
+ }, config?: RequestConfig) => RequestBuilder<any>;
1303
3266
  };
1304
3267
  rollback: {
1305
3268
  /** 将提示词回滚到指定历史版本 */
1306
3269
  post: (body: {
1307
3270
  id: string;
1308
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3271
+ }, config?: RequestConfig) => RequestBuilder<any>;
1309
3272
  };
1310
3273
  };
1311
3274
  promptTestData: {
@@ -1315,13 +3278,13 @@ export interface ApiClient {
1315
3278
  name: string;
1316
3279
  value: string;
1317
3280
  description: string;
1318
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3281
+ }, config?: RequestConfig) => RequestBuilder<any>;
1319
3282
  };
1320
3283
  delete: {
1321
3284
  /** 删除提示词测试数据 */
1322
3285
  post: (body: {
1323
3286
  id: string;
1324
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3287
+ }, config?: RequestConfig) => RequestBuilder<any>;
1325
3288
  };
1326
3289
  update: {
1327
3290
  /** 更新提示词测试数据 */
@@ -1330,7 +3293,7 @@ export interface ApiClient {
1330
3293
  name: string;
1331
3294
  value: string;
1332
3295
  description: string;
1333
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3296
+ }, config?: RequestConfig) => RequestBuilder<any>;
1334
3297
  };
1335
3298
  find: {
1336
3299
  /** 分页查询提示词测试数据列表 */
@@ -1342,17 +3305,17 @@ export interface ApiClient {
1342
3305
  value?: string;
1343
3306
  modelId?: string;
1344
3307
  };
1345
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3308
+ }, config?: RequestConfig) => RequestBuilder<any>;
1346
3309
  };
1347
3310
  findOne: {
1348
3311
  /** 根据 ID 查询提示词测试数据详情 */
1349
3312
  post: (body: {
1350
3313
  id: string;
1351
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3314
+ }, config?: RequestConfig) => RequestBuilder<any>;
1352
3315
  };
1353
3316
  options: {
1354
3317
  /** 获取提示词测试数据下拉选项 */
1355
- post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
3318
+ post: (config?: RequestConfig) => RequestBuilder<any>;
1356
3319
  };
1357
3320
  };
1358
3321
  asr: {
@@ -1362,28 +3325,24 @@ export interface ApiClient {
1362
3325
  audio: {
1363
3326
  url: string;
1364
3327
  format: "wav" | "mp3";
1365
- codec?: "raw";
1366
- rate?: number;
1367
- bits?: number;
1368
- channel?: number;
1369
3328
  };
1370
3329
  request: {
1371
- enableItn?: boolean;
1372
- enablePunc?: boolean;
1373
- enableDdc?: boolean;
1374
- enableSpeakerInfo?: boolean;
1375
- enableChannelSplit?: boolean;
1376
- showUtterances?: boolean;
1377
- vadSegment?: boolean;
1378
- context: unknown;
3330
+ enableItn: boolean;
3331
+ enablePunc: boolean;
3332
+ enableDdc: boolean;
3333
+ enableSpeakerInfo: boolean;
3334
+ enableChannelSplit: boolean;
3335
+ showUtterances: boolean;
3336
+ vadSegment: boolean;
3337
+ context?: unknown;
1379
3338
  };
1380
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3339
+ }, config?: RequestConfig) => RequestBuilder<any>;
1381
3340
  };
1382
3341
  delete: {
1383
3342
  /** 删除 ASR 任务 */
1384
3343
  post: (body: {
1385
3344
  id: string;
1386
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3345
+ }, config?: RequestConfig) => RequestBuilder<any>;
1387
3346
  };
1388
3347
  find: {
1389
3348
  /** 分页查询 ASR 任务列表 */
@@ -1394,36 +3353,49 @@ export interface ApiClient {
1394
3353
  id?: string;
1395
3354
  status?: string;
1396
3355
  };
1397
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3356
+ }, config?: RequestConfig) => RequestBuilder<any>;
3357
+ };
3358
+ findOne: {
3359
+ /** 根据 ID 查询单条 ASR 任务详情 */
3360
+ post: (body: {
3361
+ id: string;
3362
+ }, config?: RequestConfig) => RequestBuilder<any>;
1398
3363
  };
1399
3364
  status: {
1400
3365
  /** 查询 ASR 任务处理状态 */
1401
3366
  post: (body: {
1402
3367
  id: string;
1403
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3368
+ }, config?: RequestConfig) => RequestBuilder<any>;
1404
3369
  };
1405
3370
  options: {
1406
3371
  status: {
1407
3372
  /** 获取 ASR 任务状态下拉选项 */
1408
- post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
3373
+ post: (config?: RequestConfig) => RequestBuilder<any>;
1409
3374
  };
1410
3375
  };
1411
3376
  };
1412
3377
  tts: {
1413
3378
  create: {
1414
- /** 创建新的 TTS 任务 */
3379
+ /** 创建新的 TTS 任务;默认 V3 单向流式,长文本需显式传 synthesisMode=longText */
1415
3380
  post: (body: {
1416
- sceneKey: string;
3381
+ voiceKind: "official" | "clone" | "design";
1417
3382
  voiceType: string;
1418
3383
  text: string;
1419
3384
  encoding?: "wav";
1420
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3385
+ synthesisMode?: "unidirectional" | "longText";
3386
+ }, config?: RequestConfig) => RequestBuilder<any>;
3387
+ };
3388
+ status: {
3389
+ /** 查询长文本 TTS 任务处理状态(仅 synthesisMode=longText) */
3390
+ post: (body: {
3391
+ id: string;
3392
+ }, config?: RequestConfig) => RequestBuilder<any>;
1421
3393
  };
1422
3394
  delete: {
1423
3395
  /** 删除 TTS 任务 */
1424
3396
  post: (body: {
1425
3397
  id: string;
1426
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3398
+ }, config?: RequestConfig) => RequestBuilder<any>;
1427
3399
  };
1428
3400
  find: {
1429
3401
  /** 分页查询 TTS 任务列表 */
@@ -1431,22 +3403,30 @@ export interface ApiClient {
1431
3403
  current: number;
1432
3404
  pageSize: number;
1433
3405
  where: {
1434
- sceneKey?: string;
3406
+ id?: string;
3407
+ voiceKind?: "official" | "clone" | "design";
1435
3408
  voiceType?: string;
1436
3409
  text?: string;
3410
+ status?: "running" | "success" | "failure";
1437
3411
  };
1438
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3412
+ }, config?: RequestConfig) => RequestBuilder<any>;
1439
3413
  };
1440
3414
  findOne: {
1441
3415
  /** 根据 ID 查询 TTS 任务详情 */
1442
3416
  post: (body: {
1443
3417
  id: string;
1444
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3418
+ }, config?: RequestConfig) => RequestBuilder<any>;
3419
+ };
3420
+ options: {
3421
+ status: {
3422
+ /** 获取 TTS 任务状态下拉选项 */
3423
+ post: (config?: RequestConfig) => RequestBuilder<any>;
3424
+ };
1445
3425
  };
1446
3426
  };
1447
3427
  si: {
1448
3428
  create: {
1449
- /** 创建新的同声传译任务 */
3429
+ /** 创建新的同声传译任务(ASR → 翻译 → TTS) */
1450
3430
  post: (body: {
1451
3431
  audios: {
1452
3432
  audioFormat: "wav" | "mp3" | "ogg" | "m4a" | "aac" | "pcm";
@@ -1455,13 +3435,19 @@ export interface ApiClient {
1455
3435
  }[];
1456
3436
  language: string;
1457
3437
  modelType: 0 | 1;
1458
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3438
+ }, config?: RequestConfig) => RequestBuilder<any>;
3439
+ };
3440
+ status: {
3441
+ /** 查询同声传译任务当前状态与结果 */
3442
+ post: (body: {
3443
+ id: string;
3444
+ }, config?: RequestConfig) => RequestBuilder<any>;
1459
3445
  };
1460
3446
  delete: {
1461
3447
  /** 删除同声传译任务 */
1462
3448
  post: (body: {
1463
3449
  id: string;
1464
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3450
+ }, config?: RequestConfig) => RequestBuilder<any>;
1465
3451
  };
1466
3452
  find: {
1467
3453
  /** 分页查询同声传译任务列表 */
@@ -1469,31 +3455,69 @@ export interface ApiClient {
1469
3455
  current: number;
1470
3456
  pageSize: number;
1471
3457
  where: {
1472
- name?: string;
1473
- value?: string;
1474
- version?: number;
1475
- modelId?: string;
1476
- providerId?: string;
3458
+ id?: string;
3459
+ speakerID?: string;
3460
+ language?: string;
1477
3461
  status?: string;
1478
3462
  };
1479
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3463
+ }, config?: RequestConfig) => RequestBuilder<any>;
1480
3464
  };
1481
3465
  findOne: {
1482
3466
  /** 根据 ID 查询同声传译任务详情 */
1483
3467
  post: (body: {
1484
3468
  id: string;
1485
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3469
+ }, config?: RequestConfig) => RequestBuilder<any>;
3470
+ };
3471
+ };
3472
+ realtimeSpeech: {
3473
+ session: {
3474
+ create: {
3475
+ /** 创建实时语音交互会话(complete 时扣费) */
3476
+ post: (body: {
3477
+ language?: string;
3478
+ modelType?: 0 | 1;
3479
+ }, config?: RequestConfig) => RequestBuilder<any>;
3480
+ };
3481
+ complete: {
3482
+ /** 提交上游 usage 并完成实时语音扣费 */
3483
+ post: (body: {
3484
+ id: string;
3485
+ usage: {
3486
+ inputAudioTokens: number;
3487
+ outputTextTokens: number;
3488
+ outputAudioTokens: number;
3489
+ inputAudioCachedTokens?: number;
3490
+ };
3491
+ }, config?: RequestConfig) => RequestBuilder<any>;
3492
+ };
3493
+ };
3494
+ find: {
3495
+ /** 分页查询实时语音会话 */
3496
+ post: (body: {
3497
+ current: number;
3498
+ pageSize: number;
3499
+ where: {
3500
+ sessionId?: string;
3501
+ status?: string;
3502
+ };
3503
+ }, config?: RequestConfig) => RequestBuilder<any>;
3504
+ };
3505
+ findOne: {
3506
+ /** 根据 ID 查询实时语音会话详情 */
3507
+ post: (body: {
3508
+ id: string;
3509
+ }, config?: RequestConfig) => RequestBuilder<any>;
1486
3510
  };
1487
3511
  };
1488
3512
  copyVoice: {
1489
3513
  create: {
1490
- /** 创建新的声音复刻任务 */
3514
+ /** 选择已购买音色槽位创建声音复刻资产 */
1491
3515
  post: (body: {
1492
3516
  name: string;
1493
3517
  tags: string[];
1494
- times: number;
3518
+ voiceSlotId: string;
1495
3519
  description?: string;
1496
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3520
+ }, config?: RequestConfig) => RequestBuilder<any>;
1497
3521
  };
1498
3522
  update: {
1499
3523
  /** 更新声音复刻信息 */
@@ -1502,7 +3526,7 @@ export interface ApiClient {
1502
3526
  name: string;
1503
3527
  tags: string[];
1504
3528
  description?: string;
1505
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3529
+ }, config?: RequestConfig) => RequestBuilder<any>;
1506
3530
  };
1507
3531
  find: {
1508
3532
  /** 分页查询声音复刻任务列表 */
@@ -1510,24 +3534,152 @@ export interface ApiClient {
1510
3534
  current: number;
1511
3535
  pageSize: number;
1512
3536
  where: {
3537
+ id?: string;
1513
3538
  name?: string;
1514
3539
  speakerID?: string;
1515
3540
  status?: string;
1516
3541
  };
1517
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3542
+ }, config?: RequestConfig) => RequestBuilder<any>;
1518
3543
  };
1519
3544
  findOne: {
1520
3545
  /** 根据 ID 查询声音复刻详情 */
1521
3546
  post: (body: {
1522
3547
  id: string;
1523
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3548
+ }, config?: RequestConfig) => RequestBuilder<any>;
1524
3549
  };
1525
3550
  options: {
1526
3551
  /** 获取声音复刻下拉选项 */
1527
- post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
3552
+ post: (config?: RequestConfig) => RequestBuilder<any>;
1528
3553
  status: {
1529
3554
  /** 获取声音复刻状态下拉选项 */
1530
- post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
3555
+ post: (config?: RequestConfig) => RequestBuilder<any>;
3556
+ };
3557
+ };
3558
+ status: {
3559
+ /** 查询声音复刻的训练状态 */
3560
+ post: (body: {
3561
+ id: string;
3562
+ }, config?: RequestConfig) => RequestBuilder<any>;
3563
+ };
3564
+ };
3565
+ voiceSlots: {
3566
+ create: {
3567
+ /** 统一购买音色槽位,后续可绑定到声音复刻或音色设计 */
3568
+ post: (body: {
3569
+ name: string;
3570
+ tags: string[];
3571
+ times: number;
3572
+ quantity?: number;
3573
+ description?: string;
3574
+ }, config?: RequestConfig) => RequestBuilder<any>;
3575
+ };
3576
+ renew: {
3577
+ /** 统一续费音色槽位 */
3578
+ post: (body: {
3579
+ id: string;
3580
+ times: number;
3581
+ }, config?: RequestConfig) => RequestBuilder<any>;
3582
+ };
3583
+ refresh: {
3584
+ /** 从火山控制台同步槽位状态 */
3585
+ post: (body: {
3586
+ id: string;
3587
+ }, config?: RequestConfig) => RequestBuilder<any>;
3588
+ };
3589
+ find: {
3590
+ /** 分页查询统一音色槽位 */
3591
+ post: (body: {
3592
+ current: number;
3593
+ pageSize: number;
3594
+ where: {
3595
+ id?: string;
3596
+ name?: string;
3597
+ speakerID?: string;
3598
+ status?: string;
3599
+ usageType?: string;
3600
+ };
3601
+ }, config?: RequestConfig) => RequestBuilder<any>;
3602
+ };
3603
+ findOne: {
3604
+ /** 根据 ID 查询音色槽位详情 */
3605
+ post: (body: {
3606
+ id: string;
3607
+ }, config?: RequestConfig) => RequestBuilder<any>;
3608
+ };
3609
+ options: {
3610
+ /** 获取未绑定且已交付的音色槽位选项 */
3611
+ post: (body: {
3612
+ usageType?: "copyVoice" | "voiceDesign";
3613
+ }, config?: RequestConfig) => RequestBuilder<any>;
3614
+ status: {
3615
+ /** 获取音色槽位状态下拉选项 */
3616
+ post: (config?: RequestConfig) => RequestBuilder<any>;
3617
+ };
3618
+ };
3619
+ };
3620
+ voiceDesign: {
3621
+ create: {
3622
+ /** 选择已购买音色槽位创建音色设计资产 */
3623
+ post: (body: {
3624
+ name: string;
3625
+ tags: string[];
3626
+ voiceSlotId: string;
3627
+ description?: string;
3628
+ }, config?: RequestConfig) => RequestBuilder<any>;
3629
+ };
3630
+ design: {
3631
+ /** 基于文本/图片提示词设计音色并生成试听 */
3632
+ post: (body: {
3633
+ id: string;
3634
+ previewText: string;
3635
+ textPrompt?: string;
3636
+ language?: 0 | 1;
3637
+ imagePrompt?: {
3638
+ imageUrl?: string;
3639
+ imageBytes?: string;
3640
+ };
3641
+ }, config?: RequestConfig) => RequestBuilder<any>;
3642
+ };
3643
+ update: {
3644
+ /** 更新音色设计名称、标签与描述 */
3645
+ post: (body: {
3646
+ id: string;
3647
+ name: string;
3648
+ tags: string[];
3649
+ description?: string;
3650
+ }, config?: RequestConfig) => RequestBuilder<any>;
3651
+ };
3652
+ find: {
3653
+ /** 分页查询音色设计任务 */
3654
+ post: (body: {
3655
+ current: number;
3656
+ pageSize: number;
3657
+ where: {
3658
+ id?: string;
3659
+ name?: string;
3660
+ speakerID?: string;
3661
+ status?: string;
3662
+ };
3663
+ }, config?: RequestConfig) => RequestBuilder<any>;
3664
+ };
3665
+ findOne: {
3666
+ /** 根据 ID 查询音色设计详情 */
3667
+ post: (body: {
3668
+ id: string;
3669
+ }, config?: RequestConfig) => RequestBuilder<any>;
3670
+ };
3671
+ status: {
3672
+ /** 从上游刷新 SpeakerID 状态 */
3673
+ post: (body: {
3674
+ id: string;
3675
+ }, config?: RequestConfig) => RequestBuilder<any>;
3676
+ };
3677
+ options: {
3678
+ /** 获取音色设计下拉选项 */
3679
+ post: (config?: RequestConfig) => RequestBuilder<any>;
3680
+ status: {
3681
+ /** 获取音色设计状态下拉选项 */
3682
+ post: (config?: RequestConfig) => RequestBuilder<any>;
1531
3683
  };
1532
3684
  };
1533
3685
  };
@@ -1542,13 +3694,13 @@ export interface ApiClient {
1542
3694
  status: "enabled" | "disabled";
1543
3695
  providers: string[];
1544
3696
  description: string;
1545
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3697
+ }, config?: RequestConfig) => RequestBuilder<any>;
1546
3698
  };
1547
3699
  delete: {
1548
3700
  /** 删除音色类型 */
1549
3701
  post: (body: {
1550
3702
  id: string;
1551
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3703
+ }, config?: RequestConfig) => RequestBuilder<any>;
1552
3704
  };
1553
3705
  update: {
1554
3706
  /** 更新音色信息 */
@@ -1561,7 +3713,7 @@ export interface ApiClient {
1561
3713
  status: "enabled" | "disabled";
1562
3714
  providers: string[];
1563
3715
  description: string;
1564
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3716
+ }, config?: RequestConfig) => RequestBuilder<any>;
1565
3717
  };
1566
3718
  find: {
1567
3719
  /** 分页查询音色类型列表 */
@@ -1576,22 +3728,24 @@ export interface ApiClient {
1576
3728
  providerId?: string;
1577
3729
  status?: string;
1578
3730
  };
1579
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3731
+ }, config?: RequestConfig) => RequestBuilder<any>;
1580
3732
  };
1581
3733
  findOne: {
1582
3734
  /** 根据 ID 查询音色详情 */
1583
3735
  post: (body: {
1584
3736
  id: string;
1585
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3737
+ }, config?: RequestConfig) => RequestBuilder<any>;
1586
3738
  };
1587
3739
  options: {
1588
3740
  /** 获取音色下拉选项 */
1589
3741
  post: (body: {
1590
- sceneKey?: string;
1591
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1592
- voiceScene: {
1593
- /** 获取音色场景下拉选项 */
1594
- post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
3742
+ voiceKind?: "official" | "clone" | "design";
3743
+ category?: string;
3744
+ resourceId?: string;
3745
+ }, config?: RequestConfig) => RequestBuilder<any>;
3746
+ categories: {
3747
+ /** 聚合 ListSpeakers 返回的分类列表 */
3748
+ post: (config?: RequestConfig) => RequestBuilder<any>;
1595
3749
  };
1596
3750
  };
1597
3751
  };
@@ -1600,13 +3754,18 @@ export interface ApiClient {
1600
3754
  /** 创建新的声音复刻训练任务 */
1601
3755
  post: (body: {
1602
3756
  copyVoiceId: string;
1603
- audios: {
3757
+ audio: {
1604
3758
  audioFormat: "wav" | "mp3" | "ogg" | "m4a" | "aac" | "pcm";
1605
3759
  audioBytes: string;
1606
3760
  text?: string;
1607
- }[];
3761
+ extraParams?: {
3762
+ demoText?: string;
3763
+ enableAudioDenoise?: boolean;
3764
+ disableVolumeNormalization?: boolean;
3765
+ };
3766
+ };
1608
3767
  language: number;
1609
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3768
+ }, config?: RequestConfig) => RequestBuilder<any>;
1610
3769
  };
1611
3770
  find: {
1612
3771
  /** 分页查询声音训练任务列表 */
@@ -1618,157 +3777,285 @@ export interface ApiClient {
1618
3777
  language?: number;
1619
3778
  status?: number;
1620
3779
  };
1621
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3780
+ }, config?: RequestConfig) => RequestBuilder<any>;
1622
3781
  };
1623
3782
  findOne: {
1624
3783
  /** 根据 ID 查询声音训练任务详情 */
1625
3784
  post: (body: {
1626
3785
  id: string;
1627
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1628
- };
1629
- options: {
1630
- status: {
1631
- /** 获取声音训练状态下拉选项 */
1632
- post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
1633
- };
1634
- language: {
1635
- /** 获取声音训练语言下拉选项 */
1636
- post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
1637
- };
3786
+ }, config?: RequestConfig) => RequestBuilder<any>;
3787
+ };
3788
+ options: {
3789
+ status: {
3790
+ /** 获取声音训练状态下拉选项 */
3791
+ post: (config?: RequestConfig) => RequestBuilder<any>;
3792
+ };
3793
+ language: {
3794
+ /** 获取声音训练语言下拉选项 */
3795
+ post: (config?: RequestConfig) => RequestBuilder<any>;
3796
+ };
3797
+ };
3798
+ };
3799
+ imageGeneration: {
3800
+ create: {
3801
+ /** 创建新的图片生成任务(火山方舟,后台异步处理) */
3802
+ post: (body: {
3803
+ model: string;
3804
+ prompt: string;
3805
+ sizeType?: "resolution" | "pixel";
3806
+ size?: "1K" | "2K" | "3K" | "4K";
3807
+ width?: number;
3808
+ height?: number;
3809
+ watermark?: boolean;
3810
+ outputFormat?: "png" | "jpeg";
3811
+ referenceImageUrls?: string[];
3812
+ sequentialImageGeneration?: "disabled" | "auto";
3813
+ maxImages?: number;
3814
+ }, config?: RequestConfig) => RequestBuilder<any>;
3815
+ };
3816
+ delete: {
3817
+ /** 删除图片生成任务 */
3818
+ post: (body: {
3819
+ id: string;
3820
+ }, config?: RequestConfig) => RequestBuilder<any>;
3821
+ };
3822
+ find: {
3823
+ /** 分页查询图片生成任务列表 */
3824
+ post: (body: {
3825
+ current: number;
3826
+ pageSize: number;
3827
+ where: {
3828
+ id?: string;
3829
+ prompt?: string;
3830
+ status?: string;
3831
+ };
3832
+ }, config?: RequestConfig) => RequestBuilder<any>;
3833
+ };
3834
+ findOne: {
3835
+ /** 根据 ID 查询图片生成任务详情 */
3836
+ post: (body: {
3837
+ id: string;
3838
+ }, config?: RequestConfig) => RequestBuilder<any>;
3839
+ };
3840
+ options: {
3841
+ status: {
3842
+ /** 获取图片生成任务状态下拉选项 */
3843
+ post: (config?: RequestConfig) => RequestBuilder<any>;
3844
+ };
3845
+ model: {
3846
+ /** 获取豆包 Seedream 图片模型下拉选项 */
3847
+ post: (config?: RequestConfig) => RequestBuilder<any>;
3848
+ };
3849
+ };
3850
+ };
3851
+ videoGeneration: {
3852
+ create: {
3853
+ /** 创建新的视频生成任务(提交不扣费,请轮询 /status) */
3854
+ post: (body: {
3855
+ model?: string;
3856
+ prompt: string;
3857
+ negativePrompt?: string;
3858
+ aspectRatio?: "16:9" | "9:16" | "1:1";
3859
+ resolution?: "720p" | "1080p";
3860
+ duration?: 4 | 6 | 8;
3861
+ personGeneration?: string;
3862
+ numberOfVideos?: number;
3863
+ seed?: number;
3864
+ }, config?: RequestConfig) => RequestBuilder<any>;
3865
+ };
3866
+ status: {
3867
+ /** 查询 Veo 任务状态 */
3868
+ post: (body: {
3869
+ id: string;
3870
+ }, config?: RequestConfig) => RequestBuilder<any>;
1638
3871
  };
1639
- };
1640
- copyVoiceRenew: {
1641
- create: {
1642
- /** 创建声音复刻续期申请 */
3872
+ delete: {
3873
+ /** 删除视频生成任务 */
1643
3874
  post: (body: {
1644
- copyVoiceId: string;
1645
- times: number;
1646
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3875
+ id: string;
3876
+ }, config?: RequestConfig) => RequestBuilder<any>;
1647
3877
  };
1648
3878
  find: {
1649
- /** 分页查询声音复刻续期列表 */
3879
+ /** 分页查询视频生成任务列表 */
1650
3880
  post: (body: {
1651
3881
  current: number;
1652
3882
  pageSize: number;
1653
3883
  where: {
1654
- speakerID?: string;
1655
- copyVoiceId?: string;
3884
+ id?: string;
3885
+ prompt?: string;
1656
3886
  status?: string;
1657
3887
  };
1658
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3888
+ }, config?: RequestConfig) => RequestBuilder<any>;
1659
3889
  };
1660
3890
  findOne: {
1661
- /** 根据 ID 查询声音复刻续期详情 */
3891
+ /** 根据 ID 查询视频生成任务详情 */
3892
+ post: (body: {
3893
+ id: string;
3894
+ }, config?: RequestConfig) => RequestBuilder<any>;
3895
+ };
3896
+ refresh: {
3897
+ /** 刷新视频生成任务状态(不扣费) */
1662
3898
  post: (body: {
1663
3899
  id: string;
1664
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3900
+ }, config?: RequestConfig) => RequestBuilder<any>;
3901
+ };
3902
+ options: {
3903
+ status: {
3904
+ /** 获取视频生成任务状态下拉选项 */
3905
+ post: (config?: RequestConfig) => RequestBuilder<any>;
3906
+ };
3907
+ model: {
3908
+ /** 获取 Google Veo 视频模型下拉选项 */
3909
+ post: (config?: RequestConfig) => RequestBuilder<any>;
3910
+ };
3911
+ };
3912
+ progress: {
3913
+ ':id': {
3914
+ /** 通过 SSE 实时获取视频生成任务进度(需登录,仅任务创建者可访问) */
3915
+ get: (config?: RequestConfig) => RequestBuilder<any>;
3916
+ };
1665
3917
  };
1666
3918
  };
1667
- imageGeneration: {
3919
+ seedanceVideoGeneration: {
1668
3920
  create: {
1669
- /** 创建新的图片生成任务 */
3921
+ /** 提交火山方舟 Seedance 异步视频任务 */
1670
3922
  post: (body: {
1671
3923
  model: string;
1672
- prompt: string;
1673
- sizeType?: "resolution" | "pixel";
1674
- size?: "1K" | "2K" | "4K";
1675
- width?: number;
1676
- height?: number;
3924
+ content: unknown[];
3925
+ ratio?: string;
3926
+ duration?: number;
3927
+ resolution?: string;
1677
3928
  watermark?: boolean;
1678
- guidanceScale?: number;
3929
+ generate_audio?: boolean;
1679
3930
  seed?: number;
1680
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3931
+ service_tier?: string;
3932
+ }, config?: RequestConfig) => RequestBuilder<any>;
3933
+ };
3934
+ status: {
3935
+ /** 轮询火山方舟任务状态 */
3936
+ post: (body: {
3937
+ id: string;
3938
+ }, config?: RequestConfig) => RequestBuilder<any>;
3939
+ };
3940
+ refresh: {
3941
+ /** 轮询上游任务状态 */
3942
+ post: (body: {
3943
+ id: string;
3944
+ }, config?: RequestConfig) => RequestBuilder<any>;
1681
3945
  };
1682
3946
  delete: {
1683
- /** 删除图片生成任务 */
3947
+ /** 删除 Seedance 视频任务记录 */
1684
3948
  post: (body: {
1685
3949
  id: string;
1686
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3950
+ }, config?: RequestConfig) => RequestBuilder<any>;
1687
3951
  };
1688
3952
  find: {
1689
- /** 分页查询图片生成任务列表 */
3953
+ /** 分页查询 Seedance 视频任务 */
1690
3954
  post: (body: {
1691
3955
  current: number;
1692
3956
  pageSize: number;
1693
3957
  where: {
3958
+ id?: string;
1694
3959
  prompt?: string;
3960
+ status?: string;
1695
3961
  };
1696
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3962
+ }, config?: RequestConfig) => RequestBuilder<any>;
1697
3963
  };
1698
3964
  findOne: {
1699
- /** 根据 ID 查询图片生成任务详情 */
3965
+ /** 查询单条 Seedance 视频任务 */
1700
3966
  post: (body: {
1701
3967
  id: string;
1702
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3968
+ }, config?: RequestConfig) => RequestBuilder<any>;
3969
+ };
3970
+ options: {
3971
+ status: {
3972
+ /** 获取 Seedance 视频任务状态下拉选项 */
3973
+ post: (config?: RequestConfig) => RequestBuilder<any>;
3974
+ };
1703
3975
  };
1704
3976
  };
1705
- videoGeneration: {
3977
+ mesh3dGeneration: {
1706
3978
  create: {
1707
- /** 创建新的视频生成任务 */
3979
+ /** 提交火山方舟 3D 异步生成任务 */
1708
3980
  post: (body: {
1709
- model?: string;
1710
- prompt: string;
1711
- negativePrompt?: string;
1712
- aspectRatio?: "16:9" | "9:16" | "1:1";
1713
- resolution?: "720p" | "1080p";
1714
- duration?: 4 | 6 | 8;
1715
- personGeneration?: string;
1716
- numberOfVideos?: number;
3981
+ model: string;
3982
+ content: unknown[];
3983
+ subdivision_level?: string;
3984
+ file_format?: string;
1717
3985
  seed?: number;
1718
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3986
+ }, config?: RequestConfig) => RequestBuilder<any>;
3987
+ };
3988
+ status: {
3989
+ /** 轮询火山方舟 3D 任务状态 */
3990
+ post: (body: {
3991
+ id: string;
3992
+ }, config?: RequestConfig) => RequestBuilder<any>;
3993
+ };
3994
+ refresh: {
3995
+ /** 轮询上游 3D 任务状态 */
3996
+ post: (body: {
3997
+ id: string;
3998
+ }, config?: RequestConfig) => RequestBuilder<any>;
1719
3999
  };
1720
4000
  delete: {
1721
- /** 删除视频生成任务 */
4001
+ /** 删除 3D 生成任务记录 */
1722
4002
  post: (body: {
1723
4003
  id: string;
1724
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
4004
+ }, config?: RequestConfig) => RequestBuilder<any>;
1725
4005
  };
1726
4006
  find: {
1727
- /** 分页查询视频生成任务列表 */
4007
+ /** 分页查询 3D 生成任务 */
1728
4008
  post: (body: {
1729
4009
  current: number;
1730
4010
  pageSize: number;
1731
4011
  where: {
4012
+ id?: string;
1732
4013
  prompt?: string;
1733
4014
  status?: string;
4015
+ supplierId?: string;
4016
+ model?: string;
1734
4017
  };
1735
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
4018
+ }, config?: RequestConfig) => RequestBuilder<any>;
1736
4019
  };
1737
4020
  findOne: {
1738
- /** 根据 ID 查询视频生成任务详情 */
1739
- post: (body: {
1740
- id: string;
1741
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1742
- };
1743
- refresh: {
1744
- /** 刷新视频生成任务状态 */
4021
+ /** 查询单条 3D 生成任务 */
1745
4022
  post: (body: {
1746
4023
  id: string;
1747
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
4024
+ }, config?: RequestConfig) => RequestBuilder<any>;
1748
4025
  };
1749
4026
  options: {
1750
4027
  status: {
1751
- /** 获取视频生成任务状态下拉选项 */
1752
- post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
4028
+ /** 获取 3D 生成任务状态下拉选项 */
4029
+ post: (config?: RequestConfig) => RequestBuilder<any>;
1753
4030
  };
1754
4031
  };
1755
4032
  };
1756
4033
  geminiImage: {
1757
4034
  create: {
1758
- /** 创建 Gemini 图片生成任务 */
4035
+ /** LLM Proxy 异步生成 Gemini 图片(提交不扣费,请轮询 /status) */
1759
4036
  post: (body: {
1760
4037
  model?: string;
1761
4038
  prompt: string;
1762
4039
  negativePrompt?: string;
1763
4040
  aspectRatio?: string;
1764
4041
  numberOfImages?: number;
1765
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
4042
+ personGeneration?: string;
4043
+ resolution?: string;
4044
+ referenceImageBase64?: string;
4045
+ referenceImageMimeType?: string;
4046
+ }, config?: RequestConfig) => RequestBuilder<any>;
4047
+ };
4048
+ status: {
4049
+ /** 查询 Gemini 生图任务状态 */
4050
+ post: (body: {
4051
+ id: string;
4052
+ }, config?: RequestConfig) => RequestBuilder<any>;
1766
4053
  };
1767
4054
  delete: {
1768
4055
  /** 删除 Gemini 图片生成任务 */
1769
4056
  post: (body: {
1770
4057
  id: string;
1771
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
4058
+ }, config?: RequestConfig) => RequestBuilder<any>;
1772
4059
  };
1773
4060
  find: {
1774
4061
  /** 分页查询 Gemini 图片列表 */
@@ -1776,48 +4063,674 @@ export interface ApiClient {
1776
4063
  pageSize: number;
1777
4064
  current: number;
1778
4065
  where?: {
4066
+ id?: string;
1779
4067
  prompt?: string;
1780
4068
  status?: string;
1781
4069
  };
1782
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
4070
+ }, config?: RequestConfig) => RequestBuilder<any>;
1783
4071
  };
1784
4072
  findOne: {
1785
4073
  /** 根据 ID 查询 Gemini 图片详情 */
1786
4074
  post: (body: {
1787
4075
  id: string;
1788
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
4076
+ }, config?: RequestConfig) => RequestBuilder<any>;
1789
4077
  };
1790
4078
  options: {
1791
4079
  status: {
1792
4080
  /** 获取 Gemini 图片状态下拉选项 */
1793
- post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
4081
+ post: (config?: RequestConfig) => RequestBuilder<any>;
1794
4082
  };
1795
4083
  model: {
1796
4084
  /** 获取 Gemini 图片模型下拉选项 */
1797
- post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
4085
+ post: (config?: RequestConfig) => RequestBuilder<any>;
1798
4086
  };
1799
4087
  aspectRatio: {
1800
4088
  /** 获取 Gemini 图片宽高比下拉选项 */
1801
- post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
4089
+ post: (config?: RequestConfig) => RequestBuilder<any>;
1802
4090
  };
1803
4091
  resolution: {
1804
4092
  /** 获取 Gemini 图片分辨率下拉选项 */
1805
- post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
4093
+ post: (config?: RequestConfig) => RequestBuilder<any>;
4094
+ };
4095
+ };
4096
+ };
4097
+ billing: {
4098
+ balance: {
4099
+ /** 查询用户积分余额 */
4100
+ post: (body: Record<string, unknown>, config?: RequestConfig) => RequestBuilder<any>;
4101
+ };
4102
+ estimate: {
4103
+ /** 根据 token 数量预估费用 */
4104
+ post: (body: {
4105
+ model: string;
4106
+ promptTokens: number;
4107
+ completionTokens: number;
4108
+ }, config?: RequestConfig) => RequestBuilder<any>;
4109
+ };
4110
+ usage: {
4111
+ stats: {
4112
+ /** 统计用户的 AI 使用情况 */
4113
+ post: (body: {
4114
+ userId?: string;
4115
+ model?: string;
4116
+ supplierId?: string;
4117
+ profileId?: string;
4118
+ protocolId?: string;
4119
+ startTime?: string;
4120
+ endTime?: string;
4121
+ }, config?: RequestConfig) => RequestBuilder<any>;
4122
+ };
4123
+ find: {
4124
+ /** 查询用户的 AI 使用记录 */
4125
+ post: (body: {
4126
+ userId?: string;
4127
+ model?: string;
4128
+ supplierId?: string;
4129
+ profileId?: string;
4130
+ protocolId?: string;
4131
+ billingRouteKey?: string;
4132
+ id?: string;
4133
+ requestId?: string;
4134
+ resourceId?: string;
4135
+ startTime?: string;
4136
+ endTime?: string;
4137
+ page?: number;
4138
+ pageSize?: number;
4139
+ }, config?: RequestConfig) => RequestBuilder<any>;
4140
+ };
4141
+ };
4142
+ trace: {
4143
+ resource: {
4144
+ /** 按 resourceId 查询用量与积分流水 */
4145
+ post: (body: {
4146
+ resourceId: string;
4147
+ serviceKey?: string;
4148
+ }, config?: RequestConfig) => RequestBuilder<any>;
4149
+ };
4150
+ };
4151
+ };
4152
+ modelCatalog: {
4153
+ suppliers: {
4154
+ find: {
4155
+ post: (body: {
4156
+ page?: number;
4157
+ pageSize?: number;
4158
+ keyword?: string;
4159
+ enabled?: boolean;
4160
+ supplierKind?: "agent_vendor" | "agent_proxy";
4161
+ agentVendorOnly?: boolean;
4162
+ platformUpstream?: "direct" | "proxy_railway";
4163
+ downstreamAccessMode?: "official" | "self_key";
4164
+ }, config?: RequestConfig) => RequestBuilder<any>;
4165
+ };
4166
+ options: {
4167
+ /** 筛选项、表单 Select 用供应商下拉 */
4168
+ post: (body: {
4169
+ enabled?: boolean;
4170
+ supplierKind?: "agent_vendor" | "agent_proxy";
4171
+ agentVendorOnly?: boolean;
4172
+ }, config?: RequestConfig) => RequestBuilder<any>;
4173
+ };
4174
+ upsert: {
4175
+ post: (body: {
4176
+ supplierId: string;
4177
+ name: string;
4178
+ supplierKind: "agent_vendor" | "agent_proxy";
4179
+ enabled?: boolean;
4180
+ description?: string;
4181
+ platformUpstream: "direct" | "proxy_railway";
4182
+ downstreamAccessModes: "official" | "self_key"[];
4183
+ }, config?: RequestConfig) => RequestBuilder<any>;
4184
+ };
4185
+ delete: {
4186
+ post: (body: {
4187
+ supplierId: string;
4188
+ }, config?: RequestConfig) => RequestBuilder<any>;
4189
+ };
4190
+ };
4191
+ productLines: {
4192
+ find: {
4193
+ post: (body: {
4194
+ page?: number;
4195
+ pageSize?: number;
4196
+ supplierId?: string;
4197
+ keyword?: string;
4198
+ enabled?: boolean;
4199
+ withStats?: boolean;
4200
+ }, config?: RequestConfig) => RequestBuilder<any>;
4201
+ };
4202
+ findOne: {
4203
+ post: (body: {
4204
+ productLineId: string;
4205
+ }, config?: RequestConfig) => RequestBuilder<any>;
4206
+ };
4207
+ options: {
4208
+ /** 筛选项、表单 Select 用产品线下拉 */
4209
+ post: (body: {
4210
+ supplierId?: string;
4211
+ enabled?: boolean;
4212
+ }, config?: RequestConfig) => RequestBuilder<any>;
4213
+ };
4214
+ create: {
4215
+ post: (body: {
4216
+ supplierId: string;
4217
+ productLineKey: string;
4218
+ label: string;
4219
+ }, config?: RequestConfig) => RequestBuilder<any>;
4220
+ };
4221
+ update: {
4222
+ post: (body: {
4223
+ productLineId: string;
4224
+ label?: string;
4225
+ enabled?: boolean;
4226
+ }, config?: RequestConfig) => RequestBuilder<any>;
4227
+ };
4228
+ delete: {
4229
+ post: (body: {
4230
+ productLineId: string;
4231
+ }, config?: RequestConfig) => RequestBuilder<any>;
4232
+ };
4233
+ };
4234
+ protocols: {
4235
+ find: {
4236
+ post: (body: {
4237
+ page?: number;
4238
+ pageSize?: number;
4239
+ supplierId?: string;
4240
+ keyword?: string;
4241
+ enabled?: boolean;
4242
+ chatRuntimeEnabled?: boolean;
4243
+ method?: "POST" | "GET";
4244
+ }, config?: RequestConfig) => RequestBuilder<any>;
4245
+ };
4246
+ listBySupplier: {
4247
+ post: (body: {
4248
+ supplierId: string;
4249
+ enabledOnly?: boolean;
4250
+ }, config?: RequestConfig) => RequestBuilder<any>;
4251
+ };
4252
+ create: {
4253
+ post: (body: {
4254
+ protocolId: string;
4255
+ supplierId: string;
4256
+ name: string;
4257
+ baseUrl: string;
4258
+ path: string;
4259
+ chatRuntimeProtocol?: string;
4260
+ method?: "POST" | "GET";
4261
+ docUrl?: string;
4262
+ description?: string;
4263
+ enabled?: boolean;
4264
+ }, config?: RequestConfig) => RequestBuilder<any>;
4265
+ };
4266
+ update: {
4267
+ post: (body: {
4268
+ protocolId: string;
4269
+ supplierId?: string;
4270
+ name?: string;
4271
+ baseUrl?: string;
4272
+ path?: string;
4273
+ chatRuntimeProtocol?: string;
4274
+ method?: "POST" | "GET";
4275
+ docUrl?: string;
4276
+ description?: string;
4277
+ enabled?: boolean;
4278
+ }, config?: RequestConfig) => RequestBuilder<any>;
4279
+ };
4280
+ delete: {
4281
+ post: (body: {
4282
+ protocolId: string;
4283
+ }, config?: RequestConfig) => RequestBuilder<any>;
4284
+ };
4285
+ supplierOptions: {
4286
+ /** 协议管理筛选用供应商全量(key/label) */
4287
+ post: (config?: RequestConfig) => RequestBuilder<any>;
4288
+ };
4289
+ protocolOptions: {
4290
+ /** 按供应商加载接入协议选项(key/label) */
4291
+ post: (body: {
4292
+ supplierId: string;
4293
+ enabledOnly?: boolean;
4294
+ }, config?: RequestConfig) => RequestBuilder<any>;
4295
+ };
4296
+ };
4297
+ profiles: {
4298
+ find: {
4299
+ post: (body: {
4300
+ page?: number;
4301
+ pageSize?: number;
4302
+ referenceVendor?: string;
4303
+ family?: string;
4304
+ tag?: string;
4305
+ keyword?: string;
4306
+ status?: "active" | "deprecated";
4307
+ inputType?: "text" | "image" | "audio" | "video" | "embedding" | "mesh_3d";
4308
+ outputType?: "text" | "image" | "audio" | "video" | "embedding" | "mesh_3d";
4309
+ }, config?: RequestConfig) => RequestBuilder<any>;
4310
+ };
4311
+ listBrief: {
4312
+ post: (body: {
4313
+ enabledOnly?: boolean;
4314
+ }, config?: RequestConfig) => RequestBuilder<any>;
4315
+ };
4316
+ referenceVendorOptions: {
4317
+ /** 模型信息筛选用原厂供应商全量(key/label) */
4318
+ post: (body: {
4319
+ enabledOnly?: boolean;
4320
+ }, config?: RequestConfig) => RequestBuilder<any>;
4321
+ };
4322
+ create: {
4323
+ post: (body: {
4324
+ profileId: string;
4325
+ referenceVendor: string;
4326
+ name: string;
4327
+ family?: string;
4328
+ tags?: string[];
4329
+ description?: string;
4330
+ capabilities: {
4331
+ inputTypes: "text" | "image" | "audio" | "video" | "embedding" | "mesh_3d"[];
4332
+ outputType: "text" | "image" | "audio" | "video" | "embedding" | "mesh_3d";
4333
+ rateLimits?: {
4334
+ tpmPerMinute?: number;
4335
+ rpmPerMinute?: number;
4336
+ qpmPerMinute?: number;
4337
+ ipmPerMinute?: number;
4338
+ maxConcurrency?: number;
4339
+ };
4340
+ text?: {
4341
+ contextWindow?: number;
4342
+ maxInputTokens?: number;
4343
+ maxOutputTokens?: number;
4344
+ maxThinkingTokens?: number;
4345
+ };
4346
+ image?: {
4347
+ minWidth?: number;
4348
+ minHeight?: number;
4349
+ maxWidth?: number;
4350
+ maxHeight?: number;
4351
+ maxImagesPerRequest?: number;
4352
+ supportedAspectRatios?: string[];
4353
+ supportsInpainting?: boolean;
4354
+ };
4355
+ video?: {
4356
+ supportedResolutions?: string[];
4357
+ maxFps?: number;
4358
+ maxDurationSeconds?: number;
4359
+ minDurationSeconds?: number;
4360
+ supportedAspectRatios?: string[];
4361
+ supportsImageToVideo?: boolean;
4362
+ supportsVideoExtend?: boolean;
4363
+ };
4364
+ mesh3d?: {
4365
+ supportsImageTo3d?: boolean;
4366
+ outputFormats?: string[];
4367
+ maxPolygons?: number;
4368
+ };
4369
+ speech?: {
4370
+ mode: "tts" | "asr";
4371
+ billingMode?: "token_io" | "inference_chars" | "inference_hour" | "realtime_duplex";
4372
+ };
4373
+ embedding?: {
4374
+ contextWindow?: number;
4375
+ dimensions?: number;
4376
+ maxInputTokens?: number;
4377
+ maxBatchSize?: number;
4378
+ normalization?: "l2" | "none";
4379
+ };
4380
+ webSearchDetail?: {
4381
+ maxResults?: number;
4382
+ };
4383
+ thinking?: boolean;
4384
+ structuredOutput?: boolean;
4385
+ contextCache?: boolean;
4386
+ onlineInference?: boolean;
4387
+ lowLatencyInference?: boolean;
4388
+ batchInference?: boolean;
4389
+ fineTuning?: boolean;
4390
+ toolUse?: boolean;
4391
+ webSearch?: boolean;
4392
+ knowledgeBase?: boolean;
4393
+ mcp?: boolean;
4394
+ };
4395
+ status?: "active" | "deprecated";
4396
+ }, config?: RequestConfig) => RequestBuilder<any>;
4397
+ };
4398
+ update: {
4399
+ post: (body: {
4400
+ profileId: string;
4401
+ referenceVendor?: string;
4402
+ name?: string;
4403
+ family?: string;
4404
+ tags?: string[];
4405
+ description?: string;
4406
+ capabilities?: {
4407
+ inputTypes: "text" | "image" | "audio" | "video" | "embedding" | "mesh_3d"[];
4408
+ outputType: "text" | "image" | "audio" | "video" | "embedding" | "mesh_3d";
4409
+ rateLimits?: {
4410
+ tpmPerMinute?: number;
4411
+ rpmPerMinute?: number;
4412
+ qpmPerMinute?: number;
4413
+ ipmPerMinute?: number;
4414
+ maxConcurrency?: number;
4415
+ };
4416
+ text?: {
4417
+ contextWindow?: number;
4418
+ maxInputTokens?: number;
4419
+ maxOutputTokens?: number;
4420
+ maxThinkingTokens?: number;
4421
+ };
4422
+ image?: {
4423
+ minWidth?: number;
4424
+ minHeight?: number;
4425
+ maxWidth?: number;
4426
+ maxHeight?: number;
4427
+ maxImagesPerRequest?: number;
4428
+ supportedAspectRatios?: string[];
4429
+ supportsInpainting?: boolean;
4430
+ };
4431
+ video?: {
4432
+ supportedResolutions?: string[];
4433
+ maxFps?: number;
4434
+ maxDurationSeconds?: number;
4435
+ minDurationSeconds?: number;
4436
+ supportedAspectRatios?: string[];
4437
+ supportsImageToVideo?: boolean;
4438
+ supportsVideoExtend?: boolean;
4439
+ };
4440
+ mesh3d?: {
4441
+ supportsImageTo3d?: boolean;
4442
+ outputFormats?: string[];
4443
+ maxPolygons?: number;
4444
+ };
4445
+ speech?: {
4446
+ mode: "tts" | "asr";
4447
+ billingMode?: "token_io" | "inference_chars" | "inference_hour" | "realtime_duplex";
4448
+ };
4449
+ embedding?: {
4450
+ contextWindow?: number;
4451
+ dimensions?: number;
4452
+ maxInputTokens?: number;
4453
+ maxBatchSize?: number;
4454
+ normalization?: "l2" | "none";
4455
+ };
4456
+ webSearchDetail?: {
4457
+ maxResults?: number;
4458
+ };
4459
+ thinking?: boolean;
4460
+ structuredOutput?: boolean;
4461
+ contextCache?: boolean;
4462
+ onlineInference?: boolean;
4463
+ lowLatencyInference?: boolean;
4464
+ batchInference?: boolean;
4465
+ fineTuning?: boolean;
4466
+ toolUse?: boolean;
4467
+ webSearch?: boolean;
4468
+ knowledgeBase?: boolean;
4469
+ mcp?: boolean;
4470
+ };
4471
+ status?: "active" | "deprecated";
4472
+ }, config?: RequestConfig) => RequestBuilder<any>;
4473
+ };
4474
+ delete: {
4475
+ post: (body: {
4476
+ profileId: string;
4477
+ }, config?: RequestConfig) => RequestBuilder<any>;
4478
+ };
4479
+ };
4480
+ offerings: {
4481
+ supplierOptions: {
4482
+ /** 管理后台筛选用供应商全量(key/label) */
4483
+ post: (config?: RequestConfig) => RequestBuilder<any>;
4484
+ };
4485
+ profileOptions: {
4486
+ /** 管理后台筛选用模型信息全量(key/label) */
4487
+ post: (config?: RequestConfig) => RequestBuilder<any>;
4488
+ };
4489
+ modelOptions: {
4490
+ /** 管理后台筛选用计费标识全量(key/label/value,支持联动筛选) */
4491
+ post: (body: {
4492
+ supplierId?: string;
4493
+ profileId?: string;
4494
+ protocolId?: string;
4495
+ productLineId?: string;
4496
+ billingRouteKey?: string;
4497
+ tag?: string;
4498
+ enabled?: boolean;
4499
+ }, config?: RequestConfig) => RequestBuilder<any>;
4500
+ };
4501
+ };
4502
+ models: {
4503
+ find: {
4504
+ post: (body: {
4505
+ page?: number;
4506
+ pageSize?: number;
4507
+ profileId?: string;
4508
+ referenceVendor?: string;
4509
+ supplierId?: string;
4510
+ supplierKind?: "agent_vendor" | "agent_proxy";
4511
+ protocolId?: string;
4512
+ tag?: string;
4513
+ productLineId?: string;
4514
+ billingRouteKey?: string;
4515
+ keyword?: string;
4516
+ enabled?: boolean;
4517
+ platformAvailable?: boolean;
4518
+ }, config?: RequestConfig) => RequestBuilder<any>;
4519
+ };
4520
+ unconfigured: {
4521
+ post: (body: {
4522
+ supplierId?: string;
4523
+ supplierKind?: "agent_vendor" | "agent_proxy";
4524
+ }, config?: RequestConfig) => RequestBuilder<any>;
4525
+ };
4526
+ create: {
4527
+ post: (body: {
4528
+ profileId: string;
4529
+ supplierId: string;
4530
+ productLineId: string;
4531
+ protocolId: string;
4532
+ providerModelId: string;
4533
+ name?: string;
4534
+ version?: string;
4535
+ status?: "active" | "deprecated";
4536
+ enabled?: boolean;
4537
+ description?: string;
4538
+ }, config?: RequestConfig) => RequestBuilder<any>;
4539
+ };
4540
+ update: {
4541
+ post: (body: {
4542
+ modelId: string;
4543
+ supplierId?: string;
4544
+ profileId?: string;
4545
+ productLineId?: string;
4546
+ protocolId?: string;
4547
+ providerModelId?: string;
4548
+ name?: string;
4549
+ version?: string;
4550
+ status?: "active" | "deprecated";
4551
+ enabled?: boolean;
4552
+ description?: string;
4553
+ }, config?: RequestConfig) => RequestBuilder<any>;
4554
+ };
4555
+ delete: {
4556
+ post: (body: {
4557
+ modelId: string;
4558
+ }, config?: RequestConfig) => RequestBuilder<any>;
4559
+ };
4560
+ };
4561
+ chat: {
4562
+ supplierOptions: {
4563
+ /** 获取下游应用对话模型设置可用的供应商(与 Ones 已启用 aiSupplier 列表一致) */
4564
+ post: (config?: RequestConfig) => RequestBuilder<any>;
4565
+ };
4566
+ modelOptions: {
4567
+ /** 获取下游应用可用的对话模型目录项(已启用 text_generation) */
4568
+ post: (body: {
4569
+ supplierIds?: string[];
4570
+ }, config?: RequestConfig) => RequestBuilder<any>;
4571
+ };
4572
+ integrationExport: {
4573
+ /** 按 offeringModelId 生成 LLMConfig 片段与下游 API 说明,供 Ones 复制或调试 */
4574
+ post: (body: {
4575
+ offeringModelId: string;
4576
+ }, config?: RequestConfig) => RequestBuilder<any>;
4577
+ };
4578
+ reloadRuntime: {
4579
+ /** 目录或 Key 变更后,从 Mongo 重新编译 /agent/* 可用模型(无需重启进程) */
4580
+ post: (config?: RequestConfig) => RequestBuilder<any>;
4581
+ };
4582
+ };
4583
+ prompt: {
4584
+ supplierOptions: {
4585
+ /** Prompt 模块:筛选平台 Runtime 已就绪的文本模型供应商 */
4586
+ post: (config?: RequestConfig) => RequestBuilder<any>;
4587
+ };
4588
+ modelOptions: {
4589
+ /** Prompt 模块:从平台 Runtime 目录筛选文本模型(offering modelId + providerModelId) */
4590
+ post: (body: {
4591
+ supplierIds?: string[];
4592
+ }, config?: RequestConfig) => RequestBuilder<any>;
4593
+ };
4594
+ };
4595
+ };
4596
+ billingCatalog: {
4597
+ suppliers: {
4598
+ options: {
4599
+ /** 筛选项、表单 Select 用供应商下拉 */
4600
+ post: (body: {
4601
+ enabled?: boolean;
4602
+ supplierKind?: "agent_vendor" | "agent_proxy";
4603
+ agentVendorOnly?: boolean;
4604
+ }, config?: RequestConfig) => RequestBuilder<any>;
4605
+ };
4606
+ };
4607
+ models: {
4608
+ find: {
4609
+ post: (body: {
4610
+ page?: number;
4611
+ pageSize?: number;
4612
+ supplierId?: string;
4613
+ profileId?: string;
4614
+ protocolId?: string;
4615
+ tag?: string;
4616
+ keyword?: string;
4617
+ enabled?: boolean;
4618
+ }, config?: RequestConfig) => RequestBuilder<any>;
4619
+ };
4620
+ };
4621
+ billingEntries: {
4622
+ find: {
4623
+ /** 按 supplier+profile 聚合的价表列表 */
4624
+ post: (body: {
4625
+ page?: number;
4626
+ pageSize?: number;
4627
+ supplierId?: string;
4628
+ profileId?: string;
4629
+ productLine?: "" | "text" | "multimodal" | "image_gen" | "video_gen" | "mesh_3d" | "embedding" | "speech_tts" | "speech_voice_clone" | "speech_voice_design" | "speech_asr_file" | "speech_asr_stream" | "speech_si" | "speech_realtime_duplex";
4630
+ keyword?: string;
4631
+ pricingConfigured?: boolean;
4632
+ billable?: boolean;
4633
+ }, config?: RequestConfig) => RequestBuilder<any>;
4634
+ };
4635
+ unconfigured: {
4636
+ post: (body: {
4637
+ supplierId?: string;
4638
+ productLine?: "" | "text" | "multimodal" | "image_gen" | "video_gen" | "mesh_3d" | "embedding" | "speech_tts" | "speech_voice_clone" | "speech_voice_design" | "speech_asr_file" | "speech_asr_stream" | "speech_si" | "speech_realtime_duplex";
4639
+ keyword?: string;
4640
+ }, config?: RequestConfig) => RequestBuilder<any>;
4641
+ };
4642
+ findOne: {
4643
+ post: (body: {
4644
+ supplierId: string;
4645
+ profileId: string;
4646
+ }, config?: RequestConfig) => RequestBuilder<any>;
4647
+ };
4648
+ statuses: {
4649
+ post: (config?: RequestConfig) => RequestBuilder<any>;
4650
+ };
4651
+ };
4652
+ modelPricing: {
4653
+ delete: {
4654
+ post: (body: {
4655
+ supplierId: string;
4656
+ profileId: string;
4657
+ }, config?: RequestConfig) => RequestBuilder<any>;
4658
+ };
4659
+ };
4660
+ builtinServices: {
4661
+ options: {
4662
+ /** 只读内置服务与价目表 catalog */
4663
+ post: (body: {
4664
+ group?: "ai" | "storage" | "platform";
4665
+ }, config?: RequestConfig) => RequestBuilder<any>;
4666
+ };
4667
+ };
4668
+ exchangeRate: {
4669
+ findOne: {
4670
+ post: (config?: RequestConfig) => RequestBuilder<any>;
4671
+ };
4672
+ update: {
4673
+ post: (body: {
4674
+ usdToCny: number;
4675
+ }, config?: RequestConfig) => RequestBuilder<any>;
4676
+ };
4677
+ };
4678
+ };
4679
+ embeddings: {
4680
+ create: {
4681
+ /** 将文本转换为向量(豆包 doubao-embedding-vision-250615),含计费 */
4682
+ post: (body: {
4683
+ model?: string;
4684
+ input: string;
4685
+ dimensions?: number;
4686
+ instructions?: string;
4687
+ }, config?: RequestConfig) => RequestBuilder<any>;
4688
+ };
4689
+ delete: {
4690
+ /** 删除向量生成任务记录 */
4691
+ post: (body: {
4692
+ id: string;
4693
+ }, config?: RequestConfig) => RequestBuilder<any>;
4694
+ };
4695
+ find: {
4696
+ /** 分页查询向量生成任务 */
4697
+ post: (body: {
4698
+ current: number;
4699
+ pageSize: number;
4700
+ where: {
4701
+ id?: string;
4702
+ input?: string;
4703
+ supplierId?: string;
4704
+ model?: string;
4705
+ status?: string;
4706
+ };
4707
+ }, config?: RequestConfig) => RequestBuilder<any>;
4708
+ };
4709
+ findOne: {
4710
+ /** 查询单条向量生成任务 */
4711
+ post: (body: {
4712
+ id: string;
4713
+ }, config?: RequestConfig) => RequestBuilder<any>;
4714
+ };
4715
+ options: {
4716
+ status: {
4717
+ /** 获取向量任务状态下拉选项 */
4718
+ post: (config?: RequestConfig) => RequestBuilder<any>;
1806
4719
  };
1807
4720
  };
1808
4721
  };
1809
4722
  webhooks: {
1810
4723
  events: {
1811
4724
  /** 获取所有可用的 Webhook 事件类型 */
1812
- get: (config?: RequestConfig) => Promise<ApiResponse<any>>;
4725
+ get: (config?: RequestConfig) => RequestBuilder<any>;
1813
4726
  ':id': {
1814
4727
  /** 获取指定分类的 Webhook 事件 */
1815
- get: (config?: RequestConfig) => Promise<ApiResponse<any>>;
4728
+ get: (config?: RequestConfig) => RequestBuilder<any>;
1816
4729
  };
1817
4730
  };
1818
4731
  categories: {
1819
4732
  /** 获取所有 Webhook 事件分类 */
1820
- get: (config?: RequestConfig) => Promise<ApiResponse<any>>;
4733
+ get: (config?: RequestConfig) => RequestBuilder<any>;
1821
4734
  };
1822
4735
  };
1823
4736
  }