@shop-os/modelkit 0.8.0 → 0.9.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
@@ -72,6 +72,10 @@ type ModelType = "text" | "image" | "video" | "audio"
72
72
  | "lipsync"
73
73
  /** Speech to text (`transcribe`). */
74
74
  | "transcription"
75
+ /** A reusable voice cloned from recordings (`createVoice`); its id feeds `SpeechRequest.customVoice`. */
76
+ | "voice-clone"
77
+ /** Candidate voices from a description (`designVoice`); keep one with `createVoice`. */
78
+ | "voice-design"
75
79
  /** A prompt and/or photos of an object in, a GLB 3D model out. */
76
80
  | "model3d";
77
81
  /**
@@ -136,7 +140,7 @@ type Lifecycle = "active" | "deprecated" | "retired";
136
140
  type Surface = "cowork" | "space_builder";
137
141
  /** @deprecated use Surface[] */
138
142
  type Exposure = Surface[];
139
- type AdapterId = "ai-sdk-text" | "google-image" | "openai-image" | "google-genai" | "ark" | "fal" | "replicate" | "prodia" | "higgsfield" | "xai-video" | "luma";
143
+ type AdapterId = "ai-sdk-text" | "google-image" | "openai-image" | "google-genai" | "ark" | "fal" | "replicate" | "prodia" | "higgsfield" | "xai-video" | "luma" | "fish";
140
144
  /** Gemini image safety threshold, per category, sent only when the caller opts in. */
141
145
  type ImageSafetySetting = {
142
146
  category: string;
@@ -430,6 +434,12 @@ interface SpeechRequest {
430
434
  text: string;
431
435
  /** One of `constraints.voices[].id`; the row default when unset. */
432
436
  voice?: string;
437
+ /**
438
+ * Rows with `capabilities.customVoices`: a voice id `createVoice` returned, used instead of
439
+ * `voice`. It belongs to the provider account of the key set that created it, so call with
440
+ * the same `tier`.
441
+ */
442
+ customVoice?: string;
433
443
  /** One of `constraints.languages[].code`; the provider detects it when unset. */
434
444
  language?: string;
435
445
  /** Rows with `supports: style`: how to speak it ("warm and slow"), kept out of the script. */
@@ -438,6 +448,65 @@ interface SpeechRequest {
438
448
  outputFormat?: string;
439
449
  abortSignal?: AbortSignal;
440
450
  }
451
+ /** One recording a voice is cloned from. */
452
+ interface VoiceSample {
453
+ /** Clean, single-speaker speech. Set `durationSeconds` so `constraints.references.audioSeconds` can be checked. */
454
+ audio: MediaRef;
455
+ /** The words spoken in `audio`; the provider transcribes the clip when unset. */
456
+ transcript?: string;
457
+ /** `VoiceCandidate.signature` when `audio` is a `designVoice` candidate. */
458
+ designSignature?: string;
459
+ }
460
+ /** `createVoice` on a `voice-clone` row: a private, reusable voice. */
461
+ interface VoiceCloneRequest {
462
+ model: string;
463
+ /** The voice's name in the provider console. */
464
+ title: string;
465
+ samples: VoiceSample[];
466
+ description?: string;
467
+ /** Provider noise removal and level normalisation before cloning; the provider default (on) when unset. */
468
+ enhance?: boolean;
469
+ abortSignal?: AbortSignal;
470
+ }
471
+ type VoiceCloneState = "created" | "training" | "trained" | "failed";
472
+ interface VoiceCloneResult {
473
+ /** Pass as `SpeechRequest.customVoice` on a row with `capabilities.customVoices`. */
474
+ voiceId: string;
475
+ /** `trained` means usable now; unset when the provider reports a state the kit does not know. */
476
+ state?: VoiceCloneState;
477
+ usage: UsageEvent;
478
+ raw?: JsonValue;
479
+ }
480
+ /** `designVoice` on a `voice-design` row: short candidate voices from a description. */
481
+ interface VoiceDesignRequest {
482
+ model: string;
483
+ /** The voice: age, tone, accent, pacing, context. */
484
+ prompt: string;
485
+ /** A short line every candidate reads, so they can be compared. */
486
+ previewText?: string;
487
+ /** A language hint such as `en`. */
488
+ language?: string;
489
+ /** Candidates to return, within `constraints.voiceDesign.maxCandidates`; the row default when unset. */
490
+ count?: number;
491
+ seed?: number;
492
+ abortSignal?: AbortSignal;
493
+ }
494
+ interface VoiceCandidate {
495
+ audio: MediaOutput;
496
+ durationSeconds: number;
497
+ /** Send with this audio in `VoiceSample.designSignature` to keep the voice. */
498
+ signature: string;
499
+ }
500
+ interface VoiceDesignResult {
501
+ candidates: VoiceCandidate[];
502
+ usage: UsageEvent;
503
+ }
504
+ /** `deleteVoice` on the `voice-clone` row that created the voice, with the same `tier`. */
505
+ interface VoiceDeleteRequest {
506
+ model: string;
507
+ voiceId: string;
508
+ abortSignal?: AbortSignal;
509
+ }
441
510
  /** `changeVoice` on a `voice-change` row: the recording re-spoken in another voice. */
442
511
  interface VoiceChangeRequest {
443
512
  model: string;
@@ -673,6 +742,11 @@ interface ModelConstraints {
673
742
  ratioIgnoredWith?: ("firstFrame" | "sourceVideo")[];
674
743
  /** Speech and voice-change rows: the voices offered; `defaults.voice` is one of their ids. */
675
744
  voices?: VoiceOption[];
745
+ /** `voice-design` rows: how many candidates one call returns at most, and the preview line's length cap. */
746
+ voiceDesign?: {
747
+ maxCandidates: number;
748
+ previewMaxChars: number;
749
+ };
676
750
  /** Speech, transcription and dubbing (target) rows: the languages taken. */
677
751
  languages?: LanguageOption[];
678
752
  /** Audio-output rows whose provider lets the caller pick a file format; `defaults.outputFormat` is one. */
@@ -756,6 +830,8 @@ interface CatalogDisplay {
756
830
  interface CatalogCapabilities {
757
831
  /** Video rows: takes an existing video as the thing to edit or extend. */
758
832
  acceptsSourceVideo?: boolean;
833
+ /** Speech rows: take `SpeechRequest.customVoice`, a voice the same provider cloned. */
834
+ customVoices?: boolean;
759
835
  /**
760
836
  * Video rows: offered for prompt-driven edits of a source clip (`taskType: "edit"`). Absent
761
837
  * means the caller falls back to `acceptsSourceVideo`; `false` opts a row out.
@@ -904,7 +980,7 @@ interface UsageEvent {
904
980
  latencyMs?: number;
905
981
  raw?: unknown;
906
982
  }
907
- type ProviderKeyName = "openai" | "anthropic" | "google" | "xai" | "perplexity" | "deepseek" | "moonshot" | "minimax" | "ark" | "fal" | "replicate" | "prodia" | "higgsfield" | "luma" | "cloudflare";
983
+ type ProviderKeyName = "openai" | "anthropic" | "google" | "xai" | "perplexity" | "deepseek" | "moonshot" | "minimax" | "ark" | "fal" | "replicate" | "prodia" | "higgsfield" | "luma" | "fish" | "cloudflare";
908
984
  type ProviderKeys = Partial<Record<ProviderKeyName, string>> & {
909
985
  /** Higgsfield needs the pair; both switch together. */
910
986
  higgsfieldSecret?: string;
@@ -955,6 +1031,8 @@ interface AdapterEndpoints {
955
1031
  ark?: string;
956
1032
  /** Luma Agents API. Defaults to https://agents.lumalabs.ai. */
957
1033
  luma?: string;
1034
+ /** Fish Audio API. Defaults to https://api.fish.audio. */
1035
+ fish?: string;
958
1036
  }
959
1037
  interface ModelKitConfig {
960
1038
  keys: {
@@ -1055,7 +1133,7 @@ declare function isListed(row: CatalogModel): boolean;
1055
1133
  */
1056
1134
  declare const MODELS: CatalogModel[];
1057
1135
 
1058
- declare const ADAPTER_IDS: readonly ["ai-sdk-text", "google-image", "openai-image", "google-genai", "ark", "fal", "replicate", "prodia", "higgsfield", "xai-video", "luma"];
1136
+ declare const ADAPTER_IDS: readonly ["ai-sdk-text", "google-image", "openai-image", "google-genai", "ark", "fal", "replicate", "prodia", "higgsfield", "xai-video", "luma", "fish"];
1059
1137
  declare const SurfaceSchema: z.ZodEnum<{
1060
1138
  cowork: "cowork";
1061
1139
  space_builder: "space_builder";
@@ -1090,6 +1168,8 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
1090
1168
  dubbing: "dubbing";
1091
1169
  lipsync: "lipsync";
1092
1170
  transcription: "transcription";
1171
+ "voice-clone": "voice-clone";
1172
+ "voice-design": "voice-design";
1093
1173
  model3d: "model3d";
1094
1174
  }>;
1095
1175
  adapter: z.ZodEnum<{
@@ -1104,6 +1184,7 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
1104
1184
  higgsfield: "higgsfield";
1105
1185
  "xai-video": "xai-video";
1106
1186
  luma: "luma";
1187
+ fish: "fish";
1107
1188
  }>;
1108
1189
  providerModelId: z.ZodString;
1109
1190
  lifecycle: z.ZodEnum<{
@@ -1237,6 +1318,10 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
1237
1318
  description: z.ZodOptional<z.ZodString>;
1238
1319
  previewUrl: z.ZodOptional<z.ZodURL>;
1239
1320
  }, z.core.$loose>>>;
1321
+ voiceDesign: z.ZodOptional<z.ZodObject<{
1322
+ maxCandidates: z.ZodNumber;
1323
+ previewMaxChars: z.ZodNumber;
1324
+ }, z.core.$strip>>;
1240
1325
  languages: z.ZodOptional<z.ZodArray<z.ZodObject<{
1241
1326
  code: z.ZodString;
1242
1327
  name: z.ZodString;
@@ -1541,6 +1626,7 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
1541
1626
  }, z.core.$loose>>;
1542
1627
  capabilities: z.ZodOptional<z.ZodObject<{
1543
1628
  acceptsSourceVideo: z.ZodOptional<z.ZodBoolean>;
1629
+ customVoices: z.ZodOptional<z.ZodBoolean>;
1544
1630
  videoEdit: z.ZodOptional<z.ZodBoolean>;
1545
1631
  framesExcludeReferences: z.ZodOptional<z.ZodBoolean>;
1546
1632
  sourceVideoExcludesFrames: z.ZodOptional<z.ZodBoolean>;
@@ -1664,6 +1750,9 @@ interface Adapter {
1664
1750
  lipsync?(req: LipsyncRequest, ctx: AdapterContext): Promise<VideoJob>;
1665
1751
  dub?(req: DubbingRequest, ctx: AdapterContext): Promise<DubbingOutcome>;
1666
1752
  transcribe?(req: TranscriptionRequest, ctx: AdapterContext): Promise<TranscriptionResult>;
1753
+ createVoice?(req: VoiceCloneRequest, ctx: AdapterContext): Promise<VoiceCloneResult>;
1754
+ designVoice?(req: VoiceDesignRequest, ctx: AdapterContext): Promise<VoiceDesignResult>;
1755
+ deleteVoice?(req: VoiceDeleteRequest, ctx: AdapterContext): Promise<void>;
1667
1756
  /** Video tools run as provider jobs the caller tracks; see ModelKit.submitVideoTool. */
1668
1757
  submitVideoTool?(req: VideoToolRequest, ctx: AdapterContext, opts: {
1669
1758
  webhookUrl?: string;
@@ -1789,6 +1878,11 @@ declare function resolveDubbingOptions(model: CatalogModel, request: DubbingRequ
1789
1878
  /** `transcribe` on a `transcription` row. */
1790
1879
  declare function resolveTranscriptionOptions(model: CatalogModel, request: TranscriptionRequest, onUnsupported?: OnUnsupported): ResolveResult<TranscriptionRequest>;
1791
1880
 
1881
+ /** `createVoice` on a `voice-clone` row. */
1882
+ declare function resolveVoiceCloneOptions(model: CatalogModel, request: VoiceCloneRequest): ResolveResult<VoiceCloneRequest>;
1883
+ /** `designVoice` on a `voice-design` row; a count over the row cap is clamped when coercing. */
1884
+ declare function resolveVoiceDesignOptions(model: CatalogModel, request: VoiceDesignRequest, onUnsupported?: OnUnsupported): ResolveResult<VoiceDesignRequest>;
1885
+
1792
1886
  /** Which key names an adapter needs. All of them must be set on a tier for that tier to win. */
1793
1887
  declare const ADAPTER_KEYS: Record<AdapterId, ProviderKeyName[]>;
1794
1888
  /** The required names the given non-pro tier is missing. */
@@ -1847,6 +1941,16 @@ interface AudioNodeMethods {
1847
1941
  transcribe(req: TranscriptionRequest, call?: CallContext): Promise<TranscriptionResult>;
1848
1942
  /** Dubs a video or an audio file into `targetLanguage`; the result is the same kind. */
1849
1943
  dub(req: DubbingRequest, call?: MediaJobCallContext): Promise<DubbingResult>;
1944
+ /**
1945
+ * Clones a private voice from recordings on a `voice-clone` row. The voice lives in the
1946
+ * provider account of the call's key set (`tier`); speak with it through
1947
+ * `generateSpeech({ customVoice })` on the same tier.
1948
+ */
1949
+ createVoice(req: VoiceCloneRequest, call?: CallContext): Promise<VoiceCloneResult>;
1950
+ /** Candidate voices from a description on a `voice-design` row; keep one with `createVoice`. */
1951
+ designVoice(req: VoiceDesignRequest, call?: CallContext): Promise<VoiceDesignResult>;
1952
+ /** Deletes a voice `createVoice` made, on the same row and tier. A voice this key set does not have is `provider_rejected` (404). */
1953
+ deleteVoice(req: VoiceDeleteRequest, call?: CallContext): Promise<void>;
1850
1954
  }
1851
1955
 
1852
1956
  /**
@@ -1992,6 +2096,8 @@ declare const arkAdapter: Adapter;
1992
2096
 
1993
2097
  declare const falAdapter: Adapter;
1994
2098
 
2099
+ declare const fishAdapter: Adapter;
2100
+
1995
2101
  declare const googleGenaiAdapter: Adapter;
1996
2102
 
1997
2103
  declare const googleImageAdapter: Adapter;
@@ -2151,4 +2257,4 @@ declare function describeThrown(cause: unknown): ThrownErrorInfo;
2151
2257
  /** Add the AI SDK `GeneratedFile` accessors to adapter image bytes. base64 is computed on first read. */
2152
2258
  declare function toGeneratedImage(image: ImageBytes): GeneratedImage;
2153
2259
 
2154
- 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, MODEL3D_IMAGE_SLOTS, MODEL3D_MODELS, MODELS, type MaskBox, type MaskPoint, type MediaJobCallContext, type MediaNodeDefaults, type MediaOutput, type MediaPart, type MediaRef, type Model3dCall, type Model3dConstraints, type Model3dEndpoints, type Model3dFamily, type Model3dInputRefusal, type Model3dPricedInputs, type Model3dPricedOptions, type Model3dRequest, type Model3dResult, type Model3dStatus, type Model3dSubmission, type Model3dTexture, type Model3dViews, type Model3dWired, 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, lumaAdapter, lumaReframeTooTall, mergeTextProviderOptions, missingTierKeys, model3dCall, model3dConstraints, model3dInputRefusal, model3dPricingSku, model3dResolution, model3dSeedFits, model3dSkus, model3dTexture, 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, takesTargetAspectRatio, textUsageEvent, toGeneratedImage, validateInputSpec, videoLengthViolation, videoToolConstraints, withRetry, xaiVideoAdapter };
2260
+ 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, MODEL3D_IMAGE_SLOTS, MODEL3D_MODELS, MODELS, type MaskBox, type MaskPoint, type MediaJobCallContext, type MediaNodeDefaults, type MediaOutput, type MediaPart, type MediaRef, type Model3dCall, type Model3dConstraints, type Model3dEndpoints, type Model3dFamily, type Model3dInputRefusal, type Model3dPricedInputs, type Model3dPricedOptions, type Model3dRequest, type Model3dResult, type Model3dStatus, type Model3dSubmission, type Model3dTexture, type Model3dViews, type Model3dWired, 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 VoiceCandidate, type VoiceChangeRequest, type VoiceCloneRequest, type VoiceCloneResult, type VoiceCloneState, type VoiceDeleteRequest, type VoiceDesignRequest, type VoiceDesignResult, type VoiceGender, type VoiceOption, type VoiceSample, type Warning, adapterServesType, aiSdkTextAdapter, arkAdapter, aspectRatioToSize, classifyHttpError, compareCatalogOrder, createDefaultModelKit, createModelKit, dataOnlyCapable, describe, describeThrown, generateImage as experimental_generateImage, falAdapter, falWebhookBodySchema, fileCatalogCache, fishAdapter, generateAudio, generateImage, generateObject, generateText, generateVideo, googleGenaiAdapter, googleImageAdapter, hasAwsCredentials, higgsfieldAdapter, isArrayInputSpecKey, isInputSpecKey, isListed, isListedOn, isModelKitError, keysFromEnv, languageModel, liveCatalog, liveState, lumaAdapter, lumaReframeTooTall, mergeTextProviderOptions, missingTierKeys, model3dCall, model3dConstraints, model3dInputRefusal, model3dPricingSku, model3dResolution, model3dSeedFits, model3dSkus, model3dTexture, nearestAspectRatio, normalizeExposure, openaiImageAdapter, passthroughTextModel, planVideoTool, pollUntil, prepareMediaPart, primeCatalog, prodiaAdapter, readErrorBody, replicateAdapter, resetLiveCatalog, resolutionTier, resolveAudioOptions, resolveDubbingOptions, resolveImageOptions, resolveKeys, resolveLipsyncOptions, resolveSpeechOptions, resolveTranscriptionOptions, resolveVideoOptions, resolveVoiceChangeOptions, resolveVoiceCloneOptions, resolveVoiceDesignOptions, shouldRetry, sleep, sortCatalogRows, streamObject, streamText, takesTargetAspectRatio, textUsageEvent, toGeneratedImage, validateInputSpec, videoLengthViolation, videoToolConstraints, withRetry, xaiVideoAdapter };
package/dist/index.d.ts CHANGED
@@ -72,6 +72,10 @@ type ModelType = "text" | "image" | "video" | "audio"
72
72
  | "lipsync"
73
73
  /** Speech to text (`transcribe`). */
74
74
  | "transcription"
75
+ /** A reusable voice cloned from recordings (`createVoice`); its id feeds `SpeechRequest.customVoice`. */
76
+ | "voice-clone"
77
+ /** Candidate voices from a description (`designVoice`); keep one with `createVoice`. */
78
+ | "voice-design"
75
79
  /** A prompt and/or photos of an object in, a GLB 3D model out. */
76
80
  | "model3d";
77
81
  /**
@@ -136,7 +140,7 @@ type Lifecycle = "active" | "deprecated" | "retired";
136
140
  type Surface = "cowork" | "space_builder";
137
141
  /** @deprecated use Surface[] */
138
142
  type Exposure = Surface[];
139
- type AdapterId = "ai-sdk-text" | "google-image" | "openai-image" | "google-genai" | "ark" | "fal" | "replicate" | "prodia" | "higgsfield" | "xai-video" | "luma";
143
+ type AdapterId = "ai-sdk-text" | "google-image" | "openai-image" | "google-genai" | "ark" | "fal" | "replicate" | "prodia" | "higgsfield" | "xai-video" | "luma" | "fish";
140
144
  /** Gemini image safety threshold, per category, sent only when the caller opts in. */
141
145
  type ImageSafetySetting = {
142
146
  category: string;
@@ -430,6 +434,12 @@ interface SpeechRequest {
430
434
  text: string;
431
435
  /** One of `constraints.voices[].id`; the row default when unset. */
432
436
  voice?: string;
437
+ /**
438
+ * Rows with `capabilities.customVoices`: a voice id `createVoice` returned, used instead of
439
+ * `voice`. It belongs to the provider account of the key set that created it, so call with
440
+ * the same `tier`.
441
+ */
442
+ customVoice?: string;
433
443
  /** One of `constraints.languages[].code`; the provider detects it when unset. */
434
444
  language?: string;
435
445
  /** Rows with `supports: style`: how to speak it ("warm and slow"), kept out of the script. */
@@ -438,6 +448,65 @@ interface SpeechRequest {
438
448
  outputFormat?: string;
439
449
  abortSignal?: AbortSignal;
440
450
  }
451
+ /** One recording a voice is cloned from. */
452
+ interface VoiceSample {
453
+ /** Clean, single-speaker speech. Set `durationSeconds` so `constraints.references.audioSeconds` can be checked. */
454
+ audio: MediaRef;
455
+ /** The words spoken in `audio`; the provider transcribes the clip when unset. */
456
+ transcript?: string;
457
+ /** `VoiceCandidate.signature` when `audio` is a `designVoice` candidate. */
458
+ designSignature?: string;
459
+ }
460
+ /** `createVoice` on a `voice-clone` row: a private, reusable voice. */
461
+ interface VoiceCloneRequest {
462
+ model: string;
463
+ /** The voice's name in the provider console. */
464
+ title: string;
465
+ samples: VoiceSample[];
466
+ description?: string;
467
+ /** Provider noise removal and level normalisation before cloning; the provider default (on) when unset. */
468
+ enhance?: boolean;
469
+ abortSignal?: AbortSignal;
470
+ }
471
+ type VoiceCloneState = "created" | "training" | "trained" | "failed";
472
+ interface VoiceCloneResult {
473
+ /** Pass as `SpeechRequest.customVoice` on a row with `capabilities.customVoices`. */
474
+ voiceId: string;
475
+ /** `trained` means usable now; unset when the provider reports a state the kit does not know. */
476
+ state?: VoiceCloneState;
477
+ usage: UsageEvent;
478
+ raw?: JsonValue;
479
+ }
480
+ /** `designVoice` on a `voice-design` row: short candidate voices from a description. */
481
+ interface VoiceDesignRequest {
482
+ model: string;
483
+ /** The voice: age, tone, accent, pacing, context. */
484
+ prompt: string;
485
+ /** A short line every candidate reads, so they can be compared. */
486
+ previewText?: string;
487
+ /** A language hint such as `en`. */
488
+ language?: string;
489
+ /** Candidates to return, within `constraints.voiceDesign.maxCandidates`; the row default when unset. */
490
+ count?: number;
491
+ seed?: number;
492
+ abortSignal?: AbortSignal;
493
+ }
494
+ interface VoiceCandidate {
495
+ audio: MediaOutput;
496
+ durationSeconds: number;
497
+ /** Send with this audio in `VoiceSample.designSignature` to keep the voice. */
498
+ signature: string;
499
+ }
500
+ interface VoiceDesignResult {
501
+ candidates: VoiceCandidate[];
502
+ usage: UsageEvent;
503
+ }
504
+ /** `deleteVoice` on the `voice-clone` row that created the voice, with the same `tier`. */
505
+ interface VoiceDeleteRequest {
506
+ model: string;
507
+ voiceId: string;
508
+ abortSignal?: AbortSignal;
509
+ }
441
510
  /** `changeVoice` on a `voice-change` row: the recording re-spoken in another voice. */
442
511
  interface VoiceChangeRequest {
443
512
  model: string;
@@ -673,6 +742,11 @@ interface ModelConstraints {
673
742
  ratioIgnoredWith?: ("firstFrame" | "sourceVideo")[];
674
743
  /** Speech and voice-change rows: the voices offered; `defaults.voice` is one of their ids. */
675
744
  voices?: VoiceOption[];
745
+ /** `voice-design` rows: how many candidates one call returns at most, and the preview line's length cap. */
746
+ voiceDesign?: {
747
+ maxCandidates: number;
748
+ previewMaxChars: number;
749
+ };
676
750
  /** Speech, transcription and dubbing (target) rows: the languages taken. */
677
751
  languages?: LanguageOption[];
678
752
  /** Audio-output rows whose provider lets the caller pick a file format; `defaults.outputFormat` is one. */
@@ -756,6 +830,8 @@ interface CatalogDisplay {
756
830
  interface CatalogCapabilities {
757
831
  /** Video rows: takes an existing video as the thing to edit or extend. */
758
832
  acceptsSourceVideo?: boolean;
833
+ /** Speech rows: take `SpeechRequest.customVoice`, a voice the same provider cloned. */
834
+ customVoices?: boolean;
759
835
  /**
760
836
  * Video rows: offered for prompt-driven edits of a source clip (`taskType: "edit"`). Absent
761
837
  * means the caller falls back to `acceptsSourceVideo`; `false` opts a row out.
@@ -904,7 +980,7 @@ interface UsageEvent {
904
980
  latencyMs?: number;
905
981
  raw?: unknown;
906
982
  }
907
- type ProviderKeyName = "openai" | "anthropic" | "google" | "xai" | "perplexity" | "deepseek" | "moonshot" | "minimax" | "ark" | "fal" | "replicate" | "prodia" | "higgsfield" | "luma" | "cloudflare";
983
+ type ProviderKeyName = "openai" | "anthropic" | "google" | "xai" | "perplexity" | "deepseek" | "moonshot" | "minimax" | "ark" | "fal" | "replicate" | "prodia" | "higgsfield" | "luma" | "fish" | "cloudflare";
908
984
  type ProviderKeys = Partial<Record<ProviderKeyName, string>> & {
909
985
  /** Higgsfield needs the pair; both switch together. */
910
986
  higgsfieldSecret?: string;
@@ -955,6 +1031,8 @@ interface AdapterEndpoints {
955
1031
  ark?: string;
956
1032
  /** Luma Agents API. Defaults to https://agents.lumalabs.ai. */
957
1033
  luma?: string;
1034
+ /** Fish Audio API. Defaults to https://api.fish.audio. */
1035
+ fish?: string;
958
1036
  }
959
1037
  interface ModelKitConfig {
960
1038
  keys: {
@@ -1055,7 +1133,7 @@ declare function isListed(row: CatalogModel): boolean;
1055
1133
  */
1056
1134
  declare const MODELS: CatalogModel[];
1057
1135
 
1058
- declare const ADAPTER_IDS: readonly ["ai-sdk-text", "google-image", "openai-image", "google-genai", "ark", "fal", "replicate", "prodia", "higgsfield", "xai-video", "luma"];
1136
+ declare const ADAPTER_IDS: readonly ["ai-sdk-text", "google-image", "openai-image", "google-genai", "ark", "fal", "replicate", "prodia", "higgsfield", "xai-video", "luma", "fish"];
1059
1137
  declare const SurfaceSchema: z.ZodEnum<{
1060
1138
  cowork: "cowork";
1061
1139
  space_builder: "space_builder";
@@ -1090,6 +1168,8 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
1090
1168
  dubbing: "dubbing";
1091
1169
  lipsync: "lipsync";
1092
1170
  transcription: "transcription";
1171
+ "voice-clone": "voice-clone";
1172
+ "voice-design": "voice-design";
1093
1173
  model3d: "model3d";
1094
1174
  }>;
1095
1175
  adapter: z.ZodEnum<{
@@ -1104,6 +1184,7 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
1104
1184
  higgsfield: "higgsfield";
1105
1185
  "xai-video": "xai-video";
1106
1186
  luma: "luma";
1187
+ fish: "fish";
1107
1188
  }>;
1108
1189
  providerModelId: z.ZodString;
1109
1190
  lifecycle: z.ZodEnum<{
@@ -1237,6 +1318,10 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
1237
1318
  description: z.ZodOptional<z.ZodString>;
1238
1319
  previewUrl: z.ZodOptional<z.ZodURL>;
1239
1320
  }, z.core.$loose>>>;
1321
+ voiceDesign: z.ZodOptional<z.ZodObject<{
1322
+ maxCandidates: z.ZodNumber;
1323
+ previewMaxChars: z.ZodNumber;
1324
+ }, z.core.$strip>>;
1240
1325
  languages: z.ZodOptional<z.ZodArray<z.ZodObject<{
1241
1326
  code: z.ZodString;
1242
1327
  name: z.ZodString;
@@ -1541,6 +1626,7 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
1541
1626
  }, z.core.$loose>>;
1542
1627
  capabilities: z.ZodOptional<z.ZodObject<{
1543
1628
  acceptsSourceVideo: z.ZodOptional<z.ZodBoolean>;
1629
+ customVoices: z.ZodOptional<z.ZodBoolean>;
1544
1630
  videoEdit: z.ZodOptional<z.ZodBoolean>;
1545
1631
  framesExcludeReferences: z.ZodOptional<z.ZodBoolean>;
1546
1632
  sourceVideoExcludesFrames: z.ZodOptional<z.ZodBoolean>;
@@ -1664,6 +1750,9 @@ interface Adapter {
1664
1750
  lipsync?(req: LipsyncRequest, ctx: AdapterContext): Promise<VideoJob>;
1665
1751
  dub?(req: DubbingRequest, ctx: AdapterContext): Promise<DubbingOutcome>;
1666
1752
  transcribe?(req: TranscriptionRequest, ctx: AdapterContext): Promise<TranscriptionResult>;
1753
+ createVoice?(req: VoiceCloneRequest, ctx: AdapterContext): Promise<VoiceCloneResult>;
1754
+ designVoice?(req: VoiceDesignRequest, ctx: AdapterContext): Promise<VoiceDesignResult>;
1755
+ deleteVoice?(req: VoiceDeleteRequest, ctx: AdapterContext): Promise<void>;
1667
1756
  /** Video tools run as provider jobs the caller tracks; see ModelKit.submitVideoTool. */
1668
1757
  submitVideoTool?(req: VideoToolRequest, ctx: AdapterContext, opts: {
1669
1758
  webhookUrl?: string;
@@ -1789,6 +1878,11 @@ declare function resolveDubbingOptions(model: CatalogModel, request: DubbingRequ
1789
1878
  /** `transcribe` on a `transcription` row. */
1790
1879
  declare function resolveTranscriptionOptions(model: CatalogModel, request: TranscriptionRequest, onUnsupported?: OnUnsupported): ResolveResult<TranscriptionRequest>;
1791
1880
 
1881
+ /** `createVoice` on a `voice-clone` row. */
1882
+ declare function resolveVoiceCloneOptions(model: CatalogModel, request: VoiceCloneRequest): ResolveResult<VoiceCloneRequest>;
1883
+ /** `designVoice` on a `voice-design` row; a count over the row cap is clamped when coercing. */
1884
+ declare function resolveVoiceDesignOptions(model: CatalogModel, request: VoiceDesignRequest, onUnsupported?: OnUnsupported): ResolveResult<VoiceDesignRequest>;
1885
+
1792
1886
  /** Which key names an adapter needs. All of them must be set on a tier for that tier to win. */
1793
1887
  declare const ADAPTER_KEYS: Record<AdapterId, ProviderKeyName[]>;
1794
1888
  /** The required names the given non-pro tier is missing. */
@@ -1847,6 +1941,16 @@ interface AudioNodeMethods {
1847
1941
  transcribe(req: TranscriptionRequest, call?: CallContext): Promise<TranscriptionResult>;
1848
1942
  /** Dubs a video or an audio file into `targetLanguage`; the result is the same kind. */
1849
1943
  dub(req: DubbingRequest, call?: MediaJobCallContext): Promise<DubbingResult>;
1944
+ /**
1945
+ * Clones a private voice from recordings on a `voice-clone` row. The voice lives in the
1946
+ * provider account of the call's key set (`tier`); speak with it through
1947
+ * `generateSpeech({ customVoice })` on the same tier.
1948
+ */
1949
+ createVoice(req: VoiceCloneRequest, call?: CallContext): Promise<VoiceCloneResult>;
1950
+ /** Candidate voices from a description on a `voice-design` row; keep one with `createVoice`. */
1951
+ designVoice(req: VoiceDesignRequest, call?: CallContext): Promise<VoiceDesignResult>;
1952
+ /** Deletes a voice `createVoice` made, on the same row and tier. A voice this key set does not have is `provider_rejected` (404). */
1953
+ deleteVoice(req: VoiceDeleteRequest, call?: CallContext): Promise<void>;
1850
1954
  }
1851
1955
 
1852
1956
  /**
@@ -1992,6 +2096,8 @@ declare const arkAdapter: Adapter;
1992
2096
 
1993
2097
  declare const falAdapter: Adapter;
1994
2098
 
2099
+ declare const fishAdapter: Adapter;
2100
+
1995
2101
  declare const googleGenaiAdapter: Adapter;
1996
2102
 
1997
2103
  declare const googleImageAdapter: Adapter;
@@ -2151,4 +2257,4 @@ declare function describeThrown(cause: unknown): ThrownErrorInfo;
2151
2257
  /** Add the AI SDK `GeneratedFile` accessors to adapter image bytes. base64 is computed on first read. */
2152
2258
  declare function toGeneratedImage(image: ImageBytes): GeneratedImage;
2153
2259
 
2154
- 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, MODEL3D_IMAGE_SLOTS, MODEL3D_MODELS, MODELS, type MaskBox, type MaskPoint, type MediaJobCallContext, type MediaNodeDefaults, type MediaOutput, type MediaPart, type MediaRef, type Model3dCall, type Model3dConstraints, type Model3dEndpoints, type Model3dFamily, type Model3dInputRefusal, type Model3dPricedInputs, type Model3dPricedOptions, type Model3dRequest, type Model3dResult, type Model3dStatus, type Model3dSubmission, type Model3dTexture, type Model3dViews, type Model3dWired, 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, lumaAdapter, lumaReframeTooTall, mergeTextProviderOptions, missingTierKeys, model3dCall, model3dConstraints, model3dInputRefusal, model3dPricingSku, model3dResolution, model3dSeedFits, model3dSkus, model3dTexture, 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, takesTargetAspectRatio, textUsageEvent, toGeneratedImage, validateInputSpec, videoLengthViolation, videoToolConstraints, withRetry, xaiVideoAdapter };
2260
+ 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, MODEL3D_IMAGE_SLOTS, MODEL3D_MODELS, MODELS, type MaskBox, type MaskPoint, type MediaJobCallContext, type MediaNodeDefaults, type MediaOutput, type MediaPart, type MediaRef, type Model3dCall, type Model3dConstraints, type Model3dEndpoints, type Model3dFamily, type Model3dInputRefusal, type Model3dPricedInputs, type Model3dPricedOptions, type Model3dRequest, type Model3dResult, type Model3dStatus, type Model3dSubmission, type Model3dTexture, type Model3dViews, type Model3dWired, 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 VoiceCandidate, type VoiceChangeRequest, type VoiceCloneRequest, type VoiceCloneResult, type VoiceCloneState, type VoiceDeleteRequest, type VoiceDesignRequest, type VoiceDesignResult, type VoiceGender, type VoiceOption, type VoiceSample, type Warning, adapterServesType, aiSdkTextAdapter, arkAdapter, aspectRatioToSize, classifyHttpError, compareCatalogOrder, createDefaultModelKit, createModelKit, dataOnlyCapable, describe, describeThrown, generateImage as experimental_generateImage, falAdapter, falWebhookBodySchema, fileCatalogCache, fishAdapter, generateAudio, generateImage, generateObject, generateText, generateVideo, googleGenaiAdapter, googleImageAdapter, hasAwsCredentials, higgsfieldAdapter, isArrayInputSpecKey, isInputSpecKey, isListed, isListedOn, isModelKitError, keysFromEnv, languageModel, liveCatalog, liveState, lumaAdapter, lumaReframeTooTall, mergeTextProviderOptions, missingTierKeys, model3dCall, model3dConstraints, model3dInputRefusal, model3dPricingSku, model3dResolution, model3dSeedFits, model3dSkus, model3dTexture, nearestAspectRatio, normalizeExposure, openaiImageAdapter, passthroughTextModel, planVideoTool, pollUntil, prepareMediaPart, primeCatalog, prodiaAdapter, readErrorBody, replicateAdapter, resetLiveCatalog, resolutionTier, resolveAudioOptions, resolveDubbingOptions, resolveImageOptions, resolveKeys, resolveLipsyncOptions, resolveSpeechOptions, resolveTranscriptionOptions, resolveVideoOptions, resolveVoiceChangeOptions, resolveVoiceCloneOptions, resolveVoiceDesignOptions, shouldRetry, sleep, sortCatalogRows, streamObject, streamText, takesTargetAspectRatio, textUsageEvent, toGeneratedImage, validateInputSpec, videoLengthViolation, videoToolConstraints, withRetry, xaiVideoAdapter };