@shop-os/modelkit 0.14.0 → 0.15.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/CHANGELOG.md +9 -0
- package/dist/catalog.cjs +34 -1
- package/dist/catalog.cjs.map +1 -1
- package/dist/catalog.d.cts +31 -1
- package/dist/catalog.d.ts +31 -1
- package/dist/catalog.js +34 -1
- package/dist/catalog.js.map +1 -1
- package/dist/index.cjs +35 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +31 -1
- package/dist/index.d.ts +31 -1
- package/dist/index.js +34 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/catalog.d.cts
CHANGED
|
@@ -598,6 +598,11 @@ type SupportedOption = "seed" | "quality" | "negativePrompt" | "cfgScale" | "gen
|
|
|
598
598
|
| "insertWindow"
|
|
599
599
|
/** Mask rows: `ImageRequest.points` and `ImageRequest.boxes`. */
|
|
600
600
|
| "points" | "boxes";
|
|
601
|
+
/** Smallest frame a provider takes for an input video, in pixels (fal: "Min width: 700px"). */
|
|
602
|
+
interface VideoPixelLimits {
|
|
603
|
+
minWidth?: number;
|
|
604
|
+
minHeight?: number;
|
|
605
|
+
}
|
|
601
606
|
interface VideoSecondsLimits {
|
|
602
607
|
/** Minimum length of each reference video, in seconds. */
|
|
603
608
|
min?: number;
|
|
@@ -619,6 +624,8 @@ interface ReferenceLimits {
|
|
|
619
624
|
audioOnly?: boolean;
|
|
620
625
|
/** Per-video length caps (min/max each) and combined total for reference videos. */
|
|
621
626
|
videoSeconds?: VideoSecondsLimits;
|
|
627
|
+
/** Smallest frame each reference video may have (Kling 4.0: 700 px). Kits before 0.15.0 ignore it. */
|
|
628
|
+
videoPixels?: VideoPixelLimits;
|
|
622
629
|
/** Per-clip length caps (min/max each) and combined total for reference audio, in seconds. */
|
|
623
630
|
audioSeconds?: {
|
|
624
631
|
min?: number;
|
|
@@ -748,6 +755,8 @@ interface ModelConstraints {
|
|
|
748
755
|
languages?: LanguageOption[];
|
|
749
756
|
/** Audio-output rows whose provider lets the caller pick a file format; `defaults.outputFormat` is one. */
|
|
750
757
|
outputFormats?: string[];
|
|
758
|
+
/** Smallest frame the source video may have (Kling 4.0 Edit: 700 px). Kits before 0.15.0 ignore it. */
|
|
759
|
+
sourceVideoPixels?: VideoPixelLimits;
|
|
751
760
|
/** Length limits for the source video the row edits or extends. */
|
|
752
761
|
sourceVideoSeconds?: Omit<VideoSecondsLimits, "total"> & {
|
|
753
762
|
/** The provider sends the source as a reference video, so it counts toward `references.videoSeconds.total` (Seedance). */
|
|
@@ -1224,6 +1233,10 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
|
|
|
1224
1233
|
total: z.ZodOptional<z.ZodNumber>;
|
|
1225
1234
|
editMin: z.ZodOptional<z.ZodNumber>;
|
|
1226
1235
|
}, z.core.$loose>>;
|
|
1236
|
+
videoPixels: z.ZodOptional<z.ZodObject<{
|
|
1237
|
+
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
1238
|
+
minHeight: z.ZodOptional<z.ZodNumber>;
|
|
1239
|
+
}, z.core.$loose>>;
|
|
1227
1240
|
audioSeconds: z.ZodOptional<z.ZodObject<{
|
|
1228
1241
|
min: z.ZodOptional<z.ZodNumber>;
|
|
1229
1242
|
max: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1301,6 +1314,10 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
|
|
|
1301
1314
|
name: z.ZodString;
|
|
1302
1315
|
}, z.core.$loose>>>;
|
|
1303
1316
|
outputFormats: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1317
|
+
sourceVideoPixels: z.ZodOptional<z.ZodObject<{
|
|
1318
|
+
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
1319
|
+
minHeight: z.ZodOptional<z.ZodNumber>;
|
|
1320
|
+
}, z.core.$loose>>;
|
|
1304
1321
|
sourceVideoSeconds: z.ZodOptional<z.ZodObject<{
|
|
1305
1322
|
max: z.ZodOptional<z.ZodNumber>;
|
|
1306
1323
|
min: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1773,6 +1790,19 @@ declare function videoLengthViolation(model: CatalogModel, input: {
|
|
|
1773
1790
|
sourceVideo?: number;
|
|
1774
1791
|
taskType?: VideoRequest["taskType"];
|
|
1775
1792
|
}): string | undefined;
|
|
1793
|
+
type MeasuredFrame = {
|
|
1794
|
+
width?: number;
|
|
1795
|
+
height?: number;
|
|
1796
|
+
} | undefined;
|
|
1797
|
+
/**
|
|
1798
|
+
* First frame-size violation for the videos a request sends, as a user-facing message, from
|
|
1799
|
+
* their measured pixel sizes (`references.videoPixels`, `sourceVideoPixels`). An unmeasured
|
|
1800
|
+
* video passes: the provider still has the last word.
|
|
1801
|
+
*/
|
|
1802
|
+
declare function videoSizeViolation(model: CatalogModel, input: {
|
|
1803
|
+
referenceVideos?: MeasuredFrame[];
|
|
1804
|
+
sourceVideo?: MeasuredFrame;
|
|
1805
|
+
}): string | undefined;
|
|
1776
1806
|
declare function resolveImageOptions(model: CatalogModel, request: ImageRequest, onUnsupported?: OnUnsupported): ResolveResult<ImageRequest>;
|
|
1777
1807
|
declare function resolveVideoOptions(model: CatalogModel, request: VideoRequest, onUnsupported?: OnUnsupported): ResolveResult<VideoRequest>;
|
|
1778
1808
|
declare function resolveAudioOptions(model: CatalogModel, request: AudioRequest, onUnsupported?: OnUnsupported): ResolveResult<AudioRequest>;
|
|
@@ -1938,4 +1968,4 @@ declare function promptConventions(row: {
|
|
|
1938
1968
|
constraints: unknown;
|
|
1939
1969
|
}): PromptConventions;
|
|
1940
1970
|
|
|
1941
|
-
export { ADAPTER_IDS, AUDIO_OUTPUTS, type AdapterEndpoints, type AdapterId, type AspectRatio, type AudioOutput, type AudioRequest, type AudioResult, type CallContext, Catalog, type CatalogAuth, type CatalogCache, type CatalogCapabilities, type CatalogDisplay, type CatalogEnvelope, type CatalogModel, CatalogModelSchema, CatalogModelSchemaBase, type CatalogOrigin, CatalogSchema, type CatalogSource, type DubbingRequest, type DubbingResult, type Exposure, ExposureSchema, type GeneratedImage, IMAGE_MODELS, type ImageBytes, type ImageCallOptions, type ImageCallResult, type ImageQuality, type ImageRequest, type ImageResult, type ImageSafetySetting, type ImageSize, type JsonObject, type JsonPrimitive, type JsonValue, type KeyTier, type LanguageOption, type Lifecycle, type LipsyncRequest, type LipsyncResult, type LiveCatalogState, MEDIA_METHODS, MEDIA_NODE_MODELS, MODEL3D_IMAGE_SLOTS, MODEL3D_MODELS, MODELS, type MaskBox, type MaskPoint, type MediaMethod, type MediaNodeDefaults, type MediaOutput, type MediaPart, type MediaRef, 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 ModelKitConfig, ModelKitError, type ModelKitErrorCode, type ModelKitErrorInit, type ModelType, OTHER_MODELS, type OnUnsupported, type OutputFormat, type PricingKind, type PrimeCatalogResult, type PromptConventions, type ProviderErrorBody, type ProviderKeyName, type ProviderKeys, type ProviderOptionValue, type ProviderOptions, type QuarantineResult, REFERENCE_SYNTAXES, type ReferenceLimits, type ReferenceSyntax, type RequiredInput, type RequiredKeyName, type ResolveCall, type ResolveResult, type ResolvedCall, type Routing, SURFACES, type SpeechRequest, type SubtitleOptions, type SubtitleTextStyle, type SupportedOption, type Surface, SurfaceSchema, TEXT_MODELS, type TranscriptWord, type TranscriptionRequest, type TranscriptionResult, type UpscaleOptions, type UsageEvent, type UsageModality, type UsageUnit, VIDEO_MODELS, 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, billedAudio, compareCatalogOrder, hasAwsCredentials, isListed, isListedOn, isModelKitError, liveCatalog, liveState, lumaReframeTooTall, model3dConstraints, model3dInputRefusal, model3dPricingSku, model3dResolution, model3dSeedFits, model3dSkus, model3dTexture, nearestAspectRatio, normalizeExposure, outputAudio, planVideoTool, primeCatalog, promptConventions, resetLiveCatalog, resolutionTier, resolveAudioOptions, resolveDubbingOptions, resolveImageOptions, resolveLipsyncOptions, resolveOptions, resolveSpeechOptions, resolveTranscriptionOptions, resolveVideoOptions, resolveVoiceChangeOptions, resolveVoiceCloneOptions, resolveVoiceDesignOptions, sortCatalogRows, takesTargetAspectRatio, videoLengthViolation, videoToolConstraints };
|
|
1971
|
+
export { ADAPTER_IDS, AUDIO_OUTPUTS, type AdapterEndpoints, type AdapterId, type AspectRatio, type AudioOutput, type AudioRequest, type AudioResult, type CallContext, Catalog, type CatalogAuth, type CatalogCache, type CatalogCapabilities, type CatalogDisplay, type CatalogEnvelope, type CatalogModel, CatalogModelSchema, CatalogModelSchemaBase, type CatalogOrigin, CatalogSchema, type CatalogSource, type DubbingRequest, type DubbingResult, type Exposure, ExposureSchema, type GeneratedImage, IMAGE_MODELS, type ImageBytes, type ImageCallOptions, type ImageCallResult, type ImageQuality, type ImageRequest, type ImageResult, type ImageSafetySetting, type ImageSize, type JsonObject, type JsonPrimitive, type JsonValue, type KeyTier, type LanguageOption, type Lifecycle, type LipsyncRequest, type LipsyncResult, type LiveCatalogState, MEDIA_METHODS, MEDIA_NODE_MODELS, MODEL3D_IMAGE_SLOTS, MODEL3D_MODELS, MODELS, type MaskBox, type MaskPoint, type MediaMethod, type MediaNodeDefaults, type MediaOutput, type MediaPart, type MediaRef, 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 ModelKitConfig, ModelKitError, type ModelKitErrorCode, type ModelKitErrorInit, type ModelType, OTHER_MODELS, type OnUnsupported, type OutputFormat, type PricingKind, type PrimeCatalogResult, type PromptConventions, type ProviderErrorBody, type ProviderKeyName, type ProviderKeys, type ProviderOptionValue, type ProviderOptions, type QuarantineResult, REFERENCE_SYNTAXES, type ReferenceLimits, type ReferenceSyntax, type RequiredInput, type RequiredKeyName, type ResolveCall, type ResolveResult, type ResolvedCall, type Routing, SURFACES, type SpeechRequest, type SubtitleOptions, type SubtitleTextStyle, type SupportedOption, type Surface, SurfaceSchema, TEXT_MODELS, type TranscriptWord, type TranscriptionRequest, type TranscriptionResult, type UpscaleOptions, type UsageEvent, type UsageModality, type UsageUnit, VIDEO_MODELS, 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, billedAudio, compareCatalogOrder, hasAwsCredentials, isListed, isListedOn, isModelKitError, liveCatalog, liveState, lumaReframeTooTall, model3dConstraints, model3dInputRefusal, model3dPricingSku, model3dResolution, model3dSeedFits, model3dSkus, model3dTexture, nearestAspectRatio, normalizeExposure, outputAudio, planVideoTool, primeCatalog, promptConventions, resetLiveCatalog, resolutionTier, resolveAudioOptions, resolveDubbingOptions, resolveImageOptions, resolveLipsyncOptions, resolveOptions, resolveSpeechOptions, resolveTranscriptionOptions, resolveVideoOptions, resolveVoiceChangeOptions, resolveVoiceCloneOptions, resolveVoiceDesignOptions, sortCatalogRows, takesTargetAspectRatio, videoLengthViolation, videoSizeViolation, videoToolConstraints };
|
package/dist/catalog.d.ts
CHANGED
|
@@ -598,6 +598,11 @@ type SupportedOption = "seed" | "quality" | "negativePrompt" | "cfgScale" | "gen
|
|
|
598
598
|
| "insertWindow"
|
|
599
599
|
/** Mask rows: `ImageRequest.points` and `ImageRequest.boxes`. */
|
|
600
600
|
| "points" | "boxes";
|
|
601
|
+
/** Smallest frame a provider takes for an input video, in pixels (fal: "Min width: 700px"). */
|
|
602
|
+
interface VideoPixelLimits {
|
|
603
|
+
minWidth?: number;
|
|
604
|
+
minHeight?: number;
|
|
605
|
+
}
|
|
601
606
|
interface VideoSecondsLimits {
|
|
602
607
|
/** Minimum length of each reference video, in seconds. */
|
|
603
608
|
min?: number;
|
|
@@ -619,6 +624,8 @@ interface ReferenceLimits {
|
|
|
619
624
|
audioOnly?: boolean;
|
|
620
625
|
/** Per-video length caps (min/max each) and combined total for reference videos. */
|
|
621
626
|
videoSeconds?: VideoSecondsLimits;
|
|
627
|
+
/** Smallest frame each reference video may have (Kling 4.0: 700 px). Kits before 0.15.0 ignore it. */
|
|
628
|
+
videoPixels?: VideoPixelLimits;
|
|
622
629
|
/** Per-clip length caps (min/max each) and combined total for reference audio, in seconds. */
|
|
623
630
|
audioSeconds?: {
|
|
624
631
|
min?: number;
|
|
@@ -748,6 +755,8 @@ interface ModelConstraints {
|
|
|
748
755
|
languages?: LanguageOption[];
|
|
749
756
|
/** Audio-output rows whose provider lets the caller pick a file format; `defaults.outputFormat` is one. */
|
|
750
757
|
outputFormats?: string[];
|
|
758
|
+
/** Smallest frame the source video may have (Kling 4.0 Edit: 700 px). Kits before 0.15.0 ignore it. */
|
|
759
|
+
sourceVideoPixels?: VideoPixelLimits;
|
|
751
760
|
/** Length limits for the source video the row edits or extends. */
|
|
752
761
|
sourceVideoSeconds?: Omit<VideoSecondsLimits, "total"> & {
|
|
753
762
|
/** The provider sends the source as a reference video, so it counts toward `references.videoSeconds.total` (Seedance). */
|
|
@@ -1224,6 +1233,10 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
|
|
|
1224
1233
|
total: z.ZodOptional<z.ZodNumber>;
|
|
1225
1234
|
editMin: z.ZodOptional<z.ZodNumber>;
|
|
1226
1235
|
}, z.core.$loose>>;
|
|
1236
|
+
videoPixels: z.ZodOptional<z.ZodObject<{
|
|
1237
|
+
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
1238
|
+
minHeight: z.ZodOptional<z.ZodNumber>;
|
|
1239
|
+
}, z.core.$loose>>;
|
|
1227
1240
|
audioSeconds: z.ZodOptional<z.ZodObject<{
|
|
1228
1241
|
min: z.ZodOptional<z.ZodNumber>;
|
|
1229
1242
|
max: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1301,6 +1314,10 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
|
|
|
1301
1314
|
name: z.ZodString;
|
|
1302
1315
|
}, z.core.$loose>>>;
|
|
1303
1316
|
outputFormats: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1317
|
+
sourceVideoPixels: z.ZodOptional<z.ZodObject<{
|
|
1318
|
+
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
1319
|
+
minHeight: z.ZodOptional<z.ZodNumber>;
|
|
1320
|
+
}, z.core.$loose>>;
|
|
1304
1321
|
sourceVideoSeconds: z.ZodOptional<z.ZodObject<{
|
|
1305
1322
|
max: z.ZodOptional<z.ZodNumber>;
|
|
1306
1323
|
min: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1773,6 +1790,19 @@ declare function videoLengthViolation(model: CatalogModel, input: {
|
|
|
1773
1790
|
sourceVideo?: number;
|
|
1774
1791
|
taskType?: VideoRequest["taskType"];
|
|
1775
1792
|
}): string | undefined;
|
|
1793
|
+
type MeasuredFrame = {
|
|
1794
|
+
width?: number;
|
|
1795
|
+
height?: number;
|
|
1796
|
+
} | undefined;
|
|
1797
|
+
/**
|
|
1798
|
+
* First frame-size violation for the videos a request sends, as a user-facing message, from
|
|
1799
|
+
* their measured pixel sizes (`references.videoPixels`, `sourceVideoPixels`). An unmeasured
|
|
1800
|
+
* video passes: the provider still has the last word.
|
|
1801
|
+
*/
|
|
1802
|
+
declare function videoSizeViolation(model: CatalogModel, input: {
|
|
1803
|
+
referenceVideos?: MeasuredFrame[];
|
|
1804
|
+
sourceVideo?: MeasuredFrame;
|
|
1805
|
+
}): string | undefined;
|
|
1776
1806
|
declare function resolveImageOptions(model: CatalogModel, request: ImageRequest, onUnsupported?: OnUnsupported): ResolveResult<ImageRequest>;
|
|
1777
1807
|
declare function resolveVideoOptions(model: CatalogModel, request: VideoRequest, onUnsupported?: OnUnsupported): ResolveResult<VideoRequest>;
|
|
1778
1808
|
declare function resolveAudioOptions(model: CatalogModel, request: AudioRequest, onUnsupported?: OnUnsupported): ResolveResult<AudioRequest>;
|
|
@@ -1938,4 +1968,4 @@ declare function promptConventions(row: {
|
|
|
1938
1968
|
constraints: unknown;
|
|
1939
1969
|
}): PromptConventions;
|
|
1940
1970
|
|
|
1941
|
-
export { ADAPTER_IDS, AUDIO_OUTPUTS, type AdapterEndpoints, type AdapterId, type AspectRatio, type AudioOutput, type AudioRequest, type AudioResult, type CallContext, Catalog, type CatalogAuth, type CatalogCache, type CatalogCapabilities, type CatalogDisplay, type CatalogEnvelope, type CatalogModel, CatalogModelSchema, CatalogModelSchemaBase, type CatalogOrigin, CatalogSchema, type CatalogSource, type DubbingRequest, type DubbingResult, type Exposure, ExposureSchema, type GeneratedImage, IMAGE_MODELS, type ImageBytes, type ImageCallOptions, type ImageCallResult, type ImageQuality, type ImageRequest, type ImageResult, type ImageSafetySetting, type ImageSize, type JsonObject, type JsonPrimitive, type JsonValue, type KeyTier, type LanguageOption, type Lifecycle, type LipsyncRequest, type LipsyncResult, type LiveCatalogState, MEDIA_METHODS, MEDIA_NODE_MODELS, MODEL3D_IMAGE_SLOTS, MODEL3D_MODELS, MODELS, type MaskBox, type MaskPoint, type MediaMethod, type MediaNodeDefaults, type MediaOutput, type MediaPart, type MediaRef, 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 ModelKitConfig, ModelKitError, type ModelKitErrorCode, type ModelKitErrorInit, type ModelType, OTHER_MODELS, type OnUnsupported, type OutputFormat, type PricingKind, type PrimeCatalogResult, type PromptConventions, type ProviderErrorBody, type ProviderKeyName, type ProviderKeys, type ProviderOptionValue, type ProviderOptions, type QuarantineResult, REFERENCE_SYNTAXES, type ReferenceLimits, type ReferenceSyntax, type RequiredInput, type RequiredKeyName, type ResolveCall, type ResolveResult, type ResolvedCall, type Routing, SURFACES, type SpeechRequest, type SubtitleOptions, type SubtitleTextStyle, type SupportedOption, type Surface, SurfaceSchema, TEXT_MODELS, type TranscriptWord, type TranscriptionRequest, type TranscriptionResult, type UpscaleOptions, type UsageEvent, type UsageModality, type UsageUnit, VIDEO_MODELS, 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, billedAudio, compareCatalogOrder, hasAwsCredentials, isListed, isListedOn, isModelKitError, liveCatalog, liveState, lumaReframeTooTall, model3dConstraints, model3dInputRefusal, model3dPricingSku, model3dResolution, model3dSeedFits, model3dSkus, model3dTexture, nearestAspectRatio, normalizeExposure, outputAudio, planVideoTool, primeCatalog, promptConventions, resetLiveCatalog, resolutionTier, resolveAudioOptions, resolveDubbingOptions, resolveImageOptions, resolveLipsyncOptions, resolveOptions, resolveSpeechOptions, resolveTranscriptionOptions, resolveVideoOptions, resolveVoiceChangeOptions, resolveVoiceCloneOptions, resolveVoiceDesignOptions, sortCatalogRows, takesTargetAspectRatio, videoLengthViolation, videoToolConstraints };
|
|
1971
|
+
export { ADAPTER_IDS, AUDIO_OUTPUTS, type AdapterEndpoints, type AdapterId, type AspectRatio, type AudioOutput, type AudioRequest, type AudioResult, type CallContext, Catalog, type CatalogAuth, type CatalogCache, type CatalogCapabilities, type CatalogDisplay, type CatalogEnvelope, type CatalogModel, CatalogModelSchema, CatalogModelSchemaBase, type CatalogOrigin, CatalogSchema, type CatalogSource, type DubbingRequest, type DubbingResult, type Exposure, ExposureSchema, type GeneratedImage, IMAGE_MODELS, type ImageBytes, type ImageCallOptions, type ImageCallResult, type ImageQuality, type ImageRequest, type ImageResult, type ImageSafetySetting, type ImageSize, type JsonObject, type JsonPrimitive, type JsonValue, type KeyTier, type LanguageOption, type Lifecycle, type LipsyncRequest, type LipsyncResult, type LiveCatalogState, MEDIA_METHODS, MEDIA_NODE_MODELS, MODEL3D_IMAGE_SLOTS, MODEL3D_MODELS, MODELS, type MaskBox, type MaskPoint, type MediaMethod, type MediaNodeDefaults, type MediaOutput, type MediaPart, type MediaRef, 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 ModelKitConfig, ModelKitError, type ModelKitErrorCode, type ModelKitErrorInit, type ModelType, OTHER_MODELS, type OnUnsupported, type OutputFormat, type PricingKind, type PrimeCatalogResult, type PromptConventions, type ProviderErrorBody, type ProviderKeyName, type ProviderKeys, type ProviderOptionValue, type ProviderOptions, type QuarantineResult, REFERENCE_SYNTAXES, type ReferenceLimits, type ReferenceSyntax, type RequiredInput, type RequiredKeyName, type ResolveCall, type ResolveResult, type ResolvedCall, type Routing, SURFACES, type SpeechRequest, type SubtitleOptions, type SubtitleTextStyle, type SupportedOption, type Surface, SurfaceSchema, TEXT_MODELS, type TranscriptWord, type TranscriptionRequest, type TranscriptionResult, type UpscaleOptions, type UsageEvent, type UsageModality, type UsageUnit, VIDEO_MODELS, 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, billedAudio, compareCatalogOrder, hasAwsCredentials, isListed, isListedOn, isModelKitError, liveCatalog, liveState, lumaReframeTooTall, model3dConstraints, model3dInputRefusal, model3dPricingSku, model3dResolution, model3dSeedFits, model3dSkus, model3dTexture, nearestAspectRatio, normalizeExposure, outputAudio, planVideoTool, primeCatalog, promptConventions, resetLiveCatalog, resolutionTier, resolveAudioOptions, resolveDubbingOptions, resolveImageOptions, resolveLipsyncOptions, resolveOptions, resolveSpeechOptions, resolveTranscriptionOptions, resolveVideoOptions, resolveVoiceChangeOptions, resolveVoiceCloneOptions, resolveVoiceDesignOptions, sortCatalogRows, takesTargetAspectRatio, videoLengthViolation, videoSizeViolation, videoToolConstraints };
|
package/dist/catalog.js
CHANGED
|
@@ -5082,6 +5082,7 @@ function klingMotionControl(tier) {
|
|
|
5082
5082
|
videos: 1,
|
|
5083
5083
|
audios: 0,
|
|
5084
5084
|
videoSeconds: { min: 3, max: 30.05 },
|
|
5085
|
+
videoPixels: { minWidth: 340, minHeight: 340 },
|
|
5085
5086
|
min: { images: 1, videos: 1 }
|
|
5086
5087
|
},
|
|
5087
5088
|
requires: ["references"],
|
|
@@ -5148,6 +5149,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5148
5149
|
references: { ...NO_REFERENCES, images: 4 },
|
|
5149
5150
|
requires: ["sourceVideo"],
|
|
5150
5151
|
sourceVideoSeconds: { min: 3, max: 15.05 },
|
|
5152
|
+
sourceVideoPixels: { minWidth: 720, minHeight: 720 },
|
|
5151
5153
|
// generateAudio keeps (true) or drops (false) the source soundtrack.
|
|
5152
5154
|
supports: ["generateAudio"],
|
|
5153
5155
|
prompt: KLING_PROMPT,
|
|
@@ -5188,7 +5190,8 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5188
5190
|
...NO_REFERENCES,
|
|
5189
5191
|
images: 10,
|
|
5190
5192
|
videos: 5,
|
|
5191
|
-
videoSeconds: { min: 3, max: 30.05, total: 30 }
|
|
5193
|
+
videoSeconds: { min: 3, max: 30.05, total: 30 },
|
|
5194
|
+
videoPixels: { minWidth: 700, minHeight: 700 }
|
|
5192
5195
|
},
|
|
5193
5196
|
supports: ["lastFrame"],
|
|
5194
5197
|
prompt: KLING_V4_PROMPT,
|
|
@@ -5222,6 +5225,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5222
5225
|
references: { ...NO_REFERENCES, images: 10 },
|
|
5223
5226
|
requires: ["sourceVideo"],
|
|
5224
5227
|
sourceVideoSeconds: { min: 3, max: 30.05 },
|
|
5228
|
+
sourceVideoPixels: { minWidth: 700, minHeight: 700 },
|
|
5225
5229
|
supports: [],
|
|
5226
5230
|
prompt: KLING_V4_PROMPT,
|
|
5227
5231
|
audio: KLING_V4_AUDIO
|
|
@@ -7772,6 +7776,10 @@ var VideoSecondsLimitsSchema = z3.looseObject({
|
|
|
7772
7776
|
total: z3.number().optional(),
|
|
7773
7777
|
editMin: z3.number().optional()
|
|
7774
7778
|
});
|
|
7779
|
+
var VideoPixelLimitsSchema = z3.looseObject({
|
|
7780
|
+
minWidth: z3.number().int().positive().optional(),
|
|
7781
|
+
minHeight: z3.number().int().positive().optional()
|
|
7782
|
+
});
|
|
7775
7783
|
var ReferenceLimitsSchema = z3.looseObject({
|
|
7776
7784
|
images: z3.number().optional(),
|
|
7777
7785
|
imagesWithVideo: z3.number().optional(),
|
|
@@ -7780,6 +7788,7 @@ var ReferenceLimitsSchema = z3.looseObject({
|
|
|
7780
7788
|
total: z3.number().optional(),
|
|
7781
7789
|
audioOnly: z3.boolean().optional(),
|
|
7782
7790
|
videoSeconds: VideoSecondsLimitsSchema.optional(),
|
|
7791
|
+
videoPixels: VideoPixelLimitsSchema.optional(),
|
|
7783
7792
|
audioSeconds: z3.looseObject({
|
|
7784
7793
|
min: z3.number().optional(),
|
|
7785
7794
|
max: z3.number().optional(),
|
|
@@ -7869,6 +7878,7 @@ var ModelConstraintsSchema = z3.looseObject({
|
|
|
7869
7878
|
}).optional(),
|
|
7870
7879
|
languages: z3.array(LanguageOptionSchema).optional(),
|
|
7871
7880
|
outputFormats: z3.array(z3.string().min(1)).min(1).optional(),
|
|
7881
|
+
sourceVideoPixels: VideoPixelLimitsSchema.optional(),
|
|
7872
7882
|
sourceVideoSeconds: VideoSecondsLimitsSchema.omit({ total: true }).extend({ inReferenceTotal: z3.boolean().optional() }).optional(),
|
|
7873
7883
|
// segmentSeconds/maxTotalSeconds stay required: a kit before 0.3.0 drops a row whose
|
|
7874
7884
|
// extension lacks them, so every extension block keeps them.
|
|
@@ -9393,6 +9403,28 @@ function videoLengthViolation(model, input) {
|
|
|
9393
9403
|
return `${model.label} takes a source video of at least ${String(sourceMin)} s; this one is ${seconds2(source, sourceMin)} s.`;
|
|
9394
9404
|
return void 0;
|
|
9395
9405
|
}
|
|
9406
|
+
function undersizedSide(frame, limits) {
|
|
9407
|
+
if (!frame || !limits) return void 0;
|
|
9408
|
+
const { width, height } = frame;
|
|
9409
|
+
if (limits.minWidth !== void 0 && width !== void 0 && width > 0 && width < limits.minWidth)
|
|
9410
|
+
return { side: "wide", min: limits.minWidth, actual: width };
|
|
9411
|
+
if (limits.minHeight !== void 0 && height !== void 0 && height > 0 && height < limits.minHeight)
|
|
9412
|
+
return { side: "tall", min: limits.minHeight, actual: height };
|
|
9413
|
+
return void 0;
|
|
9414
|
+
}
|
|
9415
|
+
function videoSizeViolation(model, input) {
|
|
9416
|
+
const refLimits = model.constraints.references?.videoPixels;
|
|
9417
|
+
const refs = input.referenceVideos ?? [];
|
|
9418
|
+
for (let i = 0; i < refs.length; i++) {
|
|
9419
|
+
const under2 = undersizedSide(refs[i], refLimits);
|
|
9420
|
+
if (under2)
|
|
9421
|
+
return `${model.label} takes reference videos at least ${String(under2.min)} px ${under2.side}; video ${i + 1} is ${String(under2.actual)} px.`;
|
|
9422
|
+
}
|
|
9423
|
+
const under = undersizedSide(input.sourceVideo, model.constraints.sourceVideoPixels);
|
|
9424
|
+
if (under)
|
|
9425
|
+
return `${model.label} takes a source video at least ${String(under.min)} px ${under.side}; this one is ${String(under.actual)} px.`;
|
|
9426
|
+
return void 0;
|
|
9427
|
+
}
|
|
9396
9428
|
function resolveImageOptions(model, request, onUnsupported = "error") {
|
|
9397
9429
|
const warnings = [];
|
|
9398
9430
|
const c = model.constraints;
|
|
@@ -10296,6 +10328,7 @@ export {
|
|
|
10296
10328
|
sortCatalogRows,
|
|
10297
10329
|
takesTargetAspectRatio,
|
|
10298
10330
|
videoLengthViolation,
|
|
10331
|
+
videoSizeViolation,
|
|
10299
10332
|
videoToolConstraints
|
|
10300
10333
|
};
|
|
10301
10334
|
//# sourceMappingURL=catalog.js.map
|