@shop-os/modelkit 0.4.6 → 0.5.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/index.d.cts CHANGED
@@ -34,6 +34,19 @@ type MediaRef = {
34
34
  /** Measured length of a video/audio; the kit never measures it. */
35
35
  durationSeconds?: number;
36
36
  };
37
+ /** A click on the image for `mask` rows, in source pixels; `background` excludes the spot. */
38
+ interface MaskPoint {
39
+ x: number;
40
+ y: number;
41
+ label?: "foreground" | "background";
42
+ }
43
+ /** A box around the object to mask, in source pixels. */
44
+ interface MaskBox {
45
+ xMin: number;
46
+ yMin: number;
47
+ xMax: number;
48
+ yMax: number;
49
+ }
37
50
  /** Caller-driven Topaz upscale controls; see the topaz row and TopazImageInput. */
38
51
  interface UpscaleOptions {
39
52
  enhanceModel?: string;
@@ -42,13 +55,28 @@ interface UpscaleOptions {
42
55
  faceEnhancementCreativity?: number;
43
56
  faceEnhancementStrength?: number;
44
57
  }
45
- type ModelType = "text" | "image" | "video" | "audio" | "upscale" | "bg-remove"
46
- /** Video in, video out, no prompt: upscale, frame interpolation, SDR to HDR. */
47
- | "video-tool";
58
+ type ModelType = "text" | "image" | "video" | "audio"
59
+ /** Sound effects (`generateAudio`): a text description, or a `sourceVideo` to score when the row requires one. */
60
+ | "sound-effect" | "upscale" | "bg-remove"
61
+ /** Image segmentation (`generateImage`): one image and a prompt in, one mask per match out. */
62
+ | "mask"
63
+ /** Video in, video out, no prompt: upscale, frame interpolation, SDR to HDR, background removal, subtitles. */
64
+ | "video-tool"
65
+ /** Text to speech (`generateSpeech`). */
66
+ | "speech"
67
+ /** Speech to speech in another voice (`changeVoice`). */
68
+ | "voice-change"
69
+ /** Speech translated into `targetLanguage` (`dub`), from a video or an audio file. */
70
+ | "dubbing"
71
+ /** A face driven by speech (`lipsync`): a `sourceVideo` re-timed or a still `image` animated. */
72
+ | "lipsync"
73
+ /** Speech to text (`transcribe`). */
74
+ | "transcription";
48
75
  /** What a `video-tool` row does to its source clip. */
49
- type VideoToolKind = "upscale" | "interpolate" | "hdr";
76
+ type VideoToolKind = "upscale" | "interpolate" | "hdr" | "bg-remove" | "subtitles";
50
77
  /** Container/codec a video-tool row can write. */
51
- type VideoToolOutputFormat = "h265" | "prores";
78
+ /** `exr`: a ZIP of 16-bit EXR frames in `VideoToolResult.frames`, with an MP4 preview as `video`. */
79
+ type VideoToolOutputFormat = "h265" | "prores" | "exr";
52
80
  type Lifecycle = "active" | "deprecated" | "retired";
53
81
  type Surface = "cowork" | "space_builder";
54
82
  /** @deprecated use Surface[] */
@@ -78,6 +106,10 @@ interface ImageRequest {
78
106
  temperature?: number;
79
107
  /** Upscaler controls beyond `scaleFactor`/`outputFormat` (Topaz). */
80
108
  upscale?: UpscaleOptions;
109
+ /** Mask rows with `supports: points`: spots that refine what the prompt selects. */
110
+ points?: MaskPoint[];
111
+ /** Mask rows with `supports: boxes`: boxes around the objects to mask. */
112
+ boxes?: MaskBox[];
81
113
  }
82
114
  /**
83
115
  * What a caller passes to generateImage. Same field names as the AI SDK's
@@ -125,6 +157,12 @@ interface VideoRequest {
125
157
  * adapter sends the prompt alone; `taskType: "extend"` still selects the extend path. */
126
158
  previousInteractionId?: string;
127
159
  mode?: "standard" | "pro";
160
+ /** Rows with `supports: ["insertWindow"]`: where the generated scene starts in the
161
+ * source clip and where the source footage resumes, in seconds. */
162
+ insertWindow?: {
163
+ startSeconds: number;
164
+ resumeSeconds: number;
165
+ };
128
166
  }
129
167
  /**
130
168
  * What a caller passes to generateVideo. `duration` is the AI SDK spelling of
@@ -152,12 +190,38 @@ interface VideoToolRequest {
152
190
  source: VideoToolSource;
153
191
  /** Upscale rows. */
154
192
  upscaleFactor?: number;
155
- /** Upscale rows whose `constraints.tool.prompt` is set; ignored by every other row. */
193
+ /** Rows whose `constraints.tool.prompt` is set; ignored by every other row. */
156
194
  prompt?: string;
157
195
  /** Interpolate rows. */
158
196
  targetFps?: number;
159
197
  /** HDR rows; the row's first `outputFormats` entry when unset. */
160
198
  outputFormat?: VideoToolOutputFormat;
199
+ /** Subtitles rows: caption style and language; the row's first preset when unset. */
200
+ subtitles?: SubtitleOptions;
201
+ }
202
+ /** Per-tier caption text overrides; an unset field keeps the preset's own. */
203
+ interface SubtitleTextStyle {
204
+ /** A Google Font name the provider supports. */
205
+ font?: string;
206
+ /** 100 to 900. */
207
+ weight?: number;
208
+ /** `#rgb` or `#rrggbb`. */
209
+ color?: string;
210
+ }
211
+ /** Burned-in caption options; every unset field keeps the preset's own. */
212
+ interface SubtitleOptions {
213
+ /** One of `constraints.tool.presets`. */
214
+ preset?: string;
215
+ /** The spoken language (one of `tool.languages`); the provider detects it when unset. */
216
+ language?: string;
217
+ /** Caption in this language instead (one of `tool.translationLanguages`). */
218
+ translationLanguage?: string;
219
+ position?: "top" | "center" | "bottom";
220
+ shadow?: "none" | "min" | "mid" | "max";
221
+ /** Every word. */
222
+ baseline?: SubtitleTextStyle;
223
+ /** The words the provider marks as key. */
224
+ highlighted?: SubtitleTextStyle;
161
225
  }
162
226
  /** The output a video-tool request will produce, from the request alone. */
163
227
  interface VideoToolOutputSpec {
@@ -165,8 +229,11 @@ interface VideoToolOutputSpec {
165
229
  height: number;
166
230
  durationSeconds: number;
167
231
  fps?: number;
232
+ /** HDR: the frames the row renders at `fps`, which the request sends. */
233
+ frames?: number;
168
234
  resolution: VideoResolution;
169
- format: "h264" | VideoToolOutputFormat;
235
+ /** `vp9` (WebM with alpha) is what a `bg-remove` row writes. */
236
+ format: "h264" | "vp9" | VideoToolOutputFormat;
170
237
  }
171
238
  interface VideoToolCallContext extends CallContext {
172
239
  /** Where the provider posts the result when the job ends. */
@@ -194,6 +261,12 @@ interface VideoToolResult {
194
261
  mime?: string;
195
262
  bytes?: number;
196
263
  };
264
+ /** The frame archive of an `exr` row; `video` is then its preview. */
265
+ frames?: {
266
+ url: string;
267
+ mime?: string;
268
+ bytes?: number;
269
+ };
197
270
  output: VideoToolOutputSpec;
198
271
  usage: UsageEvent;
199
272
  raw?: unknown;
@@ -209,22 +282,118 @@ interface AudioRequest {
209
282
  seed?: number;
210
283
  /** Music models: no vocals. */
211
284
  instrumental?: boolean;
285
+ /** Music rows with `supports: lyrics`: the words to sing, with [verse]/[chorus] tags. */
286
+ lyrics?: string;
287
+ /** One of the row's `constraints.outputFormats`; the row default when unset. */
288
+ outputFormat?: string;
212
289
  /** Cancellation; combined with CallContext.signal before dispatch. */
213
290
  abortSignal?: AbortSignal;
214
291
  }
292
+ /** A provider file: a URL it hosts, or the bytes when it returns them inline. */
293
+ type MediaOutput = {
294
+ bytes: Uint8Array;
295
+ mime: string;
296
+ } | {
297
+ url: string;
298
+ mime?: string;
299
+ expiresAt?: Date;
300
+ };
215
301
  interface AudioResult {
216
- audio: {
217
- bytes: Uint8Array;
218
- mime: string;
219
- } | {
220
- url: string;
221
- expiresAt?: Date;
222
- };
302
+ audio: MediaOutput;
223
303
  /** Lyria returns lyrics as text parts next to the audio. */
224
304
  text?: string;
225
305
  usage: UsageEvent;
226
306
  raw?: JsonValue;
227
307
  }
308
+ /** `generateSpeech` on a `speech` row. Voice, language and format are ids the row lists. */
309
+ interface SpeechRequest {
310
+ model: string;
311
+ /** The script, spoken verbatim. */
312
+ text: string;
313
+ /** One of `constraints.voices[].id`; the row default when unset. */
314
+ voice?: string;
315
+ /** One of `constraints.languages[].code`; the provider detects it when unset. */
316
+ language?: string;
317
+ /** Rows with `supports: style`: how to speak it ("warm and slow"), kept out of the script. */
318
+ style?: string;
319
+ /** One of `constraints.outputFormats`; the row default when unset. */
320
+ outputFormat?: string;
321
+ abortSignal?: AbortSignal;
322
+ }
323
+ /** `changeVoice` on a `voice-change` row: the recording re-spoken in another voice. */
324
+ interface VoiceChangeRequest {
325
+ model: string;
326
+ /** Set `durationSeconds` so `constraints.references.audioSeconds` can be checked. */
327
+ sourceAudio: MediaRef;
328
+ voice?: string;
329
+ outputFormat?: string;
330
+ abortSignal?: AbortSignal;
331
+ }
332
+ /**
333
+ * `lipsync` on a `lipsync` row. The row's `requires` names the face input: `sourceVideo` (a
334
+ * video re-timed to the speech) or `firstFrame` (a still `image` animated).
335
+ */
336
+ interface LipsyncRequest {
337
+ model: string;
338
+ sourceVideo?: MediaRef;
339
+ image?: MediaRef;
340
+ /** The speech. Set `durationSeconds` so `constraints.references.audioSeconds` can be checked. */
341
+ audio: MediaRef;
342
+ /** Rows that list `constraints.resolutions`; the row default when unset. */
343
+ resolution?: VideoResolution;
344
+ abortSignal?: AbortSignal;
345
+ }
346
+ interface LipsyncResult {
347
+ video: MediaOutput;
348
+ usage: UsageEvent;
349
+ raw?: unknown;
350
+ }
351
+ /** `dub` on a `dubbing` row: exactly one of `sourceVideo` / `sourceAudio`. */
352
+ interface DubbingRequest {
353
+ model: string;
354
+ sourceVideo?: MediaRef;
355
+ sourceAudio?: MediaRef;
356
+ /** One of `constraints.languages[].code`. */
357
+ targetLanguage: string;
358
+ /** One of `constraints.outputFormats` on rows that list them. */
359
+ outputFormat?: string;
360
+ abortSignal?: AbortSignal;
361
+ }
362
+ /** The dubbed media, of the same kind as the source. */
363
+ interface DubbingResult {
364
+ video?: MediaOutput;
365
+ audio?: MediaOutput;
366
+ usage: UsageEvent;
367
+ raw?: unknown;
368
+ }
369
+ interface TranscriptionRequest {
370
+ model: string;
371
+ /** The speech, audio or video. Set `durationSeconds` so limits and usage can use it. */
372
+ source: MediaRef;
373
+ /** One of `constraints.languages[].code`; the provider detects the language when unset. */
374
+ language?: string;
375
+ /** Also return `subtitles` (SRT) built from the word timings. */
376
+ timestamps?: boolean;
377
+ abortSignal?: AbortSignal;
378
+ }
379
+ interface TranscriptWord {
380
+ text: string;
381
+ /** `word`, `spacing` or `audio_event` (ElevenLabs Scribe). */
382
+ type: string;
383
+ start?: number;
384
+ end?: number;
385
+ speakerId?: string;
386
+ }
387
+ interface TranscriptionResult {
388
+ text: string;
389
+ /** SubRip (SRT) cues, when the request asked for `timestamps`. */
390
+ subtitles?: string;
391
+ /** The language the provider detected or was told. */
392
+ language?: string;
393
+ words: TranscriptWord[];
394
+ usage: UsageEvent;
395
+ raw?: JsonValue;
396
+ }
228
397
  /** An AI SDK file part ready for generateText/generateObject, e.g. a video for understanding. */
229
398
  interface MediaPart {
230
399
  type: "file";
@@ -233,10 +402,18 @@ interface MediaPart {
233
402
  /** Set when the bytes were uploaded to a provider file store (Gemini Files API). Call `cleanup` after the request. */
234
403
  cleanup?: () => Promise<void>;
235
404
  }
236
- type RequiredInput = "firstFrame" | "sourceVideo" | "references";
405
+ type RequiredInput = "firstFrame" | "sourceVideo" | "references" | "sourceAudio";
237
406
  type SupportedOption = "seed" | "quality" | "negativePrompt" | "cfgScale" | "generateAudio" | "promptExpansion" | "lastFrame" | "count" | "outputFormat" | "scaleFactor" | "safetySettings" | "temperature" | "upscale" | "watermark" | "safetyChecker" | "taskType" | "instrumental"
407
+ /** Music rows that sing `AudioRequest.lyrics`. */
408
+ | "lyrics"
409
+ /** Speech rows that take `SpeechRequest.style`, a delivery instruction. */
410
+ | "style"
238
411
  /** Video rows that extend a clip in fixed segments up to a cumulative cap (see `ModelConstraints.extension`). */
239
- | "videoExtension";
412
+ | "videoExtension"
413
+ /** Video rows that generate a scene inside a source clip (`VideoRequest.insertWindow`). */
414
+ | "insertWindow"
415
+ /** Mask rows: `ImageRequest.points` and `ImageRequest.boxes`. */
416
+ | "points" | "boxes";
240
417
  interface VideoSecondsLimits {
241
418
  /** Minimum length of each reference video, in seconds. */
242
419
  min?: number;
@@ -268,6 +445,16 @@ interface ReferenceLimits {
268
445
  audioFormats?: string[];
269
446
  /** Largest reference audio file the provider takes, in bytes. */
270
447
  audioMaxBytes?: number;
448
+ /**
449
+ * Video rows: the fewest references of each kind a request needs (Kling 3.0 Motion Control:
450
+ * one image and one video). `requires: ["references"]` needs one of any kind; this names
451
+ * the kinds. Kits before 0.5.0 ignore it.
452
+ */
453
+ min?: {
454
+ images?: number;
455
+ videos?: number;
456
+ audios?: number;
457
+ };
271
458
  }
272
459
  interface VideoToolConstraints {
273
460
  kind: VideoToolKind;
@@ -278,7 +465,7 @@ interface VideoToolConstraints {
278
465
  };
279
466
  /** Upscale: the output's long edge may not pass this, in pixels. */
280
467
  maxOutputLongEdge?: number;
281
- /** Upscale: the row takes an optional prompt that guides added detail. */
468
+ /** Upscale and HDR: the row takes an optional prompt that guides the result. */
282
469
  prompt?: boolean;
283
470
  /** Interpolate: allowed target frame rate range. */
284
471
  fps?: {
@@ -287,11 +474,45 @@ interface VideoToolConstraints {
287
474
  };
288
475
  /** HDR: the formats the row writes, first is the default. */
289
476
  outputFormats?: VideoToolOutputFormat[];
477
+ /** The output's short edge is scaled down to this many pixels, keeping the aspect ratio. */
478
+ maxOutputShortEdge?: number;
479
+ /** The most frames the row renders (duration times frame rate). */
480
+ maxOutputFrames?: number;
481
+ /** HDR: the fewest frames the row renders; a shorter source is padded to it. */
482
+ minOutputFrames?: number;
483
+ /** HDR: the fastest output rate; a faster source renders at this rate. */
484
+ maxOutputFps?: number;
485
+ /** Subtitles: the caption styles, first is the default. */
486
+ presets?: string[];
487
+ /** Subtitles: spoken-language codes the provider transcribes. */
488
+ languages?: string[];
489
+ /** Subtitles: codes the provider can translate the captions into. */
490
+ translationLanguages?: string[];
491
+ /** Subtitles: the longest source above 1080p, in seconds (`sourceVideoSeconds.max` covers the rest). */
492
+ maxSecondsAbove1080p?: number;
290
493
  }
291
494
  /** Whether a video row's output has sound: always, switchable (`supports: generateAudio`), or silent. */
292
495
  type AudioOutput = "always" | "optional" | "never";
293
496
  /** How a prompt points at reference N: "image N" numbering, a caption beside each image, or prose. */
294
497
  type ReferenceSyntax = "numbered" | "caption" | "descriptive";
498
+ type VoiceGender = "male" | "female" | "neutral";
499
+ /** A voice a row offers. `id` is the value sent to the provider. */
500
+ interface VoiceOption {
501
+ id: string;
502
+ name: string;
503
+ gender?: VoiceGender;
504
+ accent?: string;
505
+ /** Language codes the provider lists for the voice. */
506
+ languages?: string[];
507
+ description?: string;
508
+ /** An https sample of the voice. */
509
+ previewUrl?: string;
510
+ }
511
+ /** A language a row takes. `code` is the value sent to the provider. */
512
+ interface LanguageOption {
513
+ code: string;
514
+ name: string;
515
+ }
295
516
  interface PromptConventions {
296
517
  referenceSyntax: ReferenceSyntax;
297
518
  /** Provider-documented prompt length limit, in characters. */
@@ -309,6 +530,8 @@ interface ModelConstraints {
309
530
  durationPresets?: number[];
310
531
  /** Curated quality choices for rows whose `supports` includes "quality". */
311
532
  qualityOptions?: string[];
533
+ /** Upscale rows: the `scaleFactor` values the row offers; absent means any. */
534
+ scaleFactors?: number[];
312
535
  /**
313
536
  * Exact pixel size per aspect ratio for rows an app must size verbatim
314
537
  * (gpt-image-2 keeps its historic WxH contract); callers pass it as `exactSize`.
@@ -316,9 +539,26 @@ interface ModelConstraints {
316
539
  exactSizes?: Record<string, string>;
317
540
  references?: ReferenceLimits;
318
541
  requires?: RequiredInput[];
542
+ /**
543
+ * Video rows: at least one of these inputs must be present (`requires` needs all of its
544
+ * own). Kits before 0.5.0 ignore it.
545
+ */
546
+ requiresOneOf?: RequiredInput[];
547
+ /**
548
+ * Video rows whose endpoint has no prompt field (MiniMax H3 Max Relight): the request needs
549
+ * no prompt, and a non-empty one is dropped with an `option_ignored` warning. Absent means
550
+ * the row takes a prompt. Kits before 0.5.0 ignore it.
551
+ */
552
+ noPrompt?: boolean;
319
553
  supports?: SupportedOption[];
320
554
  /** Ratio is dropped, with a warning, when one of these inputs is present. */
321
555
  ratioIgnoredWith?: ("firstFrame" | "sourceVideo")[];
556
+ /** Speech and voice-change rows: the voices offered; `defaults.voice` is one of their ids. */
557
+ voices?: VoiceOption[];
558
+ /** Speech, transcription and dubbing (target) rows: the languages taken. */
559
+ languages?: LanguageOption[];
560
+ /** Audio-output rows whose provider lets the caller pick a file format; `defaults.outputFormat` is one. */
561
+ outputFormats?: string[];
322
562
  /** Length limits for the source video the row edits or extends. */
323
563
  sourceVideoSeconds?: Omit<VideoSecondsLimits, "total"> & {
324
564
  /** The provider sends the source as a reference video, so it counts toward `references.videoSeconds.total` (Seedance). */
@@ -411,6 +651,15 @@ interface CatalogCapabilities {
411
651
  vision?: boolean;
412
652
  contextWindow?: number;
413
653
  }
654
+ /** Row defaults the request types do not share. */
655
+ interface MediaNodeDefaults {
656
+ /** Image rows: png, jpeg or webp. Audio-output rows: one of `constraints.outputFormats`. */
657
+ outputFormat?: string;
658
+ /** One of `constraints.voices[].id`. */
659
+ voice?: string;
660
+ /** One of `constraints.languages[].code`. */
661
+ language?: string;
662
+ }
414
663
  interface CatalogModel {
415
664
  /** Canonical id. Equals the pricing key in pro-backend credit_pricing_* tables. */
416
665
  id: string;
@@ -430,7 +679,7 @@ interface CatalogModel {
430
679
  */
431
680
  exposure: Surface[];
432
681
  constraints: ModelConstraints;
433
- defaults: Partial<Omit<ImageRequest, "model" | "prompt"> & Omit<VideoRequest, "model" | "prompt"> & Omit<AudioRequest, "model" | "prompt">>;
682
+ defaults: Partial<Omit<ImageRequest, "model" | "prompt" | "outputFormat"> & Omit<VideoRequest, "model" | "prompt"> & Omit<AudioRequest, "model" | "prompt" | "outputFormat">> & MediaNodeDefaults;
434
683
  /** Provider options merged under the caller's on every call. Chat-only tuning belongs in display.chat. */
435
684
  providerOptions?: ProviderOptions;
436
685
  /**
@@ -676,7 +925,11 @@ declare function isListedOn(row: CatalogModel, surface: Surface): boolean;
676
925
  /** True when an active row is listed on at least one surface. */
677
926
  declare function isListed(row: CatalogModel): boolean;
678
927
 
679
- /** Seeded from Cowork, Space Builder and trigger-workflows. See catalog/*.ts. */
928
+ /**
929
+ * Every row, aggregated from the exported per-type collections only, so a row added anywhere
930
+ * else never reaches MODELS without its collection. Seeded from Cowork, Space Builder and
931
+ * trigger-workflows. See catalog/*.ts.
932
+ */
680
933
  declare const MODELS: CatalogModel[];
681
934
 
682
935
  declare const ADAPTER_IDS: readonly ["ai-sdk-text", "google-image", "openai-image", "google-genai", "ark", "fal", "replicate", "prodia", "higgsfield", "xai-video"];
@@ -686,6 +939,15 @@ declare const SurfaceSchema: z.ZodEnum<{
686
939
  }>;
687
940
  declare const SURFACES: ("cowork" | "space_builder")[];
688
941
  declare const ExposureSchema: z.ZodType<Surface[], unknown>;
942
+ declare const VideoResolutionSchema: z.ZodEnum<{
943
+ "360p": "360p";
944
+ "480p": "480p";
945
+ "720p": "720p";
946
+ "768p": "768p";
947
+ "1080p": "1080p";
948
+ "2k": "2k";
949
+ "4k": "4k";
950
+ }>;
689
951
  declare const CatalogModelSchemaBase: z.ZodObject<{
690
952
  id: z.ZodString;
691
953
  aliases: z.ZodDefault<z.ZodArray<z.ZodString>>;
@@ -695,9 +957,16 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
695
957
  image: "image";
696
958
  video: "video";
697
959
  audio: "audio";
960
+ "sound-effect": "sound-effect";
698
961
  upscale: "upscale";
699
962
  "bg-remove": "bg-remove";
963
+ mask: "mask";
700
964
  "video-tool": "video-tool";
965
+ speech: "speech";
966
+ "voice-change": "voice-change";
967
+ dubbing: "dubbing";
968
+ lipsync: "lipsync";
969
+ transcription: "transcription";
701
970
  }>;
702
971
  adapter: z.ZodEnum<{
703
972
  "ai-sdk-text": "ai-sdk-text";
@@ -760,6 +1029,7 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
760
1029
  }, z.core.$loose>, z.ZodArray<z.ZodNumber>]>>;
761
1030
  durationPresets: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
762
1031
  qualityOptions: z.ZodOptional<z.ZodArray<z.ZodString>>;
1032
+ scaleFactors: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
763
1033
  exactSizes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
764
1034
  references: z.ZodOptional<z.ZodObject<{
765
1035
  images: z.ZodOptional<z.ZodNumber>;
@@ -781,12 +1051,25 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
781
1051
  }, z.core.$loose>>;
782
1052
  audioFormats: z.ZodOptional<z.ZodArray<z.ZodString>>;
783
1053
  audioMaxBytes: z.ZodOptional<z.ZodNumber>;
1054
+ min: z.ZodOptional<z.ZodObject<{
1055
+ images: z.ZodOptional<z.ZodNumber>;
1056
+ videos: z.ZodOptional<z.ZodNumber>;
1057
+ audios: z.ZodOptional<z.ZodNumber>;
1058
+ }, z.core.$loose>>;
784
1059
  }, z.core.$loose>>;
785
1060
  requires: z.ZodOptional<z.ZodArray<z.ZodEnum<{
786
1061
  references: "references";
787
1062
  firstFrame: "firstFrame";
788
1063
  sourceVideo: "sourceVideo";
1064
+ sourceAudio: "sourceAudio";
1065
+ }>>>;
1066
+ requiresOneOf: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1067
+ references: "references";
1068
+ firstFrame: "firstFrame";
1069
+ sourceVideo: "sourceVideo";
1070
+ sourceAudio: "sourceAudio";
789
1071
  }>>>;
1072
+ noPrompt: z.ZodOptional<z.ZodBoolean>;
790
1073
  supports: z.ZodOptional<z.ZodArray<z.ZodEnum<{
791
1074
  upscale: "upscale";
792
1075
  quality: "quality";
@@ -796,6 +1079,8 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
796
1079
  scaleFactor: "scaleFactor";
797
1080
  safetySettings: "safetySettings";
798
1081
  temperature: "temperature";
1082
+ points: "points";
1083
+ boxes: "boxes";
799
1084
  lastFrame: "lastFrame";
800
1085
  generateAudio: "generateAudio";
801
1086
  negativePrompt: "negativePrompt";
@@ -804,13 +1089,34 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
804
1089
  watermark: "watermark";
805
1090
  safetyChecker: "safetyChecker";
806
1091
  taskType: "taskType";
1092
+ insertWindow: "insertWindow";
807
1093
  instrumental: "instrumental";
1094
+ lyrics: "lyrics";
1095
+ style: "style";
808
1096
  videoExtension: "videoExtension";
809
1097
  }>>>;
810
1098
  ratioIgnoredWith: z.ZodOptional<z.ZodArray<z.ZodEnum<{
811
1099
  firstFrame: "firstFrame";
812
1100
  sourceVideo: "sourceVideo";
813
1101
  }>>>;
1102
+ voices: z.ZodOptional<z.ZodArray<z.ZodObject<{
1103
+ id: z.ZodString;
1104
+ name: z.ZodString;
1105
+ gender: z.ZodOptional<z.ZodEnum<{
1106
+ male: "male";
1107
+ female: "female";
1108
+ neutral: "neutral";
1109
+ }>>;
1110
+ accent: z.ZodOptional<z.ZodString>;
1111
+ languages: z.ZodOptional<z.ZodArray<z.ZodString>>;
1112
+ description: z.ZodOptional<z.ZodString>;
1113
+ previewUrl: z.ZodOptional<z.ZodURL>;
1114
+ }, z.core.$loose>>>;
1115
+ languages: z.ZodOptional<z.ZodArray<z.ZodObject<{
1116
+ code: z.ZodString;
1117
+ name: z.ZodString;
1118
+ }, z.core.$loose>>>;
1119
+ outputFormats: z.ZodOptional<z.ZodArray<z.ZodString>>;
814
1120
  sourceVideoSeconds: z.ZodOptional<z.ZodObject<{
815
1121
  max: z.ZodOptional<z.ZodNumber>;
816
1122
  min: z.ZodOptional<z.ZodNumber>;
@@ -828,8 +1134,10 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
828
1134
  tool: z.ZodOptional<z.ZodObject<{
829
1135
  kind: z.ZodEnum<{
830
1136
  upscale: "upscale";
1137
+ "bg-remove": "bg-remove";
831
1138
  interpolate: "interpolate";
832
1139
  hdr: "hdr";
1140
+ subtitles: "subtitles";
833
1141
  }>;
834
1142
  upscaleFactor: z.ZodOptional<z.ZodObject<{
835
1143
  min: z.ZodNumber;
@@ -844,7 +1152,16 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
844
1152
  outputFormats: z.ZodOptional<z.ZodArray<z.ZodEnum<{
845
1153
  h265: "h265";
846
1154
  prores: "prores";
1155
+ exr: "exr";
847
1156
  }>>>;
1157
+ maxOutputShortEdge: z.ZodOptional<z.ZodNumber>;
1158
+ maxOutputFrames: z.ZodOptional<z.ZodNumber>;
1159
+ minOutputFrames: z.ZodOptional<z.ZodNumber>;
1160
+ maxOutputFps: z.ZodOptional<z.ZodNumber>;
1161
+ presets: z.ZodOptional<z.ZodArray<z.ZodString>>;
1162
+ languages: z.ZodOptional<z.ZodArray<z.ZodString>>;
1163
+ translationLanguages: z.ZodOptional<z.ZodArray<z.ZodString>>;
1164
+ maxSecondsAbove1080p: z.ZodOptional<z.ZodNumber>;
848
1165
  }, z.core.$loose>>;
849
1166
  audio: z.ZodOptional<z.ZodUnknown>;
850
1167
  prompt: z.ZodOptional<z.ZodUnknown>;
@@ -896,11 +1213,11 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
896
1213
  }>>;
897
1214
  seed: z.ZodOptional<z.ZodNumber>;
898
1215
  count: z.ZodOptional<z.ZodNumber>;
899
- outputFormat: z.ZodOptional<z.ZodEnum<{
1216
+ outputFormat: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
900
1217
  png: "png";
901
1218
  jpeg: "jpeg";
902
1219
  webp: "webp";
903
- }>>;
1220
+ }>, z.ZodString]>>;
904
1221
  scaleFactor: z.ZodOptional<z.ZodNumber>;
905
1222
  safetySettings: z.ZodOptional<z.ZodArray<z.ZodObject<{
906
1223
  category: z.ZodString;
@@ -914,6 +1231,20 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
914
1231
  faceEnhancementCreativity: z.ZodOptional<z.ZodNumber>;
915
1232
  faceEnhancementStrength: z.ZodOptional<z.ZodNumber>;
916
1233
  }, z.core.$loose>>;
1234
+ points: z.ZodOptional<z.ZodArray<z.ZodObject<{
1235
+ x: z.ZodNumber;
1236
+ y: z.ZodNumber;
1237
+ label: z.ZodOptional<z.ZodEnum<{
1238
+ foreground: "foreground";
1239
+ background: "background";
1240
+ }>>;
1241
+ }, z.core.$loose>>>;
1242
+ boxes: z.ZodOptional<z.ZodArray<z.ZodObject<{
1243
+ xMin: z.ZodNumber;
1244
+ yMin: z.ZodNumber;
1245
+ xMax: z.ZodNumber;
1246
+ yMax: z.ZodNumber;
1247
+ }, z.core.$loose>>>;
917
1248
  firstFrame: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
918
1249
  url: z.ZodString;
919
1250
  label: z.ZodOptional<z.ZodString>;
@@ -994,6 +1325,10 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
994
1325
  }>>;
995
1326
  watermark: z.ZodOptional<z.ZodBoolean>;
996
1327
  safetyChecker: z.ZodOptional<z.ZodBoolean>;
1328
+ insertWindow: z.ZodOptional<z.ZodObject<{
1329
+ startSeconds: z.ZodNumber;
1330
+ resumeSeconds: z.ZodNumber;
1331
+ }, z.core.$loose>>;
997
1332
  taskType: z.ZodOptional<z.ZodEnum<{
998
1333
  reference: "reference";
999
1334
  edit: "edit";
@@ -1004,6 +1339,9 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
1004
1339
  pro: "pro";
1005
1340
  }>>;
1006
1341
  instrumental: z.ZodOptional<z.ZodBoolean>;
1342
+ lyrics: z.ZodOptional<z.ZodString>;
1343
+ voice: z.ZodOptional<z.ZodString>;
1344
+ language: z.ZodOptional<z.ZodString>;
1007
1345
  }, z.core.$loose>;
1008
1346
  providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodType<ProviderOptionValue, unknown, z.core.$ZodTypeInternals<ProviderOptionValue, unknown>>>>>;
1009
1347
  usage: z.ZodObject<{
@@ -1135,6 +1473,14 @@ interface AdapterContext {
1135
1473
  call: CallContext;
1136
1474
  warnings: Warning[];
1137
1475
  }
1476
+ /** A dubbed video is a provider job the client waits on; dubbed audio arrives in one call. */
1477
+ type DubbingOutcome = {
1478
+ kind: "video";
1479
+ job: VideoJob;
1480
+ } | {
1481
+ kind: "audio";
1482
+ result: AudioResult;
1483
+ };
1138
1484
  /**
1139
1485
  * One adapter per provider API. The request the adapter receives has already
1140
1486
  * passed resolveOptions: every option is inside the catalog constraints and the
@@ -1147,6 +1493,11 @@ interface Adapter {
1147
1493
  /** Reconnect to a job `generateVideo` submitted earlier; never submits. */
1148
1494
  resumeVideo?(req: VideoRequest, jobId: string, ctx: AdapterContext): VideoJob;
1149
1495
  generateAudio?(req: AudioRequest, ctx: AdapterContext): Promise<AudioResult>;
1496
+ generateSpeech?(req: SpeechRequest, ctx: AdapterContext): Promise<AudioResult>;
1497
+ changeVoice?(req: VoiceChangeRequest, ctx: AdapterContext): Promise<AudioResult>;
1498
+ lipsync?(req: LipsyncRequest, ctx: AdapterContext): Promise<VideoJob>;
1499
+ dub?(req: DubbingRequest, ctx: AdapterContext): Promise<DubbingOutcome>;
1500
+ transcribe?(req: TranscriptionRequest, ctx: AdapterContext): Promise<TranscriptionResult>;
1150
1501
  /** Video tools run as provider jobs the caller tracks; see ModelKit.submitVideoTool. */
1151
1502
  submitVideoTool?(req: VideoToolRequest, ctx: AdapterContext, opts: {
1152
1503
  webhookUrl?: string;
@@ -1245,6 +1596,17 @@ declare function resolveImageOptions(model: CatalogModel, request: ImageRequest,
1245
1596
  declare function resolveVideoOptions(model: CatalogModel, request: VideoRequest, onUnsupported?: OnUnsupported): ResolveResult<VideoRequest>;
1246
1597
  declare function resolveAudioOptions(model: CatalogModel, request: AudioRequest, onUnsupported?: OnUnsupported): ResolveResult<AudioRequest>;
1247
1598
 
1599
+ /** `generateSpeech` on a `speech` row. */
1600
+ declare function resolveSpeechOptions(model: CatalogModel, request: SpeechRequest, onUnsupported?: OnUnsupported): ResolveResult<SpeechRequest>;
1601
+ /** `changeVoice` on a `voice-change` row. */
1602
+ declare function resolveVoiceChangeOptions(model: CatalogModel, request: VoiceChangeRequest, onUnsupported?: OnUnsupported): ResolveResult<VoiceChangeRequest>;
1603
+ /** `lipsync` on a `lipsync` row: the face input is the one its `requires` names. */
1604
+ declare function resolveLipsyncOptions(model: CatalogModel, request: LipsyncRequest, onUnsupported?: OnUnsupported): ResolveResult<LipsyncRequest>;
1605
+ /** `dub` on a `dubbing` row: one source, a target language the row lists. */
1606
+ declare function resolveDubbingOptions(model: CatalogModel, request: DubbingRequest, onUnsupported?: OnUnsupported): ResolveResult<DubbingRequest>;
1607
+ /** `transcribe` on a `transcription` row. */
1608
+ declare function resolveTranscriptionOptions(model: CatalogModel, request: TranscriptionRequest, onUnsupported?: OnUnsupported): ResolveResult<TranscriptionRequest>;
1609
+
1248
1610
  /** Which key names an adapter needs. All of them must be set on a tier for that tier to win. */
1249
1611
  declare const ADAPTER_KEYS: Record<AdapterId, ProviderKeyName[]>;
1250
1612
  /** The required names the given non-pro tier is missing. */
@@ -1284,6 +1646,27 @@ declare function pollUntil<T>(check: () => Promise<T | undefined>, opts: {
1284
1646
  maxIntervalMs?: number;
1285
1647
  }): Promise<T>;
1286
1648
 
1649
+ /** `lipsync` and a video `dub` wait on a provider job; `wait` tunes that wait. */
1650
+ interface MediaJobCallContext extends CallContext {
1651
+ wait?: {
1652
+ pollIntervalMs?: number;
1653
+ timeoutMs?: number;
1654
+ };
1655
+ }
1656
+ /** The single-purpose audio and lipsync node methods of the kit. */
1657
+ interface AudioNodeMethods {
1658
+ /** Text to speech on a `speech` row. Blocks until the provider returns the audio. */
1659
+ generateSpeech(req: SpeechRequest, call?: CallContext): Promise<AudioResult>;
1660
+ /** Re-speaks a recording in another voice on a `voice-change` row. */
1661
+ changeVoice(req: VoiceChangeRequest, call?: CallContext): Promise<AudioResult>;
1662
+ /** Drives a face (`sourceVideo` or `image`) with speech on a `lipsync` row. */
1663
+ lipsync(req: LipsyncRequest, call?: MediaJobCallContext): Promise<LipsyncResult>;
1664
+ /** Speech to text on a `transcription` row; `timestamps` adds SRT `subtitles`. */
1665
+ transcribe(req: TranscriptionRequest, call?: CallContext): Promise<TranscriptionResult>;
1666
+ /** Dubs a video or an audio file into `targetLanguage`; the result is the same kind. */
1667
+ dub(req: DubbingRequest, call?: MediaJobCallContext): Promise<DubbingResult>;
1668
+ }
1669
+
1287
1670
  /**
1288
1671
  * The AI SDK `LanguageModel` type. A string is a catalog id or alias; a provider
1289
1672
  * instance (`openai("gpt-4o")`) runs through the SDK unchanged, with usage
@@ -1340,7 +1723,7 @@ type StreamTextCallOptions<TOOLS extends ToolSet, OUTPUT extends Output.Output =
1340
1723
  /** @deprecated Use `prepareStep`; accepted for parity with `generateText`. */
1341
1724
  experimental_prepareStep?: Parameters<typeof streamText$1<TOOLS, OUTPUT>>[0]["prepareStep"];
1342
1725
  };
1343
- interface ModelKit extends TextMethods {
1726
+ interface ModelKit extends TextMethods, AudioNodeMethods {
1344
1727
  catalog: Catalog;
1345
1728
  /**
1346
1729
  * Generate one or more images. Blocks until the provider returns bytes.
@@ -1362,7 +1745,11 @@ interface ModelKit extends TextMethods {
1362
1745
  languageModel(modelId: string, call?: CallContext): LanguageModelHandle;
1363
1746
  /** Usage-event `provider` for a catalog model, without building it: "bedrock" on Bedrock, else the vendor. */
1364
1747
  usageProvider(modelId: string, call?: CallContext): string;
1365
- /** Generate music or a soundtrack. Blocks until the provider returns audio. */
1748
+ /**
1749
+ * Generate music (`audio`) or a sound effect (`sound-effect`). Blocks until the provider
1750
+ * returns audio. Speech, voice change, lipsync, dubbing and transcription have their own
1751
+ * methods (AudioNodeMethods).
1752
+ */
1366
1753
  generateAudio(req: AudioRequest, call?: CallContext): Promise<AudioResult>;
1367
1754
  /**
1368
1755
  * Stream text. Mirrors `TextMethods.streamText` and also accepts the
@@ -1499,4 +1886,4 @@ declare function describeThrown(cause: unknown): ThrownErrorInfo;
1499
1886
  /** Add the AI SDK `GeneratedFile` accessors to adapter image bytes. base64 is computed on first read. */
1500
1887
  declare function toGeneratedImage(image: ImageBytes): GeneratedImage;
1501
1888
 
1502
- export { ADAPTER_IDS, ADAPTER_KEYS, ARRAY_INPUT_SPEC_KEYS, AUDIO_INPUT_SPEC_KEYS, type Adapter, type AdapterContext, type AdapterEndpoints, type AdapterId, type AdapterRegistry, type AiTextProviderOptions, type ArrayInputSpecKey, type AspectRatio, type AudioOutput, type AudioRequest, type AudioResult, type CallContext, Catalog, type CatalogAuth, type CatalogCache, type CatalogCapabilities, type CatalogDisplay, type CatalogEnvelope, type CatalogModel, CatalogModelSchema, CatalogModelSchemaBase, type CatalogOrigin, CatalogSchema, type CatalogSource, type CatalogTextModel, DEFAULT_ADAPTERS, type DataOnlyRow, type DataOnlyVerdict, type DefaultObjectOutput, type Exposure, ExposureSchema, type FalWebhookBody, type GeneratedImage, IMAGE_INPUT_SPEC_KEYS, INPUT_SPEC_SUPPORTS_KEYS, type ImageBytes, type ImageCallOptions, type ImageCallResult, type ImageQuality, type ImageRequest, type ImageResult, type ImageSafetySetting, type ImageSize, type InputSpec, type InputSpecDimensions, type InputSpecIssue, type InputSpecKey, InputSpecSchema, type JsonObject, JsonObjectSchema, type JsonPrimitive, type JsonValue, JsonValueSchema, type KeyTier, type LanguageModelHandle, type Lifecycle, type LiveCatalogState, MODELS, type MediaPart, type MediaRef, type ModelConstraints, type ModelKit, type ModelKitConfig, ModelKitError, type ModelKitErrorCode, type ModelKitErrorInit, type ModelType, type ModelkitGenerateObjectOptions, type ModelkitGenerateTextOptions, type ModelkitStreamObjectOptions, type ModelkitStreamTextOptions, type ObjectOutput, type ObjectResult, type OnUnsupported, type OutputFormat, type PricingKind, type PrimeCatalogResult, type PromptConventions, type ProviderErrorBody, type ProviderKeyName, type ProviderKeys, type ProviderOptionValue, type ProviderOptions, type QuarantineResult, type ReferenceLimits, type ReferenceSyntax, type RequiredInput, type RequiredKeyName, type ResolveResult, type Routing, SURFACES, type SupportedOption, type Surface, SurfaceSchema, type TextMethods, type TextModelInstance, type UpscaleOptions, type UsageEvent, type UsageModality, type UsageUnit, VIDEO_INPUT_SPEC_KEYS, VIDEO_TOOL_MODELS, type VideoCallJob, type VideoCallOptions, type VideoJob, type VideoModel, type VideoRequest, type VideoResolution, type VideoResult, type VideoSecondsLimits, type VideoToolCallContext, type VideoToolConstraints, type VideoToolKind, type VideoToolOutputFormat, type VideoToolOutputSpec, type VideoToolPlan, type VideoToolRequest, type VideoToolResult, type VideoToolSource, type VideoToolStatus, type VideoToolSubmission, type Warning, adapterServesType, aiSdkTextAdapter, arkAdapter, aspectRatioToSize, classifyHttpError, compareCatalogOrder, createDefaultModelKit, createModelKit, dataOnlyCapable, describe, describeThrown, generateImage as experimental_generateImage, falAdapter, falWebhookBodySchema, fileCatalogCache, generateAudio, generateImage, generateObject, generateText, generateVideo, googleGenaiAdapter, googleImageAdapter, hasAwsCredentials, higgsfieldAdapter, isArrayInputSpecKey, isInputSpecKey, isListed, isListedOn, isModelKitError, keysFromEnv, languageModel, liveCatalog, liveState, mergeTextProviderOptions, missingTierKeys, nearestAspectRatio, normalizeExposure, openaiImageAdapter, passthroughTextModel, planVideoTool, pollUntil, prepareMediaPart, primeCatalog, prodiaAdapter, readErrorBody, replicateAdapter, resetLiveCatalog, resolutionTier, resolveAudioOptions, resolveImageOptions, resolveKeys, resolveVideoOptions, shouldRetry, sleep, sortCatalogRows, streamObject, streamText, textUsageEvent, toGeneratedImage, validateInputSpec, videoLengthViolation, videoToolConstraints, withRetry, xaiVideoAdapter };
1889
+ export { ADAPTER_IDS, ADAPTER_KEYS, ARRAY_INPUT_SPEC_KEYS, AUDIO_INPUT_SPEC_KEYS, type Adapter, type AdapterContext, type AdapterEndpoints, type AdapterId, type AdapterRegistry, type AiTextProviderOptions, type ArrayInputSpecKey, type AspectRatio, type AudioNodeMethods, type AudioOutput, type AudioRequest, type AudioResult, type CallContext, Catalog, type CatalogAuth, type CatalogCache, type CatalogCapabilities, type CatalogDisplay, type CatalogEnvelope, type CatalogModel, CatalogModelSchema, CatalogModelSchemaBase, type CatalogOrigin, CatalogSchema, type CatalogSource, type CatalogTextModel, DEFAULT_ADAPTERS, type DataOnlyRow, type DataOnlyVerdict, type DefaultObjectOutput, type DubbingOutcome, type DubbingRequest, type DubbingResult, type Exposure, ExposureSchema, type FalWebhookBody, type GeneratedImage, IMAGE_INPUT_SPEC_KEYS, INPUT_SPEC_SUPPORTS_KEYS, type ImageBytes, type ImageCallOptions, type ImageCallResult, type ImageQuality, type ImageRequest, type ImageResult, type ImageSafetySetting, type ImageSize, type InputSpec, type InputSpecDimensions, type InputSpecIssue, type InputSpecKey, InputSpecSchema, type JsonObject, JsonObjectSchema, type JsonPrimitive, type JsonValue, JsonValueSchema, type KeyTier, type LanguageModelHandle, type LanguageOption, type Lifecycle, type LipsyncRequest, type LipsyncResult, type LiveCatalogState, MODELS, type MaskBox, type MaskPoint, type MediaJobCallContext, type MediaNodeDefaults, type MediaOutput, type MediaPart, type MediaRef, type ModelConstraints, type ModelKit, type ModelKitConfig, ModelKitError, type ModelKitErrorCode, type ModelKitErrorInit, type ModelType, type ModelkitGenerateObjectOptions, type ModelkitGenerateTextOptions, type ModelkitStreamObjectOptions, type ModelkitStreamTextOptions, type ObjectOutput, type ObjectResult, type OnUnsupported, type OutputFormat, type PricingKind, type PrimeCatalogResult, type PromptConventions, type ProviderErrorBody, type ProviderKeyName, type ProviderKeys, type ProviderOptionValue, type ProviderOptions, type QuarantineResult, type ReferenceLimits, type ReferenceSyntax, type RequiredInput, type RequiredKeyName, type ResolveResult, type Routing, SURFACES, type SpeechRequest, type SubtitleOptions, type SubtitleTextStyle, type SupportedOption, type Surface, SurfaceSchema, type TextMethods, type TextModelInstance, type TranscriptWord, type TranscriptionRequest, type TranscriptionResult, type UpscaleOptions, type UsageEvent, type UsageModality, type UsageUnit, VIDEO_INPUT_SPEC_KEYS, VIDEO_TOOL_MODELS, type VideoCallJob, type VideoCallOptions, type VideoJob, type VideoModel, type VideoRequest, type VideoResolution, VideoResolutionSchema, type VideoResult, type VideoSecondsLimits, type VideoToolCallContext, type VideoToolConstraints, type VideoToolKind, type VideoToolOutputFormat, type VideoToolOutputSpec, type VideoToolPlan, type VideoToolRequest, type VideoToolResult, type VideoToolSource, type VideoToolStatus, type VideoToolSubmission, type VoiceChangeRequest, type VoiceGender, type VoiceOption, type Warning, adapterServesType, aiSdkTextAdapter, arkAdapter, aspectRatioToSize, classifyHttpError, compareCatalogOrder, createDefaultModelKit, createModelKit, dataOnlyCapable, describe, describeThrown, generateImage as experimental_generateImage, falAdapter, falWebhookBodySchema, fileCatalogCache, generateAudio, generateImage, generateObject, generateText, generateVideo, googleGenaiAdapter, googleImageAdapter, hasAwsCredentials, higgsfieldAdapter, isArrayInputSpecKey, isInputSpecKey, isListed, isListedOn, isModelKitError, keysFromEnv, languageModel, liveCatalog, liveState, mergeTextProviderOptions, missingTierKeys, nearestAspectRatio, normalizeExposure, openaiImageAdapter, passthroughTextModel, planVideoTool, pollUntil, prepareMediaPart, primeCatalog, prodiaAdapter, readErrorBody, replicateAdapter, resetLiveCatalog, resolutionTier, resolveAudioOptions, resolveDubbingOptions, resolveImageOptions, resolveKeys, resolveLipsyncOptions, resolveSpeechOptions, resolveTranscriptionOptions, resolveVideoOptions, resolveVoiceChangeOptions, shouldRetry, sleep, sortCatalogRows, streamObject, streamText, textUsageEvent, toGeneratedImage, validateInputSpec, videoLengthViolation, videoToolConstraints, withRetry, xaiVideoAdapter };