quantum-ai-sdk 0.3.3 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.d.ts +5 -0
- package/dist/client.js +8 -0
- package/dist/index.d.ts +1 -1
- package/dist/rag.d.ts +7 -1
- package/dist/rag.js +24 -0
- package/dist/types.d.ts +1054 -41
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ export interface ClientOptions {
|
|
|
12
12
|
export interface ResponseMeta {
|
|
13
13
|
costTicks: number;
|
|
14
14
|
requestId: string;
|
|
15
|
+
cost_ticks?: number;
|
|
16
|
+
request_id?: string;
|
|
15
17
|
model: string;
|
|
16
18
|
}
|
|
17
19
|
export interface ChatRequest {
|
|
@@ -50,10 +52,14 @@ export interface ChatTool {
|
|
|
50
52
|
}
|
|
51
53
|
export interface ContentBlock {
|
|
52
54
|
type: string;
|
|
55
|
+
/** Canonical block type (e.g. "text", "thinking", "tool_use"). */
|
|
56
|
+
block_type?: string;
|
|
53
57
|
text?: string;
|
|
54
58
|
id?: string;
|
|
55
59
|
name?: string;
|
|
56
60
|
input?: Record<string, unknown>;
|
|
61
|
+
/** Gemini thought signature — must be echoed back with tool results. */
|
|
62
|
+
thought_signature?: string;
|
|
57
63
|
[key: string]: unknown;
|
|
58
64
|
}
|
|
59
65
|
export interface ChatUsage {
|
|
@@ -80,6 +86,8 @@ export interface StreamToolUse {
|
|
|
80
86
|
}
|
|
81
87
|
export interface StreamEvent {
|
|
82
88
|
type: string;
|
|
89
|
+
/** Event type (e.g. "content_delta", "thinking_delta", "tool_use", "usage", "error", "done"). */
|
|
90
|
+
event_type?: string;
|
|
83
91
|
delta?: StreamDelta;
|
|
84
92
|
tool_use?: StreamToolUse;
|
|
85
93
|
usage?: ChatUsage;
|
|
@@ -149,6 +157,10 @@ export interface AgentRequest {
|
|
|
149
157
|
max_steps?: number;
|
|
150
158
|
/** System prompt for the conductor. */
|
|
151
159
|
system_prompt?: string;
|
|
160
|
+
/** Conversation session ID. */
|
|
161
|
+
session_id?: string;
|
|
162
|
+
/** Session context management. */
|
|
163
|
+
context_config?: ContextConfig;
|
|
152
164
|
}
|
|
153
165
|
export interface AgentWorkerConfig {
|
|
154
166
|
name: string;
|
|
@@ -174,6 +186,24 @@ export interface MissionRequest {
|
|
|
174
186
|
workers?: MissionWorkerConfig[];
|
|
175
187
|
/** Maximum orchestration steps. */
|
|
176
188
|
max_steps?: number;
|
|
189
|
+
/** Execution strategy ("wave", "dag", "codegen", etc.). */
|
|
190
|
+
strategy?: string;
|
|
191
|
+
/** Conductor system prompt. */
|
|
192
|
+
system_prompt?: string;
|
|
193
|
+
/** Conversation session ID. */
|
|
194
|
+
session_id?: string;
|
|
195
|
+
/** Auto-plan before executing. */
|
|
196
|
+
auto_plan?: boolean;
|
|
197
|
+
/** Session context management. */
|
|
198
|
+
context_config?: ContextConfig;
|
|
199
|
+
/** Route workers through a deployed Vertex endpoint. */
|
|
200
|
+
deployment_id?: string;
|
|
201
|
+
/** Model for codegen worker nodes. */
|
|
202
|
+
worker_model?: string;
|
|
203
|
+
/** Build command for codegen verification. */
|
|
204
|
+
build_command?: string;
|
|
205
|
+
/** Workspace directory for generated files. */
|
|
206
|
+
workspace_path?: string;
|
|
177
207
|
}
|
|
178
208
|
export interface MissionWorkerConfig {
|
|
179
209
|
name: string;
|
|
@@ -197,14 +227,42 @@ export interface ImageRequest {
|
|
|
197
227
|
prompt: string;
|
|
198
228
|
/** Number of images to generate. */
|
|
199
229
|
n?: number;
|
|
230
|
+
/** Number of images to generate (alias). */
|
|
231
|
+
count?: number;
|
|
200
232
|
/** Image size (e.g. "1024x1024"). */
|
|
201
233
|
size?: string;
|
|
234
|
+
/** Aspect ratio (e.g. "16:9", "1:1"). */
|
|
235
|
+
aspect_ratio?: string;
|
|
202
236
|
/** Quality level (e.g. "standard", "hd"). */
|
|
203
237
|
quality?: string;
|
|
238
|
+
/** Image format (e.g. "png", "jpeg", "webp"). */
|
|
239
|
+
output_format?: string;
|
|
240
|
+
/** Style preset (e.g. "vivid", "natural"). */
|
|
241
|
+
style?: string;
|
|
242
|
+
/** Background mode (e.g. "auto", "transparent", "opaque"). */
|
|
243
|
+
background?: string;
|
|
244
|
+
/** Image URL or data URI for image-to-3D conversion (Meshy). */
|
|
245
|
+
image_url?: string;
|
|
246
|
+
/** Mesh topology: "triangle" or "quad". */
|
|
247
|
+
topology?: string;
|
|
248
|
+
/** Target polygon count (100-300,000). */
|
|
249
|
+
target_polycount?: number;
|
|
250
|
+
/** Symmetry mode: "auto", "on", or "off". */
|
|
251
|
+
symmetry_mode?: string;
|
|
252
|
+
/** Pose mode: "", "a-pose", or "t-pose". */
|
|
253
|
+
pose_mode?: string;
|
|
254
|
+
/** Generate PBR texture maps. */
|
|
255
|
+
enable_pbr?: boolean;
|
|
204
256
|
}
|
|
205
257
|
export interface GeneratedImage {
|
|
206
258
|
url?: string;
|
|
207
259
|
b64_json?: string;
|
|
260
|
+
/** Base64-encoded image data. */
|
|
261
|
+
base64?: string;
|
|
262
|
+
/** Image format (e.g. "png", "jpeg"). */
|
|
263
|
+
format?: string;
|
|
264
|
+
/** Image index within the batch. */
|
|
265
|
+
index?: number;
|
|
208
266
|
}
|
|
209
267
|
export interface ImageResponse {
|
|
210
268
|
images: GeneratedImage[];
|
|
@@ -218,13 +276,17 @@ export interface ImageEditRequest {
|
|
|
218
276
|
/** Text prompt describing the edit. */
|
|
219
277
|
prompt: string;
|
|
220
278
|
/** Base64-encoded source image. */
|
|
221
|
-
image
|
|
279
|
+
image?: string;
|
|
280
|
+
/** Base64-encoded input images. */
|
|
281
|
+
input_images?: string[];
|
|
222
282
|
/** Optional mask image for inpainting. */
|
|
223
283
|
mask?: string;
|
|
224
284
|
/** Image size. */
|
|
225
285
|
size?: string;
|
|
226
286
|
/** Number of images. */
|
|
227
287
|
n?: number;
|
|
288
|
+
/** Number of edited images to generate. */
|
|
289
|
+
count?: number;
|
|
228
290
|
}
|
|
229
291
|
export interface ImageEditResponse {
|
|
230
292
|
images: GeneratedImage[];
|
|
@@ -273,30 +335,54 @@ export interface MusicRequest {
|
|
|
273
335
|
prompt: string;
|
|
274
336
|
/** Duration in seconds. */
|
|
275
337
|
duration?: number;
|
|
338
|
+
/** Target duration in seconds. */
|
|
339
|
+
duration_seconds?: number;
|
|
276
340
|
/** Model to use for music generation. */
|
|
277
341
|
model?: string;
|
|
278
342
|
}
|
|
279
343
|
export interface MusicClip {
|
|
280
|
-
audio_url
|
|
344
|
+
audio_url?: string;
|
|
281
345
|
title?: string;
|
|
282
346
|
tags?: string;
|
|
283
|
-
duration_seconds
|
|
347
|
+
duration_seconds?: number;
|
|
348
|
+
/** Base64-encoded audio data. */
|
|
349
|
+
base64?: string;
|
|
350
|
+
/** Audio format (e.g. "mp3", "wav"). */
|
|
351
|
+
format?: string;
|
|
352
|
+
/** Audio file size. */
|
|
353
|
+
size_bytes?: number;
|
|
354
|
+
/** Clip index within the batch. */
|
|
355
|
+
index?: number;
|
|
284
356
|
}
|
|
285
357
|
export interface MusicResponse {
|
|
286
|
-
clips
|
|
358
|
+
clips?: MusicClip[];
|
|
359
|
+
/** Generated music clips. */
|
|
360
|
+
audio_clips?: MusicClip[];
|
|
361
|
+
/** Model that generated the music. */
|
|
362
|
+
model?: string;
|
|
287
363
|
request_id: string;
|
|
288
364
|
cost_ticks: number;
|
|
289
365
|
}
|
|
290
366
|
export interface SoundEffectRequest {
|
|
291
367
|
/** Text prompt describing the sound effect. */
|
|
292
|
-
text
|
|
368
|
+
text?: string;
|
|
369
|
+
/** Text prompt describing the sound effect (alias). */
|
|
370
|
+
prompt?: string;
|
|
293
371
|
/** Duration in seconds. */
|
|
294
372
|
duration_seconds?: number;
|
|
295
373
|
/** Whether to generate multiple variations. */
|
|
296
374
|
prompt_influence?: number;
|
|
297
375
|
}
|
|
298
376
|
export interface SoundEffectResponse {
|
|
299
|
-
audio_url
|
|
377
|
+
audio_url?: string;
|
|
378
|
+
/** Base64-encoded audio data. */
|
|
379
|
+
audio_base64?: string;
|
|
380
|
+
/** Audio format (e.g. "mp3"). */
|
|
381
|
+
format?: string;
|
|
382
|
+
/** File size in bytes. */
|
|
383
|
+
size_bytes?: number;
|
|
384
|
+
/** Model used. */
|
|
385
|
+
model?: string;
|
|
300
386
|
request_id: string;
|
|
301
387
|
cost_ticks: number;
|
|
302
388
|
}
|
|
@@ -306,11 +392,17 @@ export interface DialogueVoice {
|
|
|
306
392
|
}
|
|
307
393
|
export interface DialogueRequest {
|
|
308
394
|
/** Script with speaker names and lines. */
|
|
309
|
-
script
|
|
395
|
+
script?: string;
|
|
396
|
+
/** Full dialogue script text. */
|
|
397
|
+
text?: string;
|
|
310
398
|
/** Voice mapping (speaker name -> voice ID). */
|
|
311
|
-
voices: Record<string, string
|
|
399
|
+
voices: Record<string, string> | DialogueVoice[];
|
|
312
400
|
/** Model for dialogue generation. */
|
|
313
401
|
model?: string;
|
|
402
|
+
/** Output audio format. */
|
|
403
|
+
output_format?: string;
|
|
404
|
+
/** Seed for reproducible generation. */
|
|
405
|
+
seed?: number;
|
|
314
406
|
}
|
|
315
407
|
export interface DialogueResponse {
|
|
316
408
|
audio_url: string;
|
|
@@ -320,11 +412,17 @@ export interface DialogueResponse {
|
|
|
320
412
|
}
|
|
321
413
|
export interface SpeechToSpeechRequest {
|
|
322
414
|
/** Base64-encoded source audio. */
|
|
323
|
-
audio
|
|
415
|
+
audio?: string;
|
|
416
|
+
/** Base64-encoded source audio (canonical). */
|
|
417
|
+
audio_base64?: string;
|
|
324
418
|
/** Target voice ID. */
|
|
325
|
-
voice_id
|
|
419
|
+
voice_id?: string;
|
|
420
|
+
/** Target voice. */
|
|
421
|
+
voice?: string;
|
|
326
422
|
/** Model for voice conversion. */
|
|
327
423
|
model?: string;
|
|
424
|
+
/** Output audio format. */
|
|
425
|
+
output_format?: string;
|
|
328
426
|
}
|
|
329
427
|
export interface SpeechToSpeechResponse {
|
|
330
428
|
audio_url: string;
|
|
@@ -354,11 +452,19 @@ export interface RemixVoiceResponse {
|
|
|
354
452
|
}
|
|
355
453
|
export interface DubRequest {
|
|
356
454
|
/** Base64-encoded audio/video to dub. */
|
|
357
|
-
audio
|
|
455
|
+
audio?: string;
|
|
456
|
+
/** Base64-encoded source audio or video (canonical). */
|
|
457
|
+
audio_base64?: string;
|
|
458
|
+
/** Original filename (helps detect format). */
|
|
459
|
+
filename?: string;
|
|
358
460
|
/** Target language code. */
|
|
359
|
-
target_lang
|
|
461
|
+
target_lang?: string;
|
|
462
|
+
/** Target language (canonical). */
|
|
463
|
+
target_language?: string;
|
|
360
464
|
/** Source language code. */
|
|
361
465
|
source_lang?: string;
|
|
466
|
+
/** Source language (auto-detected if omitted). */
|
|
467
|
+
source_language?: string;
|
|
362
468
|
}
|
|
363
469
|
export interface DubResponse {
|
|
364
470
|
audio_url: string;
|
|
@@ -367,9 +473,13 @@ export interface DubResponse {
|
|
|
367
473
|
}
|
|
368
474
|
export interface AlignRequest {
|
|
369
475
|
/** Base64-encoded audio. */
|
|
370
|
-
audio
|
|
476
|
+
audio?: string;
|
|
477
|
+
/** Base64-encoded audio data (canonical). */
|
|
478
|
+
audio_base64?: string;
|
|
371
479
|
/** Text to align against the audio. */
|
|
372
480
|
text: string;
|
|
481
|
+
/** Language code. */
|
|
482
|
+
language?: string;
|
|
373
483
|
}
|
|
374
484
|
export interface AlignedWord {
|
|
375
485
|
word: string;
|
|
@@ -377,15 +487,21 @@ export interface AlignedWord {
|
|
|
377
487
|
end: number;
|
|
378
488
|
}
|
|
379
489
|
export interface AlignResponse {
|
|
380
|
-
words
|
|
490
|
+
words?: AlignedWord[];
|
|
491
|
+
/** Aligned segments. */
|
|
492
|
+
segments?: AlignmentSegment[];
|
|
381
493
|
request_id: string;
|
|
382
494
|
cost_ticks: number;
|
|
383
495
|
}
|
|
384
496
|
export interface VoiceDesignRequest {
|
|
385
497
|
/** Text description of the desired voice. */
|
|
386
498
|
description: string;
|
|
499
|
+
/** Sample text to speak with the designed voice. */
|
|
500
|
+
text?: string;
|
|
387
501
|
/** Text to preview the voice with. */
|
|
388
502
|
preview_text?: string;
|
|
503
|
+
/** Output audio format. */
|
|
504
|
+
output_format?: string;
|
|
389
505
|
}
|
|
390
506
|
export interface VoicePreview {
|
|
391
507
|
audio_url: string;
|
|
@@ -401,6 +517,12 @@ export interface StarfishTTSRequest {
|
|
|
401
517
|
text: string;
|
|
402
518
|
/** Base64-encoded reference audio for voice cloning. */
|
|
403
519
|
reference_audio?: string;
|
|
520
|
+
/** Voice identifier. */
|
|
521
|
+
voice?: string;
|
|
522
|
+
/** Output audio format. */
|
|
523
|
+
output_format?: string;
|
|
524
|
+
/** Speech speed multiplier. */
|
|
525
|
+
speed?: number;
|
|
404
526
|
}
|
|
405
527
|
export interface StarfishTTSResponse {
|
|
406
528
|
audio_url: string;
|
|
@@ -453,12 +575,24 @@ export interface VideoRequest {
|
|
|
453
575
|
prompt: string;
|
|
454
576
|
/** Duration in seconds. */
|
|
455
577
|
duration?: number;
|
|
578
|
+
/** Target video duration in seconds. */
|
|
579
|
+
duration_seconds?: number;
|
|
580
|
+
/** Video aspect ratio (e.g. "16:9", "9:16"). */
|
|
581
|
+
aspect_ratio?: string;
|
|
456
582
|
/** Resolution (e.g. "720p", "1080p"). */
|
|
457
583
|
resolution?: string;
|
|
458
584
|
}
|
|
459
585
|
export interface GeneratedVideo {
|
|
460
|
-
url
|
|
461
|
-
duration_seconds
|
|
586
|
+
url?: string;
|
|
587
|
+
duration_seconds?: number;
|
|
588
|
+
/** Base64-encoded video data (or a URL). */
|
|
589
|
+
base64?: string;
|
|
590
|
+
/** Video format (e.g. "mp4"). */
|
|
591
|
+
format?: string;
|
|
592
|
+
/** Video file size. */
|
|
593
|
+
size_bytes?: number;
|
|
594
|
+
/** Video index within the batch. */
|
|
595
|
+
index?: number;
|
|
462
596
|
}
|
|
463
597
|
export interface VideoResponse {
|
|
464
598
|
videos: GeneratedVideo[];
|
|
@@ -492,11 +626,27 @@ export interface VideoTranslateRequest {
|
|
|
492
626
|
}
|
|
493
627
|
export interface PhotoAvatarRequest {
|
|
494
628
|
/** Base64-encoded photo image. */
|
|
495
|
-
image
|
|
629
|
+
image?: string;
|
|
630
|
+
/** Base64-encoded photo (canonical). */
|
|
631
|
+
photo_base64?: string;
|
|
632
|
+
/** Script text for the avatar to speak. */
|
|
633
|
+
script?: string;
|
|
634
|
+
/** Voice ID. */
|
|
635
|
+
voice_id?: string;
|
|
636
|
+
/** Aspect ratio. */
|
|
637
|
+
aspect_ratio?: string;
|
|
496
638
|
}
|
|
497
639
|
export interface DigitalTwinRequest {
|
|
498
640
|
/** Base64-encoded training video. */
|
|
499
|
-
video
|
|
641
|
+
video?: string;
|
|
642
|
+
/** Digital twin / avatar ID. */
|
|
643
|
+
avatar_id?: string;
|
|
644
|
+
/** Script text. */
|
|
645
|
+
script?: string;
|
|
646
|
+
/** Voice ID. */
|
|
647
|
+
voice_id?: string;
|
|
648
|
+
/** Aspect ratio. */
|
|
649
|
+
aspect_ratio?: string;
|
|
500
650
|
}
|
|
501
651
|
export interface AsyncJobResponse {
|
|
502
652
|
job_id: string;
|
|
@@ -523,6 +673,10 @@ export interface HeyGenVoice {
|
|
|
523
673
|
voice_id: string;
|
|
524
674
|
name: string;
|
|
525
675
|
language?: string;
|
|
676
|
+
/** Gender. */
|
|
677
|
+
gender?: string;
|
|
678
|
+
/** Additional fields. */
|
|
679
|
+
extra?: Record<string, unknown>;
|
|
526
680
|
[key: string]: unknown;
|
|
527
681
|
}
|
|
528
682
|
export interface HeyGenVoicesResponse {
|
|
@@ -542,14 +696,26 @@ export interface EmbedResponse {
|
|
|
542
696
|
}
|
|
543
697
|
export interface DocumentRequest {
|
|
544
698
|
/** Document content (base64 or URL). */
|
|
545
|
-
content
|
|
699
|
+
content?: string;
|
|
700
|
+
/** Base64-encoded file content. */
|
|
701
|
+
file_base64?: string;
|
|
702
|
+
/** Original filename (helps determine the file type). */
|
|
703
|
+
filename?: string;
|
|
546
704
|
/** Content type (e.g. "pdf", "image", "url"). */
|
|
547
705
|
type?: string;
|
|
706
|
+
/** Desired output format (e.g. "markdown", "text"). */
|
|
707
|
+
output_format?: string;
|
|
548
708
|
/** Model for extraction. */
|
|
549
709
|
model?: string;
|
|
550
710
|
}
|
|
551
711
|
export interface DocumentResponse {
|
|
552
|
-
text
|
|
712
|
+
text?: string;
|
|
713
|
+
/** Extracted text content. */
|
|
714
|
+
content?: string;
|
|
715
|
+
/** Format of the extracted content (e.g. "markdown"). */
|
|
716
|
+
format?: string;
|
|
717
|
+
/** Provider-specific metadata about the document. */
|
|
718
|
+
meta?: Record<string, unknown>;
|
|
553
719
|
pages?: number;
|
|
554
720
|
request_id: string;
|
|
555
721
|
cost_ticks: number;
|
|
@@ -563,7 +729,9 @@ export interface ChunkDocumentRequest {
|
|
|
563
729
|
export interface DocumentChunk {
|
|
564
730
|
text: string;
|
|
565
731
|
index: number;
|
|
566
|
-
tokens
|
|
732
|
+
tokens?: number;
|
|
733
|
+
/** Estimated token count. */
|
|
734
|
+
token_count?: number;
|
|
567
735
|
}
|
|
568
736
|
export interface ChunkDocumentResponse {
|
|
569
737
|
chunks: DocumentChunk[];
|
|
@@ -634,6 +802,43 @@ export interface SurrealRAGProviderInfo {
|
|
|
634
802
|
export interface SurrealRAGProvidersResponse {
|
|
635
803
|
providers: SurrealRAGProviderInfo[];
|
|
636
804
|
}
|
|
805
|
+
export interface Collection {
|
|
806
|
+
id: string;
|
|
807
|
+
name: string;
|
|
808
|
+
description?: string;
|
|
809
|
+
document_count?: number;
|
|
810
|
+
owner?: string;
|
|
811
|
+
provider?: string;
|
|
812
|
+
created_at?: string;
|
|
813
|
+
}
|
|
814
|
+
export interface CollectionDocument {
|
|
815
|
+
file_id: string;
|
|
816
|
+
name: string;
|
|
817
|
+
size_bytes?: number;
|
|
818
|
+
content_type?: string;
|
|
819
|
+
processing_status?: string;
|
|
820
|
+
document_status?: string;
|
|
821
|
+
indexed?: boolean;
|
|
822
|
+
created_at?: string;
|
|
823
|
+
}
|
|
824
|
+
export interface CollectionSearchResult {
|
|
825
|
+
content: string;
|
|
826
|
+
score?: number;
|
|
827
|
+
file_id?: string;
|
|
828
|
+
collection_id?: string;
|
|
829
|
+
metadata?: Record<string, unknown>;
|
|
830
|
+
}
|
|
831
|
+
export interface CollectionSearchRequest {
|
|
832
|
+
query: string;
|
|
833
|
+
collection_ids: string[];
|
|
834
|
+
mode?: string;
|
|
835
|
+
max_results?: number;
|
|
836
|
+
}
|
|
837
|
+
export interface CollectionUploadResult {
|
|
838
|
+
file_id: string;
|
|
839
|
+
filename: string;
|
|
840
|
+
bytes?: number;
|
|
841
|
+
}
|
|
637
842
|
export interface ModelInfo {
|
|
638
843
|
id: string;
|
|
639
844
|
provider: string;
|
|
@@ -689,18 +894,32 @@ export interface UsageSummaryResponse {
|
|
|
689
894
|
months: UsageSummaryMonth[];
|
|
690
895
|
}
|
|
691
896
|
export interface PricingEntry {
|
|
692
|
-
Provider
|
|
693
|
-
Model
|
|
694
|
-
DisplayName
|
|
695
|
-
InputPerMillion
|
|
696
|
-
OutputPerMillion
|
|
897
|
+
Provider?: string;
|
|
898
|
+
Model?: string;
|
|
899
|
+
DisplayName?: string;
|
|
900
|
+
InputPerMillion?: number;
|
|
901
|
+
OutputPerMillion?: number;
|
|
697
902
|
CachedPerMillion?: number;
|
|
903
|
+
/** Upstream provider. */
|
|
904
|
+
provider?: string;
|
|
905
|
+
/** Model identifier. */
|
|
906
|
+
model?: string;
|
|
907
|
+
/** Human-readable model name. */
|
|
908
|
+
display_name?: string;
|
|
909
|
+
/** Cost per million input tokens in USD. */
|
|
910
|
+
input_per_million?: number;
|
|
911
|
+
/** Cost per million output tokens in USD. */
|
|
912
|
+
output_per_million?: number;
|
|
913
|
+
/** Cost per million cached tokens in USD. */
|
|
914
|
+
cached_per_million?: number;
|
|
698
915
|
}
|
|
699
916
|
export interface AccountPricingResponse {
|
|
700
917
|
pricing: Record<string, PricingEntry>;
|
|
701
918
|
}
|
|
702
919
|
export interface JobCreateRequest {
|
|
703
|
-
type
|
|
920
|
+
type?: string;
|
|
921
|
+
/** Job type (e.g. "video/generate", "audio/music"). */
|
|
922
|
+
job_type?: string;
|
|
704
923
|
params: Record<string, unknown>;
|
|
705
924
|
}
|
|
706
925
|
export interface JobCreateResponse {
|
|
@@ -867,19 +1086,37 @@ export interface CreateKeyRequest {
|
|
|
867
1086
|
name: string;
|
|
868
1087
|
scopes?: string[];
|
|
869
1088
|
expires_at?: string;
|
|
1089
|
+
/** Restrict to specific endpoints (e.g. ["chat", "images"]). */
|
|
1090
|
+
endpoints?: string[];
|
|
1091
|
+
/** Maximum spend in USD before the key is disabled. */
|
|
1092
|
+
spend_cap_usd?: number;
|
|
1093
|
+
/** Rate limit in requests per minute. */
|
|
1094
|
+
rate_limit?: number;
|
|
870
1095
|
}
|
|
871
1096
|
export interface CreateKeyResponse {
|
|
872
1097
|
key: string;
|
|
873
|
-
id
|
|
1098
|
+
id?: string;
|
|
1099
|
+
/** Key metadata. */
|
|
1100
|
+
details?: KeyDetails;
|
|
874
1101
|
}
|
|
875
1102
|
export interface KeyDetails {
|
|
876
1103
|
id: string;
|
|
877
1104
|
name: string;
|
|
878
|
-
prefix
|
|
1105
|
+
prefix?: string;
|
|
1106
|
+
/** First characters of the key for identification. */
|
|
1107
|
+
key_prefix?: string;
|
|
879
1108
|
scopes?: string[];
|
|
880
|
-
|
|
1109
|
+
/** Scope restrictions. */
|
|
1110
|
+
scope?: unknown;
|
|
1111
|
+
/** Amount spent by this key in ticks. */
|
|
1112
|
+
spent_ticks?: number;
|
|
1113
|
+
/** Whether the key has been revoked. */
|
|
1114
|
+
revoked?: boolean;
|
|
1115
|
+
created_at?: string;
|
|
881
1116
|
expires_at?: string;
|
|
882
1117
|
last_used_at?: string;
|
|
1118
|
+
/** Last usage timestamp. */
|
|
1119
|
+
last_used?: string;
|
|
883
1120
|
}
|
|
884
1121
|
export interface ListKeysResponse {
|
|
885
1122
|
keys: KeyDetails[];
|
|
@@ -887,25 +1124,49 @@ export interface ListKeysResponse {
|
|
|
887
1124
|
export interface ComputeTemplate {
|
|
888
1125
|
id: string;
|
|
889
1126
|
name: string;
|
|
890
|
-
gpu_type
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
1127
|
+
gpu_type?: string;
|
|
1128
|
+
/** GPU type description. */
|
|
1129
|
+
gpu?: string;
|
|
1130
|
+
gpu_count?: number;
|
|
1131
|
+
/** VRAM per GPU in GB. */
|
|
1132
|
+
vram_gb?: number;
|
|
1133
|
+
vcpus?: number;
|
|
1134
|
+
ram_gb?: number;
|
|
1135
|
+
disk_gb?: number;
|
|
1136
|
+
price_per_hour?: number;
|
|
1137
|
+
/** Price per hour in USD. */
|
|
1138
|
+
price_per_hour_usd?: number;
|
|
1139
|
+
/** Available zones. */
|
|
1140
|
+
zones?: string[];
|
|
896
1141
|
[key: string]: unknown;
|
|
897
1142
|
}
|
|
898
1143
|
export interface TemplatesResponse {
|
|
899
1144
|
templates: ComputeTemplate[];
|
|
900
1145
|
}
|
|
901
1146
|
export interface ProvisionRequest {
|
|
902
|
-
template_id
|
|
1147
|
+
template_id?: string;
|
|
1148
|
+
/** Template ID to provision. */
|
|
1149
|
+
template?: string;
|
|
903
1150
|
region?: string;
|
|
1151
|
+
/** Preferred zone (e.g. "us-central1-a"). */
|
|
1152
|
+
zone?: string;
|
|
1153
|
+
/** Use spot/preemptible pricing. */
|
|
1154
|
+
spot?: boolean;
|
|
1155
|
+
/** Auto-teardown after N minutes of inactivity. */
|
|
1156
|
+
auto_teardown_minutes?: number;
|
|
904
1157
|
ssh_public_key?: string;
|
|
905
1158
|
}
|
|
906
1159
|
export interface ProvisionResponse {
|
|
907
1160
|
instance_id: string;
|
|
908
1161
|
status: string;
|
|
1162
|
+
/** Template that was provisioned. */
|
|
1163
|
+
template?: string;
|
|
1164
|
+
/** Zone the instance was placed in. */
|
|
1165
|
+
zone?: string;
|
|
1166
|
+
/** SSH connection address. */
|
|
1167
|
+
ssh_address?: string;
|
|
1168
|
+
/** Estimated price per hour. */
|
|
1169
|
+
price_per_hour_usd?: number;
|
|
909
1170
|
}
|
|
910
1171
|
export interface ComputeInstanceInfo {
|
|
911
1172
|
id: string;
|
|
@@ -931,6 +1192,8 @@ export interface SSHKeyRequest {
|
|
|
931
1192
|
export interface DeleteResponse {
|
|
932
1193
|
status: string;
|
|
933
1194
|
cost_ticks?: number;
|
|
1195
|
+
/** Instance that was deleted. */
|
|
1196
|
+
instance_id?: string;
|
|
934
1197
|
}
|
|
935
1198
|
export interface VoiceInfo {
|
|
936
1199
|
voice_id: string;
|
|
@@ -951,6 +1214,8 @@ export interface CloneVoiceRequest {
|
|
|
951
1214
|
export interface CloneVoiceResponse {
|
|
952
1215
|
voice_id: string;
|
|
953
1216
|
name: string;
|
|
1217
|
+
/** Status message. */
|
|
1218
|
+
status?: string;
|
|
954
1219
|
}
|
|
955
1220
|
export interface SharedVoice {
|
|
956
1221
|
public_owner_id: string;
|
|
@@ -999,6 +1264,8 @@ export interface ContactRequest {
|
|
|
999
1264
|
name: string;
|
|
1000
1265
|
/** Sender email address. */
|
|
1001
1266
|
email: string;
|
|
1267
|
+
/** Message subject. */
|
|
1268
|
+
subject?: string;
|
|
1002
1269
|
/** Message body. */
|
|
1003
1270
|
message: string;
|
|
1004
1271
|
}
|
|
@@ -1080,6 +1347,8 @@ export interface CreditTier {
|
|
|
1080
1347
|
name?: string;
|
|
1081
1348
|
min_balance?: number;
|
|
1082
1349
|
discount_percent?: number;
|
|
1350
|
+
/** Additional tier data. */
|
|
1351
|
+
extra?: unknown;
|
|
1083
1352
|
[key: string]: unknown;
|
|
1084
1353
|
}
|
|
1085
1354
|
/** Response from listing credit tiers. */
|
|
@@ -1120,6 +1389,8 @@ export interface AuthAppleRequest {
|
|
|
1120
1389
|
export interface StatusResponse {
|
|
1121
1390
|
/** Status string (e.g. "revoked", "deleted", "alive", "sent"). */
|
|
1122
1391
|
status: string;
|
|
1392
|
+
/** Optional human-readable message. */
|
|
1393
|
+
message?: string;
|
|
1123
1394
|
/** Additional fields. */
|
|
1124
1395
|
[key: string]: unknown;
|
|
1125
1396
|
}
|
|
@@ -1179,14 +1450,14 @@ export interface BasicAnimations {
|
|
|
1179
1450
|
export interface AnimateRequest {
|
|
1180
1451
|
rig_task_id: string;
|
|
1181
1452
|
action_id: number;
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
fps?: number;
|
|
1185
|
-
};
|
|
1453
|
+
/** Optional post-processing. */
|
|
1454
|
+
post_process?: AnimationPostProcess;
|
|
1186
1455
|
}
|
|
1187
1456
|
export interface RetextureRequest {
|
|
1188
1457
|
input_task_id?: string;
|
|
1189
1458
|
model_url?: string;
|
|
1459
|
+
/** Text prompt describing the desired texture. */
|
|
1460
|
+
prompt?: string;
|
|
1190
1461
|
text_style_prompt?: string;
|
|
1191
1462
|
image_style_url?: string;
|
|
1192
1463
|
ai_model?: string;
|
|
@@ -1195,3 +1466,745 @@ export interface RetextureRequest {
|
|
|
1195
1466
|
remove_lighting?: boolean;
|
|
1196
1467
|
target_formats?: string[];
|
|
1197
1468
|
}
|
|
1469
|
+
/** Post-processing options for animation export. */
|
|
1470
|
+
export interface AnimationPostProcess {
|
|
1471
|
+
/** Operation: "change_fps", "fbx2usdz", "extract_armature". */
|
|
1472
|
+
operation_type: string;
|
|
1473
|
+
/** Target FPS (for "change_fps"): 24, 25, 30, 60. */
|
|
1474
|
+
fps?: number;
|
|
1475
|
+
}
|
|
1476
|
+
/** A single event from an agent or mission SSE stream. */
|
|
1477
|
+
export interface AgentStreamEvent {
|
|
1478
|
+
/** Event type (e.g. "step", "thought", "tool_call", "tool_result", "message", "error", "done"). */
|
|
1479
|
+
event_type: string;
|
|
1480
|
+
/** Raw JSON payload. */
|
|
1481
|
+
data?: Record<string, unknown>;
|
|
1482
|
+
[key: string]: unknown;
|
|
1483
|
+
}
|
|
1484
|
+
/** Describes a worker agent in a multi-agent run. */
|
|
1485
|
+
export interface AgentWorker {
|
|
1486
|
+
/** Worker name. */
|
|
1487
|
+
name: string;
|
|
1488
|
+
/** Model ID for this worker. */
|
|
1489
|
+
model?: string;
|
|
1490
|
+
/** Worker tier (e.g. "fast", "thinking"). */
|
|
1491
|
+
tier?: string;
|
|
1492
|
+
/** Description of this worker's role. */
|
|
1493
|
+
description?: string;
|
|
1494
|
+
}
|
|
1495
|
+
/** Describes a named worker for a mission. */
|
|
1496
|
+
export interface MissionWorker {
|
|
1497
|
+
/** Model ID for this worker. */
|
|
1498
|
+
model?: string;
|
|
1499
|
+
/** Worker tier. */
|
|
1500
|
+
tier?: string;
|
|
1501
|
+
/** Description of this worker's purpose. */
|
|
1502
|
+
description?: string;
|
|
1503
|
+
}
|
|
1504
|
+
/** A single alignment segment. */
|
|
1505
|
+
export interface AlignmentSegment {
|
|
1506
|
+
/** Aligned text. */
|
|
1507
|
+
text: string;
|
|
1508
|
+
/** Start time in seconds. */
|
|
1509
|
+
start: number;
|
|
1510
|
+
/** End time in seconds. */
|
|
1511
|
+
end: number;
|
|
1512
|
+
}
|
|
1513
|
+
/** Generic audio response used by multiple advanced audio endpoints. */
|
|
1514
|
+
export interface AudioResponse {
|
|
1515
|
+
/** Base64-encoded audio data. */
|
|
1516
|
+
audio_base64?: string;
|
|
1517
|
+
/** Audio format (e.g. "mp3", "wav"). */
|
|
1518
|
+
format?: string;
|
|
1519
|
+
/** File size in bytes. */
|
|
1520
|
+
size_bytes?: number;
|
|
1521
|
+
/** Model used. */
|
|
1522
|
+
model?: string;
|
|
1523
|
+
/** Total cost in ticks. */
|
|
1524
|
+
cost_ticks?: number;
|
|
1525
|
+
/** Unique request identifier. */
|
|
1526
|
+
request_id?: string;
|
|
1527
|
+
/** Additional response fields. */
|
|
1528
|
+
extra?: Record<string, unknown>;
|
|
1529
|
+
[key: string]: unknown;
|
|
1530
|
+
}
|
|
1531
|
+
/** A single dialogue turn. */
|
|
1532
|
+
export interface DialogueTurn {
|
|
1533
|
+
/** Speaker name or identifier. */
|
|
1534
|
+
speaker: string;
|
|
1535
|
+
/** Text for this speaker to say. */
|
|
1536
|
+
text: string;
|
|
1537
|
+
/** Voice ID to use for this speaker. */
|
|
1538
|
+
voice?: string;
|
|
1539
|
+
}
|
|
1540
|
+
/** Request body for voice isolation. */
|
|
1541
|
+
export interface IsolateRequest {
|
|
1542
|
+
/** Base64-encoded audio to isolate voice from. */
|
|
1543
|
+
audio_base64: string;
|
|
1544
|
+
/** Output audio format. */
|
|
1545
|
+
output_format?: string;
|
|
1546
|
+
}
|
|
1547
|
+
/** Request body for voice remixing. */
|
|
1548
|
+
export interface RemixRequest {
|
|
1549
|
+
/** Base64-encoded source audio. */
|
|
1550
|
+
audio_base64: string;
|
|
1551
|
+
/** Target voice for the remix. */
|
|
1552
|
+
voice?: string;
|
|
1553
|
+
/** Model for remixing. */
|
|
1554
|
+
model?: string;
|
|
1555
|
+
/** Output audio format. */
|
|
1556
|
+
output_format?: string;
|
|
1557
|
+
}
|
|
1558
|
+
/** Request body for text-to-speech (canonical). */
|
|
1559
|
+
export interface TtsRequest {
|
|
1560
|
+
/** TTS model. */
|
|
1561
|
+
model: string;
|
|
1562
|
+
/** Text to synthesise into speech. */
|
|
1563
|
+
text: string;
|
|
1564
|
+
/** Voice to use. */
|
|
1565
|
+
voice?: string;
|
|
1566
|
+
/** Audio format (e.g. "mp3", "wav", "opus"). */
|
|
1567
|
+
output_format?: string;
|
|
1568
|
+
/** Speech rate. */
|
|
1569
|
+
speed?: number;
|
|
1570
|
+
}
|
|
1571
|
+
/** Response from text-to-speech (canonical). */
|
|
1572
|
+
export interface TtsResponse {
|
|
1573
|
+
/** Base64-encoded audio data. */
|
|
1574
|
+
audio_base64: string;
|
|
1575
|
+
/** Audio format (e.g. "mp3"). */
|
|
1576
|
+
format: string;
|
|
1577
|
+
/** Audio file size. */
|
|
1578
|
+
size_bytes: number;
|
|
1579
|
+
/** Model that generated the audio. */
|
|
1580
|
+
model: string;
|
|
1581
|
+
/** Total cost in ticks. */
|
|
1582
|
+
cost_ticks: number;
|
|
1583
|
+
/** Unique request identifier. */
|
|
1584
|
+
request_id: string;
|
|
1585
|
+
}
|
|
1586
|
+
/** Request body for speech-to-text (canonical). */
|
|
1587
|
+
export interface SttRequest {
|
|
1588
|
+
/** STT model. */
|
|
1589
|
+
model: string;
|
|
1590
|
+
/** Base64-encoded audio data. */
|
|
1591
|
+
audio_base64: string;
|
|
1592
|
+
/** Original filename. */
|
|
1593
|
+
filename?: string;
|
|
1594
|
+
/** BCP-47 language code hint. */
|
|
1595
|
+
language?: string;
|
|
1596
|
+
}
|
|
1597
|
+
/** Response from speech-to-text (canonical). */
|
|
1598
|
+
export interface SttResponse {
|
|
1599
|
+
/** Transcribed text. */
|
|
1600
|
+
text: string;
|
|
1601
|
+
/** Model that performed transcription. */
|
|
1602
|
+
model: string;
|
|
1603
|
+
/** Total cost in ticks. */
|
|
1604
|
+
cost_ticks: number;
|
|
1605
|
+
/** Unique request identifier. */
|
|
1606
|
+
request_id: string;
|
|
1607
|
+
}
|
|
1608
|
+
/** Request body for audio translation. */
|
|
1609
|
+
export interface TranslateRequest {
|
|
1610
|
+
/** URL of the video to translate. */
|
|
1611
|
+
video_url?: string;
|
|
1612
|
+
/** Base64-encoded video. */
|
|
1613
|
+
video_base64?: string;
|
|
1614
|
+
/** Target language code. */
|
|
1615
|
+
target_language: string;
|
|
1616
|
+
/** Source language code (auto-detected if omitted). */
|
|
1617
|
+
source_language?: string;
|
|
1618
|
+
}
|
|
1619
|
+
/** A section within an Eleven Music generation request. */
|
|
1620
|
+
export interface MusicSection {
|
|
1621
|
+
section_type: string;
|
|
1622
|
+
lyrics?: string;
|
|
1623
|
+
style?: string;
|
|
1624
|
+
style_exclude?: string;
|
|
1625
|
+
}
|
|
1626
|
+
/** Request body for advanced music generation (ElevenLabs Eleven Music). */
|
|
1627
|
+
export interface ElevenMusicRequest {
|
|
1628
|
+
model: string;
|
|
1629
|
+
prompt: string;
|
|
1630
|
+
sections?: MusicSection[];
|
|
1631
|
+
duration_seconds?: number;
|
|
1632
|
+
language?: string;
|
|
1633
|
+
vocals?: boolean;
|
|
1634
|
+
style?: string;
|
|
1635
|
+
style_exclude?: string;
|
|
1636
|
+
finetune_id?: string;
|
|
1637
|
+
edit_reference_id?: string;
|
|
1638
|
+
edit_instruction?: string;
|
|
1639
|
+
}
|
|
1640
|
+
/** A single music clip from advanced generation. */
|
|
1641
|
+
export interface ElevenMusicClip {
|
|
1642
|
+
/** Base64-encoded audio data. */
|
|
1643
|
+
base64: string;
|
|
1644
|
+
/** Audio format (e.g. "mp3"). */
|
|
1645
|
+
format: string;
|
|
1646
|
+
/** File size in bytes. */
|
|
1647
|
+
size: number;
|
|
1648
|
+
}
|
|
1649
|
+
/** Response from advanced music generation. */
|
|
1650
|
+
export interface ElevenMusicResponse {
|
|
1651
|
+
/** Generated music clips. */
|
|
1652
|
+
clips: ElevenMusicClip[];
|
|
1653
|
+
/** Model used. */
|
|
1654
|
+
model: string;
|
|
1655
|
+
/** Total cost in ticks. */
|
|
1656
|
+
cost_ticks: number;
|
|
1657
|
+
/** Unique request identifier. */
|
|
1658
|
+
request_id: string;
|
|
1659
|
+
}
|
|
1660
|
+
/** Info about a music finetune. */
|
|
1661
|
+
export interface FinetuneInfo {
|
|
1662
|
+
finetune_id: string;
|
|
1663
|
+
name: string;
|
|
1664
|
+
status?: string;
|
|
1665
|
+
created_at?: string;
|
|
1666
|
+
}
|
|
1667
|
+
/** Response from listing finetunes. */
|
|
1668
|
+
export interface ListFinetunesResponse {
|
|
1669
|
+
finetunes: FinetuneInfo[];
|
|
1670
|
+
}
|
|
1671
|
+
/** A single job in a batch submission (Rust canonical). */
|
|
1672
|
+
export interface BatchJob {
|
|
1673
|
+
/** Model to use for this job. */
|
|
1674
|
+
model: string;
|
|
1675
|
+
/** The prompt text. */
|
|
1676
|
+
prompt: string;
|
|
1677
|
+
/** Optional title for this job. */
|
|
1678
|
+
title?: string;
|
|
1679
|
+
/** Optional system prompt. */
|
|
1680
|
+
system_prompt?: string;
|
|
1681
|
+
/** Optional maximum tokens to generate. */
|
|
1682
|
+
max_tokens?: number;
|
|
1683
|
+
}
|
|
1684
|
+
/** A running compute instance. */
|
|
1685
|
+
export interface ComputeInstance {
|
|
1686
|
+
/** Instance identifier. */
|
|
1687
|
+
id: string;
|
|
1688
|
+
/** Current status. */
|
|
1689
|
+
status: string;
|
|
1690
|
+
/** Template used. */
|
|
1691
|
+
template?: string;
|
|
1692
|
+
/** Zone. */
|
|
1693
|
+
zone?: string;
|
|
1694
|
+
/** SSH connection address. */
|
|
1695
|
+
ssh_address?: string;
|
|
1696
|
+
/** Creation timestamp. */
|
|
1697
|
+
created_at?: string;
|
|
1698
|
+
/** Price per hour. */
|
|
1699
|
+
price_per_hour_usd?: number;
|
|
1700
|
+
/** Auto-teardown setting in minutes. */
|
|
1701
|
+
auto_teardown_minutes?: number;
|
|
1702
|
+
}
|
|
1703
|
+
/** Request body for document chunking (canonical). */
|
|
1704
|
+
export interface ChunkRequest {
|
|
1705
|
+
/** Base64-encoded file content. */
|
|
1706
|
+
file_base64: string;
|
|
1707
|
+
/** Original filename. */
|
|
1708
|
+
filename: string;
|
|
1709
|
+
/** Maximum chunk size in tokens. */
|
|
1710
|
+
max_chunk_tokens?: number;
|
|
1711
|
+
/** Overlap between chunks in tokens. */
|
|
1712
|
+
overlap_tokens?: number;
|
|
1713
|
+
}
|
|
1714
|
+
/** Response from document chunking (canonical). */
|
|
1715
|
+
export interface ChunkResponse {
|
|
1716
|
+
/** Document chunks. */
|
|
1717
|
+
chunks: DocumentChunk[];
|
|
1718
|
+
/** Total number of chunks. */
|
|
1719
|
+
total_chunks?: number;
|
|
1720
|
+
/** Total cost in ticks. */
|
|
1721
|
+
cost_ticks: number;
|
|
1722
|
+
/** Unique request identifier. */
|
|
1723
|
+
request_id: string;
|
|
1724
|
+
}
|
|
1725
|
+
/** Request body for document processing (canonical). */
|
|
1726
|
+
export interface ProcessRequest {
|
|
1727
|
+
/** Base64-encoded file content. */
|
|
1728
|
+
file_base64: string;
|
|
1729
|
+
/** Original filename. */
|
|
1730
|
+
filename: string;
|
|
1731
|
+
/** Processing instructions or prompt. */
|
|
1732
|
+
prompt?: string;
|
|
1733
|
+
/** Model to use for processing. */
|
|
1734
|
+
model?: string;
|
|
1735
|
+
}
|
|
1736
|
+
/** Response from document processing (canonical). */
|
|
1737
|
+
export interface ProcessResponse {
|
|
1738
|
+
/** Processed content / analysis result. */
|
|
1739
|
+
content: string;
|
|
1740
|
+
/** Model used for processing. */
|
|
1741
|
+
model?: string;
|
|
1742
|
+
/** Total cost in ticks. */
|
|
1743
|
+
cost_ticks: number;
|
|
1744
|
+
/** Unique request identifier. */
|
|
1745
|
+
request_id: string;
|
|
1746
|
+
}
|
|
1747
|
+
/** Error types returned by the Quantum AI SDK. */
|
|
1748
|
+
export interface ApiError {
|
|
1749
|
+
/** The HTTP status code from the response. */
|
|
1750
|
+
status_code: number;
|
|
1751
|
+
/** The error type from the API. */
|
|
1752
|
+
code: string;
|
|
1753
|
+
/** The human-readable error description. */
|
|
1754
|
+
message: string;
|
|
1755
|
+
/** The unique request identifier. */
|
|
1756
|
+
request_id: string;
|
|
1757
|
+
}
|
|
1758
|
+
/** Summary of a job in the list response. */
|
|
1759
|
+
export interface JobSummary {
|
|
1760
|
+
job_id: string;
|
|
1761
|
+
status: string;
|
|
1762
|
+
job_type?: string;
|
|
1763
|
+
created_at?: string;
|
|
1764
|
+
completed_at?: string;
|
|
1765
|
+
cost_ticks: number;
|
|
1766
|
+
}
|
|
1767
|
+
/** Response from listing jobs. */
|
|
1768
|
+
export interface ListJobsResponse {
|
|
1769
|
+
jobs: JobSummary[];
|
|
1770
|
+
}
|
|
1771
|
+
/** Response from async video job submission. */
|
|
1772
|
+
export interface JobResponse {
|
|
1773
|
+
/** Job identifier for polling status. */
|
|
1774
|
+
job_id: string;
|
|
1775
|
+
/** Current status. */
|
|
1776
|
+
status?: string;
|
|
1777
|
+
/** Total cost in ticks. */
|
|
1778
|
+
cost_ticks?: number;
|
|
1779
|
+
/** Additional response fields. */
|
|
1780
|
+
extra?: Record<string, unknown>;
|
|
1781
|
+
[key: string]: unknown;
|
|
1782
|
+
}
|
|
1783
|
+
/** Request body for Vertex AI RAG search (canonical). */
|
|
1784
|
+
export interface RagSearchRequest {
|
|
1785
|
+
/** Search query. */
|
|
1786
|
+
query: string;
|
|
1787
|
+
/** Filter by corpus name or ID. */
|
|
1788
|
+
corpus?: string;
|
|
1789
|
+
/** Maximum number of results. */
|
|
1790
|
+
top_k?: number;
|
|
1791
|
+
}
|
|
1792
|
+
/** Response from RAG search (canonical). */
|
|
1793
|
+
export interface RagSearchResponse {
|
|
1794
|
+
/** Matching document chunks. */
|
|
1795
|
+
results: RagResult[];
|
|
1796
|
+
/** Original search query. */
|
|
1797
|
+
query: string;
|
|
1798
|
+
/** Corpora that were searched. */
|
|
1799
|
+
corpora?: string[];
|
|
1800
|
+
/** Total cost in ticks. */
|
|
1801
|
+
cost_ticks: number;
|
|
1802
|
+
/** Unique request identifier. */
|
|
1803
|
+
request_id: string;
|
|
1804
|
+
}
|
|
1805
|
+
/** A single result from RAG search (canonical). */
|
|
1806
|
+
export interface RagResult {
|
|
1807
|
+
/** Source document URI. */
|
|
1808
|
+
source_uri: string;
|
|
1809
|
+
/** Display name of the source. */
|
|
1810
|
+
source_name: string;
|
|
1811
|
+
/** Matching text chunk. */
|
|
1812
|
+
text: string;
|
|
1813
|
+
/** Relevance score. */
|
|
1814
|
+
score: number;
|
|
1815
|
+
/** Vector distance. */
|
|
1816
|
+
distance: number;
|
|
1817
|
+
}
|
|
1818
|
+
/** Describes an available RAG corpus (canonical). */
|
|
1819
|
+
export interface RagCorpus {
|
|
1820
|
+
/** Full resource name. */
|
|
1821
|
+
name: string;
|
|
1822
|
+
/** Human-readable name. */
|
|
1823
|
+
displayName: string;
|
|
1824
|
+
/** Describes the corpus contents. */
|
|
1825
|
+
description: string;
|
|
1826
|
+
/** Corpus state (e.g. "ACTIVE"). */
|
|
1827
|
+
state: string;
|
|
1828
|
+
}
|
|
1829
|
+
/** A SurrealDB RAG provider (canonical). */
|
|
1830
|
+
export interface SurrealRagProvider {
|
|
1831
|
+
/** Provider identifier. */
|
|
1832
|
+
provider: string;
|
|
1833
|
+
/** Number of document chunks for this provider. */
|
|
1834
|
+
chunk_count?: number;
|
|
1835
|
+
}
|
|
1836
|
+
/** Response from listing SurrealDB RAG providers (canonical). */
|
|
1837
|
+
export interface SurrealRagProvidersResponse {
|
|
1838
|
+
providers: SurrealRagProvider[];
|
|
1839
|
+
}
|
|
1840
|
+
/** Request body for SurrealDB-backed RAG search (canonical). */
|
|
1841
|
+
export interface SurrealRagSearchRequest {
|
|
1842
|
+
/** Search query. */
|
|
1843
|
+
query: string;
|
|
1844
|
+
/** Filter by documentation provider. */
|
|
1845
|
+
provider?: string;
|
|
1846
|
+
/** Maximum number of results. */
|
|
1847
|
+
limit?: number;
|
|
1848
|
+
}
|
|
1849
|
+
/** A single result from SurrealDB RAG search (canonical). */
|
|
1850
|
+
export interface SurrealRagResult {
|
|
1851
|
+
/** Documentation provider. */
|
|
1852
|
+
provider: string;
|
|
1853
|
+
/** Document title. */
|
|
1854
|
+
title: string;
|
|
1855
|
+
/** Section heading. */
|
|
1856
|
+
heading: string;
|
|
1857
|
+
/** Original source file path. */
|
|
1858
|
+
source_file: string;
|
|
1859
|
+
/** Matching text chunk. */
|
|
1860
|
+
content: string;
|
|
1861
|
+
/** Cosine similarity score. */
|
|
1862
|
+
score: number;
|
|
1863
|
+
}
|
|
1864
|
+
/** Response from SurrealDB RAG search (canonical). */
|
|
1865
|
+
export interface SurrealRagSearchResponse {
|
|
1866
|
+
/** Matching documentation chunks. */
|
|
1867
|
+
results: SurrealRagResult[];
|
|
1868
|
+
/** Original search query. */
|
|
1869
|
+
query: string;
|
|
1870
|
+
/** Provider filter that was applied. */
|
|
1871
|
+
provider?: string;
|
|
1872
|
+
/** Total cost in ticks. */
|
|
1873
|
+
cost_ticks: number;
|
|
1874
|
+
/** Unique request identifier. */
|
|
1875
|
+
request_id: string;
|
|
1876
|
+
}
|
|
1877
|
+
/** Configuration for a realtime voice session (canonical). */
|
|
1878
|
+
export interface RealtimeConfig {
|
|
1879
|
+
/** Voice to use. */
|
|
1880
|
+
voice: string;
|
|
1881
|
+
/** System instructions for the AI. */
|
|
1882
|
+
instructions: string;
|
|
1883
|
+
/** PCM sample rate in Hz. */
|
|
1884
|
+
sample_rate?: number;
|
|
1885
|
+
/** Tool definitions. */
|
|
1886
|
+
tools?: unknown[];
|
|
1887
|
+
/** Model to use for the realtime session. */
|
|
1888
|
+
model?: string;
|
|
1889
|
+
}
|
|
1890
|
+
/** Parsed incoming event from the realtime API. */
|
|
1891
|
+
export interface RealtimeEvent {
|
|
1892
|
+
/** Event type. */
|
|
1893
|
+
type: string;
|
|
1894
|
+
/** Event-specific data. */
|
|
1895
|
+
[key: string]: unknown;
|
|
1896
|
+
}
|
|
1897
|
+
/** A single web search result (canonical). */
|
|
1898
|
+
export interface WebResult {
|
|
1899
|
+
/** Page title. */
|
|
1900
|
+
title: string;
|
|
1901
|
+
/** Page URL. */
|
|
1902
|
+
url: string;
|
|
1903
|
+
/** Result description / snippet. */
|
|
1904
|
+
description?: string;
|
|
1905
|
+
/** Age of the result. */
|
|
1906
|
+
age?: string;
|
|
1907
|
+
/** Favicon URL. */
|
|
1908
|
+
favicon?: string;
|
|
1909
|
+
}
|
|
1910
|
+
/** A video search result (canonical). */
|
|
1911
|
+
export interface VideoResult {
|
|
1912
|
+
/** Video title. */
|
|
1913
|
+
title: string;
|
|
1914
|
+
/** Video page URL. */
|
|
1915
|
+
url: string;
|
|
1916
|
+
/** Short description. */
|
|
1917
|
+
description?: string;
|
|
1918
|
+
/** Thumbnail URL. */
|
|
1919
|
+
thumbnail?: string;
|
|
1920
|
+
/** Age of the video. */
|
|
1921
|
+
age?: string;
|
|
1922
|
+
}
|
|
1923
|
+
/** An infobox (knowledge panel) result. */
|
|
1924
|
+
export interface InfoboxResult {
|
|
1925
|
+
/** Infobox title. */
|
|
1926
|
+
title: string;
|
|
1927
|
+
/** Long description. */
|
|
1928
|
+
description?: string;
|
|
1929
|
+
/** Source URL. */
|
|
1930
|
+
url?: string;
|
|
1931
|
+
}
|
|
1932
|
+
/** A discussion / forum result. */
|
|
1933
|
+
export interface DiscussionResult {
|
|
1934
|
+
/** Discussion title. */
|
|
1935
|
+
title: string;
|
|
1936
|
+
/** Discussion URL. */
|
|
1937
|
+
url: string;
|
|
1938
|
+
/** Short description. */
|
|
1939
|
+
description?: string;
|
|
1940
|
+
/** Age of the discussion. */
|
|
1941
|
+
age?: string;
|
|
1942
|
+
/** Forum name. */
|
|
1943
|
+
forum?: string;
|
|
1944
|
+
}
|
|
1945
|
+
/** Request body for search context (returns chunked page content). */
|
|
1946
|
+
export interface SearchContextRequest {
|
|
1947
|
+
/** Search query string. */
|
|
1948
|
+
query: string;
|
|
1949
|
+
/** Number of results to fetch context from. */
|
|
1950
|
+
count?: number;
|
|
1951
|
+
/** Country code filter. */
|
|
1952
|
+
country?: string;
|
|
1953
|
+
/** Language code filter. */
|
|
1954
|
+
language?: string;
|
|
1955
|
+
/** Freshness filter. */
|
|
1956
|
+
freshness?: string;
|
|
1957
|
+
}
|
|
1958
|
+
/** A content chunk from search context (canonical). */
|
|
1959
|
+
export interface SearchContextChunk {
|
|
1960
|
+
/** Extracted page content. */
|
|
1961
|
+
content: string;
|
|
1962
|
+
/** Source URL. */
|
|
1963
|
+
url: string;
|
|
1964
|
+
/** Page title. */
|
|
1965
|
+
title?: string;
|
|
1966
|
+
/** Relevance score. */
|
|
1967
|
+
score?: number;
|
|
1968
|
+
/** Content type. */
|
|
1969
|
+
content_type?: string;
|
|
1970
|
+
}
|
|
1971
|
+
/** A source reference from search context (canonical). */
|
|
1972
|
+
export interface SearchContextSource {
|
|
1973
|
+
/** Source URL. */
|
|
1974
|
+
url: string;
|
|
1975
|
+
/** Source title. */
|
|
1976
|
+
title?: string;
|
|
1977
|
+
}
|
|
1978
|
+
/** Response from the search context endpoint. */
|
|
1979
|
+
export interface SearchContextResponse {
|
|
1980
|
+
/** Content chunks extracted from search results. */
|
|
1981
|
+
chunks: SearchContextChunk[];
|
|
1982
|
+
/** Source references. */
|
|
1983
|
+
sources?: SearchContextSource[];
|
|
1984
|
+
/** Original query. */
|
|
1985
|
+
query: string;
|
|
1986
|
+
}
|
|
1987
|
+
/** A chat message for the search answer endpoint (canonical). */
|
|
1988
|
+
export interface SearchAnswerMessage {
|
|
1989
|
+
/** Message role. */
|
|
1990
|
+
role: string;
|
|
1991
|
+
/** Message text content. */
|
|
1992
|
+
content: string;
|
|
1993
|
+
}
|
|
1994
|
+
/** A citation reference in a search answer (canonical). */
|
|
1995
|
+
export interface SearchAnswerCitation {
|
|
1996
|
+
/** Source URL. */
|
|
1997
|
+
url: string;
|
|
1998
|
+
/** Source title. */
|
|
1999
|
+
title?: string;
|
|
2000
|
+
/** Snippet from the source. */
|
|
2001
|
+
snippet?: string;
|
|
2002
|
+
}
|
|
2003
|
+
/** Context metadata returned with session responses (canonical). */
|
|
2004
|
+
export interface SessionContext {
|
|
2005
|
+
/** Number of conversation turns in the session. */
|
|
2006
|
+
turn_count: number;
|
|
2007
|
+
/** Estimated total tokens in the session context. */
|
|
2008
|
+
estimated_tokens: number;
|
|
2009
|
+
/** Whether context was compacted during this turn. */
|
|
2010
|
+
compacted?: boolean;
|
|
2011
|
+
/** Note about the compaction. */
|
|
2012
|
+
compaction_note?: string;
|
|
2013
|
+
}
|
|
2014
|
+
/** A tool result to feed back into the session (canonical). */
|
|
2015
|
+
export interface ToolResult {
|
|
2016
|
+
/** The tool_use ID this result corresponds to. */
|
|
2017
|
+
tool_call_id: string;
|
|
2018
|
+
/** The result content. */
|
|
2019
|
+
content: string;
|
|
2020
|
+
/** Whether this result is an error. */
|
|
2021
|
+
is_error?: boolean;
|
|
2022
|
+
}
|
|
2023
|
+
/** A HeyGen avatar (canonical). */
|
|
2024
|
+
export interface Avatar {
|
|
2025
|
+
/** Avatar identifier. */
|
|
2026
|
+
avatar_id: string;
|
|
2027
|
+
/** Avatar name. */
|
|
2028
|
+
name?: string;
|
|
2029
|
+
/** Avatar gender. */
|
|
2030
|
+
gender?: string;
|
|
2031
|
+
/** Preview image URL. */
|
|
2032
|
+
preview_url?: string;
|
|
2033
|
+
/** Additional fields. */
|
|
2034
|
+
extra?: Record<string, unknown>;
|
|
2035
|
+
}
|
|
2036
|
+
/** Request body for HeyGen studio video creation. */
|
|
2037
|
+
export interface StudioVideoRequest {
|
|
2038
|
+
/** Video title. */
|
|
2039
|
+
title?: string;
|
|
2040
|
+
/** Video clips. */
|
|
2041
|
+
clips: StudioClip[];
|
|
2042
|
+
/** Video dimensions. */
|
|
2043
|
+
dimension?: string;
|
|
2044
|
+
/** Aspect ratio. */
|
|
2045
|
+
aspect_ratio?: string;
|
|
2046
|
+
}
|
|
2047
|
+
/** A HeyGen video template (canonical). */
|
|
2048
|
+
export interface VideoTemplate {
|
|
2049
|
+
/** Template identifier. */
|
|
2050
|
+
template_id: string;
|
|
2051
|
+
/** Template name. */
|
|
2052
|
+
name?: string;
|
|
2053
|
+
/** Preview image URL. */
|
|
2054
|
+
preview_url?: string;
|
|
2055
|
+
/** Additional fields. */
|
|
2056
|
+
extra?: Record<string, unknown>;
|
|
2057
|
+
}
|
|
2058
|
+
/** Response from listing HeyGen video templates. */
|
|
2059
|
+
export interface VideoTemplatesResponse {
|
|
2060
|
+
templates: VideoTemplate[];
|
|
2061
|
+
}
|
|
2062
|
+
/** A voice available for TTS (canonical). */
|
|
2063
|
+
export interface Voice {
|
|
2064
|
+
/** Voice identifier. */
|
|
2065
|
+
voice_id: string;
|
|
2066
|
+
/** Human-readable voice name. */
|
|
2067
|
+
name: string;
|
|
2068
|
+
/** Provider (e.g. "elevenlabs", "openai"). */
|
|
2069
|
+
provider?: string;
|
|
2070
|
+
/** Language/locale codes supported. */
|
|
2071
|
+
languages?: string[];
|
|
2072
|
+
/** Voice gender. */
|
|
2073
|
+
gender?: string;
|
|
2074
|
+
/** Whether this is a cloned voice. */
|
|
2075
|
+
is_cloned?: boolean;
|
|
2076
|
+
/** Preview audio URL. */
|
|
2077
|
+
preview_url?: string;
|
|
2078
|
+
}
|
|
2079
|
+
/** A file to include in a voice clone request. */
|
|
2080
|
+
export interface CloneVoiceFile {
|
|
2081
|
+
/** Original filename (e.g. "sample.mp3"). */
|
|
2082
|
+
filename: string;
|
|
2083
|
+
/** Raw file bytes. */
|
|
2084
|
+
data: Uint8Array | number[];
|
|
2085
|
+
/** MIME type (e.g. "audio/mpeg"). */
|
|
2086
|
+
mime_type: string;
|
|
2087
|
+
}
|
|
2088
|
+
/** Pricing response (map of model_id to entry). */
|
|
2089
|
+
export interface PricingResponse {
|
|
2090
|
+
pricing: Record<string, PricingEntry>;
|
|
2091
|
+
}
|
|
2092
|
+
/** Error type enum values matching Rust SDK. */
|
|
2093
|
+
export type Error = ApiError | {
|
|
2094
|
+
type: "http";
|
|
2095
|
+
message: string;
|
|
2096
|
+
} | {
|
|
2097
|
+
type: "json";
|
|
2098
|
+
message: string;
|
|
2099
|
+
} | {
|
|
2100
|
+
type: "websocket";
|
|
2101
|
+
message: string;
|
|
2102
|
+
};
|
|
2103
|
+
/** A citation returned with search-grounded chat responses. */
|
|
2104
|
+
export interface Citation {
|
|
2105
|
+
url: string;
|
|
2106
|
+
title: string;
|
|
2107
|
+
text?: string;
|
|
2108
|
+
index?: number;
|
|
2109
|
+
}
|
|
2110
|
+
/** Response from listing RAG collections. */
|
|
2111
|
+
export interface CollectionsListResponse {
|
|
2112
|
+
collections: Collection[];
|
|
2113
|
+
}
|
|
2114
|
+
/** Response from listing documents in a collection. */
|
|
2115
|
+
export interface CollectionDocumentsResponse {
|
|
2116
|
+
documents: CollectionDocument[];
|
|
2117
|
+
}
|
|
2118
|
+
/** Response from searching a collection. */
|
|
2119
|
+
export interface CollectionSearchResponse {
|
|
2120
|
+
results: CollectionSearchResult[];
|
|
2121
|
+
}
|
|
2122
|
+
/** Request to create a new RAG collection. */
|
|
2123
|
+
export interface CreateCollectionRequest {
|
|
2124
|
+
name: string;
|
|
2125
|
+
description?: string;
|
|
2126
|
+
provider?: string;
|
|
2127
|
+
}
|
|
2128
|
+
/** Response from deleting a collection. */
|
|
2129
|
+
export interface DeleteCollectionResponse {
|
|
2130
|
+
deleted: boolean;
|
|
2131
|
+
}
|
|
2132
|
+
/** Response from listing available models. */
|
|
2133
|
+
export interface ModelsResponse {
|
|
2134
|
+
models: ModelInfo[];
|
|
2135
|
+
}
|
|
2136
|
+
/** Response from listing Vertex AI RAG corpora. */
|
|
2137
|
+
export interface RagCorporaResponse {
|
|
2138
|
+
corpora: RagCorpus[];
|
|
2139
|
+
}
|
|
2140
|
+
/** Canonical alias for InfoboxResult. */
|
|
2141
|
+
export type Infobox = InfoboxResult;
|
|
2142
|
+
/** Canonical alias for DiscussionResult. */
|
|
2143
|
+
export type Discussion = DiscussionResult;
|
|
2144
|
+
/** Canonical aliases for TTS/STT types. */
|
|
2145
|
+
export type TextToSpeechRequest = TTSRequest;
|
|
2146
|
+
export type TextToSpeechResponse = TTSResponse;
|
|
2147
|
+
export type SpeechToTextRequest = STTRequest;
|
|
2148
|
+
export type SpeechToTextResponse = STTResponse;
|
|
2149
|
+
/** Response from the contact form endpoint. */
|
|
2150
|
+
export interface ContactResponse {
|
|
2151
|
+
status: string;
|
|
2152
|
+
message?: string;
|
|
2153
|
+
}
|
|
2154
|
+
/** Canonical alias for SearchContextChunk. */
|
|
2155
|
+
export type ContextChunk = SearchContextChunk;
|
|
2156
|
+
/** Options for configuring LLM context search requests. */
|
|
2157
|
+
export interface ContextOptions {
|
|
2158
|
+
count?: number;
|
|
2159
|
+
country?: string;
|
|
2160
|
+
language?: string;
|
|
2161
|
+
freshness?: string;
|
|
2162
|
+
}
|
|
2163
|
+
/** Response from listing HeyGen avatars. */
|
|
2164
|
+
export interface HeyGenAvatarsResponse {
|
|
2165
|
+
avatars: Avatar[];
|
|
2166
|
+
request_id?: string;
|
|
2167
|
+
}
|
|
2168
|
+
/** Response from async job submission. */
|
|
2169
|
+
export interface JobAcceptedResponse {
|
|
2170
|
+
job_id: string;
|
|
2171
|
+
status: string;
|
|
2172
|
+
job_type?: string;
|
|
2173
|
+
request_id?: string;
|
|
2174
|
+
}
|
|
2175
|
+
/** A single job entry in the detailed job list response. */
|
|
2176
|
+
export interface JobListEntry {
|
|
2177
|
+
job_id: string;
|
|
2178
|
+
status: string;
|
|
2179
|
+
job_type?: string;
|
|
2180
|
+
result?: unknown;
|
|
2181
|
+
error?: string;
|
|
2182
|
+
cost_ticks: number;
|
|
2183
|
+
created_at?: string;
|
|
2184
|
+
completed_at?: string;
|
|
2185
|
+
request_id?: string;
|
|
2186
|
+
}
|
|
2187
|
+
/** Post-processing options for animation export. */
|
|
2188
|
+
export interface PostProcess {
|
|
2189
|
+
operation_type: string;
|
|
2190
|
+
fps?: number;
|
|
2191
|
+
}
|
|
2192
|
+
/** Response from creating a realtime voice session. */
|
|
2193
|
+
export interface RealtimeSessionResponse {
|
|
2194
|
+
ephemeral_token?: string;
|
|
2195
|
+
url?: string;
|
|
2196
|
+
signed_url?: string;
|
|
2197
|
+
session_id?: string;
|
|
2198
|
+
provider?: string;
|
|
2199
|
+
}
|
|
2200
|
+
/** Canonical alias for SearchAnswerMessage. */
|
|
2201
|
+
export type SearchMessage = SearchAnswerMessage;
|
|
2202
|
+
/** Options for configuring web search requests. */
|
|
2203
|
+
export interface SearchOptions {
|
|
2204
|
+
count?: number;
|
|
2205
|
+
offset?: number;
|
|
2206
|
+
country?: string;
|
|
2207
|
+
language?: string;
|
|
2208
|
+
freshness?: string;
|
|
2209
|
+
safe_search?: string;
|
|
2210
|
+
}
|