11---
2- title : API Summary — v0.12 .x (latest)
2+ title : API Summary — v0.13 .x (latest)
33description : One-page reference of all public functions and objects exported by @qvac/sdk
44---
55
@@ -12,12 +12,72 @@ description: One-page reference of all public functions and objects exported by
1212> ** Fields intentionally omitted** : parameter descriptions, return field descriptions
1313> (covered by IDE hover and ` .d.ts ` declarations).
1414>
15- > ** Scope** : 45 functions in ` packages/sdk/client/api/ ` plus the ` profiler ` object.
15+ > ** Scope** : 47 functions in ` packages/sdk/client/api/ ` plus the ` profiler ` object.
1616
1717---
1818
1919## Functions
2020
21+ ### ` bciTranscribe `
22+
23+ Has 2 overloads.
24+
25+ #### Overload 1
26+ Transcribe a neural-signal buffer with a loaded BCI model and return the
27+ complete text. Accepts either a ` .bin ` file path or a raw neural buffer.
28+
29+ ** Signature** :
30+
31+ ``` ts
32+ function bciTranscribe(params : BciTranscribeClientParams & { metadata: true }, options ? : RPCOptions ): Promise <{ append: boolean ; endMs: number ; id: number ; startMs: number ; text: string }[]> & { requestId: string };
33+ ```
34+
35+ #### Overload 2
36+ Transcribe a neural-signal buffer with a loaded BCI model and return the
37+ complete text. Accepts either a ` .bin ` file path or a raw neural buffer.
38+
39+ ** Signature** :
40+
41+ ``` ts
42+ function bciTranscribe(params : BciTranscribeClientParams , options ? : RPCOptions ): Promise <string > & { requestId: string };
43+ ```
44+
45+ ---
46+
47+ ### ` bciTranscribeStream `
48+
49+ Has 2 overloads.
50+
51+ #### Overload 1
52+ Opens a bidirectional streaming BCI transcription session. Neural-signal
53+ chunks are streamed in via ` write() ` , and transcription is yielded as the
54+ addon's sliding window decodes successive windows.
55+
56+ The returned session is single-use. Attempting to iterate a second time
57+ will throw a ` TranscriptionFailedError ` .
58+
59+ ** Signature** :
60+
61+ ``` ts
62+ function bciTranscribeStream(params : BciTranscribeStreamClientParams & { metadata: true }, options ? : RPCOptions ): Promise <BciTranscribeStreamMetadataSession >;
63+ ```
64+
65+ #### Overload 2
66+ Opens a bidirectional streaming BCI transcription session. Neural-signal
67+ chunks are streamed in via ` write() ` , and transcription is yielded as the
68+ addon's sliding window decodes successive windows.
69+
70+ The returned session is single-use. Attempting to iterate a second time
71+ will throw a ` TranscriptionFailedError ` .
72+
73+ ** Signature** :
74+
75+ ``` ts
76+ function bciTranscribeStream(params : BciTranscribeStreamClientParams , options ? : RPCOptions ): Promise <BciTranscribeStreamSession >;
77+ ```
78+
79+ ---
80+
2181### ` cancel `
2282
2383Cancels an ongoing operation.
@@ -312,7 +372,7 @@ Generates embeddings for a single text using a specified model.
312372** Signature** :
313373
314374``` ts
315- function embed(params : { modelId: string ; text: string }, options ? : RPCOptions ): Promise <{ embedding: number []; stats? : { backendDevice? : " gpu" | " cpu" ; tokensPerSecond? : number ; totalTime? : number ; totalTokens? : number } }> & { requestId: string };
375+ function embed(params : { modelId: string ; text: string }, options ? : RPCOptions ): Promise <{ embedding: number []; stats? : { backendDevice? : " gpu" | " cpu" ; contextSize ? : number ; tokensPerSecond? : number ; totalTime? : number ; totalTokens? : number } }> & { requestId: string };
316376```
317377
318378** Throws** :
@@ -325,7 +385,7 @@ Generates embeddings for multiple texts using a specified model.
325385** Signature** :
326386
327387``` ts
328- function embed(params : { modelId: string ; text: string [] }, options ? : RPCOptions ): Promise <{ embedding: number [][]; stats? : { backendDevice? : " gpu" | " cpu" ; tokensPerSecond? : number ; totalTime? : number ; totalTokens? : number } }> & { requestId: string };
388+ function embed(params : { modelId: string ; text: string [] }, options ? : RPCOptions ): Promise <{ embedding: number [][]; stats? : { backendDevice? : " gpu" | " cpu" ; contextSize ? : number ; tokensPerSecond? : number ; totalTime? : number ; totalTokens? : number } }> & { requestId: string };
329389```
330390
331391** Throws** :
@@ -396,7 +456,7 @@ Returns status information for a catalog model, including cache state and loaded
396456** Signature** :
397457
398458``` ts
399- function getModelInfo(params : GetModelInfoParams ): Promise <{ actualSize? : number ; addon: " llm" | " whisper" | " embeddings" | " nmt" | " vad" | " tts" | " ocr" | " parakeet" | " diffusion" | " vla" | " classification" | " other" ; blobBlockLength? : number ; blobBlockOffset? : number ; blobByteOffset? : number ; blobCoreKey? : string ; cachedAt? : Date ; cacheFiles: { actualSize? : number ; cachedAt? : Date ; expectedSize: number ; filename: string ; isCached: boolean ; path: string ; sha256Checksum: string }[]; engine? : string ; expectedSize: number ; isCached: boolean ; isLoaded: boolean ; loadedInstances? : { config? : unknown ; loadedAt: Date ; registryId: string }[]; modelId: string ; name: string ; params? : string ; quantization? : string ; registryPath? : string ; registrySource? : string ; sha256Checksum: string }>;
459+ function getModelInfo(params : GetModelInfoParams ): Promise <{ actualSize? : number ; addon: " llm" | " whisper" | " bci " | " embeddings" | " nmt" | " vad" | " tts" | " ocr" | " parakeet" | " diffusion" | " vla" | " classification" | " other" ; blobBlockLength? : number ; blobBlockOffset? : number ; blobByteOffset? : number ; blobCoreKey? : string ; cachedAt? : Date ; cacheFiles: { actualSize? : number ; cachedAt? : Date ; expectedSize: number ; filename: string ; isCached: boolean ; path: string ; sha256Checksum: string }[]; engine? : string ; expectedSize: number ; isCached: boolean ; isLoaded: boolean ; loadedInstances? : { config? : unknown ; loadedAt: Date ; registryId: string }[]; modelId: string ; name: string ; params? : string ; quantization? : string ; registryPath? : string ; registrySource? : string ; sha256Checksum: string }>;
400460```
401461
402462** Throws** :
@@ -1460,9 +1520,8 @@ Generates a video using a loaded video diffusion model.
14601520function video(params : VideoClientParams ): VideoResult ;
14611521```
14621522
1463- ** Example ** :
1523+ ** Examples ** :
14641524``` ts
1465- // Basic txt2vid generation
14661525const { outputs, stats } = video ({
14671526 modelId ,
14681527 mode: " txt2vid" ,
@@ -1474,8 +1533,9 @@ const { outputs, stats } = video({
14741533});
14751534const buffers = await outputs ;
14761535fs .writeFileSync (" output.avi" , buffers [0 ]);
1536+ ```
14771537
1478- // With progress tracking
1538+ ``` ts
14791539const { progressStream, outputs } = video ({
14801540 modelId ,
14811541 mode: " txt2vid" ,
@@ -1485,8 +1545,20 @@ for await (const { step, totalSteps } of progressStream) {
14851545 console .log (` ${step }/${totalSteps } ` );
14861546}
14871547const buffers = await outputs ;
1548+ ```
14881549
1489- // With control frames (e.g. for guided generation)
1550+ ``` ts
1551+ const firstFrame = fs .readFileSync (" portrait.png" );
1552+ const { outputs } = video ({
1553+ modelId ,
1554+ mode: " img2vid" ,
1555+ prompt: " the subject slowly turns and smiles, cinematic lighting" ,
1556+ init_image: firstFrame ,
1557+ strength: 0.85 ,
1558+ });
1559+ ```
1560+
1561+ ``` ts
14901562const frameA = fs .readFileSync (" frame-a.png" );
14911563const frameB = fs .readFileSync (" frame-b.png" );
14921564const { outputs } = video ({
@@ -1495,8 +1567,9 @@ const { outputs } = video({
14951567 prompt: " smooth transition between scenes" ,
14961568 control_frames: [frameA , frameB ],
14971569});
1570+ ```
14981571
1499- // Cancellation via requestId
1572+ ``` ts
15001573const { requestId, outputs } = video ({ modelId , mode: " txt2vid" , prompt: " ..." });
15011574// ...later
15021575await cancel (requestId );
@@ -1506,8 +1579,8 @@ await cancel(requestId);
15061579
15071580### ` vla `
15081581
1509- Run SmolVLA inference on a loaded VLA model and return the produced action
1510- chunk plus per-stage timings.
1582+ Run VLA inference on a loaded model (SmolVLA or π₀.₅) and return the
1583+ produced action chunk plus per-stage timings.
15111584
15121585** Signature** :
15131586
@@ -1652,6 +1725,8 @@ and read `error.code` / `error.cause`. Code ranges:
16521725| ` RPC_RESPONSE_STREAM_NOT_CREATED ` | 50202 | Cannot perform operation - response stream not created |
16531726| ` RPC_CONNECTION_FAILED ` | 50203 | RPC connection failed: … |
16541727| ` RPC_INIT_TIMEOUT ` | 50204 | RPC initialization timed out after …ms — the worker process may have failed to start |
1728+ | ` WORKER_CRASHED ` | 50205 | Bare worker exited mid-request (code=…, signal=…) — in-flight calls were aborted |
1729+ | ` WORKER_SHUTDOWN ` | 50206 | SDK is shutting down — in-flight RPC call aborted |
16551730| ` PROVIDER_START_FAILED ` | 50400 | Failed to start provider… |
16561731| ` PROVIDER_STOP_FAILED ` | 50401 | Failed to stop provider… |
16571732| ` DELEGATE_NO_FINAL_RESPONSE ` | 50402 | No final response received from delegated provider |
0 commit comments