quantum-ai-sdk 0.3.0 → 0.3.2

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 CHANGED
@@ -1,6 +1,7 @@
1
+ import type { BillingRequest, BillingResponse } from "./compute-billing.js";
1
2
  import { RealtimeSender, RealtimeReceiver } from "./realtime.js";
2
3
  import type { RealtimeConfig, RealtimeSession } from "./realtime.js";
3
- import type { AccountPricingResponse, AgentEvent, AgentRequest, AlignRequest, AlignResponse, AsyncJobResponse, AuthAppleRequest, AuthResponse, AvatarsResponse, BalanceResponse, BatchJobInfo, BatchJobsResponse, BatchJsonlResponse, BatchSubmitRequest, BatchSubmitResponse, ChatRequest, ChatResponse, ChunkDocumentRequest, ChunkDocumentResponse, ClientOptions, CloneVoiceRequest, CloneVoiceResponse, CreateKeyRequest, CreateKeyResponse, CreditBalanceResponse, CreditPacksResponse, CreditPurchaseRequest, CreditPurchaseResponse, CreditTiersResponse, DeleteResponse, DevProgramApplyRequest, DevProgramApplyResponse, DialogueRequest, DialogueResponse, DigitalTwinRequest, DocumentRequest, DocumentResponse, DubRequest, DubResponse, EmbedRequest, EmbedResponse, HeyGenTemplatesResponse, HeyGenVoicesResponse, ImageEditRequest, ImageEditResponse, ImageRequest, ImageResponse, InstanceResponse, InstancesResponse, IsolateVoiceRequest, IsolateVoiceResponse, JobCreateRequest, JobCreateResponse, JobListResponse, JobStreamEvent, WebSearchRequest, WebSearchResponse, LLMContextRequest, LLMContextResponse, SearchAnswerRequest, SearchAnswerResponse, JobStatusResponse, ListKeysResponse, MissionEvent, MissionRequest, ModelInfo, MusicRequest, MusicResponse, PhotoAvatarRequest, PricingInfo, ProcessDocumentRequest, ProcessDocumentResponse, ProvisionRequest, ProvisionResponse, RAGCorpus, RAGSearchRequest, RAGSearchResponse, RemixVoiceRequest, RemixVoiceResponse, ResponseMeta, SessionChatRequest, SessionChatResponse, SoundEffectRequest, SoundEffectResponse, SpeechToSpeechRequest, SpeechToSpeechResponse, SSHKeyRequest, StarfishTTSRequest, StarfishTTSResponse, StatusResponse, STTRequest, STTResponse, StreamEvent, SurrealRAGProvidersResponse, SurrealRAGSearchRequest, SurrealRAGSearchResponse, TemplatesResponse, TTSRequest, TTSResponse, UsageQuery, UsageResponse, UsageSummaryResponse, VideoRequest, VideoResponse, VideoStudioRequest, VideoTranslateRequest, VoiceDesignRequest, VoiceDesignResponse, VoicesResponse } from "./types.js";
4
+ import type { AccountPricingResponse, AgentEvent, AgentRequest, AlignRequest, AlignResponse, AsyncJobResponse, AuthAppleRequest, AuthResponse, AvatarsResponse, BalanceResponse, BatchJobInfo, BatchJobsResponse, BatchJsonlResponse, BatchSubmitRequest, BatchSubmitResponse, ChatRequest, ChatResponse, ChunkDocumentRequest, ChunkDocumentResponse, ClientOptions, CloneVoiceRequest, CloneVoiceResponse, CreateKeyRequest, CreateKeyResponse, CreditBalanceResponse, CreditPacksResponse, CreditPurchaseRequest, CreditPurchaseResponse, CreditTiersResponse, DeleteResponse, DevProgramApplyRequest, DevProgramApplyResponse, DialogueRequest, DialogueResponse, DigitalTwinRequest, DocumentRequest, DocumentResponse, DubRequest, DubResponse, EmbedRequest, EmbedResponse, HeyGenTemplatesResponse, HeyGenVoicesResponse, ImageEditRequest, ImageEditResponse, ImageRequest, ImageResponse, InstanceResponse, InstancesResponse, IsolateVoiceRequest, IsolateVoiceResponse, JobCreateRequest, JobCreateResponse, JobListResponse, JobStreamEvent, WebSearchRequest, WebSearchResponse, LLMContextRequest, LLMContextResponse, SearchAnswerRequest, SearchAnswerResponse, RemeshRequest, RigRequest, AnimateRequest, JobStatusResponse, ListKeysResponse, MissionEvent, MissionRequest, ModelInfo, MusicRequest, MusicResponse, PhotoAvatarRequest, PricingInfo, ProcessDocumentRequest, ProcessDocumentResponse, ProvisionRequest, ProvisionResponse, RAGCorpus, RAGSearchRequest, RAGSearchResponse, RemixVoiceRequest, RemixVoiceResponse, ResponseMeta, SessionChatRequest, SessionChatResponse, SoundEffectRequest, SoundEffectResponse, SpeechToSpeechRequest, SpeechToSpeechResponse, SSHKeyRequest, StarfishTTSRequest, StarfishTTSResponse, StatusResponse, STTRequest, STTResponse, StreamEvent, SurrealRAGProvidersResponse, SurrealRAGSearchRequest, SurrealRAGSearchResponse, TemplatesResponse, TTSRequest, TTSResponse, UsageQuery, UsageResponse, UsageSummaryResponse, VideoRequest, VideoResponse, VideoStudioRequest, VideoTranslateRequest, VoiceDesignRequest, VoiceDesignResponse, VoicesResponse } from "./types.js";
4
5
  /**
5
6
  * QuantumClient is the Quantum AI API client.
6
7
  *
@@ -196,6 +197,12 @@ export declare class QuantumClient {
196
197
  streamJob(jobId: string, signal?: AbortSignal): AsyncIterableIterator<JobStreamEvent>;
197
198
  /** Generate a 3D model via the async jobs system. */
198
199
  generate3D(model: string, prompt?: string, imageUrl?: string): Promise<JobCreateResponse>;
200
+ /** Remesh a 3D model (re-topology + format conversion). Submits job and polls to completion. */
201
+ remesh(req: RemeshRequest): Promise<JobStatusResponse>;
202
+ /** Rig a humanoid 3D model. Returns rigged character + basic walk/run animations. */
203
+ rig(req: RigRequest): Promise<JobStatusResponse>;
204
+ /** Apply an animation to a rigged character. */
205
+ animate(req: AnimateRequest): Promise<JobStatusResponse>;
199
206
  /** Create a scoped API key. */
200
207
  createKey(req: CreateKeyRequest): Promise<CreateKeyResponse>;
201
208
  /** List all API keys for the authenticated user. */
@@ -216,6 +223,8 @@ export declare class QuantumClient {
216
223
  computeSSHKey(id: string, req: SSHKeyRequest): Promise<StatusResponse>;
217
224
  /** Reset the inactivity timer on a compute instance. */
218
225
  computeKeepalive(id: string): Promise<StatusResponse>;
226
+ /** Query compute billing from BigQuery. */
227
+ computeBilling(req: BillingRequest): Promise<BillingResponse>;
219
228
  /** List all available voices (ElevenLabs). */
220
229
  listVoices(): Promise<VoicesResponse>;
221
230
  /** Create an instant voice clone from audio samples (ElevenLabs). */
package/dist/client.js CHANGED
@@ -338,6 +338,21 @@ export class QuantumClient {
338
338
  async generate3D(model, prompt, imageUrl) {
339
339
  return generate3D(this, model, prompt, imageUrl);
340
340
  }
341
+ /** Remesh a 3D model (re-topology + format conversion). Submits job and polls to completion. */
342
+ async remesh(req) {
343
+ const job = await this.createJob({ type: "3d/remesh", params: req });
344
+ return this.pollJob(job.job_id, 5000, 120);
345
+ }
346
+ /** Rig a humanoid 3D model. Returns rigged character + basic walk/run animations. */
347
+ async rig(req) {
348
+ const job = await this.createJob({ type: "3d/rig", params: req });
349
+ return this.pollJob(job.job_id, 5000, 120);
350
+ }
351
+ /** Apply an animation to a rigged character. */
352
+ async animate(req) {
353
+ const job = await this.createJob({ type: "3d/animate", params: req });
354
+ return this.pollJob(job.job_id, 5000, 120);
355
+ }
341
356
  // ── API Keys ──────────────────────────────────────────────────────
342
357
  /** Create a scoped API key. */
343
358
  async createKey(req) {
@@ -380,6 +395,11 @@ export class QuantumClient {
380
395
  async computeKeepalive(id) {
381
396
  return computeKeepalive(this, id);
382
397
  }
398
+ /** Query compute billing from BigQuery. */
399
+ async computeBilling(req) {
400
+ const { data } = await this._doJSON("POST", "/qai/v1/compute/billing", req);
401
+ return data;
402
+ }
383
403
  // ── Voice Management ──────────────────────────────────────────────
384
404
  /** List all available voices (ElevenLabs). */
385
405
  async listVoices() {
@@ -0,0 +1,36 @@
1
+ import type { QuantumClient } from "./client.js";
2
+ export interface BillingRequest {
3
+ /** Filter by instance ID. */
4
+ instance_id?: string;
5
+ /** Start date for billing period (ISO 8601). */
6
+ start_date?: string;
7
+ /** End date for billing period (ISO 8601). */
8
+ end_date?: string;
9
+ }
10
+ export interface BillingEntry {
11
+ /** Instance identifier. */
12
+ instance_id: string;
13
+ /** Instance name. */
14
+ instance_name?: string;
15
+ /** Total cost in USD. */
16
+ cost_usd: number;
17
+ /** Usage duration in hours. */
18
+ usage_hours?: number;
19
+ /** SKU description. */
20
+ sku_description?: string;
21
+ /** Billing period start. */
22
+ start_time?: string;
23
+ /** Billing period end. */
24
+ end_time?: string;
25
+ }
26
+ export interface BillingResponse {
27
+ /** Individual billing entries. */
28
+ entries: BillingEntry[];
29
+ /** Total cost across all entries. */
30
+ total_cost_usd: number;
31
+ }
32
+ /**
33
+ * Query compute billing from BigQuery via the QAI backend.
34
+ * @internal — called by QuantumClient.computeBilling()
35
+ */
36
+ export declare function computeBilling(client: QuantumClient, req: BillingRequest): Promise<BillingResponse>;
@@ -0,0 +1,9 @@
1
+ // ── Function ─────────────────────────────────────────────────────────
2
+ /**
3
+ * Query compute billing from BigQuery via the QAI backend.
4
+ * @internal — called by QuantumClient.computeBilling()
5
+ */
6
+ export async function computeBilling(client, req) {
7
+ const { data } = await client._doJSON("POST", "/qai/v1/compute/billing", req);
8
+ return data;
9
+ }
package/dist/index.d.ts CHANGED
@@ -4,6 +4,7 @@ export { responseText, responseThinking, responseToolCalls } from "./chat.js";
4
4
  export { realtimeConnect, realtimeConnectDirect, realtimeSession, realtimeEnd, realtimeRefresh, RealtimeSender, RealtimeReceiver } from "./realtime.js";
5
5
  export type { RealtimeConfig, RealtimeEvent, RealtimeSession } from "./realtime.js";
6
6
  export { contact } from "./contact.js";
7
+ export type { BillingRequest, BillingEntry, BillingResponse } from "./compute-billing.js";
7
8
  export type { ClientOptions, ResponseMeta, ChatRequest, ChatMessage, ChatTool, ContentBlock, ChatUsage, ChatResponse, StreamEvent, StreamDelta, StreamToolUse, SessionChatRequest, SessionChatResponse, SessionToolResult, ContextConfig, ContextMetadata, AgentRequest, AgentWorkerConfig, AgentEvent, MissionRequest, MissionWorkerConfig, MissionEvent, ImageRequest, ImageResponse, GeneratedImage, ImageEditRequest, ImageEditResponse, TTSRequest, TTSResponse, STTRequest, STTResponse, MusicRequest, MusicClip, MusicResponse, SoundEffectRequest, SoundEffectResponse, DialogueRequest, DialogueResponse, DialogueVoice, SpeechToSpeechRequest, SpeechToSpeechResponse, IsolateVoiceRequest, IsolateVoiceResponse, RemixVoiceRequest, RemixVoiceResponse, DubRequest, DubResponse, AlignRequest, AlignResponse, AlignedWord, VoiceDesignRequest, VoiceDesignResponse, VoicePreview, StarfishTTSRequest, StarfishTTSResponse, VideoRequest, VideoResponse, GeneratedVideo, VideoStudioRequest, VideoTranslateRequest, PhotoAvatarRequest, DigitalTwinRequest, AsyncJobResponse, AvatarsResponse, HeyGenAvatar, HeyGenTemplatesResponse, HeyGenTemplate, HeyGenVoicesResponse, HeyGenVoice, EmbedRequest, EmbedResponse, DocumentRequest, DocumentResponse, ChunkDocumentRequest, ChunkDocumentResponse, DocumentChunk, ProcessDocumentRequest, ProcessDocumentResponse, RAGSearchRequest, RAGSearchResponse, RAGResult, RAGCorpus, SurrealRAGSearchRequest, SurrealRAGSearchResponse, SurrealRAGResult, SurrealRAGProvidersResponse, SurrealRAGProviderInfo, ModelInfo, PricingInfo, BalanceResponse, UsageEntry, UsageResponse, UsageQuery, UsageSummaryMonth, UsageSummaryResponse, PricingEntry, AccountPricingResponse, JobCreateRequest, JobCreateResponse, JobStatusResponse, JobListResponse, JobStreamEvent, JobListItem, CreateKeyRequest, CreateKeyResponse, KeyDetails, ListKeysResponse, ComputeTemplate, TemplatesResponse, ProvisionRequest, ProvisionResponse, ComputeInstanceInfo, InstancesResponse, InstanceDetailInfo, InstanceResponse, SSHKeyRequest, DeleteResponse, VoiceInfo, VoicesResponse, CloneVoiceRequest, CloneVoiceResponse, ContactRequest, BatchJobInput, BatchSubmitRequest, BatchSubmitResponse, BatchJsonlResponse, BatchJobInfo, BatchJobsResponse, CreditPack, CreditPacksResponse, CreditPurchaseRequest, CreditPurchaseResponse, CreditBalanceResponse, CreditTier, CreditTiersResponse, DevProgramApplyRequest, DevProgramApplyResponse, AuthUser, AuthResponse, AuthAppleRequest, WebSearchRequest, WebSearchResponse, WebSearchResult, NewsResult, VideoSearchResult, LLMContextRequest, LLMContextResponse, ContentChunk, ContextSource, SearchAnswerRequest, SearchAnswerResponse, SearchAnswerChoice, SearchCitation, StatusResponse, } from "./types.js";
8
9
  export { DEFAULT_BASE_URL, TICKS_PER_USD } from "./types.js";
9
10
  import type { ChatMessage } from "./types.js";
package/dist/types.d.ts CHANGED
@@ -1144,3 +1144,43 @@ export interface APIErrorBody {
1144
1144
  code?: string;
1145
1145
  };
1146
1146
  }
1147
+ export interface RemeshRequest {
1148
+ input_task_id?: string;
1149
+ model_url?: string;
1150
+ target_formats?: string[];
1151
+ topology?: string;
1152
+ target_polycount?: number;
1153
+ resize_height?: number;
1154
+ origin_at?: string;
1155
+ convert_format_only?: boolean;
1156
+ }
1157
+ export interface ModelUrls {
1158
+ glb?: string;
1159
+ fbx?: string;
1160
+ obj?: string;
1161
+ usdz?: string;
1162
+ stl?: string;
1163
+ blend?: string;
1164
+ }
1165
+ export interface RigRequest {
1166
+ input_task_id?: string;
1167
+ model_url?: string;
1168
+ height_meters?: number;
1169
+ texture_image_url?: string;
1170
+ }
1171
+ export interface BasicAnimations {
1172
+ walking_glb_url?: string;
1173
+ walking_fbx_url?: string;
1174
+ walking_armature_glb_url?: string;
1175
+ running_glb_url?: string;
1176
+ running_fbx_url?: string;
1177
+ running_armature_glb_url?: string;
1178
+ }
1179
+ export interface AnimateRequest {
1180
+ rig_task_id: string;
1181
+ action_id: number;
1182
+ post_process?: {
1183
+ operation_type: string;
1184
+ fps?: number;
1185
+ };
1186
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quantum-ai-sdk",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Cosmic Duck SDK — 100+ AI endpoints across 10 providers",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",