@canarycoders/ai 0.8.0 → 0.8.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/index.d.cts CHANGED
@@ -6,7 +6,7 @@ export { b as RealtimeKind, c as RealtimeTool } from './realtime-BWDkXcj9.cjs';
6
6
  type FetchLike = typeof globalThis.fetch;
7
7
 
8
8
  /** Every provider the gateway can route to. */
9
- type ProviderType = "gemini" | "vertex" | "openai" | "anthropic" | "xai" | "lmstudio" | "ollama" | "perplexity" | "elevenlabs" | "mlxaudio" | "vision" | "gcvision" | "zhipu" | "moonshot";
9
+ type ProviderType = "gemini" | "vertex" | "openai" | "anthropic" | "xai" | "lmstudio" | "ollama" | "perplexity" | "elevenlabs" | "mlxaudio" | "vision" | "gcvision" | "zhipu" | "moonshot" | "ocr" | "ltx";
10
10
  /** Providers that serve text chat / completion. */
11
11
  type ChatProvider = "gemini" | "vertex" | "openai" | "anthropic" | "xai" | "lmstudio" | "ollama" | "perplexity" | "zhipu" | "moonshot";
12
12
  type ModelCapability = "chat" | "vision" | "image-generation" | "video-generation" | "text-to-speech" | "speech-to-text" | "image-recognition" | "face-detection" | "web-detection" | "conversation" | "sound-effect" | "music-generation" | "dialogue" | "realtime-voice" | "realtime-translate" | "realtime-transcribe" | "embeddings" | "reasoning";
@@ -73,6 +73,12 @@ interface ApiEnvelope<T> {
73
73
  interface CostInfo {
74
74
  /** Customer price in USD for this call; 0 when it ran on your own provider key (BYOK). */
75
75
  customerPrice: number;
76
+ /**
77
+ * What the call would cost at list rates. Equals `customerPrice` on metered
78
+ * calls; on BYOK calls it is the price you avoided by bringing your own key.
79
+ * Absent on gateways older than 2026-09.
80
+ */
81
+ listPrice?: number;
76
82
  currency: "USD";
77
83
  billing: "metered" | "byok";
78
84
  /** True when served from the completion cache. */
@@ -509,15 +515,26 @@ interface ImageGenerationResult {
509
515
  cost?: CostInfo;
510
516
  }
511
517
  interface VideoGenerateParams {
512
- provider: "gemini" | "vertex" | "xai";
518
+ /** gemini/vertex = Veo 3.1, xai = Grok Imagine, ltx = local LTX-2 (no provider cost). */
519
+ provider: "gemini" | "vertex" | "xai" | "ltx";
513
520
  prompt: string;
514
521
  model?: string;
522
+ /**
523
+ * gemini/vertex/xai: "16:9" or "9:16". ltx: any "W:H"; picks a 64-grid size
524
+ * (16:9 = 768x448, 9:16 = 448x768) unless `resolution` is set.
525
+ */
515
526
  aspectRatio?: string;
527
+ /**
528
+ * gemini/vertex: "720p" | "1080p". xai: "480p" | "720p". ltx: pixels "WxH"
529
+ * (e.g. "768x512"), each side snapped to a multiple of 64 (256..1536).
530
+ */
516
531
  resolution?: string;
517
532
  durationSeconds?: number;
518
533
  numberOfVideos?: number;
519
- /** public URL of a seed image */
534
+ /** public URL (or data URI) of the start frame for image-to-video */
520
535
  imageUrl?: string;
536
+ /** Veo only: final frame, interpolates first to last. Rejected by ltx. */
537
+ lastFrameUrl?: string;
521
538
  /** id from `video.upload()` for image-to-video */
522
539
  fileId?: string;
523
540
  tag?: string;
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@ export { b as RealtimeKind, c as RealtimeTool } from './realtime-BWDkXcj9.js';
6
6
  type FetchLike = typeof globalThis.fetch;
7
7
 
8
8
  /** Every provider the gateway can route to. */
9
- type ProviderType = "gemini" | "vertex" | "openai" | "anthropic" | "xai" | "lmstudio" | "ollama" | "perplexity" | "elevenlabs" | "mlxaudio" | "vision" | "gcvision" | "zhipu" | "moonshot";
9
+ type ProviderType = "gemini" | "vertex" | "openai" | "anthropic" | "xai" | "lmstudio" | "ollama" | "perplexity" | "elevenlabs" | "mlxaudio" | "vision" | "gcvision" | "zhipu" | "moonshot" | "ocr" | "ltx";
10
10
  /** Providers that serve text chat / completion. */
11
11
  type ChatProvider = "gemini" | "vertex" | "openai" | "anthropic" | "xai" | "lmstudio" | "ollama" | "perplexity" | "zhipu" | "moonshot";
12
12
  type ModelCapability = "chat" | "vision" | "image-generation" | "video-generation" | "text-to-speech" | "speech-to-text" | "image-recognition" | "face-detection" | "web-detection" | "conversation" | "sound-effect" | "music-generation" | "dialogue" | "realtime-voice" | "realtime-translate" | "realtime-transcribe" | "embeddings" | "reasoning";
@@ -73,6 +73,12 @@ interface ApiEnvelope<T> {
73
73
  interface CostInfo {
74
74
  /** Customer price in USD for this call; 0 when it ran on your own provider key (BYOK). */
75
75
  customerPrice: number;
76
+ /**
77
+ * What the call would cost at list rates. Equals `customerPrice` on metered
78
+ * calls; on BYOK calls it is the price you avoided by bringing your own key.
79
+ * Absent on gateways older than 2026-09.
80
+ */
81
+ listPrice?: number;
76
82
  currency: "USD";
77
83
  billing: "metered" | "byok";
78
84
  /** True when served from the completion cache. */
@@ -509,15 +515,26 @@ interface ImageGenerationResult {
509
515
  cost?: CostInfo;
510
516
  }
511
517
  interface VideoGenerateParams {
512
- provider: "gemini" | "vertex" | "xai";
518
+ /** gemini/vertex = Veo 3.1, xai = Grok Imagine, ltx = local LTX-2 (no provider cost). */
519
+ provider: "gemini" | "vertex" | "xai" | "ltx";
513
520
  prompt: string;
514
521
  model?: string;
522
+ /**
523
+ * gemini/vertex/xai: "16:9" or "9:16". ltx: any "W:H"; picks a 64-grid size
524
+ * (16:9 = 768x448, 9:16 = 448x768) unless `resolution` is set.
525
+ */
515
526
  aspectRatio?: string;
527
+ /**
528
+ * gemini/vertex: "720p" | "1080p". xai: "480p" | "720p". ltx: pixels "WxH"
529
+ * (e.g. "768x512"), each side snapped to a multiple of 64 (256..1536).
530
+ */
516
531
  resolution?: string;
517
532
  durationSeconds?: number;
518
533
  numberOfVideos?: number;
519
- /** public URL of a seed image */
534
+ /** public URL (or data URI) of the start frame for image-to-video */
520
535
  imageUrl?: string;
536
+ /** Veo only: final frame, interpolates first to last. Rejected by ltx. */
537
+ lastFrameUrl?: string;
521
538
  /** id from `video.upload()` for image-to-video */
522
539
  fileId?: string;
523
540
  tag?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canarycoders/ai",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "description": "Official TypeScript SDK for the CanaryCoders AI multi-provider gateway",
5
5
  "license": "MIT",
6
6
  "author": "CanaryCoders",