@shop-os/modelkit 0.14.0 → 0.15.1

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
@@ -601,6 +601,11 @@ type SupportedOption = "seed" | "quality" | "negativePrompt" | "cfgScale" | "gen
601
601
  | "insertWindow"
602
602
  /** Mask rows: `ImageRequest.points` and `ImageRequest.boxes`. */
603
603
  | "points" | "boxes";
604
+ /** Smallest frame a provider takes for an input video, in pixels (fal: "Min width: 700px"). */
605
+ interface VideoPixelLimits {
606
+ minWidth?: number;
607
+ minHeight?: number;
608
+ }
604
609
  interface VideoSecondsLimits {
605
610
  /** Minimum length of each reference video, in seconds. */
606
611
  min?: number;
@@ -622,6 +627,8 @@ interface ReferenceLimits {
622
627
  audioOnly?: boolean;
623
628
  /** Per-video length caps (min/max each) and combined total for reference videos. */
624
629
  videoSeconds?: VideoSecondsLimits;
630
+ /** Smallest frame each reference video may have (Kling 4.0: 700 px). Kits before 0.15.0 ignore it. */
631
+ videoPixels?: VideoPixelLimits;
625
632
  /** Per-clip length caps (min/max each) and combined total for reference audio, in seconds. */
626
633
  audioSeconds?: {
627
634
  min?: number;
@@ -751,6 +758,8 @@ interface ModelConstraints {
751
758
  languages?: LanguageOption[];
752
759
  /** Audio-output rows whose provider lets the caller pick a file format; `defaults.outputFormat` is one. */
753
760
  outputFormats?: string[];
761
+ /** Smallest frame the source video may have (Kling 4.0 Edit: 700 px). Kits before 0.15.0 ignore it. */
762
+ sourceVideoPixels?: VideoPixelLimits;
754
763
  /** Length limits for the source video the row edits or extends. */
755
764
  sourceVideoSeconds?: Omit<VideoSecondsLimits, "total"> & {
756
765
  /** The provider sends the source as a reference video, so it counts toward `references.videoSeconds.total` (Seedance). */
@@ -1253,6 +1262,10 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
1253
1262
  total: z.ZodOptional<z.ZodNumber>;
1254
1263
  editMin: z.ZodOptional<z.ZodNumber>;
1255
1264
  }, z.core.$loose>>;
1265
+ videoPixels: z.ZodOptional<z.ZodObject<{
1266
+ minWidth: z.ZodOptional<z.ZodNumber>;
1267
+ minHeight: z.ZodOptional<z.ZodNumber>;
1268
+ }, z.core.$loose>>;
1256
1269
  audioSeconds: z.ZodOptional<z.ZodObject<{
1257
1270
  min: z.ZodOptional<z.ZodNumber>;
1258
1271
  max: z.ZodOptional<z.ZodNumber>;
@@ -1330,6 +1343,10 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
1330
1343
  name: z.ZodString;
1331
1344
  }, z.core.$loose>>>;
1332
1345
  outputFormats: z.ZodOptional<z.ZodArray<z.ZodString>>;
1346
+ sourceVideoPixels: z.ZodOptional<z.ZodObject<{
1347
+ minWidth: z.ZodOptional<z.ZodNumber>;
1348
+ minHeight: z.ZodOptional<z.ZodNumber>;
1349
+ }, z.core.$loose>>;
1333
1350
  sourceVideoSeconds: z.ZodOptional<z.ZodObject<{
1334
1351
  max: z.ZodOptional<z.ZodNumber>;
1335
1352
  min: z.ZodOptional<z.ZodNumber>;
@@ -1858,6 +1875,19 @@ declare function videoLengthViolation(model: CatalogModel, input: {
1858
1875
  sourceVideo?: number;
1859
1876
  taskType?: VideoRequest["taskType"];
1860
1877
  }): string | undefined;
1878
+ type MeasuredFrame = {
1879
+ width?: number;
1880
+ height?: number;
1881
+ } | undefined;
1882
+ /**
1883
+ * First frame-size violation for the videos a request sends, as a user-facing message, from
1884
+ * their measured pixel sizes (`references.videoPixels`, `sourceVideoPixels`). An unmeasured
1885
+ * video passes: the provider still has the last word.
1886
+ */
1887
+ declare function videoSizeViolation(model: CatalogModel, input: {
1888
+ referenceVideos?: MeasuredFrame[];
1889
+ sourceVideo?: MeasuredFrame;
1890
+ }): string | undefined;
1861
1891
  declare function resolveImageOptions(model: CatalogModel, request: ImageRequest, onUnsupported?: OnUnsupported): ResolveResult<ImageRequest>;
1862
1892
  declare function resolveVideoOptions(model: CatalogModel, request: VideoRequest, onUnsupported?: OnUnsupported): ResolveResult<VideoRequest>;
1863
1893
  declare function resolveAudioOptions(model: CatalogModel, request: AudioRequest, onUnsupported?: OnUnsupported): ResolveResult<AudioRequest>;
@@ -2263,4 +2293,4 @@ declare function describeThrown(cause: unknown): ThrownErrorInfo;
2263
2293
  /** Add the AI SDK `GeneratedFile` accessors to adapter image bytes. base64 is computed on first read. */
2264
2294
  declare function toGeneratedImage(image: ImageBytes): GeneratedImage;
2265
2295
 
2266
- 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, elevenLabsAdapter, 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 };
2296
+ 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 VideoPixelLimits, 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, elevenLabsAdapter, 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, videoSizeViolation, videoToolConstraints, withRetry, xaiVideoAdapter };
package/dist/index.d.ts CHANGED
@@ -601,6 +601,11 @@ type SupportedOption = "seed" | "quality" | "negativePrompt" | "cfgScale" | "gen
601
601
  | "insertWindow"
602
602
  /** Mask rows: `ImageRequest.points` and `ImageRequest.boxes`. */
603
603
  | "points" | "boxes";
604
+ /** Smallest frame a provider takes for an input video, in pixels (fal: "Min width: 700px"). */
605
+ interface VideoPixelLimits {
606
+ minWidth?: number;
607
+ minHeight?: number;
608
+ }
604
609
  interface VideoSecondsLimits {
605
610
  /** Minimum length of each reference video, in seconds. */
606
611
  min?: number;
@@ -622,6 +627,8 @@ interface ReferenceLimits {
622
627
  audioOnly?: boolean;
623
628
  /** Per-video length caps (min/max each) and combined total for reference videos. */
624
629
  videoSeconds?: VideoSecondsLimits;
630
+ /** Smallest frame each reference video may have (Kling 4.0: 700 px). Kits before 0.15.0 ignore it. */
631
+ videoPixels?: VideoPixelLimits;
625
632
  /** Per-clip length caps (min/max each) and combined total for reference audio, in seconds. */
626
633
  audioSeconds?: {
627
634
  min?: number;
@@ -751,6 +758,8 @@ interface ModelConstraints {
751
758
  languages?: LanguageOption[];
752
759
  /** Audio-output rows whose provider lets the caller pick a file format; `defaults.outputFormat` is one. */
753
760
  outputFormats?: string[];
761
+ /** Smallest frame the source video may have (Kling 4.0 Edit: 700 px). Kits before 0.15.0 ignore it. */
762
+ sourceVideoPixels?: VideoPixelLimits;
754
763
  /** Length limits for the source video the row edits or extends. */
755
764
  sourceVideoSeconds?: Omit<VideoSecondsLimits, "total"> & {
756
765
  /** The provider sends the source as a reference video, so it counts toward `references.videoSeconds.total` (Seedance). */
@@ -1253,6 +1262,10 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
1253
1262
  total: z.ZodOptional<z.ZodNumber>;
1254
1263
  editMin: z.ZodOptional<z.ZodNumber>;
1255
1264
  }, z.core.$loose>>;
1265
+ videoPixels: z.ZodOptional<z.ZodObject<{
1266
+ minWidth: z.ZodOptional<z.ZodNumber>;
1267
+ minHeight: z.ZodOptional<z.ZodNumber>;
1268
+ }, z.core.$loose>>;
1256
1269
  audioSeconds: z.ZodOptional<z.ZodObject<{
1257
1270
  min: z.ZodOptional<z.ZodNumber>;
1258
1271
  max: z.ZodOptional<z.ZodNumber>;
@@ -1330,6 +1343,10 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
1330
1343
  name: z.ZodString;
1331
1344
  }, z.core.$loose>>>;
1332
1345
  outputFormats: z.ZodOptional<z.ZodArray<z.ZodString>>;
1346
+ sourceVideoPixels: z.ZodOptional<z.ZodObject<{
1347
+ minWidth: z.ZodOptional<z.ZodNumber>;
1348
+ minHeight: z.ZodOptional<z.ZodNumber>;
1349
+ }, z.core.$loose>>;
1333
1350
  sourceVideoSeconds: z.ZodOptional<z.ZodObject<{
1334
1351
  max: z.ZodOptional<z.ZodNumber>;
1335
1352
  min: z.ZodOptional<z.ZodNumber>;
@@ -1858,6 +1875,19 @@ declare function videoLengthViolation(model: CatalogModel, input: {
1858
1875
  sourceVideo?: number;
1859
1876
  taskType?: VideoRequest["taskType"];
1860
1877
  }): string | undefined;
1878
+ type MeasuredFrame = {
1879
+ width?: number;
1880
+ height?: number;
1881
+ } | undefined;
1882
+ /**
1883
+ * First frame-size violation for the videos a request sends, as a user-facing message, from
1884
+ * their measured pixel sizes (`references.videoPixels`, `sourceVideoPixels`). An unmeasured
1885
+ * video passes: the provider still has the last word.
1886
+ */
1887
+ declare function videoSizeViolation(model: CatalogModel, input: {
1888
+ referenceVideos?: MeasuredFrame[];
1889
+ sourceVideo?: MeasuredFrame;
1890
+ }): string | undefined;
1861
1891
  declare function resolveImageOptions(model: CatalogModel, request: ImageRequest, onUnsupported?: OnUnsupported): ResolveResult<ImageRequest>;
1862
1892
  declare function resolveVideoOptions(model: CatalogModel, request: VideoRequest, onUnsupported?: OnUnsupported): ResolveResult<VideoRequest>;
1863
1893
  declare function resolveAudioOptions(model: CatalogModel, request: AudioRequest, onUnsupported?: OnUnsupported): ResolveResult<AudioRequest>;
@@ -2263,4 +2293,4 @@ declare function describeThrown(cause: unknown): ThrownErrorInfo;
2263
2293
  /** Add the AI SDK `GeneratedFile` accessors to adapter image bytes. base64 is computed on first read. */
2264
2294
  declare function toGeneratedImage(image: ImageBytes): GeneratedImage;
2265
2295
 
2266
- 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, elevenLabsAdapter, 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 };
2296
+ 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 VideoPixelLimits, 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, elevenLabsAdapter, 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, videoSizeViolation, videoToolConstraints, withRetry, xaiVideoAdapter };
package/dist/index.js CHANGED
@@ -561,7 +561,7 @@ var IMAGE_MODELS = [
561
561
  // Cowork "auto" lets OpenAI pick the size; the canonical equivalent is adaptive.
562
562
  id: "gpt-image-2",
563
563
  aliases: [],
564
- label: "GPT-image-2",
564
+ label: "GPT Image 2",
565
565
  type: "image",
566
566
  adapter: "openai-image",
567
567
  providerModelId: "gpt-image-2",
@@ -748,7 +748,7 @@ var IMAGE_MODELS = [
748
748
  display: {
749
749
  provider: "bytedance",
750
750
  logo: "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/3bba5d81-4e57-4e71-911b-cdfa05acca2c_compressed.png",
751
- description: "ByteDance Seedream 5.0 Pro text-to-image and multi-reference image-to-image (up to 10 inputs) with region editing; outputs 1K, 1.5K, or 2K."
751
+ description: "ByteDance Seedream 5.0 Pro text-to-image and multi-reference image-to-image (up to 10 inputs) with region editing; outputs 1K or 2K."
752
752
  }
753
753
  },
754
754
  {
@@ -791,7 +791,7 @@ var IMAGE_MODELS = [
791
791
  {
792
792
  id: "flux-2-pro",
793
793
  aliases: [],
794
- label: "Flux 2 Pro",
794
+ label: "FLUX 2 Pro",
795
795
  type: "image",
796
796
  adapter: "prodia",
797
797
  providerModelId: "flux-2-pro",
@@ -812,7 +812,7 @@ var IMAGE_MODELS = [
812
812
  display: {
813
813
  provider: "black-forest-labs",
814
814
  logo: "https://cdn.jsdelivr.net/npm/@lobehub/icons-static-png@1.97.0/light/flux.png",
815
- description: "Black Forest Labs FLUX.2 [pro] text-to-image and multi-reference editing model served via Prodia; takes a prompt and up to 8 input images and outputs up to 4096x4096."
815
+ description: "Black Forest Labs FLUX.2 [pro] text-to-image and multi-reference editing model; takes a prompt and up to 8 input images and outputs 1K images."
816
816
  }
817
817
  },
818
818
  {
@@ -872,7 +872,7 @@ var IMAGE_MODELS = [
872
872
  // https://replicate.com/wan-video/wan-2.7-image-pro (input schema)
873
873
  id: "wan-2.7-image-pro",
874
874
  aliases: [],
875
- label: "WAN 2.7 Image Pro",
875
+ label: "Wan 2.7 Image Pro",
876
876
  type: "image",
877
877
  adapter: "replicate",
878
878
  providerModelId: "wan-video/wan-2.7-image-pro",
@@ -1196,7 +1196,7 @@ var SAM_3_IMAGE = {
1196
1196
  display: {
1197
1197
  provider: "meta",
1198
1198
  logo: META_LOGO,
1199
- description: "Meta SAM 3 on fal; finds every object a prompt names in one image and returns a black-and-white mask for each."
1199
+ description: "Meta SAM 3; finds every object a prompt names in one image and returns a black-and-white mask for each."
1200
1200
  }
1201
1201
  };
1202
1202
  var VEED_SUBTITLES = {
@@ -2038,7 +2038,7 @@ var FISH_MODELS = [
2038
2038
  "fish-s2.1-pro-free",
2039
2039
  "Fish Audio S2.1 Pro Free",
2040
2040
  "s2.1-pro-free",
2041
- "Fish Audio S2.1 Pro on the free developer tier: the same voices at no cost, without latency or data-processing guarantees."
2041
+ "Fish Audio S2.1 Pro text to speech, with the same voices as S2.1 Pro."
2042
2042
  ),
2043
2043
  fishTts(
2044
2044
  "fish-drama-3",
@@ -3776,7 +3776,7 @@ var MEDIA_NODE_MODELS = [
3776
3776
  formats: false,
3777
3777
  // fal's schema states no limit; ElevenLabs documents 10,000 characters per request.
3778
3778
  maxChars: 1e4,
3779
- description: "ElevenLabs Multilingual v2 text to speech in 29 languages; the voice the canvas TTS node has always used."
3779
+ description: "ElevenLabs Multilingual v2 text to speech in 29 languages."
3780
3780
  }),
3781
3781
  geminiTts(
3782
3782
  "gemini-3.8-flash-tts",
@@ -3872,7 +3872,7 @@ var MEDIA_NODE_MODELS = [
3872
3872
  "Sync Lipsync 2",
3873
3873
  "fal-ai/sync-lipsync/v2",
3874
3874
  "lipsync-2",
3875
- "Sync Lipsync 2 re-times the mouth in a video to new speech; the canvas Lipsync node's original model."
3875
+ "Sync Lipsync 2 re-times the mouth in a video to new speech."
3876
3876
  ),
3877
3877
  syncLipsync(
3878
3878
  "lipsync-2-pro",
@@ -3910,7 +3910,7 @@ var MEDIA_NODE_MODELS = [
3910
3910
  display: {
3911
3911
  provider: "veed",
3912
3912
  logo: "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/d540d2bb-0022-4371-8889-48aefaf46bbe.png",
3913
- description: "VEED Lipsync v2 re-times the mouth in a video to a new audio track; billed per second of output."
3913
+ description: "VEED Lipsync v2 re-times the mouth in a video to a new audio track."
3914
3914
  },
3915
3915
  capabilities: { acceptsSourceVideo: true }
3916
3916
  },
@@ -4255,7 +4255,7 @@ var OTHER_MODELS = [
4255
4255
  pricingKind: "flat",
4256
4256
  display: {
4257
4257
  provider: "mmaudio",
4258
- description: "MMAudio V2 video-to-audio model on Replicate; takes a source video and prompt and synthesizes synchronized environmental, action, and speech-like audio."
4258
+ description: "MMAudio V2 video-to-audio model; takes a source video and a prompt and synthesizes synchronized environmental, action, and speech-like audio."
4259
4259
  },
4260
4260
  capabilities: {}
4261
4261
  },
@@ -4465,7 +4465,7 @@ var OTHER_MODELS = [
4465
4465
  display: {
4466
4466
  provider: "topaz",
4467
4467
  logo: "https://cdn.jsdelivr.net/npm/@lobehub/icons-static-png@1.97.0/light/topazlabs.png",
4468
- description: "Topaz Labs AI image upscaling on Replicate; takes one input image and upscales up to 6x with selectable enhancement models and optional face enhancement."
4468
+ description: "Topaz Labs AI image upscaling; takes one input image and upscales up to 6x with selectable enhancement models and optional face enhancement."
4469
4469
  }
4470
4470
  },
4471
4471
  {
@@ -4491,7 +4491,7 @@ var OTHER_MODELS = [
4491
4491
  display: {
4492
4492
  provider: "bytedance",
4493
4493
  logo: "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/3bba5d81-4e57-4e71-911b-cdfa05acca2c_compressed.png",
4494
- description: "ByteDance SeedVR2 one-step image upscaling and restoration on fal; takes one input image and upscales it 2x or 4x with sharp, faithful detail."
4494
+ description: "ByteDance SeedVR2 one-step image upscaling and restoration; takes one input image and upscales it 2x or 4x with sharp, faithful detail."
4495
4495
  }
4496
4496
  },
4497
4497
  {
@@ -4515,7 +4515,7 @@ var OTHER_MODELS = [
4515
4515
  pricingKind: "flat",
4516
4516
  display: {
4517
4517
  provider: "prodia",
4518
- description: "Prodia background removal; takes one input image and returns a PNG cut-out of the subject plus an optional black-and-white mask."
4518
+ description: "Background removal; takes one input image and returns a PNG cut-out of the subject plus an optional black-and-white mask."
4519
4519
  }
4520
4520
  }
4521
4521
  ];
@@ -5093,6 +5093,7 @@ function klingMotionControl(tier) {
5093
5093
  videos: 1,
5094
5094
  audios: 0,
5095
5095
  videoSeconds: { min: 3, max: 30.05 },
5096
+ videoPixels: { minWidth: 340, minHeight: 340 },
5096
5097
  min: { images: 1, videos: 1 }
5097
5098
  },
5098
5099
  requires: ["references"],
@@ -5159,6 +5160,7 @@ var VIDEO_FAMILY_MODELS = [
5159
5160
  references: { ...NO_REFERENCES, images: 4 },
5160
5161
  requires: ["sourceVideo"],
5161
5162
  sourceVideoSeconds: { min: 3, max: 15.05 },
5163
+ sourceVideoPixels: { minWidth: 720, minHeight: 720 },
5162
5164
  // generateAudio keeps (true) or drops (false) the source soundtrack.
5163
5165
  supports: ["generateAudio"],
5164
5166
  prompt: KLING_PROMPT,
@@ -5199,7 +5201,8 @@ var VIDEO_FAMILY_MODELS = [
5199
5201
  ...NO_REFERENCES,
5200
5202
  images: 10,
5201
5203
  videos: 5,
5202
- videoSeconds: { min: 3, max: 30.05, total: 30 }
5204
+ videoSeconds: { min: 3, max: 30.05, total: 30 },
5205
+ videoPixels: { minWidth: 700, minHeight: 700 }
5203
5206
  },
5204
5207
  supports: ["lastFrame"],
5205
5208
  prompt: KLING_V4_PROMPT,
@@ -5211,7 +5214,7 @@ var VIDEO_FAMILY_MODELS = [
5211
5214
  display: {
5212
5215
  provider: "kuaishou",
5213
5216
  logo: KLING_LOGO,
5214
- description: "Kuaishou Kling 4.0: text-to-video, start/end frames, or reference-to-video from up to 10 images and 5 videos (30 seconds combined), 3-30 seconds at 720p or 1080p. Prompts name references @Image1, @Video1."
5217
+ description: "Kuaishou Kling 4.0: text-to-video, start/end frames, or reference-to-video from up to 10 images and 5 videos (30 seconds combined), up to 30 seconds at 720p or 1080p. Prompts name references @Image1, @Video1."
5215
5218
  },
5216
5219
  capabilities: { lastFrameRequiresFirstFrame: true }
5217
5220
  },
@@ -5233,6 +5236,7 @@ var VIDEO_FAMILY_MODELS = [
5233
5236
  references: { ...NO_REFERENCES, images: 10 },
5234
5237
  requires: ["sourceVideo"],
5235
5238
  sourceVideoSeconds: { min: 3, max: 30.05 },
5239
+ sourceVideoPixels: { minWidth: 700, minHeight: 700 },
5236
5240
  supports: [],
5237
5241
  prompt: KLING_V4_PROMPT,
5238
5242
  audio: KLING_V4_AUDIO
@@ -5555,7 +5559,7 @@ var VIDEO_FAMILY_MODELS = [
5555
5559
  display: {
5556
5560
  provider: "xai",
5557
5561
  logo: XAI_LOGO,
5558
- description: "xAI Grok Imagine 1.5: text- and image-to-video at native 1080p with lip-synced audio, or up to 14 reference images and pinned first and last frames at 720p, 1-15 seconds."
5562
+ description: "xAI Grok Imagine 1.5: text- and image-to-video at native 1080p with lip-synced audio, or up to 14 reference images and pinned first and last frames at 720p, up to 15 seconds."
5559
5563
  },
5560
5564
  capabilities: {}
5561
5565
  }
@@ -5912,7 +5916,7 @@ var VIDEO_MODELS = [
5912
5916
  pricingKind: "video_per_second",
5913
5917
  display: {
5914
5918
  provider: "bytedance",
5915
- description: "High-quality AI video generation with reference image conditioning. Supports 4-15 second clips with human preprocessing.",
5919
+ description: "High-quality ByteDance video generation guided by reference images, for clips up to 15 seconds.",
5916
5920
  logo: BYTEDANCE_LOGO2
5917
5921
  },
5918
5922
  capabilities: { acceptsSourceVideo: true, videoEdit: false, ...FRAMES_EXCLUDE_REFERENCES }
@@ -6036,7 +6040,7 @@ var VIDEO_MODELS = [
6036
6040
  pricingKind: "video_per_second",
6037
6041
  display: {
6038
6042
  provider: "xai",
6039
- description: "xAI's reference-to-video model. Generates short clips conditioned on up to 5 reference images with flexible aspect ratios.",
6043
+ description: "xAI's reference-to-video model. Generates short clips conditioned on up to 7 reference images with flexible aspect ratios.",
6040
6044
  logo: "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/858b7fcc-9bd5-411d-aea1-a7b35ecfffab_compressed.png"
6041
6045
  },
6042
6046
  capabilities: { ...FRAMES_EXCLUDE_REFERENCES }
@@ -6120,7 +6124,7 @@ var VIDEO_MODELS = [
6120
6124
  exposure: ["cowork", "space_builder"],
6121
6125
  constraints: {
6122
6126
  aspectRatios: [...KLING_OMNI_RATIOS],
6123
- resolutions: ["720p", "1080p", "4k"],
6127
+ resolutions: ["720p", "1080p"],
6124
6128
  durations: { min: 3, max: 15 },
6125
6129
  references: { images: 7, videos: 0, audios: 0 },
6126
6130
  supports: ["generateAudio", "lastFrame"],
@@ -6133,7 +6137,7 @@ var VIDEO_MODELS = [
6133
6137
  display: {
6134
6138
  provider: "kuaishou",
6135
6139
  logo: "https://cdn.jsdelivr.net/npm/@lobehub/icons-static-png@1.97.0/light/kling-color.png",
6136
- description: "Kuaishou Kling Video 3.0 Omni generation from text, start/end images and up to 7 reference images, with optional native audio; up to 15 seconds at up to 4K."
6140
+ description: "Kuaishou Kling Video 3.0 Omni generation from text, start/end images and up to 7 reference images, with optional native audio; up to 15 seconds at up to 1080p."
6137
6141
  }
6138
6142
  // No lastFrameRequiresFirstFrame: fal image-to-video needs a start frame, so the adapter
6139
6143
  // sends a lone end frame as the start frame, as the Replicate model took it.
@@ -6168,7 +6172,7 @@ var VIDEO_MODELS = [
6168
6172
  display: {
6169
6173
  provider: "minimax",
6170
6174
  logo: "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/f4c2e906-28b7-4a4a-b491-df8fef7808ed.png",
6171
- description: "MiniMax H3 multimodal video model for text-to-video, image-to-video (first/last frame), and reference-to-video with native audio, up to 2K."
6175
+ description: "MiniMax H3 multimodal video model for text-to-video, image-to-video (first/last frame), and reference-to-video with native audio, up to 4K."
6172
6176
  },
6173
6177
  capabilities: { ...FRAMES_EXCLUDE_REFERENCES }
6174
6178
  },
@@ -6288,7 +6292,7 @@ var VIDEO_MODELS = [
6288
6292
  display: {
6289
6293
  provider: "minimax",
6290
6294
  logo: "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/f4c2e906-28b7-4a4a-b491-df8fef7808ed.png",
6291
- description: "MiniMax H3 Max reference-to-video on fal; conditions on reference images, videos, and audio. MiniMax's own docs do not list a reference mode for H3 Max."
6295
+ description: "MiniMax H3 Max reference-to-video; conditions on reference images, videos, and audio."
6292
6296
  },
6293
6297
  // fal's reference-to-video endpoint never reads a frame; the resolver must drop the
6294
6298
  // references instead of the adapter silently dropping the frame.
@@ -6332,7 +6336,7 @@ var VIDEO_MODELS = [
6332
6336
  pricingKind: "video_per_second",
6333
6337
  display: {
6334
6338
  provider: "alibaba",
6335
- description: "Alibaba Wan 3 video model for text-to-video, image-to-video (start/end frame), and reference-to-video from up to 10 images, 5 videos and 5 audio clips, with native audio; 2-30 seconds at up to 1080p."
6339
+ description: "Alibaba Wan 3 video model for text-to-video, image-to-video (start/end frame), and reference-to-video from up to 10 images, 5 videos and 5 audio clips, with native audio; up to 30 seconds at up to 1080p."
6336
6340
  },
6337
6341
  capabilities: { ...FRAMES_EXCLUDE_REFERENCES, lastFrameRequiresFirstFrame: true }
6338
6342
  },
@@ -6374,7 +6378,7 @@ var VIDEO_MODELS = [
6374
6378
  pricingKind: "video_per_second",
6375
6379
  display: {
6376
6380
  provider: "alibaba",
6377
- description: "Alibaba Wan 3 Prime, the faster-generating tier of Wan 3, for text-to-video, image-to-video (start/end frame), and reference-to-video from up to 10 images, 5 videos and 5 audio clips, with native audio; 2-30 seconds at up to 1080p."
6381
+ description: "Alibaba Wan 3 Prime, the faster-generating tier of Wan 3, for text-to-video, image-to-video (start/end frame), and reference-to-video from up to 10 images, 5 videos and 5 audio clips, with native audio; up to 30 seconds at up to 1080p."
6378
6382
  },
6379
6383
  capabilities: { ...FRAMES_EXCLUDE_REFERENCES, lastFrameRequiresFirstFrame: true }
6380
6384
  },
@@ -7777,6 +7781,10 @@ var VideoSecondsLimitsSchema = z3.looseObject({
7777
7781
  total: z3.number().optional(),
7778
7782
  editMin: z3.number().optional()
7779
7783
  });
7784
+ var VideoPixelLimitsSchema = z3.looseObject({
7785
+ minWidth: z3.number().int().positive().optional(),
7786
+ minHeight: z3.number().int().positive().optional()
7787
+ });
7780
7788
  var ReferenceLimitsSchema = z3.looseObject({
7781
7789
  images: z3.number().optional(),
7782
7790
  imagesWithVideo: z3.number().optional(),
@@ -7785,6 +7793,7 @@ var ReferenceLimitsSchema = z3.looseObject({
7785
7793
  total: z3.number().optional(),
7786
7794
  audioOnly: z3.boolean().optional(),
7787
7795
  videoSeconds: VideoSecondsLimitsSchema.optional(),
7796
+ videoPixels: VideoPixelLimitsSchema.optional(),
7788
7797
  audioSeconds: z3.looseObject({
7789
7798
  min: z3.number().optional(),
7790
7799
  max: z3.number().optional(),
@@ -7874,6 +7883,7 @@ var ModelConstraintsSchema = z3.looseObject({
7874
7883
  }).optional(),
7875
7884
  languages: z3.array(LanguageOptionSchema).optional(),
7876
7885
  outputFormats: z3.array(z3.string().min(1)).min(1).optional(),
7886
+ sourceVideoPixels: VideoPixelLimitsSchema.optional(),
7877
7887
  sourceVideoSeconds: VideoSecondsLimitsSchema.omit({ total: true }).extend({ inReferenceTotal: z3.boolean().optional() }).optional(),
7878
7888
  // segmentSeconds/maxTotalSeconds stay required: a kit before 0.3.0 drops a row whose
7879
7889
  // extension lacks them, so every extension block keeps them.
@@ -17616,6 +17626,28 @@ function videoLengthViolation(model, input) {
17616
17626
  return `${model.label} takes a source video of at least ${String(sourceMin)} s; this one is ${seconds2(source2, sourceMin)} s.`;
17617
17627
  return void 0;
17618
17628
  }
17629
+ function undersizedSide(frame, limits) {
17630
+ if (!frame || !limits) return void 0;
17631
+ const { width, height } = frame;
17632
+ if (limits.minWidth !== void 0 && width !== void 0 && width > 0 && width < limits.minWidth)
17633
+ return { side: "wide", min: limits.minWidth, actual: width };
17634
+ if (limits.minHeight !== void 0 && height !== void 0 && height > 0 && height < limits.minHeight)
17635
+ return { side: "tall", min: limits.minHeight, actual: height };
17636
+ return void 0;
17637
+ }
17638
+ function videoSizeViolation(model, input) {
17639
+ const refLimits = model.constraints.references?.videoPixels;
17640
+ const refs = input.referenceVideos ?? [];
17641
+ for (let i = 0; i < refs.length; i++) {
17642
+ const under2 = undersizedSide(refs[i], refLimits);
17643
+ if (under2)
17644
+ return `${model.label} takes reference videos at least ${String(under2.min)} px ${under2.side}; video ${i + 1} is ${String(under2.actual)} px.`;
17645
+ }
17646
+ const under = undersizedSide(input.sourceVideo, model.constraints.sourceVideoPixels);
17647
+ if (under)
17648
+ return `${model.label} takes a source video at least ${String(under.min)} px ${under.side}; this one is ${String(under.actual)} px.`;
17649
+ return void 0;
17650
+ }
17619
17651
  function resolveImageOptions(model, request, onUnsupported = "error") {
17620
17652
  const warnings = [];
17621
17653
  const c = model.constraints;
@@ -19735,6 +19767,7 @@ export {
19735
19767
  toGeneratedImage,
19736
19768
  validateInputSpec,
19737
19769
  videoLengthViolation,
19770
+ videoSizeViolation,
19738
19771
  videoToolConstraints,
19739
19772
  withRetry,
19740
19773
  xaiVideoAdapter